| ... | ... |
@@ -8,6 +8,8 @@ module Rubysermon |
| 8 | 8 |
@cpu_count = File.readlines("/proc/stat").select { |line|
|
| 9 | 9 |
line =~ /^cpu[\d]/ |
| 10 | 10 |
}.length |
| 11 |
+ |
|
| 12 |
+ @load = 0 |
|
| 11 | 13 |
end |
| 12 | 14 |
|
| 13 | 15 |
def load_options |
| ... | ... |
@@ -15,7 +17,7 @@ module Rubysermon |
| 15 | 15 |
end |
| 16 | 16 |
|
| 17 | 17 |
def results |
| 18 |
- |
|
| 18 |
+ @load = File.read("/proc/loadavg").split(" ").first.to_s
|
|
| 19 | 19 |
end |
| 20 | 20 |
|
| 21 | 21 |
def notify? |