Pulling - or clawing - data out of mode 6

Hal Murray hmurray at megapathdsl.net
Sat Dec 2 02:44:37 UTC 2017

> 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 

ntpd has an uptime timer.  You can get it via ntpq -c sysstats
I don't know if you can get it without all the other stuff.

The counters in sysstats are since reset (second line).  They get reset when 
written out if sysstats logging is enabled.  That's every hour.

These are my opinions.  I hate spam.

More information about the devel mailing list