[Nagiosplug-devel] [ nagiosplug-Bugs-1468749 ] check_ntp errors when only ntpdate is available

SourceForge.net noreply at sourceforge.net
Tue Apr 11 11:30:03 CEST 2006


Bugs item #1468749, was opened at 2006-04-11 11:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1468749&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: CVS
Status: Open
Resolution: None
Priority: 5
Submitted By: Jason Martin (jhmartin)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_ntp errors when only ntpdate is available

Initial Comment:
When running check_ntp.pl when only ntpdate is 
available, the jitter value remains at zero and causes 
a divide-by-zero error:

Use of uninitialized value in division (/) 
at ./check_ntp.pl line 437 (my line #'s are different 
due to other changes).

The offending line is:
  print ("NTP $key: $answer|offset=$offset, jitter=" . 
$jitter/1000 .     ",peer_stratum=$stratum\n");

I suggest wrapping the jitter calculation in a 'if 
jitter == 0, then print 0, else print jitter/1000' 
construct.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1468749&group_id=29880




More information about the Devel mailing list