Re: sysUptime uses gettimeofday
Magnus Fromreide <[email protected]>
| Newsgroups | gmane.network.net-snmp.devel |
|---|---|
| Message-ID | <20180328085248.GA23332__565.048403996293$1522228095$gmane$org@noemi.bahnhof.se> |
On Wed, Mar 28, 2018 at 12:49:48PM +0530, Pushpa Thimmaiah wrote: > Hi All, > > I believed that sysUpTime is counter that increments every seconds. But In > net-snmp code , > sysUpTime being calculated as difference between 'snmpd-starttime' and > 'current time' . > > I would like to know reason for sysUpTime been calculated as difference in > time instead of incremental-counter. > Is there any constraints ? sysUpTime is expressed in centiseconds. It is assumed that most snmp daemons ain't polled 100 times/s so doing it with increments would be inefficient as well as bad for accurancy. /MF ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot