On Tue, 2005-06-21 at 02:01, Steve S. Law wrote: > In my init_applTable(), after > netsnmp_register_table_iterator, I did: > > snmp_register_callback(SNMP_CALLBACK_LIBRARY, > SNMP_CALLBACK_STORE_DATA, > persist_data, > NULL); > persist_data is my callback function. Is that the > right place to register?
Yes. > In persist_data function, I just went through my > table and caled read_config_store_data() for each > column and then snmpd_store_config() to save the > record. > > I was expecting that when I killed my sub-agent > process, the callback will be invoked as part of > snmp_shutdown("my-agent"? It should be, yes. How did you kill the agent? If you put debugging output into the 'persist_data' routine, does this get displayed or not? > My MIB table has > 26 columns which I want save. Do I need to put all > those columns in some configuration file first before > running my sub-agent? No. That's what the 'persist_data' routine is for. > I looked at my-agent.conf file and noted that if I > don't register callback function, then my-agent.conf > will have some entries such as > engineBoots 193 > oldEngineID 0x80001f88800024857c0b6d2f42 This is in /var/net-snmp/my-agent.conf - yes? > But if register the persist_data callback, those > entries were gone. Hmmm... That sounds a bit worrying. Dave ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ 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