Pulling - or clawing - data out of mode 6

Ian Bruene ianbruene at gmail.com
Mon Nov 20 15:41:16 UTC 2017

I'm trying to fill out the MIB for ntpsnmpd and have several items that 
I do not know how to get data for. This also effects ntpq as so far my 
primary method of discovering what to poke mode 6 with to get what I 
need has been to see how ntpq does it. A side effect of ntpsnmpd will 
probably be to expand ntpq's capabilities, or even mode 6's.

Time Resolution (as distinct from time *precision*, which I can get from 
the "precision" variable).

Time distance: From the MIB: "The distance from this NTP entity to the 
root time reference (stratum 0) source". The closest thing I can find 
that sounds like match is the synchd() method in packet.py/SyncPacket. 
It is only used by ntpdig.

Current mode: There is a "peermode" variable, but I don't think it is 
giving the information that the MIB wants. "hostmode" or "hmode" do not 

Active reference source ID: pretty sure this means which one is the 
syspeer. I can get the address with "peeradr", but not the associd. This 
could be brute forced by getting all of the peers and finding the right 

Uptime: well there is an uptime variable. But I do not know the format 
(it *looks* like seconds since start), and the MIB wants a very specific 
and unusual format.

Date of next leap second: from what I can gather from the 2-bit leap 
second code this is predicted a day in advance?

Next leap second direction: so long as the 2-bit code is a usable source 
this is a simple one.

Heartbeat interval.

/"In the end; what separates a Man, from a Slave? Money? Power? No. A 
Man Chooses, a Slave Obeys."/ -- Andrew Ryan

/"Utopia cannot precede the Utopian. It will exist the moment we are fit 
to occupy it."/ -- Sophia Lamb

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20171120/7e4516f9/attachment.html>

More information about the devel mailing list