aksakalli / gtop

System monitoring dashboard for terminal
MIT License
9.7k stars 326 forks source link

Disk usage is different than what reported by df on the Ubuntu #118

Open sangshuduo opened 2 years ago

sangshuduo commented 2 years ago

Environment

v12.22.6

Description

what df reports:

Filesystem Size Used Avail Use% Mounted on udev 3.8G 0 3.8G 0% /dev tmpfs 771M 1.9M 769M 1% /run /dev/sda8 201G 92G 99G 49% / tmpfs 3.8G 0 3.8G 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup /dev/loop1 128K 128K 0 100% /snap/bare/5 /dev/loop0 56M 56M 0 100% /snap/core18/2246 /dev/loop3 62M 62M 0 100% /snap/core20/1242 /dev/loop2 56M 56M 0 100% /snap/core18/2253 /dev/loop5 219M 219M 0 100% /snap/gnome-3-34-1804/72 /dev/loop4 62M 62M 0 100% /snap/core20/1270 /dev/loop6 219M 219M 0 100% /snap/gnome-3-34-1804/77 /dev/loop7 248M 248M 0 100% /snap/gnome-3-38-2004/87 /dev/loop8 65M 65M 0 100% /snap/gtk-common-themes/1514 /dev/loop9 55M 55M 0 100% /snap/snap-store/558 /dev/loop10 51M 51M 0 100% /snap/snap-store/547 /dev/loop11 66M 66M 0 100% /snap/gtk-common-themes/1519 /dev/loop12 43M 43M 0 100% /snap/snapd/14066 /dev/loop13 14M 14M 0 100% /snap/universal-ctags/552 /dev/loop14 44M 44M 0 100% /snap/snapd/14295 /dev/loop15 15M 15M 0 100% /snap/universal-ctags/749 /dev/sda6 2.7G 158M 2.4G 7% /boot /dev/sda2 96M 31M 66M 32% /boot/efi /dev/sda9 550G 92G 431G 18% /home tmpfs 771M 648K 771M 1% /run/user/1000

what gtop reports:

image

aksakalli commented 2 years ago

Hi, gtop is showing the first disk entry from fsSize method of systeminformation. If you have multiple mounted disks, it might be different from what you expected.

sangshuduo commented 2 years ago

how about show the percentage of (total free size) / (total disk size)?