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.
Your help is appreciated.
Thanks in advance.
--Hemant Soundankar
On Fri, Mar 26, 2010 at 8:01 PM, Robert Story <[email protected]> wrote:
> On Fri, 26 Mar 2010 18:34:58 +0530 Hemant wrote:
> HS> I am using container_load function in data_access.c file to implement
> the
> HS> dynamism.
> HS> I need to know how i can execute container_load function every time i
> issue
> HS> the snmptable command in the terminal.
>
> There is no way to know when you are issuing a snmptable command, as the
> agent
> simply sees a series of get-next requests.
>
> HS> Right now what i have to do is , restart my subagent ... Please suggest
> me
> HS> how i can implement the dynamism without restarting my subagent.
>
> Take a look at the ifTable implementation in agent/mibgroups/if-table/*. It
> uses the cache helper to periodically reload the cache (every 20 seconds or
> so). If you have some sort of external trigger you can check (like if some
> file has been touched), you can use the cache helper for that too.
>
--
Hemant Soundankar
------------------------------------------------------------------------------
Download Intel® 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