This is a discussion on Re: pass-through feature seems to cache data within the SNMP Users forums, part of the Networking and Network Related category; AP> the pass-through feature of net-snmp ... AP> .... seems to cache data for 30 seconds RMHH> ... ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
AP> the pass-through feature of net-snmp ...
AP> .... seems to cache data for 30 seconds RMHH> ... newer versions doesn't perform caching. At least RMMH> according to the Faq: Note that with the 4.2.x and 5.0.x lines, return values are cached within the agent for 30 seconds, rather than invoking the command for every request. This does not hold for the 5.1.x agent. Note that this is explicitly referring to the 'sh' and 'exec' directives. These were re-coded with the 5.1 agent to use a more general sub-command execution mechanism, which had the side effect of removing the caching of results. The 5.2 line saw the introduction of a new 'extend' mechanism, which will eventually replace the original code completely. This includes support for dynamic configuration of the result caches (for each entry individually). But this is all related to the 'sh' and 'exec' tokens. It does *NOT* apply to the 'pass' mechanism, which was left completely untouched. As you have discovered, this still uses a hardcoded 30s cache. AP> Is it possible for net-snmp to exec the script on each AP> snmpget request ? RMHH> If somebody knows a workaround/fix for this I'd be also RMHH>interested. The workaround is to edit the file include/net-snmp/net-snmp-config.h remove the definition of EXCACHETIME, and re-compile the agent. The proper fix is to recode the 'pass.c' implementation to use the v5 APIs, and one of the cache-related helpers - either the cache helper directly (as per 'extend.c'), or via the 'stash-cache' helper. This would allow dynamic control of individual pass-through entries - caching or not caching as the user (N/W administrator) desired. Dave ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users |