You have just seen how to look at real-time system state in terms of processes, memory, and networking. Now I show how to check out the filesystems, with an eye toward disk utilization.
On any computer system, running out of disk space can cause many problems. On Linux, two commands are helpful in determining disk utilization.
df (display filesystems) command shows the mounted files systems
along with statistics on space usage, as you can see in Figure 7-1.
The main device you’re interested in is the first one, which shows
/dev/vda1 mounted on
/. Note the columns showing disk size,
Figure 7-2 shows an example where disk utilization may be causing trouble.
/dev/vda1 device is 100% full!
Once you’ve seen that there may be a problem with disk space, how do you
find out where it is being used? You can use the
utilization) command for that. By default, it descends through every
directory and shows you disk usage for every subdirectory under which it
is invoked (think
DIR /S on
CMD.EXE). That can generate a lot of
output and can take a long time to run.
What we really want to do is start at the ...