diff options
| author | pbuetow (lap824) <puppet@mx.buetow.org> | 2012-01-21 16:01:08 +0100 |
|---|---|---|
| committer | pbuetow (lap824) <puppet@mx.buetow.org> | 2012-01-21 16:01:08 +0100 |
| commit | 3e5d0d2dd497fd39d6b8b6ada967ab3bbfe4b73d (patch) | |
| tree | 50e8651f179225157ff6e5a4e8dfbec8d5f8e8bf | |
| parent | ff8b6f60955751ab76eec84320f5b267069debd9 (diff) | |
Not all kernels have steal cpu
| -rwxr-xr-x | loadbars | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -96,6 +96,9 @@ sub parse_cpu_line ($) { my ($name, %load); ($name, @load{qw(user nice system idle iowait irq softirq steal)}) = split ' ', $line; + + $load{steal} = 0 unless defined $load{steal}; + $load{TOTAL} = sum @load{qw(user nice system idle iowait irq softirq steal)}; return ($name, \%load); |
