Commit bbd74f2f authored by litaolemo's avatar litaolemo

update

parent 7cf47de8
......@@ -86,9 +86,9 @@ def parse_cluster_stats(data):
res_str = ""
stats, timestamp, memory_used_rate, fs_free_rate = data
if memory_used_rate >= memory_used_rate_top:
res_str += "集群内存使用率超过%s 目前为%s\n" % (str(memory_used_rate_top*100)+'%',str(memory_used_rate * 100)+'%')
res_str += "集群内存使用率超过%s 目前为%s\n" % (str(round(memory_used_rate_top*100,2))+'%',str(round(memory_used_rate * 100,2))+'%')
if fs_free_rate >= fs_free_rate_top:
res_str += "集群硬盘占用超过%s 目前为%s\n" % (str(fs_free_rate_top*100)+'%',str(fs_free_rate * 100)+'%')
res_str += "集群硬盘占用超过%s 目前为%s\n" % (str(round(fs_free_rate_top*100,2))+'%',str(round(fs_free_rate * 100,2))+'%')
return res_str
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment