I looked at the file and tried to use the callback mechanism to save data. But when I shut-down my sub-agent, the callback is not invoked at all. 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? In persiste_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"? Is there any step that I am missing? 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? If so, where and in what format? 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 But if register the persist_data callback, those entries were gone. All the colums in my MIB table are read-only but I do need to persist them across restart. Please help... Thanks Steve --- Dave Shield <[EMAIL PROTECTED]> wrote: > On Wed, 2005-05-25 at 01:15, Steve S. Law wrote: > > Can you point me to what those APIs are? > > Anything that make things easier will be helpful. > > Have a look at some of the existing MIB modules - > particularly those that work with purely internal > data. > > The file 'mibgroup/notification/snmpNotifyTable.c' > might be a reasonable starting point. You should > pay particular attention to the routines > 'parse_snmpNotifyTable' and 'store_snmpNotifyTable' > > 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