On Mon, 10 Jan 2005 15:21:54 +0000 Dave wrote: DS> On Fri, 2005-01-07 at 13:30, Sridhar S wrote: DS> > I see a disadvantage here (please correct me if I am wrong). [...] Then DS> > agent has to iterate through all 100 interfaces to locate the correct DS> > one. right ? DS> DS> > Can we optimize it ? DS> DS> > so that agent gets the index/indicies under query DS> > and the type of request (GET/GET-NEXT/SET). The agent, instead of DS> > iterating through all the available rows, makes a direct query to the DS> > backend.
If you know about all of the interfaces at startup, and know when interfaces appear/disappear, then any of the container based styles will work well. If you don't know when the appear/disappear, then the cache helper (as opposed to the stash_cache helper) can be used to periodically refresh the container. This would be faster than the stash_cache at populating the cache, and marginally slower on a per-request basis since your helper would still have to be called to return the actual values. If you are using 5.2, then you can do exactly what you want to with the container helpers and the cache helper. In 5.2, you can get a 'hint' from the cache helper on what varbinds are in a request. You can then use this hint to populate the container with the information for just that one row (or the next row, for a get-next request). -- Robert Story; NET-SNMP Junkie Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users> You are lost in a twisty maze of little standards, all different. ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
