Keeping an eye on disk space usage is critical to keeping a server healthy. One of the last things a system admin wants is a system to run out of disk space.
Let Rackspace make the difference with reliable managed hosting solutions backed by Fanatical Support.™ 100% Network Uptime Money-Back Guar., 1-hour hardware replacement, 24/7 LIVE, MS and LNX certified technical support.
So, how does a Linux System Administrator check his server for used and available disk space? Use Putty or your favorite SSH client and logon to your server. Switch to the root user once you are logged.
Then execute the following command:
root@server [~]# df
This command will show you the disk space among your partitions in KB size.
Sample Output:
Filesystem1K-blocksUsedAvailableUse%Mounted on
/dev/hda337167560143442122093531241%/
/dev/hda12566672779021562512%/boot
/dev/hdc138464340165355481997488846%/backup
none76669607666960%/dev/shm
/dev/tmpMnt806288174167479123%/tmp
If you want to see your server disk space in Gigabyte data change the command as shown in our next example:
root@server [~]# df -h
Sample Output:
FilesystemSizeUsedAvailUse%Mounted on
/dev/hda336G14G20G41%/
/dev/hda1251M28M211M12%/boot
/dev/hdc137G16G20G46%/backup
none749M0749M0%/dev/shm
/dev/tmpMnt788M18M731M3%/tmp
I make it a habit to check servers whenever I log into one via SSH. Next to using the "top" command, checking the disk space is one of my high priority items.