Hi Robert,

No, I never got a response from the list other than your message below.

You say:

"
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.
"

By this do you mean it should behandled from within net-snmp rather than
each shared library?

If so, this would require an enhancement to the current agent code.

I'm no expert in the internals of the  agent code, so how would such an
enhancement be  possible?

Also, my shared object needs to work with net-nsmp 5.5 and/or later, so any
such enhancement would need to be merged back into older versions.  Would
this even be possible?

Regards,

Tim

-----Original Message-----
From: NetSNMP Mailbox [mailto:net-snmp-m...@freesnmp.com] On Behalf Of
Robert Story
Sent: 08 July 2015 04:25
To: Tim Culhane
Cc: net-snmp-coders@lists.sourceforge.net
Subject: Re: making the cache timeout for container_load to be configurable

On Fri, 8 May 2015 14:53:18 +0100 Tim wrote:
TC> I can manually update the cache timeout for a table uusing a snmp 
TC> 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 allows a 
TC> 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