On Fri, 8 May 2015 14:53:18 +0100 Tim wrote:
TC> I can manually update the cache timeout for a table uusing a
TC> snmp get request as in:
TC> 
TC> snmpset -v 2c -c private 10.128.19.86
TC> nsCacheTimeout.1.3.6.1.4.1.1900.1.1.2 i 0
TC> 
TC> This sets the cache time out value for the oid listed above.
TC> 
TC> However, what I really want to do is that my hsared object can
TC> update this value if configured to do so, i.e.   do it
TC> programmatically.
TC> 
TC> 
TC> I see my change working as follows:
TC> 
TC> My shared object registers a new configuration token which
TC> allows a user to specify a time out value.

This really should be handled higher up, instead of each module
having to do it on it's own. And the nsCacheTable should probably
store configured valued in the persistent storage so values survive
a restart.

TC> I can get the existing cache object by calling
TC> netsnmp_cache_find_by_oid.
TC> 
TC> I presume I would need to remove the existing cache handler and
TC> create and inject a new cache handler.

No, you should just be able to change the value in the cache
structure.


Did you ever get this working like you wanted?

Robert

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to