On Thu, 2005-04-28 at 11:45, Emmanuel Doguet wrote: > Dave Shield wrote: > > [ First - *please* don't mail me privately.... > > I see it after send (my owns ML work with a reply :P), sorry.
Don't worry - that's a standard block of text that I include whenever this happens. I'm well aware that it's easy to reply privately (either by mistake, or in ignorance). I only get annoyed with the people who *consistently* contact me privately. > I mean, that I must fill data on my table > for each 'Walk' and not at the init of the daemon. OK - then the cache helper is an ideal solution for you. That's pretty much what this does. It will load your data the first time that a query arrives (*not* when the agent starts up), and will release and re-load it whenever another request arrives, and the cached data is "too old" to be useful. You can specify how long "too old" is. If you're running an "snmpwalk" command (and the cache timeout is chosen sensibly), then this will probably all be serviced by a single load. That contrasts with loading the table within the get_{first,next} hooks, where it will typically be reloaded for *each* value individually. > > What would be the problem in using the cache handler to load > > the table data (retaining it for 5 seconds, say), and letting > > the free routine release it again, when this time had expired? > > I don't know & see that on NetSnmp documentations, have an URL? The main documentation for this helper is at http://www.net-snmp.org/dev/agent/group__cache__handler.html There isn't an example, I'm afraid. (At least not yet....) Dave ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders