mem: fix typo warn_percentage

This commit is contained in:
enkore 2014-01-23 15:08:58 +01:00
parent d2529c6f31
commit e682d974b7

View File

@ -21,7 +21,7 @@ class Mem(IntervalModule):
color = "#00FF00" color = "#00FF00"
warn_color = "#FFFF00" warn_color = "#FFFF00"
alert_color = "#FF0000" alert_color = "#FF0000"
warn_percantage = 50 warn_percentage = 50
alert_percentage = 80 alert_percentage = 80
_round = 2 _round = 2
@ -29,15 +29,14 @@ class Mem(IntervalModule):
("format", "format string used for output."), ("format", "format string used for output."),
("divisor", ("divisor",
"divide all byte values by this value, default 1024**2(mebibytes"), "divide all byte values by this value, default 1024**2(mebibytes"),
("warn_percantage", "minimal percantage for warn state"), ("warn_percentage", "minimal percentage for warn state"),
("alert_percentage", "minimal percantage for alert state"), ("alert_percentage", "minimal percentage for alert state"),
("color", "standard color"), ("color", "standard color"),
("warn_color", ("warn_color",
"defines the color used wann warn percentage ist exceeded"), "defines the color used wann warn percentage ist exceeded"),
("alert_color", ("alert_color",
"defines the color used when alert percentage is exceeded"), "defines the color used when alert percentage is exceeded"),
("round", "round byte values to given length behind dot") ("round", "round byte values to given length behind dot")
) )
def run(self): def run(self):
@ -47,9 +46,8 @@ class Mem(IntervalModule):
if memory_usage.percent >= self.alert_percentage: if memory_usage.percent >= self.alert_percentage:
color = self.alert_color color = self.alert_color
elif memory_usage.percent >= self.warn_percantage: elif memory_usage.percent >= self.warn_percentage:
color = self.warn_color color = self.warn_color
else: else:
color = self.color color = self.color