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; Thanks Dave My current solution is: register a alarm function to reload my table repeatedly snmp_alarm_register(30, SA_REPEAT, reload_Table, NULL); /*...


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
James Deng D
 
Posts: n/a
Default RE: What should I do if I want to update the table list before each

Thanks Dave

My current solution is: register a alarm function to reload my table
repeatedly

snmp_alarm_register(30, SA_REPEAT, reload_Table, NULL);
/*reaload the entire table every 30 secs*/

My table is not massive, so I think there should be little performance
cost there.

So can I conclude that the agent never knows at which time they are
processing a retrieve of the whole table?
It just only knows the GETNEXTs and never has a separate bar between two
snmptable request?


Thanks again

//James



-----Original Message-----
From: dave.shield@googlemail.com [mailto:dave.shield@googlemail.com] On
Behalf Of Dave Shield
Sent: Monday, August 21, 2006 17:39
To: James Deng D (SH/CBC)
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: What should I do if I want to update the table list before
each request for the whole table

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 04:46 PM.


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