I think I'm totally confused about what I have to register (and I fail to understand the example in RFC 2741 - the ifTable)
When I do an snmpwalk on my table (snmpwalk GEN-MONITORING-MIB::genServerTable), I get GEN-MONITORING-MIB::genServerName.1.2.2, which is not what I'm expecting. My understanding of the problem is: - Oid of my table genServerTable is { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1} - genServerTable is a sequence of (genServerIndex, genServerName, genServerProductName, genServerHostname, genServerPID) 1) I get a unique index from master agent 2) I ask the master agent to register a portion of the MIB: { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 1, index } //genServerIndex column { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 2, index } // genServerName { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 3, index } // genServerProductName { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 4, index } // genServerHostname { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 5, index } // genServerPID 3) I create a row using the index retrieved in step 1 and register it to the master agent Is it right? or am I still completely wrong? >From: "Dave Shield" <[EMAIL PROTECTED]> >To: "Arnaud BODENAN" <[EMAIL PROTECTED]> >CC: net-snmp-users@lists.sourceforge.net >Subject: Re: multiple Sub-agents managing the same table >Date: Tue, 5 Sep 2006 12:25:21 +0100 > >On 05/09/06, Arnaud BODENAN <[EMAIL PROTECTED]> wrote: >>Sorry Dave, but I give you my MIB in previous mails; > >Err... no. Not that I can see. >I'd checked back through this thread to make sure, before my previous >reply. > > >>My table is defined something like that: >>genRoot (99999) >>---- genTestRoot (10000) >>--------- genMetrics (1) >>--------------- genServerTable (1) >>---------------------genServerEntry (1) >>-------------------------- genServerIndex (1) >>-------------------------- genServerName (2) >>-------------------------- genServerProductName (3) >>-------------------------- genServerHostname (4) >>-------------------------- genServerPID (5) > >I'd have preferred to see the actual MIB, but that gives the basic >idea. Thanks. > >>// Strangely, it has to begin with the index 2... @todo >>while ( allocatedIndex <= 1 && allocatedIndex > 0 ) > >i.e. "while (allocatedIndex == 1 )" ?? > > >>// Define the oid of the first column from the index returned >>oid genServerAllocatedOid[] = >> { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 1, allocatedIndex }; >>size_t genServerAllocatedOidLen = OID_LENGTH(genServerAllocatedOid); >>// Set the range_subid to the first column of the row >>handlerServerTable->range_subid = genServerAllocatedOidLen; > >No. >I think that's the index of the 'allocatedIndex' subidentifier. >You need the subidentifier that identifies the *column* object. >i.e. genServerAllocatedOidLen-1 > >This means that you'll end up registering: > { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 1, allocatedIndex }; > { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 2, allocatedIndex }; > { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 3, allocatedIndex }; > { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 4, allocatedIndex }; > { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 5, allocatedIndex }; > >At the moment, I think you're registering > { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 1, allocatedIndex }; > : > { 1, 3, 6, 1, 4, 1, 99999, 10000, 1, 1, 1, 5 }; > > >As I'm sure I've said before, you should walk the nsRegistryTable, to >check exactly what is getting registered and how this compares to what >you expect to be registered. > >Dave _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ 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