[Nagiosplug-devel] check_ntp: Getting jitter on xntpd
Thomas Guyot-Sionnest
dermoth at aei.ca
Wed Apr 4 05:06:27 CEST 2007
On 03/04/07 10:31 PM, Thomas Guyot-Sionnest wrote:
> 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...).
The previous patch was broken.
1: I was too confident on how to get the correct pointer.
2: I should have used " dispersion=" instead of "rootdispersion=".
This one should be good.
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_ntp.xntpd_jitter_draft.patch
Type: text/x-patch
Size: 1649 bytes
Desc: not available
URL: <http://nagios-plugins.org/archive/devel/attachments/20070403/54d018e0/attachment.bin>
More information about the Devel
mailing list