Re: sysUptime uses gettimeofday
Pushpa Thimmaiah <[email protected]>
| Newsgroups | gmane.network.net-snmp.devel |
|---|---|
| Message-ID | <CAASqVJUheqDgpqrUO53F_JCa2MFAYeNvFRy5JHS4oDT8yWtb6g@mail.gmail.com> |
Thank you Stuart Henderson. On Tue, Apr 3, 2018 at 3:51 PM, Stuart Henderson <[email protected]> wrote: > On 2018/04/03 15:25, Pushpa Thimmaiah wrote: > > Thank you Magnus Fromreide, Anders Wallin and Stuart Henderson for the > reply. > > > > Stuart Henderson, > > > > I am using net-snmp.5.7.1. Object sysUpTime uses API > netsnmp_get_agent_uptime() and they > > inturn uses gettimeofday(). > > If time on device changes after snmpd starts then sysUpTime value is > confusing. > > Scenario: > > 1. Linux device time is 'Mon Aug 28 21:01:29 UTC 2017' > > 2. start snmpd > > 3.Now sysUptime = 4 seconds > > 4. Set linux device time 'Mon Mar 26 05:53:07 UTC 2018' > > 5. sysUptime = 209 days <------ This is not correct in this scenario. > > You should update. The latest 5.7 release is 5.7.3 which is already 3 > years old; > the change to CLOCK_MONOTONIC was done in 5.7.2. > > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders