Comment 0 for bug 1314760

Revision history for this message
Vince N (libertyshadow) wrote :

According to RFC 2790 the hrSWInstalledIndex should start at 1:

  hrSWInstalledIndex OBJECT-TYPE
       SYNTAX Integer32 (1..2147483647)
       MAX-ACCESS read-only
       STATUS current
       DESCRIPTION
           "A unique value for each piece of software installed
           on the host. This value shall be in the range from 1
           to the number of pieces of software installed on the
           host."
       ::= { hrSWInstalledEntry 1 }

However, when grabbing the hrSWInstalledTable, my first entry is at index 0.
Example:
$ snmpbulkget -v2c -c public -Cn1 -Cr1 -ObentU localhost 1.3.6.1.2.1.25.6.3
.1.3.6.1.2.1.25.6.3.1.1.0 = INTEGER: 0

For a CentOS 6 host the behavior is according to spec:
$ snmpbulkget -v2c -c public -Cn1 -Cr1 -ObentU centos6_srv.example.com 1.3.6.1.2.1.25.6.3
.1.3.6.1.2.1.25.6.3.1.1.1 = INTEGER: 1

I found this issue while trying to read HOST-RESOURCES-MIB::hrSWRunPerfTable with pysnmp, but kept getting an exception:
ConstraintsIntersection(ConstraintsIntersection(ConstraintsIntersection(), ValueRangeConstraint(-2147483648, 2147483647)), ValueRangeConstraint(1, 2147483647)) failed at: "ValueRangeConstraint(1, 2147483647) failed at: "0"" at Integer32