summaryrefslogtreecommitdiff
path: root/cpuload.pl
diff options
context:
space:
mode:
Diffstat (limited to 'cpuload.pl')
-rwxr-xr-xcpuload.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpuload.pl b/cpuload.pl
index ca4c955..bc93a8d 100755
--- a/cpuload.pl
+++ b/cpuload.pl
@@ -65,7 +65,7 @@ sub parse_cpu_line ($) {
sub get_stat ($) {
my $host = shift;
- my $bash = "for i in \$(seq $CONF{samples}); do cat /proc/stat; sleep 0.1; done";
+ my $bash = "if [ -e /proc/stat ]; then proc=/proc/stat; else proc=/usr/compat/linux/proc/stat; fi; for i in \$(seq $CONF{samples}); do cat \$proc; sleep 0.1; done";
my $cmd = $host eq 'localhost' ? $bash : "ssh $CONF{sshopts} $host '$bash'";
my $sigusr1 = 0;