Pulling - or clawing - data out of mode 6
Mark Atwood
fallenpegasus at gmail.com
Sat Dec 2 02:30:52 UTC 2017
Does the MIB or SNMP define "cannot determine or undefined". It's been
too long since I did SNMP
The "uptime" variable is used to by snmp clients to do "count per time"
calculations, and also to notice how long after boot that that that daemon
started, or if its restarting. If you need to, insert into your subagent
code when it first runs to grab the system clock value and store it, and
then just sent back the diffence between "now" and that value whenever that
variable is queried
..m
On Mon, Nov 20, 2017 at 7:41 AM Ian Bruene via devel <devel at ntpsec.org>
wrote:
>
> 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
> exist.
>
> 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
> one....
>
> 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
> _______________________________________________
> devel mailing list
> devel at ntpsec.org
> http://lists.ntpsec.org/mailman/listinfo/devel
--
Mark Atwood
http://about.me/markatwood
+1-206-604-2198 Mobile & Signal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20171202/76dd30ea/attachment.html>
More information about the devel
mailing list