Bug 183900 - wrong values in disk statistics for disks larger then 2Tb
Summary: wrong values in disk statistics for disks larger then 2Tb
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: net-snmp
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Radek Vokál
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-03 15:35 UTC by max vakulenko
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-10 13:39:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description max vakulenko 2006-03-03 15:35:03 UTC
Description of problem:

snmpget return negative value of -2^31 (-2147483648) for partition larger than
2^31 Kbytes (>2Tb)

Version-Release number of selected component (if applicable):

Up to 5.2.1.2-fc4.1

How reproducible:



Steps to Reproduce:
1. Create mountpoint with size >2Tb
2. Setup snmp
3. Run snmpwalk/snmpget for given partition (doesn't matter local or remote)
  
Actual results:
-2147483648

You will see wrong values like this:

$ snmpget [params...] .1.3.6.1.4.1.2021.9.1.6.6
UCD-SNMP-MIB::dskTotal.6 = INTEGER: -2147483648

Expected results:

3Tb free actually:
$ df
...
/dev/mapper/raid1/vol1   4285534816 760017152 3525517664  18% /raid
So result should be like this:
UCD-SNMP-MIB::dskTotal.6 = INTEGER(maybe UNSIGNED or INTEGER32): 3525517664

Additional info:

dskTotal described in /usr/share/snmp/mibs/UCD-SNMP-MIB.txt as Integer32, so
wrong results are expected for >2Tb partition.

No luck for replacing type by Unsigned32 (possible workaround for <4Tb
partitions which never be negative size):

$ grep -A1 dskTotal /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
    dskTotal            Unsigned32,
    dskAvail            Integer32,
--
dskTotal OBJECT-TYPE
    SYNTAX      Unsigned32

$ UCD-SNMP-MIB::dskTotal.6 = Wrong Type (should be Gauge32 or Unsigned32):
INTEGER: -2147483648

Comment 2 Robert Story 2006-06-07 21:23:21 UTC
Use the (standard) HOST-RESOURCES-MIB::hrStorageTable instead of the
(proprietary ) UCD-SNMP-MIB::dskTable.


Note You need to log in before you can comment on or make changes to this bug.