From 823350a44e048d358bb7545eca95d2c43b447105 Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Sun, 16 Sep 2007 18:17:49 +0000 Subject: tell theuser thatsmokeping is taking 80% of the time available to complete its polling cycle -- tobi --- lib/Smokeping.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') 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; -- cgit v1.2.3-24-g4f1b