Overflowing disks? Yes, there are… A simple checker script helps.
Adapted to Linux from:
http://sunportal.sunmanagers.org/pipermail/summaries/2001-November/000398.html#!/bin/bash
# Set up variable for who is to be mailed
ADMIN_MAIL="mail@host.domain"# The maximum percent that the disk slices are allowed to grow to
MAXSIZE=80# The Command to check the disks and strip out unwanted variables
DISKSIZES=`df -k |grep / |awk '{print $5}' |sed -e 's/%//'`# Take the input from the df command above
for percent in $DISKSIZES
do# If the percent is greater than the maximum percent that the disk
# slices are allowed to grow to
if [ $percent -gt $MAXSIZE ]
then# Mail a df -k to the specified person(s)
df -h | mail -s "Disk Space Problem on $HOSTNAME " $ADMIN_MAILfidone