summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpbuetow (lap824) <puppet@mx.buetow.org>2012-01-21 16:01:08 +0100
committerpbuetow (lap824) <puppet@mx.buetow.org>2012-01-21 16:01:08 +0100
commit3e5d0d2dd497fd39d6b8b6ada967ab3bbfe4b73d (patch)
tree50e8651f179225157ff6e5a4e8dfbec8d5f8e8bf
parentff8b6f60955751ab76eec84320f5b267069debd9 (diff)
Not all kernels have steal cpu
-rwxr-xr-xloadbars3
1 files changed, 3 insertions, 0 deletions
diff --git a/loadbars b/loadbars
index 323faac..59e1d7c 100755
--- a/loadbars
+++ b/loadbars
@@ -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);