[smokeping-users] How to deal with non-result in pingone?

Matt Lawson matt at prolexic.com
Tue Apr 5 20:17:06 MEST 2005

When I have a custom probe that uses the baseforks class, and I create 
a pingone method, what should the pingone method do if it gets to the 
end and hasn't been able to produce a result?

In most of the examples, the results (if any) are pushed into an array 
called @times and then at the end of the function there is a:

return sort { $a <=> $b } @times;

Or something similar.

However I seem to be having a problem in the case where the times array 
is empty.  Smokeping will run through 2 'rounds' of samples (e.g. 2 
seconds elapsed each time), but the third time through will hang for a 
very long time (e.g. 100 seconds) and then give the message about 
"WARNING: A single round took 100 seconds when it should have been 

If I ensure that the @times array always has at least 1 value (even if 
it's zero) it seems to keep running the rounds in the proper amount of 
time, i.e. works as expected.

So.... what should I do with my empty @times array?

System is FreeBsd 5.2.1 and smokeping is version 1.38


Unsubscribe mailto:smokeping-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:smokeping-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/smokeping-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the smokeping-users mailing list