close descriptors
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
09dea79ab2
commit
c772ed8ce3
|
@ -5,6 +5,7 @@ class LoadAverage < Worker
|
|||
while true do
|
||||
file = File.open("/proc/loadavg", "r")
|
||||
la_m = file.gets.split[0]
|
||||
file.close
|
||||
|
||||
if la_m.to_i > @my_config['crit_value']
|
||||
fg_colour = @my_config['crit_colour']
|
||||
|
|
|
@ -21,6 +21,8 @@ class Network < Worker
|
|||
|
||||
net_ok = o.each_line.count
|
||||
|
||||
i.close; o.close
|
||||
|
||||
if net_ok == hosts.count
|
||||
status = "ok"
|
||||
fg_colour = @my_config['ok_colour']
|
||||
|
|
Loading…
Reference in New Issue
Block a user