Download raw body.
make 'df -hi' more human readable
On Wed, Jan 07, 2026 at 11:41:15AM +0000, Job Snijders wrote: > Before: > > $ df -hi > Filesystem Size Used Avail Capacity iused ifree %iused Mounted on > /dev/sd0a 986M 159M 777M 17% 2179 153339 2% / > /dev/sd0l 295G 47.6G 233G 17% 12019 19728651 1% /home > /dev/sd0d 31.0G 1.9M 29.5G 1% 13 4224945 1% /tmp > /dev/sd0f 29.1G 2.1G 25.5G 8% 212711 3727127 6% /usr > /dev/sd0g 1.0G 347M 644M 36% 5801 149717 4% /usr/X11R6 > /dev/sd0h 19.4G 958M 17.5G 6% 31861 2611977 2% /usr/local > /dev/sd0k 5.8G 18.2M 5.5G 1% 2405 801113 1% /usr/obj > /dev/sd0j 5.8G 1.6G 4.0G 29% 122418 681100 16% /usr/src > /dev/sd0e 197G 130G 56.9G 70% 1794 13158652 1% /var > /dev/sd0m 2.8T 61.6G 2.6T 3% 8595400 803391798 2% /var/www/htdocs/rpki > mfs:50241 3.7G 1.3G 2.3G 36% 589843 1526379 28% /var/cache/rpki-client > mfs:65537 2.9G 464M 2.3G 17% 61 797505 1% /var/www/htdocs/rpki/erik/snapshot > > After: > > $ ./obj/df -hi > Filesystem Size Used Avail Capacity iused ifree %iused Mounted on > /dev/sd0a 986M 159M 777M 17% 2.2k 153k 2% / > /dev/sd0l 295G 47.6G 233G 17% 12.0k 19.7M 1% /home > /dev/sd0d 31.0G 1.9M 29.5G 1% 13 4.2M 1% /tmp > /dev/sd0f 29.1G 2.1G 25.5G 8% 213k 3.7M 6% /usr > /dev/sd0g 1.0G 347M 644M 36% 5.8k 150k 4% /usr/X11R6 > /dev/sd0h 19.4G 958M 17.5G 6% 31.9k 2.6M 2% /usr/local > /dev/sd0k 5.8G 18.2M 5.5G 1% 2.4k 801k 1% /usr/obj > /dev/sd0j 5.8G 1.6G 4.0G 29% 122k 681k 16% /usr/src > /dev/sd0e 197G 130G 56.9G 70% 1.8k 13.2M 1% /var > /dev/sd0m 2.8T 61.6G 2.6T 3% 8.6M 803M 2% /var/www/htdocs/rpki > mfs:50241 3.7G 1.3G 2.3G 36% 590k 1.5M 28% /var/cache/rpki-client > mfs:65537 2.9G 489M 2.3G 18% 57 798k 1% /var/www/htdocs/rpki/erik/snapshot > > OK? Whilst I like the general idea, the use of 1000 as a divisor instead of 1024 seems very wrong. In computing binary multiplies were always the norm for units of storage for very sensible, practical and logical reasons. Whilst it could be argued that inodes don't share the same justifications for 1024 division, (they don't relate to physical memory cells in a grid layout), the point is that OpenBSD has never, (and hopefully will never), embraced the 'kibibyte' and 'mibibyte' brigate, (I feel pain just typing those terms). Even more so, none of the other columns of Size, Used, or Avail uses decimal divisors with -h, so at least within df we have an inconsistency.
make 'df -hi' more human readable