Hi -
How do you alter the timeout value on the fly?
Also, I thought -1 was the value for "load every time".
Thanks.
Kathy McLeod
Dept S82 CCB - SNMP
IBM Rochester, MN
(507) 253-4803
Dave Shield
<d.t.shi...@liver
pool.ac.uk> To
Alexander King <[email protected]>
08/04/2010 02:54 cc
AM net-snmp-users
<[email protected]
et>
Subject
Re: Re: net-snmp init_XXX() get
data periodically( or cyclic )
problem
On 4 August 2010 03:47, Alexander King <[email protected]> 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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
------------------------------------------------------------------------------
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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users