Re: persistency of data between two runs of snmpd daemon
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 21/03/07, Josu <[email protected]> wrote: > Is there any generic persistency mechanism provided by Net-Snmp ? > I would like such a mechanism for my owm mib module so that when the > daemon restarts values are recovered. In the initialisation routine for your MIB module, add a call of the form: snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, mymib_store, NULL); Then define a routine "mymib_store()" to save the information that you want to reload. (See agent/mibgroup/mibII/system_mib.c:system_store() for an example). You'll also need to define (and register) suitable config parsing routines that will handle whatever tokens you use in 'mymib_store()' (Again, see system_mibII.c for details). > I am using net-snmp 5.1.2. Why? At the very least, you should consider using the latest release on that line (5.1.4) But the 5.1.x line has now been closed, and there will be no further development done on it. The latest release is 5.4. Dave ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ 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