Re: No updating after changing the system time

Bill Fenner <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAF4SogYLGVsiq735NwDN=tXBeRiQwmqTwxEqJqVVPUbCJ7r48A@mail.gmail.com>
On Fri, Apr 18, 2014 at 5:30 AM, slhhust <[email protected]> wrote:

> Hi all,
> We used snmpwalk to get some network interface statistics, e.g.
> ifInOctets. But, after we changed the system time from 4:00 pm to 3:00
> pm, the output seemed never updating for a long time.
> Having a glance at the source code, i set the IFTABLE_CACHE_TIMEOUT form
> 30 to 1, and changed the cache->enabled to 0,  yet it seemed neither of
> them made sense. Did i miss something?
> In addition, i think using *gettimeofday* to determine whether a timeout
> occurs is a bit problematic. Actually, the system time may be changed
> for some reasons, and the delta could be negative. If the system time
> was changed to long before, the cache would stay unflushed for long.
> We'd better to use a monotonic clock, like
> clock_gettime(CLOCK_MONOTONIC,...), right?
>

5.7.2 does.

  Bill

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.