Site icon David Yin's Blog

How to check the disk usage of your VPS

The df utility displays the disk space usage on all mounted filesystem.

The -T option prints the filesystem type as well. By default, df measures the size in 1K blocks, which could be a little difficult for a desktop user to decipher. Use the -h option to get the more understandable output:

davidyin@localhost:~$ df -h -T
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  463M     0  463M   0% /dev
tmpfs          tmpfs      99M  7.0M   92M   8% /run
/dev/sda       ext4       25G   12G   12G  51% /
tmpfs          tmpfs     493M     0  493M   0% /dev/shm
tmpfs          tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs          tmpfs     493M     0  493M   0% /sys/fs/cgroup
tmpfs          tmpfs      99M     0   99M   0% /run/user/1000
davidyin@localhost:~$

The VPS system will be problemed when the disk is used 100% full.

So to make sure the disk usage in the health range is very important. Clean the files when it is growing too fast or close to 85% or 90%.

Look at the log files. For example, web site error log, web site access log, security log files.

Exit mobile version