[Nagiosplug-devel] pure-c check_ntp

sean finney seanius at seanius.net
Sun Mar 19 02:48:09 CET 2006


just following up a bit more with myself here,

On Sat, Mar 18, 2006 at 02:20:11PM -0500, sean finney wrote:
> what still needs to be done to make it fully compatible with
> the current perl version:
> 
> - ntpdate sends 4 requests and averages the offsets
> - ipv6 support
> - jitter support
> - i *think* that when a hostname resolves to multiple addresses
>   ntpdate/ntpq sends a request to each one.

i've verified that ntpdate does send (4) requests to each A record
resolving from the hostname.  however, ntpq only sends to the
first resolved address it seems.

i should also add that i think it would be good to have
someone review the current offset calculation code to make
sure that it makes sense/not-buggy.  i think i've handled
the endianness related stuff appropriately, but i'm not
as confident about signedness.


> bill: of these, i could really, really use help with calculating the
> jitter as i don't really understand how it's calculated in the first

having looked a bit more into it, the jitter given by ntpq is a
literally provided as the result of a READVAR ntp control request.
that is, somewhere in the packet will be the string "jitter=xxxxx".
i'm not sure if there's a datastructure or if the entire "payload"
section of the control response is to be treated as one giant
string... i'm sure rfc1305 clarifies this.

btw, the querying that i am currently doing for offset calculation
is via standard ntp query packets, which have a different format than
the control requests.

i'd still appreciate it if someone picked up this part of the code.
i'll focus on the other parts of what i previously mentioned were
remaining in the next few days, and i guess i'll see where we
are after that.


	sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20060319/e1bd11fa/attachment.sig>


More information about the Devel mailing list