On 26 March 2010 15:38, Hemant Soundankar <[email protected]> wrote:
> Is there any other implementation where i can still use container_load and
> implement some logic in where if i issue any snmp command it should run the
> subagent code again.
> What my understanding is that the net-snmp master agent is implementing some
> cache. Whenever i issue some snmp command, the results for the MIB objects
> are stored in the cache . So the next consecutive results for snmp commands
> are returned from the cache instead of calling my logic ie calling
> container_load function.

The simplest approach would be to set the cache timeout to 0.
That would mean that every SNMP request would trigger a re-loading
of the cache - i.e. calling your 'container_load' routine.

But note that this does mean *every* SNMP request.
So if you issued an "snmpwalk" command, the container would
be reloaded before every single entry in the table.   If the table
is fairly small, and reloading it is reasonably efficient, this might
not be a problem.   But if it's a large table, or complex to populate,
then this could introduce a noticeable overhead.

You might find it works better to use a low (but non-zero) cache timeout.
Something like 1s might prove a reasonable balance between timeliness
of data and the load on the system.

Dave

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to