#23 Incorrect display of Unsigned32

open
nobody
None
5
2013-01-11
2011-11-25
felix schmutz
No

Hello,

When I try to fetch Unsigned32 values from a device the SNMPB shown values seem wrong.

For example, from my PC with IP 192.168.123.63 I make a "get" onto a temperature value of a device. the result should be 61 (other snmp software shows 61 too)

The Query results will show:

-----SNMP query started-----
1: temperature.0 2293728
-----SNMP query finished-----

but the value returned is "61".

the Node Info shows:

Name:
activePSUs
Oid:
1.3.6.1.4.1.23056.2.1.9
Composed Type:
Unsigned32
Base Type:
UNSIGNED32
Status:
current
Access:
read-only
Kind:
Scalar
SMI Type:
OBJECT-TYPE
Module:
MEDIORNET-MIB
Description:
number of currently active, error-free PSUs. A value of 0 will indicate an error in the Firmware

attaching the wireshark sniffed relevant traffic

Discussion

  • felix schmutz
    felix schmutz
    2011-11-25

    wireshark traffic

     
    Attachments
  • felix schmutz
    felix schmutz
    2011-11-25

    sorry, that was the wrong node info. here goes the correct one:

    Name:
    temperature
    Oid:
    1.3.6.1.4.1.23056.2.1.4
    Composed Type:
    Unsigned32
    Base Type:
    UNSIGNED32
    Status:
    current
    Access:
    read-only
    Kind:
    Scalar
    SMI Type:
    OBJECT-TYPE
    Module:
    MEDIORNET-MIB
    Description:
    The temperature of the switch in degrees

     

  • Anonymous
    2012-02-29

    Does the MIB include a "Display-Hint" clause?
    I'm seeing that anytime there is a display-hint clause, the value reported is way off
    For example any parmeter declared like this

    Tenths ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "d-1"
    STATUS current
    DESCRIPTION
    "Values that are reported in tenths such as power levels and temperature"
    SYNTAX Unsigned32

     
  • Holger
    Holger
    2012-03-18

    Hi,

    The issue posted by Felix seems to be a bug in the SNMP agent he is quering.
    According to his second post OID 1.3.6.1.4.1.23056.2.1.4 is definded in the MIB as type Unsigned32, but the captured packet in the attachement shows that the OID is returned by the SNMP agent as Integer32.

    Both, SnmpB v0.8 and the latest trunk r486 have issues displaying these wrongly typed integers. This could probably be handled better by SnmpB, e.g. display integers from 0 to 2147483647 correctly and/or print a warning that the type is wrong.

    I haven't found anything wrong with DISPLAY-HINT "d-1", apart from that it suffers from the same issue as described above.

    Thanks,

    Holger