Re: Re: How to renew (update) data stored on a OID for a get request?
Simon Huebner <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Organization | Fraunhofer ISE |
| Message-ID | <[email protected]> |
Dave Shield wrote: > On 12/02/2008, Simon Huebner <[email protected]> wrote: >> I want to update data stored on a OID every time a get-request for this >> OID comes in! >> A AgentX stores the data but only on startup. > > Not true. > It depends how you implement the MIB module. > >> Is there a way to call the init_... function before answer a get-request? > > No - the init_xxx() function is indended for any one-off initialisation > ((registering the MIB objects, registering snmpd.conf tokens, > initialising any subsystems that this module might need). > > When a GET or other request comes in, the agent will call the > relevant handler to provide the current value. That's where you > would put the code to update the data. > > > How have you coded your MIB module? > What helper(s) are you using? > That might affect what your code might look like. > > Dave I fill the hrSWInstalledTable from HOST-RESOURCES-MIB with the output from dpkg. I store the data like in the tutorial "A table of data, stored within the agent" (http://www.net-snmp.org/dev/agent/data__set_8c-example.html) Thanks for help, Simon ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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