37.3 Command-Line Disk and Swap Space Monitoring
Disk space can, of course, be monitored both from within Cockpit and using the GNOME System Monitor. To identify disk usage from the command line, however, the df command provides a useful overview:
# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.8G 0 1.8G 0% /dev
tmpfs 374M 1.7M 372M 1% /run
/dev/sda5 92G 7.2G 80G 9% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
.
.
In the above output, the root filesystem (/) is currently only using 7.2GB of space leaving 80GB of available space.
To review current swap space and memory usage, run the free command:
# free
total used free shared buff/cache available
Mem: 3823720 ...