提交 5b1df0a8 编写于 作者: N Nicolas Hennion

Another patch for issue #273

上级 d85453fb
...@@ -100,4 +100,5 @@ list_2_description=Python programs ...@@ -100,4 +100,5 @@ list_2_description=Python programs
list_2_regex=.*python.* list_2_regex=.*python.*
list_3_description=Famous Xeyes list_3_description=Famous Xeyes
list_3_regex=.*xeyes.* list_3_regex=.*xeyes.*
list_3_countmin=0
list_3_countmax=1 list_3_countmax=1
...@@ -2149,7 +2149,7 @@ class glancesScreen: ...@@ -2149,7 +2149,7 @@ class glancesScreen:
else: else:
return 'WARNING' return 'WARNING'
else: else:
if countmin == 0: if int(countmin) == 0:
return 'OK' return 'OK'
else: else:
return 'CRITICAL' return 'CRITICAL'
...@@ -3157,6 +3157,9 @@ class glancesScreen: ...@@ -3157,6 +3157,9 @@ class glancesScreen:
sum([p['memory_percent'] for p in monitoredlist])) sum([p['memory_percent'] for p in monitoredlist]))
else: else:
cmdret = "" cmdret = ""
# cmdret = "{0} / {1} / {2}".format(len(monitoredlist),
# monitors.countmin(item),
# monitors.countmax(item))
monitormsg2 = "{0}".format(cmdret) monitormsg2 = "{0}".format(cmdret)
self.term_window.addnstr(monitor_y, self.process_x + 35, self.term_window.addnstr(monitor_y, self.process_x + 35,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册