Re: Persistent storage
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 04/09/07, Peter Czaja <[email protected]> wrote: > But where is the equivalent to the "init_myagent_scalar()" function? > > Something like "finalize_myagent_scalar()", which would be a natural > place to implement the corresponding calls to netscnmp_ds_write_*(). > > What did I miss? Add the following call to init_myagent_scalar(): snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, finalize_myagent_scalar, NULL); That will save your persistent data - both when the agent shuts down, and also when it is explicitly told to save or re-read config files. Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ 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