Question: How can I configure a Unix server to tell me when the hard drive is getting full?
Answer: Unix, Linux, and Unix-like systems have a command called “df” that reports disk space information about the server’s file system. Entering the following command:
# df -P /
produces output like the following:
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/mapper/VolGroup00-LogVol00 6983168 3824556 2798164 58% /
The next step involves configuring a shell script and setting up a cron job to periodically check the disk space and send a warning to notify you when the server’s file system is getting full. For a complete tutorial, see nixCraft.
Photo: Wikimedia Commons