2009/1/21 Dave Shield <[email protected]>:
> The best way to do this would be to tie it in with the (existing)
> NET-SNMP-AGENT-MIB::nsCacheTable.    This includes a column
> object nsCacheTimeout which is intended to control exactly this
> behaviour.   This MIB is already linked in with the cache handler
> helper, so changing this value ought to affect the cache timeouts
> immediately.
>
> Now I'm not particularly familiar with the MfD-style code used to
> implement the if-mib, but I seem to remember Robert assuring me
> that this code *does* use the cache handler, so this functionality
> should be in place already.
>
> Have you tried using this table?

I wasn't aware of this nice feature, I have just tried it with snmpset
and works like a charm with if-mib. Additionally, I would need to
obtain the same behaviour for ucd-snmp regarding cpu and memory stats,
but for those cases it seems it is not so easy:

- In the case of memory (agent/mibgroup/hardware/memory/hw_mem.c), a
cache handler is used, but 'rootoid' parameter for
'netsnmp_cache_create' is NULL, maybe because this cache handler is
associated to more than one oid??

- In the case of cpu (agent/mibgroup/hardware/cpu/cpu.c), a cache
handler is not used by default, instead a periodic timer callback is
registered using 'snmp_alarm_register', and I suppose this timers
cannot be controlled using NET-SNMP-AGENT-MIB...

Any suggestion about the better way to implement the same behaviour in
these two specific cases will be welcomed!

Thank you,

Daniel

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to