summaryrefslogtreecommitdiff
path: root/cpuload.pl
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2010-11-07 09:58:56 +0000
committerPaul Buetow <paul@buetow.org>2010-11-07 09:58:56 +0000
commit53105fc0560319c722a080009876ccddddce1b20 (patch)
tree68f4522137f9a52ea1cfd25bde013b4bb6506b63 /cpuload.pl
parent73bb72852570b00604223bf9f3eb1cb980a44cf0 (diff)
missed $host in ssh command
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 420a3c5..73cbd4d 100755
--- a/cpuload.pl
+++ b/cpuload.pl
@@ -63,7 +63,7 @@ sub get_remote_stat ($) {
my $host = shift;
my $bash = "for i in \$(seq $CONF{samples}); do cat /proc/stat; sleep 0.1; done";
- my $cmd = $host eq 'localhost' ? $bash : "ssh $CONF{sshopts} '$bash'";
+ my $cmd = $host eq 'localhost' ? $bash : "ssh $CONF{sshopts} $host '$bash'";
loop {
my $pid = open2 my $out, my $in, $cmd or die "Error: $!\n";