Works great! Thanks Tobi.
- Ken On 9/11/07, Tobias Oetiker <[EMAIL PROTECTED]> wrote: > Hi Ken, > > I guess we are hitting a rounding error here ... > > Index: Smokeping/RRDhelpers.pm > =================================================================== > --- Smokeping/RRDhelpers.pm (revision 820) > +++ Smokeping/RRDhelpers.pm (working copy) > @@ -52,7 +52,8 @@ > } > } > return undef unless $cnt; > - return sqrt( 1.0 / $cnt * ( $sqsum - $sum**2 / $cnt )) > + my $sqdev = 1.0 / $cnt * ( $sqsum - $sum**2 / $cnt ); > + return $sqdev < 0.0 ? 0.0 : sqrt($sqdev); > } > > > or is my stdev math worng ? > > cheers > tobi > > > Yesterday Ken Dreyer wrote: > > > When I try to view the webpage for a particular DNS target, I get the > > following error: > > > > Can't take sqrt of -4.62018e-22 at > > /usr/local/smokeping/lib/Smokeping/RRDhelpers.pm line 55. > > > > ...but the problem is intermittent. One target in particular almost > > always gives the error when I view its page. Once it occurred on all > > my DNS targets; and sometimes it doesn't happen on any of them. I'm > > using the normal dig probe: > > > > $ dig -v > > DiG 9.3.4-P1 > > > > with a fresh install of smokeping 2.2.2: > > > > /usr/local/smokeping/bin/smokeping --version > > 2.002002 > > > > Has anyone else experienced this error? > > > > - Ken > > > > > > -- > Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten > http://it.oetiker.ch [EMAIL PROTECTED] ++41 62 213 9902 > _______________________________________________ smokeping-users mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
