Re: What should I do if I want to update the table list before each

This is a discussion on Re: What should I do if I want to update the table list before each within the SNMP Users forums, part of the Networking and Network Related category; On 21/08/06, James Deng D (SH/CBC) <james.d.deng@ericsson.com> wrote: > I want ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-21-2006
Dave Shield
 
Posts: n/a
Default Re: What should I do if I want to update the table list before each

On 21/08/06, James Deng D (SH/CBC) <james.d.deng@ericsson.com> wrote:
> I want to update my table (which is a linked list) before each request for
> the whole table instead of each column,
> That's to say, I want to get the latest table list each time when I execute
> a snmptable command.


And what should the agent do when it gets a request for an individual
element of the table
(rather than someone walking the whole table)? Should it re-load the
table or not?


> For a scalar, I can use the get handler, and set the latest value each time
> when I get a MODE_GET request, is there a MODE_GET_LIST or something like
> that for me to track a request for a whole table?


No - as far as the agent is concerned, it receives a sequence of
GETNEXT requests (which may well be converted into MODE_GET by the
time they reach the MIB handler).

The usual approach in this situation is to cache the contents of the
table for a given period, and only reload this once the cache has
expired. If you set the timeout to be fairly short
(say 2-3 s), then that will probably have the same general effect -
particularly if the table isn't massive.

There's an example of this approach in (e.g) mibII/udpTable.c
See the end of 'init_udpTable()' and the routines 'udpTable_load' and
'udpTable_free'

Dave

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=...057&dat=121642
_______________________________________________
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 05:19 AM.


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