Merge pull request #191 from Arvedui/load_better_critical_default

Better default for critical load limit
This commit is contained in:
enkore 2015-04-03 15:24:02 +02:00
commit 83c04fd245

View File

@ -1,4 +1,8 @@
from i3pystatus import IntervalModule
try:
from os import cpu_count
except ImportError:
from multiprocessing import cpu_count
class Load(IntervalModule):
@ -11,13 +15,13 @@ class Load(IntervalModule):
("format",
"format string used for output. {avg1}, {avg5} and {avg15} are the load average of the last one, five and fifteen minutes, respectively. {tasks} is the number of tasks (i.e. 1/285, which indiciates that one out of 285 total tasks is runnable)."),
("color", "The text color"),
("critical_limit", "Limit above which the load is considered critical"),
("critical_limit", "Limit above which the load is considered critical, defaults to amount of cores."),
("critical_color", "The critical color"),
)
file = "/proc/loadavg"
color = "#ffffff"
critical_limit = 1
critical_limit = cpu_count()
critical_color = "#ff0000"
def run(self):