Re: Re: How to renew (update) data stored on a OID for a get request?

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 12/02/2008, Simon Huebner <[email protected]> wrote:
> > How have you coded your MIB module?
> > What helper(s) are you using?
> >    That might affect what your code might look like.

> I fill the hrSWInstalledTable from HOST-RESOURCES-MIB with the output
> from dpkg.

One of the MIBs (high) on my list to re-implement :-)


> 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)

Ah - that would explain your confusion.
This helper is really designed for tables where the data is held within
the agent itself - not read in from an external subsystem (e.g. dpkg).


Can I suggest that you consider using a different table helper?
Try running

     mib2c   -c mib2c.table_data.conf   -S cache=1  hrSWInstalledTable

This will generate a framework for an internal cached copy of an
external table - reloaded whenever the cache is deemed "too old".
You can then put the dpkg call into the "load" routine.

   That's the framework I'm adopting for the on-going HostRes/UCD
rewrites, and which I intend to use when I get to the hrSWInstalledTable

Dave

-------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.