Re: snmp script extend cache

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2009/3/23 [email protected]
<[email protected]>:
> Hi,

> override NET-SNMP-AGENT-MIB::nsCacheDefaultTimeout.0 integer 300
> override NET-SNMP-AGENT-MIB::nsCacheEnabled.0 integer 1
> extend check_dummy  /var/checks/check_dummy
> override NET-SNMP-EXTEND-MIB::nsExtendCacheTime."check_dummy" integer 300

Remember that "override" is concerned with what information the
agent will report back to an SNMP client.   The agent doesn't know
anything about what these values are supposed to mean - it's just
reporting back exactly what it's told to.


> Starting snmpd and querying for the information works in general. Thing
> is the cache seems to be limited to 5 seconds (according to the date
> differences in /tmp/snmp.watch).

Yes - that's the default cache timeout, I believe.


> But I want snmpd to listen to the settings in the snmpd.conf, so the
> cache should keep the results for 5 mins

But the agent doesn't use these figures internally.
You are overriding the real values, and telling the agent
to report something back if anyone asks.   That doesn't
mean that the agent knows to use this value internally.


If you want to change the cache timeout, you could try SETing the
nsExtendCacheTime dynamically.  That should change the internal
value that the agent *does* use.

Dave

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.