Re: pass-through feature seems to cache data

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


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-11-2005
Dave Shield
 
Posts: n/a
Default Re: pass-through feature seems to cache data

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:19 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0