[Nagiosplug-devel] [ nagiosplug-Bugs-1205309 ] check_ntp gives error when only one unsync'd candidate

SourceForge.net noreply at sourceforge.net
Thu May 19 14:48:31 CEST 2005


Bugs item #1205309, was opened at 2005-05-19 14:44
Message generated for change (Comment added) made by kraby
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1205309&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: None
Group: None
>Status: Closed
>Resolution: Duplicate
Priority: 5
Submitted By: Kenny Raby (kraby)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_ntp gives error when only one unsync'd candidate

Initial Comment:
check_ntp (nagios-plugins 1.4) 1.20

If there is only one candidate and the server is not
syncronized to it you get the following error:

Use of uninitialized value in concatenation (.) or
string at ./check_ntp line 346.
NTP UNKNOWN: Jitter  too high

check_ntp -v shows (ip addresses masked):

server x.x.x.x, stratum 2, offset -0.000264, delay 0.05827
ntperr = 0 
18 May 16:23:19 ntpdate[24669]: adjust time server
x.x.x.x offset -0.000264 sec
ntperr = 0 
     remote           refid      st t when poll reach 
 delay   offset  jitter
==============================================================================
#y.y.y.y   .GPS.            1 u 1088 1024  236   33.020
   0.149 1000.06
Candiate count= 1
Use of uninitialized value in concatenation (.) or
string at ./check_ntp line 346.
NTP UNKNOWN: Jitter  too high

After testing it looks like this line might be
responsible for problems with just one candidate:

  300             if ($#candidates >0) {

I changed it to:

            if ($#candidates >=0) {

And now verbose output becomes:

server x.x.x.x, stratum 2, offset -0.000354, delay 0.05830
ntperr = 0 
18 May 16:33:01 ntpdate[13054]: adjust time server
x.x.x.x offset -0.000354 sec
ntperr = 0 
     remote           refid      st t when poll reach 
 delay   offset  jitter
==============================================================================
#y.y.y.y   .GPS.            1 u 1670 1024  236   33.020
   0.149 1000.06
Candiate count= 1
candidate match #y.y.y.y  .GPS.            1 u 1670
1024  236   33.020    0.149 1000.06
 
NTP WARNING: Jitter 1000.06 too high

Note in particular the "candidate match" line which did
not appear before the change.












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

>Comment By: Kenny Raby (kraby)
Date: 2005-05-19 14:46

Message:
Logged In: YES 
user_id=908646

Ack!  Don't do a refresh on the summary page after
submitting a bug the previous day...  closing as duplicate

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

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




More information about the Devel mailing list