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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |