summaryrefslogtreecommitdiffstats
path: root/lib/Smokeping.pm
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2007-09-16 20:17:49 +0200
committerTobi Oetiker <tobi@oetiker.ch>2007-09-16 20:17:49 +0200
commit823350a44e048d358bb7545eca95d2c43b447105 (patch)
tree003c3ef329240fd1780ac1e1c175af4d18934903 /lib/Smokeping.pm
parentcc8921fdf54244edad3895514a3c9c80ca2f563f (diff)
downloadsmokeping-823350a44e048d358bb7545eca95d2c43b447105.tar.gz
smokeping-823350a44e048d358bb7545eca95d2c43b447105.tar.xz
tell theuser thatsmokeping is taking 80% of the time available to complete its polling cycle -- tobi
Diffstat (limited to 'lib/Smokeping.pm')
-rw-r--r--lib/Smokeping.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 4630c65..4e2a022 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -3987,6 +3987,15 @@ KID:
do_log($warn);
}
}
+ elsif ($runtime > $step * 0.8) {
+ my $warn = "NOTE: smokeping took $runtime seconds to complete 1 round of polling. ".
+ "This is over 80% of the max time available for a polling cycle ($step seconds).\n";
+ if (defined $myprobe) {
+ $probes->{$myprobe}->do_log($warn);
+ } else {
+ do_log($warn);
+ }
+ }
last if checkhup($multiprocessmode, $gothup) && reload_cfg($cfgfile);
}
$0 =~ s/ \[$myprobe\]$// if $changeprocessnames;