[Nagiosplug-devel] check_ntp: Getting jitter on xntpd

Thomas Guyot-Sionnest dermoth at aei.ca
Wed Apr 4 04:31:43 CEST 2007


I reverse-engineered a bit the NTP protocol and found out how to get the
jitter data on xntpd (ex. Solaris).

Basically xntpd does not seems to support getting specific values (or at
least not jitter). By sending a READVAL request with no data all servers
will return all their values (in multiple packets hence the quick and
dirty my_udp_connect() in the loop).

While the "ntpq -p" command prints "rootdispersion=" as it, given the
results I get it's possible that this value has to be divided, though
it's also well possible that my Sun server it too crappy to get decent
jitters.

So I made a rough patch that allow to check the jitter on both kind of
servers. It look for "jitter=" and If not found it will look for
"rootdispersion=" (xntpd). If either is found it will extract the jitter
value just as usual.

Any comment or suggestion? Do you think it should be included as it or
should be polished a bit (ex. looping on reads, sending all packets then
polling on the sockets, or anything else...).

Thanks

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_ntp.xntpd_jitter_draft.patch
Type: text/x-patch
Size: 1628 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20070403/c0838583/attachment.bin>


More information about the Devel mailing list