add SSH="ssh hostname " ./ifstat.pl to run remotly
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 11 Dec 2016 18:03:58 +0000 (19:03 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 11 Dec 2016 18:03:58 +0000 (19:03 +0100)
ifstat.pl

index 8ea8534..3f322b7 100755 (executable)
--- a/ifstat.pl
+++ b/ifstat.pl
@@ -22,7 +22,7 @@ sub update_time {
 # FIXME add -A to pull interfaces if they go up and down
 # -l loopback
 # -a all
 # FIXME add -A to pull interfaces if they go up and down
 # -l loopback
 # -a all
-my $cmd = qq{ifstat -s '$community@#$host' -a -l -b -n -t 1};
+my $cmd = qq{$ENV{SSH}ifstat -s '$community@#$host' -a -l -b -n -t 1};
 warn "# $cmd\n";
 open(my $ifstat, '-|', $cmd);
 
 warn "# $cmd\n";
 open(my $ifstat, '-|', $cmd);