FreeBSD Disk Space


23-01-2004 23:35:22

Maybe its just me, but on my FreeBSD 4.9-R system, disk space graphs from both Cacti AND NetMRG both seem to be off by some.

For example

Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 126M 29M 87M 25% /
/dev/da0s1f 252M 1000K 231M 0% /tmp
/dev/da0s1g 16G 1.7G 13G 12% /usr
/dev/da0s1e 252M 29M 203M 12% /var
/dev/da1s1e 15G 1.0G 13G 8% /www
procfs 4.0K 4.0K 0B 100% /proc

but... NetMRG currently reports

Total Space

/www 13.59G
/var 231.80M
/tmp 231.80M
/ 115.89M
/usr 14.70G

This appears to only occur with the 'Total Space' figure, the others appear to be right.

I am running net-snmp-5.1



24-01-2004 14:23:57

This might be a differene in how the 'human readable' formatting is accomplished. RRDtool (which both Cacti and NetMRG are based on) use 1024 as the multiplier for K,M,G.. calculations. Perhaps FreeBSD's 'df' uses 1000 for it's mulitplier. In linux, -h = 1024 and -H = 1000; note the differences in their output
[code162ff8c3153]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 14G 5.1G 8.0G 39% /
/dev/hda1 101M 11M 84M 12% /boot
/dev/hda6 28G 6.7G 21G 25% /mnt/shared
none 252M 0 252M 0% /dev/shm

$ df -H
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 15G 5.5G 8.6G 39% /
/dev/hda1 105M 12M 89M 12% /boot
/dev/hda6 30G 7.1G 23G 25% /mnt/shared
none 264M 0 264M 0% /dev/shm



24-01-2004 15:42:51

I've seen some strange things with disk space graphs. On a linux box with net-snmp, if the partition was steadily filling, when it reached the capacity, the capacity would expand upwards for another few megs.

Not sure if net-snmp is to blame, or perhaps the OS, but inconsistencies in disk usage/available/capacity seem to be fairly common.