mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
armbsdcli-utilitieslinuxperlperl5remote-admin-toolsupport-toolssysadmin-toolsysinfosystem-administration
052a5d16ed
to identify a partition, but rather the basic /dev/sdc for example. This made -D show wrong disk used percentage. Also, I added --total for df that have that supported, there is however an oddity which you can see here: df --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \ --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \ --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs | \ awk 'BEGIN {total=0} !/total/ {total = total + $4 }END {print total}' result: 614562236 df --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \ --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \ --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs | \ awk 'BEGIN {total=0} /^total/ {total = total + $4 }END {print total}' result: 614562228 df -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \ --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \ --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs | \ awk 'BEGIN {total=0} {total = total + $4 }END {print total}' result: 614562236 In my tests, using --total gives a greater disk user percentage than adding the results up manually, as inxi did before, and still does for systems without --total for df. df --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \ --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs \ --exclude-type=procfs --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs \ --exclude-type=unionfs Filesystem Type 1024-blocks Used Available Capacity Mounted on /dev/disk/by-label/root-data ext3 12479556 12015624 335816 98% / /dev/sdc9 ext3 20410156 18013360 1979432 91% /home /dev/sdc7 ext3 4904448 3785460 1016672 79% /media/sdb2 /dev/sdc5 ext3 30382896 27467220 2295720 93% /var/www/m /dev/sdc8 ext3 61294356 41849300 18196972 70% /home/me/1 /dev/sdb1 ext3 307532728 285159432 20810456 94% /home/me/2 /dev/sdd1 ext3 26789720 18153076 7542620 71% /home/me/3 /dev/sdd2 ext3 213310776 206932912 2040960 100% /home/me/4 /dev/sda7 ext3 10138204 1185772 8434348 13% /home/me/5 total - 687242840 614562156 62652996 91% - Strange, no? the data is in blocks, and it should of course in theory add up to exactly the same thing. However, because --total lets df do the math, I'm going to use that for now, unless someone can show it's not good. inxi still falls back for bsds and older df to the standard method. |
||
---|---|---|
inxi | ||
inxi.1 | ||
inxi.changelog |