I am implementing SNMP table support using the standard
mib2c.table_data.conf configuration file.
The data I am using to populate the table comes from an external collection
class that my application builds and manages.
I am trying to weigh out the benefits of the cache or no cache setting when
generating the table handling code.
My content will not come from a physical file that needs to be polled for
changes. Instead, my collection can be written
to by the application, and I would want the changes to be viewable upon the
next read by demand. I suppose I could call
the free() and load() methods directly when the application makes changes to
the collection rather than the timer based
updates.
Currently I am using the following cache flags when implementing the cache
method.
NETSNMP_CACHE_AUTO_RELOAD
NETSNMP_CACHE_DONT_FREE_EXPIRED
NETSNMP_CACHE_DONT_AUTO_RELEASE
NETSNMP_CACHE_PRELOAD.
My perception is that when using the cached method, there are unnecessary
calls to load and free that occur as some periodic interval.
Perhaps an alternative would be to simply provide my content maintained in
my external collection from calls within the table handler,
So for example for the read operation, upon MODE_GET, I would copy my
content to the table_entry, and perhaps for the write
Operation MODE_SET_ACTION I would update by collection with the new content.
I certainly may be oversimplifying the operation and
I don't fully understand the nature of the MODE_SET_UNDO ramifications.
Now if I use the cache method, I would not have to customize the read
operation for the MODE_GET command, so perhaps this would be a
benefit of the caching process.
I am interested in someone how has domain experience on this to provide some
general opinions on the benefits of caching the content or not.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders