I get similar results. For instance: > # df -h > Filesystem Size Used Avail Use% Mounted on > /dev/xvda3 61G 5.5G 52G 10% /
and in zenoss: > Mount Total bytes Used bytes Free bytes % Util > Lock > / 60.4GB 5.4GB 54.9GB 8 However, if I use "df" without the -h option (human readable), I get the following: > # df > Filesystem 1K-blocks Used Available Use% Mounted on > /dev/xvda3 63282372 5665584 54402184 10% / So I have 5,665,584 kbytes of used space. If I take the Used 1k blocks 5665584 and divide by 1024 twice I get 5.4031219482421875. So even though size available should be 5.4G, df -h option rounds up to 5.5G. You can specifically confirm what snmp is returning by doing an snmpwalk on hrStorageTable. snmpwalk -v2c -c COMMUNITY HOSTNAME hrStorageSize You can get the snmp index number of the volume that you're trying to find the size on by clicking on it under File Systems under the OS tab. For example, the system above is my zenoss server and I'll query it using "localhost" for the HOSTNAME and public for the COMMUNITY. The Snmp Index is 4. > # snmpwalk -v2c -c gscpublic localhost hrStorageTable > HOST-RESOURCES-MIB::hrStorageIndex.1 = INTEGER: 1 > HOST-RESOURCES-MIB::hrStorageIndex.2 = INTEGER: 2 > HOST-RESOURCES-MIB::hrStorageIndex.3 = INTEGER: 3 > HOST-RESOURCES-MIB::hrStorageIndex.4 = INTEGER: 4 > HOST-RESOURCES-MIB::hrStorageIndex.5 = INTEGER: 5 > HOST-RESOURCES-MIB::hrStorageIndex.6 = INTEGER: 6 > HOST-RESOURCES-MIB::hrStorageIndex.7 = INTEGER: 7 > HOST-RESOURCES-MIB::hrStorageType.1 = OID: > HOST-RESOURCES-TYPES::hrStorageOther > HOST-RESOURCES-MIB::hrStorageType.2 = OID: HOST-RESOURCES-TYPES::hrStorageRam > HOST-RESOURCES-MIB::hrStorageType.3 = OID: > HOST-RESOURCES-TYPES::hrStorageVirtualMemory > HOST-RESOURCES-MIB::hrStorageType.4 = OID: > HOST-RESOURCES-TYPES::hrStorageFixedDisk > HOST-RESOURCES-MIB::hrStorageType.5 = OID: > HOST-RESOURCES-TYPES::hrStorageFixedDisk > HOST-RESOURCES-MIB::hrStorageType.6 = OID: > HOST-RESOURCES-TYPES::hrStorageFixedDisk > HOST-RESOURCES-MIB::hrStorageType.7 = OID: > HOST-RESOURCES-TYPES::hrStorageFixedDisk > HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Memory Buffers > HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real Memory > HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Swap Space > HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: / > HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: /sys > HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: /sys/kernel/debug > HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: /boot > HOST-RESOURCES-MIB::hrStorageAllocationUnits.1 = INTEGER: 1024 Bytes > HOST-RESOURCES-MIB::hrStorageAllocationUnits.2 = INTEGER: 1024 Bytes > HOST-RESOURCES-MIB::hrStorageAllocationUnits.3 = INTEGER: 1024 Bytes > HOST-RESOURCES-MIB::hrStorageAllocationUnits.4 = INTEGER: 4096 Bytes > HOST-RESOURCES-MIB::hrStorageAllocationUnits.5 = INTEGER: 4096 Bytes > HOST-RESOURCES-MIB::hrStorageAllocationUnits.6 = INTEGER: 4096 Bytes > HOST-RESOURCES-MIB::hrStorageAllocationUnits.7 = INTEGER: 1024 Bytes > HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 1048740 > HOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 1048740 > HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 1052248 > HOST-RESOURCES-MIB::hrStorageSize.4 = INTEGER: 15820593 > HOST-RESOURCES-MIB::hrStorageSize.5 = INTEGER: 0 > HOST-RESOURCES-MIB::hrStorageSize.6 = INTEGER: 0 > HOST-RESOURCES-MIB::hrStorageSize.7 = INTEGER: 101086 > HOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 19500 > HOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 1039048 > HOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 922588 > HOST-RESOURCES-MIB::hrStorageUsed.4 = INTEGER: 1416399 > HOST-RESOURCES-MIB::hrStorageUsed.5 = INTEGER: 0 > HOST-RESOURCES-MIB::hrStorageUsed.6 = INTEGER: 0 > HOST-RESOURCES-MIB::hrStorageUsed.7 = INTEGER: 17733 I can see that hrStorageDescr.4 is "/" so I know I'm querying the correct volume. My hrStorageAllocationUnits.4 is 4096 Bytes which is my block size. hrStorageSize.4 is 15820593...and multiplying that by 4096 I get 64801148928. That's the total size of my disk in bytes. hrStorageUsed.4 is 1416399 and multiplying that by 4096 I get 5801570304. That's the total size of used space in bytes. Note: if you wanted to get free space you'd have to subtract the size of the disk by the size of used space as there is no mib for available space. Anyway, my used bytes is 5801570304, and if I divide this by 1024 I get the same used 1k blocks from df (without the -h) as above 5665596. -------------------- m2f -------------------- Read this topic online here: http://community.zenoss.com/forums/viewtopic.php?p=22248#22248 -------------------- m2f -------------------- _______________________________________________ zenoss-users mailing list [email protected] http://lists.zenoss.org/mailman/listinfo/zenoss-users
