<div dir="ltr"><div><div>Does the MIB or SNMP define "cannot determine or undefined".   It's been too long since I did SNMP<br><br></div>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<br><br></div>..m<br></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 20, 2017 at 7:41 AM Ian Bruene via devel <<a href="mailto:devel@ntpsec.org">devel@ntpsec.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <br>
    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.<br>
    <br>
    Time Resolution (as distinct from time *precision*, which I can get
    from the "precision" variable).<br>
    <br>
    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
    <a href="http://packet.py/SyncPacket" target="_blank">packet.py/SyncPacket</a>. It is only used by ntpdig.<br>
    <br>
    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.<br>
    <br>
    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....<br>
    <br>
    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.<br>
    <br>
    Date of next leap second: from what I can gather from the 2-bit leap
    second code this is predicted a day in advance?<br>
    <br>
    Next leap second direction: so long as the 2-bit code is a usable
    source this is a simple one.<br>
    <br>
    Heartbeat interval.<br>
    <br>
    <div class="m_-8352870139873214586moz-signature">-- <br>
      <i>"In the end; what separates a Man, from a Slave? Money? Power?
        No. A Man Chooses, a Slave Obeys."</i> -- Andrew Ryan
      <p>
        <i>"Utopia cannot precede the Utopian.
          It will exist the moment we are fit to occupy it."</i> --
        Sophia Lamb
      </p>
    </div>
  </div>

_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@ntpsec.org" target="_blank">devel@ntpsec.org</a><br>
<a href="http://lists.ntpsec.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ntpsec.org/mailman/listinfo/devel</a></blockquote></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><p dir="ltr">Mark Atwood<br>
<a href="http://about.me/markatwood">http://about.me/markatwood</a><br>
+1-206-604-2198 Mobile & Signal</p>
</div>