diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2007-09-16 20:17:49 +0200 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2007-09-16 20:17:49 +0200 |
commit | 823350a44e048d358bb7545eca95d2c43b447105 (patch) | |
tree | 003c3ef329240fd1780ac1e1c175af4d18934903 /lib | |
parent | cc8921fdf54244edad3895514a3c9c80ca2f563f (diff) | |
download | smokeping-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')
-rw-r--r-- | lib/Smokeping.pm | 9 |
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; |