Hi

I am using net-snmp(version:  5.2.1.2) in sending the data from the managed 
device to the PC Software and I found there exists a potential issue in the 
net-snmp, but I am not sure if it is, thereby I send you this email to confirm 
it, and I would like to hear any voice from you upon how to fix my issue.

Before I propose the potential issue I would like to show you what my mib file 
looks like:

lgpFlexibleBasicTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF LgpFlexibleBasicEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table contains data points supported by the managed device. The
         data in this table is formatted in string form. This data is also
         available in numerical form in the augmented
         lgpFlexibleExtendedTable.

         In this table, the row indexing is not necessarily sequential and
         leads to a sparsely populated table."
    ::= { lgpFlexible 20 }

    lgpFlexibleBasicEntry OBJECT-TYPE
        SYNTAX      LgpFlexibleBasicEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "This entry defines the columns to be populated in the
             'lgpFlexibleBasicTable'."
        INDEX
        {
            IMPLIED lgpFlexibleEntryIndex
        }
        ::= { lgpFlexibleBasicTable 1 }

    LgpFlexibleBasicEntry ::= SEQUENCE
    {
            lgpFlexibleEntryIndex               OBJECT IDENTIFIER,
            lgpFlexibleEntryDataLabel           DisplayString,
            lgpFlexibleEntryValue               DisplayString,
            lgpFlexibleEntryUnitsOfMeasure      DisplayString
    }

    lgpFlexibleEntryIndex OBJECT-TYPE
        SYNTAX      OBJECT IDENTIFIER
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "This is the index which defines a specific row in the
             lgpFlexibleBasicTable.  Each row index is associated with a unique
             data point ID which fixes the data point to its permanent location
             in the table."
        ::= { lgpFlexibleBasicEntry 1 }

    lgpFlexibleEntryDataLabel OBJECT-TYPE
        SYNTAX      DisplayString
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "A short description of the data reported in this row."
        ::= { lgpFlexibleBasicEntry 10 }

    lgpFlexibleEntryValue OBJECT-TYPE
        SYNTAX      DisplayString
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            "A string representation of any data available.  This is the
             preferred method of data access, since this will give fully
             scaled data for both integer and floating point data, in addition
             to textual data.  If this string column cannot be used, then
             columns in the lgpFlexibleExtendedTable must be used in order
             to get a fully scaled version of integer data."
        ::= { lgpFlexibleBasicEntry 20 }

    lgpFlexibleEntryUnitsOfMeasure OBJECT-TYPE
        SYNTAX      DisplayString
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The unit of measure that the value will be presented in.  This is
             not populated when the data does not have a unit of measure
             associated with it."
        ::= { lgpFlexibleBasicEntry 30 }

[cid:image002.png@01CDA7D2.159290B0]

As you can see, in the lgpFlexibleBasicTable there exists a node named 
lgpFlexibleEntryUnitsOfMeasure, which is only registered for the data-points 
that have measurement like temperature, length and so, but if the data-point 
stands for time, date which has no measurement, we don't register this OID. 
Moreover, our MIB only defines columns 1,10,20,30,40,50,60,70...

Ok, I think you have understand the lgpFlexibleBasicTable very well and you 
also have registered the lgpFlexibleEntryUnitsOfMeasure like what I described 
above. Right now you can walk lgpFlexibleBasicTable now by using "snmpwalk -v 
2c -c xxx IpAddr lgpFlexibleEntryUnitsOfMeasure, then You should get an "Error 
in packet." after a while. The lgpFlexibleBasicTable table fails on retry and 
time out before completing walk. After I investigate he ling of sparse tables 
in net-snmp, I find that the Current implementation calls our handler for all 
possible row/column combinations. This is due to the fact that the SNMP engine 
is still busy trying to get all the empty row/columns rather than properly 
skipping over them. Our MIB only defines columns 1,10,20,30,40,50,60,70 but is 
also called for columns 2-9,11-19, etc, and It is also some columns are only 
valid for some rows (lgpFlexibelEntryUnitsOfMeasure) but all rows are called.


By the way, I have handle the table like what 
snetSnmpHostsTable_access.c(located in 
net-snmp-package/agent/mibgroup/examples/) does.


Thank you!

Bruce


<<inline: image002.png>>

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to