On 6 April 2010 20:59, Kathy McLeod <kmcl...@us.ibm.com> wrote: > 1) I thought it would always issue a free before a load.
Not quite. The purpose of the "free" hook is to release the information left over from the previous "load" call. This can either be done immediately before the next load, or (possibly) as part of regularly-scheduled garbage collection. > However, the > first time I issue a command ... I see the load without a free first. That's correct. Until the MIB is first queried, the "load" routine has never been called, so there's no need to invoke "free" that first time. > My table is now 8 rows long > instead of 4. (The table init creates indexes 1 - 4, and the cache load > creates 5 - 8) If you are using the cache mechanism, then this will initialise the contents of the table when required. There's no need to duplicate this within the init routine. Either set up the table within the init routine, or use a cache. Don't mix the two. If you want to prime the table when the agent first starts up, the simplest (and safest) way would be to call netsnmp_cache_check_and_reload( cache ) > 2) After 60 seconds, I see the cache free. This works ok, but when I issue > another command, I never see another load and I get an error message for > the command. I'm seeing something slightly different. I *do* see the cache load routine called for this later request, but then the agent crashes. There's something wrong about the way that the handler accesses the refreshed cache contents. I haven't had the chance to investigate properly, but it looks as if replacing the code that primes the table with a call to netsnmp_cache_check_and_reload( cache ) seems to fix things. (Though omitting this seems to drop the table altogether. Which again doesn't really make sense!) Dave ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ 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/listinfo/net-snmp-users