Dave Shield wrote: > 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 >
That works! > 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. > But now i have a problem with the load routine? With routine should i use to fill the table? netsnmp_create_table_data_row(); netsnmp_set_row_column() and so one doesn't work, or? > 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 SoFar 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 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