From 1fcc211ee9ad24d6e00776e6482d86c08b004b5a Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Sun, 12 Aug 2007 16:32:07 +0000 Subject: only mention fping reporting resolution if abnormal --- lib/Smokeping/probes/FPing.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/Smokeping/probes/FPing.pm') diff --git a/lib/Smokeping/probes/FPing.pm b/lib/Smokeping/probes/FPing.pm index a8035d6..32e0735 100644 --- a/lib/Smokeping/probes/FPing.pm +++ b/lib/Smokeping/probes/FPing.pm @@ -60,7 +60,7 @@ sub new($$$) my $testhost = $self->testhost; my $return = `$binary -C 1 $testhost 2>&1`; $self->{enable}{S} = (`$binary -h 2>&1` =~ /\s-S\s/); - warn "NOTE: your fping binary doesn't support source address setting (-S), I will ignore any sourceaddress configurations - see http://bugs.debian.org/198486.\n" if !$self->{enable}{S}; + warn "NOTE: your fping binary doesn't support source address setting (-S), I will ignore any sourceaddress configurations - see http://bugs.debian.org/198486.\n" if !$self->{enable}{S}; croak "ERROR: fping ('$binary -C 1 $testhost') could not be run: $return" if $return =~ m/not found/; croak "ERROR: FPing must be installed setuid root or it will not work\n" @@ -68,10 +68,12 @@ sub new($$$) if ($return =~ m/bytes, ([0-9.]+)\sms\s+.*\n.*\n.*:\s+([0-9.]+)/ and $1 > 0){ $self->{pingfactor} = 1000 * $1/$2; - print "### fping seems to report in ", $1/$2, " milliseconds\n"; + if ($1 != $2){ + warn "### fping seems to report in ", $1/$2, " milliseconds (old version?)"; + } } else { $self->{pingfactor} = 1000; # Gives us a good-guess default - print "### assuming you are using an fping copy reporting in milliseconds\n"; + warn "### assuming you are using an fping copy reporting in milliseconds\n"; } }; -- cgit v1.2.3-24-g4f1b