mfd - problems with container_load

Martin Townsend <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization Power Oasis
Message-ID <[email protected]>
Hi,

I'm currently creating a test agent using my own mib.  I have 
implemented all the scalar values using mib2c and then int-watch 
configuration file.  The problem I have is with a table.  mib2c.mfd.conf 
was used to create the files.  I have implemented the data access 
routines but I can't see where the generated routine 
(loadMonitorUnitsPOTable_container_load) is called, i've used gdb and 
set a breakpoint but the routine doesn't get called and I'm seeing no 
table information when using snmpwalk or snmpbulkget.  All the examples 
I've seen use container-cache which call the xx_container_load from a 
_cache_load hook routine that is passed to the netsnmp_cache_create 
function.  I choose the default container option:

container : [DEFAULT]  This access method uses a netsnmp_container
      to store all row data in memory. This method is best for:
          - Internal data (maintained by the agent)
          - Access speed is important
          - Sufficient memory exists to contain all rows

Does anyone know how to hook the container_load routine up, or know why 
I'm not getting any table information?  I've tried add the 
container_load to loadMonitorUnitsPOTable_container_init but it seg faults.

Just in case it helps here is the portion of the MIB that defines the table:
loadMonitorUnitsPOIndex  OBJECT-TYPE
     SYNTAX     Integer32 (0..13)
     MAX-ACCESS accessible-for-notify
     STATUS     current
     DESCRIPTION
         ""
     ::= { loadMonitorPOUnits 2 }

loadMonitorUnitsPOTable  OBJECT-TYPE
     SYNTAX SEQUENCE OF LoadMonitorUnitsPOEntry
     MAX-ACCESS not-accessible
     STATUS     current
     DESCRIPTION
         ""
     ::= { loadMonitorPOUnits 3 }

loadMonitorUnitsPOEntry  OBJECT-TYPE
     SYNTAX  LoadMonitorUnitsPOEntry
     MAX-ACCESS not-accessible
     STATUS     current
     DESCRIPTION
         ""
     INDEX { loadMonitorUnitsPOIndex }
     ::= { loadMonitorUnitsPOTable 1 }

LoadMonitorUnitsPOEntry ::= SEQUENCE {
     loadMonitorIDPO
         Integer32,
     loadMonitorFuseStatus1PO
         INTEGER,
     loadMonitorCurrent1PO
         Integer32,
     loadMonitorFuseStatus2PO
         INTEGER,
     loadMonitorCurrent2PO
         Integer32
}

loadMonitorIDPO  OBJECT-TYPE
     SYNTAX     Integer32
     MAX-ACCESS read-only
     STATUS     current
     DESCRIPTION
         ""
     ::= { loadMonitorUnitsPOEntry 1 }

loadMonitorFuseStatus1PO  OBJECT-TYPE
     SYNTAX     INTEGER {
         normal (0),
         alarm (1)
     }
     MAX-ACCESS read-only
     STATUS     current
     DESCRIPTION
         "The state of the load fuses/breakers can be either normal(0) 
or alarm(1) "
     ::= { loadMonitorUnitsPOEntry 2 }

loadMonitorCurrent1PO  OBJECT-TYPE
     SYNTAX     Integer32
     UNITS   "Amperes or DeciAmperes"
     MAX-ACCESS read-only
     STATUS     current
     DESCRIPTION
         "The current consumed by this load branch. Note that the units 
measured may be i Amperes or in Deciamperes depending on global system 
settings"
     ::= { loadMonitorUnitsPOEntry 3 }

loadMonitorFuseStatus2PO  OBJECT-TYPE
     SYNTAX     INTEGER {
         normal (0),
         alarm (1)
     }
     MAX-ACCESS read-only
     STATUS     current
     DESCRIPTION
         "The state of the load fuses/breakers can be either normal(0) 
or alarm(1) "
     ::= { loadMonitorUnitsPOEntry 4 }

loadMonitorCurrent2PO  OBJECT-TYPE
     SYNTAX     Integer32
     UNITS   "Amperes or DeciAmperes"
     MAX-ACCESS read-only
     STATUS     current
     DESCRIPTION
         "The current consumed by this load branch. Note that the units 
measured may be i Amperes or in Deciamperes depending on global system 
settings"
     ::= { loadMonitorUnitsPOEntry 5 }

Many Thanks in advance,
Martin.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
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.