Commit ff80a1a4 authored by Tristan Cavelier's avatar Tristan Cavelier

check_computer_memory: use memory[used] everywhere

parent a30e7974
...@@ -63,7 +63,7 @@ def main(): ...@@ -63,7 +63,7 @@ def main():
if memory is 0: if memory is 0:
return 0 return 0
if memory['free'] > threshold: if memory['used'] <= threshold:
print "OK - memory used: {:d}% ({}B of {}B)".format(memory["used"] * 100 / memory["total"], memory["used"], memory["total"]) print "OK - memory used: {:d}% ({}B of {}B)".format(memory["used"] * 100 / memory["total"], memory["used"], memory["total"])
return 0 return 0
print "Low memory - usage: {:d}% ({}B of {}B)".format(memory["used"] * 100 / memory["total"], memory["used"], memory["total"]) print "Low memory - usage: {:d}% ({}B of {}B)".format(memory["used"] * 100 / memory["total"], memory["used"], memory["total"])
......
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