Get wrong hrStorageUsed size when storage size greater than 16T

shih dane <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CADcCCvtu72DTyxkgmCOMRJT78bORmYYAE5xLs=2mnvnzJVfujw@mail.gmail.com>
Hi all

net-snmp-5.7.1 get wrong used size

/raid0 is 23TB
used 42G

Size = 16384 * 1457172163
Used = 16384 * 41582004

in function netsnmp_fsys_calculate32
f->used_32 = f->used << factor;

but it seem need to >> factor  to get right used size


HOST-RESOURCES-MIB::hrStorageDescr.44 = STRING: /raid0
HOST-RESOURCES-MIB::hrStorageDescr.45 = STRING: /raidsys/1
HOST-RESOURCES-MIB::hrStorageDescr.46 = STRING: /raid1
HOST-RESOURCES-MIB::hrStorageAllocationUnits.1 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.3 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.6 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.7 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.10 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.31 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.32 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.36 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.37 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.41 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.42 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.43 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.44 = INTEGER: 16384 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.45 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.46 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 8191248
HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 10287360
HOST-RESOURCES-MIB::hrStorageSize.6 = INTEGER: 8191248
HOST-RESOURCES-MIB::hrStorageSize.7 = INTEGER: 186688
HOST-RESOURCES-MIB::hrStorageSize.10 = INTEGER: 2096112
HOST-RESOURCES-MIB::hrStorageSize.31 = INTEGER: 61973
HOST-RESOURCES-MIB::hrStorageSize.32 = INTEGER: 1023906
HOST-RESOURCES-MIB::hrStorageSize.36 = INTEGER: 1023906
HOST-RESOURCES-MIB::hrStorageSize.37 = INTEGER: 205372
HOST-RESOURCES-MIB::hrStorageSize.41 = INTEGER: 23425
HOST-RESOURCES-MIB::hrStorageSize.42 = INTEGER: 23425
HOST-RESOURCES-MIB::hrStorageSize.43 = INTEGER: 129869
HOST-RESOURCES-MIB::hrStorageSize.44 = INTEGER: 1457172163
HOST-RESOURCES-MIB::hrStorageSize.45 = INTEGER: 129869
HOST-RESOURCES-MIB::hrStorageSize.46 = INTEGER: 72616520
HOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 428484
HOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 428484
HOST-RESOURCES-MIB::hrStorageUsed.6 = INTEGER: 31488
HOST-RESOURCES-MIB::hrStorageUsed.7 = INTEGER: 186688
HOST-RESOURCES-MIB::hrStorageUsed.10 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.31 = INTEGER: 57915
HOST-RESOURCES-MIB::hrStorageUsed.32 = INTEGER: 15671
HOST-RESOURCES-MIB::hrStorageUsed.36 = INTEGER: 15671
HOST-RESOURCES-MIB::hrStorageUsed.37 = INTEGER: 14983
HOST-RESOURCES-MIB::hrStorageUsed.41 = INTEGER: 560
HOST-RESOURCES-MIB::hrStorageUsed.42 = INTEGER: 797
HOST-RESOURCES-MIB::hrStorageUsed.43 = INTEGER: 6625
HOST-RESOURCES-MIB::hrStorageUsed.44 = INTEGER: 41582004
HOST-RESOURCES-MIB::hrStorageUsed.45 = INTEGER: 6597
HOST-RESOURCES-MIB::hrStorageUsed.46 = INTEGER: 1242945

thanks for any advice
Dane

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.