On 4 August 2010 03:47, Alexander King <new...@foxmail.com> wrote:
> Now,I want to know how to get the newest data use net-snmp snmpd daemon
> routine.That is to say,Is there a way when I use "snmpwalk" command browse
> the uit data tree I get the updated or newest or latest data each time?

I will repeat my suggestion from yesterday.
Use one of the mib2c templates generated with '-S cache=1'
That will produce code that uses a local cache, with a 'load'
routine, which will be called when the cache is "too old".

If you set the timeout for the cache to be 0, then the data will
be reloaded for every single new SNMP request.

But note that this is every *request* - not every command.
A single 'snmpwalk' command will trigger a whole sequence of
GETNEXT requests, each of which will re-load the cache.
That's why I think you might be better off with a cache timeout
of a few seconds.

   But experiment - altering the timeout is a trivial change
(and can even be done on the fly).   No code changes are needed.
Get something working using the cache first, and then worry
about tuning the cache frequency.

Dave

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to