SNMP disk space - inaccurate numbers

on the remote server that im running the snmp command against, below is the information about the specific directory i'm concerned about:

SIZE   USED  AVAIL
673G  483G  157G 

can someone explain to me why snmp is telling me the size of this filesystem is 176399584?

HOST-RESOURCES-MIB::hrStorageSize.39 = INTEGER: 176399584

this woefully inaccurate.

What are the units for each indicator above?

this is what i get when i search for units

[nagios-03.kewr0:636] snmpwalk -v 1 -c ajajaja billing-host.com HOST-RESOURCES-MIB::hrStorage | egrep -i unit
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.8 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.10 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.31 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.32 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.33 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.34 = INTEGER: 1024 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.35 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.36 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.37 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.38 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.39 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.40 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.41 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.42 = INTEGER: 4096 Bytes
[nagios-03.kewr0:637]

176399584 units * 4096 Bytes/unit = 672,9 GiB
That's what it's reporting.

1 Like

i'm still not understanding this. can you please explain.

when i run the numbers i get something other than 672,9

176399584 * 4096 = 722532696064

A gigabyte is not one billion bytes. Recent marketing speak recently defined it as such by fiat, but but computers have blithely continued to think in base-two numbers anyway.

Kilo = 1024
Mega = 10241024
Giga = 1024*1024
1024

722532696064 / (1024 * 1024 * 1024) = 672.911

1 Like