check_ntp

Leif Nixon nixon at nsc.liu.se
Tue Jun 15 12:30:44 CEST 2004


"Paul L. Allen" <pla at softflare.com> writes:

> Yes, I know that 0 is
> leass than 60, but you would get OK for 0.1s, 0.01s, 0.001s,
> 0.0001s... 0s is special-cased.  The code assumes that an offset of 0s
> is bogus
> because it assumes that nobody is running a stratum 0 server.

I have stared at that line of code several times without understanding
it. Why would an offset of 0 be bogus? It just means that ntpd
estimates that the local clock currently is off by less than 0.0005
milliseconds (or something like that), which is not an infrequent
occurence on my systems. The estimated offset varies continuously, and
sometimes just happens to hit 0.000 ms.

I'm using a replacement plugin which simply checks the output from
"ntpq -c peers <HOST>" and returns CRITICAL on connection refused and
WARNING if ntpd isn't currently synced somewhere.

Basically, we trust ntpd to do its job. If it says it is synced we
believe it keeps the local system time from drifting. The logic here
is that if we *don't* trust ntpd, there is little point in trusting it
to report correct offset and jitter values either.

-- 
Leif Nixon                                    Systems expert
------------------------------------------------------------
National Supercomputer Centre           Linkoping University
------------------------------------------------------------


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list