summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@iki.fi>2005-02-15 13:22:29 +0100
committerNiko Tyni <ntyni@iki.fi>2005-02-15 13:22:29 +0100
commit085f51e6af606a8ab27b64e49f56c1908a9cb7a8 (patch)
tree412cb64a439c83891b3a94d3af79dfd0b537e6d7 /lib
parent4e4427e69c5a4aa2b688f14f117ba342a7f7b0fc (diff)
downloadsmokeping-085f51e6af606a8ab27b64e49f56c1908a9cb7a8.tar.gz
smokeping-085f51e6af606a8ab27b64e49f56c1908a9cb7a8.tar.xz
* CHANGES updated
* FPing : added 'hostinterval' (-p), renamed 'mindelay' -> 'mininterval' (-i) * Smokeping.pm: include links to the probe manpages from smokeping_config
Diffstat (limited to 'lib')
-rw-r--r--lib/Smokeping.pm2
-rw-r--r--lib/Smokeping/probes/FPing.pm35
2 files changed, 24 insertions, 13 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 9878cff..16654f1 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -1079,7 +1079,7 @@ sub get_parser () {
for (readdir D) {
next unless s/\.pm$//;
next unless /^$PROBE_RE/;
- $probelist->{$_} = "(See the separate module documentation for details about each variable.)";
+ $probelist->{$_} = "(See the L<separate module documentation|Smokeping::probes::$_> for details about each variable.)";
}
closedir D;
diff --git a/lib/Smokeping/probes/FPing.pm b/lib/Smokeping/probes/FPing.pm
index 17f649d..5f5a9cd 100644
--- a/lib/Smokeping/probes/FPing.pm
+++ b/lib/Smokeping/probes/FPing.pm
@@ -102,15 +102,15 @@ sub ping ($){
my $errh = gensym;
# pinging nothing is pointless
return unless @{$self->addresses};
- my @bytes = () ;
- push @bytes, "-b$self->{properties}{packetsize}" if $self->{properties}{packetsize};
- my @timeout = ();
- push @timeout, "-t" . int(1000 * $self->{properties}{timeout}) if $self->{properties}{timeout};
+ my @params = () ;
+ push @params , "-b$self->{properties}{packetsize}" if $self->{properties}{packetsize};
+ push @params, "-t" . int(1000 * $self->{properties}{timeout}) if $self->{properties}{timeout};
+ push @params, "-i" . int(1000 * $self->{properties}{mininterval});
+ push @params, "-p" . int(1000 * $self->{properties}{hostinterval}) if $self->{properties}{hostinterval};
my @cmd = (
- $self->binary, @bytes,
+ $self->binary,
'-C', $self->pings, '-q','-B1','-r1',
- '-i' . $self->{properties}{mindelay},
- @timeout,
+ @params,
@{$self->addresses});
$self->do_debug("Executing @cmd");
my $pid = open3($inh,$outh,$errh, @cmd);
@@ -168,14 +168,25 @@ Initial target timeout. In the default mode, this is the amount of time tha
ping waits for a response to its first request. Successive timeouts are multiplied by the backoff factor.
DOC
},
- mindelay => {
+ hostinterval => {
_re => '(\d*\.)?\d+',
- _example => 1,
- _default => 10,
+ _example => 1.5,
+ _doc => <<DOC,
+The fping "-p" parameter, but in (possibly fractional) seconds rather than
+milliseconds, for consistency with other Smokeping probes. From fping(1):
+
+This parameter sets the time that fping waits between successive packets
+to an individual target.
+DOC
+ mininterval => {
+ _re => '(\d*\.)?\d+',
+ _example => .001,
+ _default => .01,
_doc => <<DOC,
-The fping "-i" parameter. From fping(1):
+The fping "-i" parameter, but in (probably fractional) seconds rather than
+milliseconds, for consistency with other Smokeping probes. From fping(1):
-The minimum amount of time (in milliseconds) between sending a ping packet to any target.
+The minimum amount of time between sending a ping packet to any target.
DOC
},
});