This is the script that I mentioned - it runs from a central server so that there is only ever one copy of the files irrespective of how many hosts are being checked.
Also this script only mails changes to filesystem size, and only filesystems over 80% full are monitored.
Amend the values of the HOSTS and OUTPUT_FILE variables to suit your setup. Include the pathname in OUTPUT_FILE.
#!/usr/bin/ksh
############################################################
# FILE: df_check.sh
# VERSION: 2.1
# WRITTEN BY: D Vickers
############################################################
# REQUIRES: rsh access to remote nodes
############################################################
# OTHER FILES:
# creates config file to keep date of previous check.
# creates file ddmmyy.df to maintain df information.
############################################################
# MODIFICATIONS:
# DATE AUTHOR CHANGE
# ===== ====== ======
# 11/06 DV Amended script to mail root user.
# 11/06 DV Added better mail message when no change.
############################################################
## BUG-TRAQ:
## DATE REPORTED BY DESCRIPTION
## ===== =========== ===========
## 11/06 DV Does not mail relevant hostname
## with filesystem, which is a hassle
## if filesystem is /home or something.
## 11/06 DV COMPLETED. (amended awk statement).
##
## 12/06 DV Under certain scenarios the old
## dfout.PID file does not get removed.
############################################################
############################################################
# Set variables.
############################################################
# You may change these values to reflect hosts checked.
############################################################
HOSTS="hostname1 hostname2 hostname3 hostname4"
############################################################
# Do not change anything below this line.
############################################################
DFCHK_CFG="dfchk.cfg"
OUTPUT_FILE="/tmp/dfout.$$"
MAIL_FILE="df.mail"
SUBJECT="Usage checks: "`date`
############################################################
# Loop through hosts to get df values.
############################################################
for host in `echo ${HOSTS}`
do
echo "HOSTNAME: ${host}"
rsh ${host} df -k|tr -d "%"| awk 'BEGIN{getline} $4 > 80 {print $4,hostnm,$7}' hostnm=${host} | sort +0 -r -n 2> /dev/null
echo "\n"
done > ${OUTPUT_FILE}
############################################################
# Check against previous findings.
############################################################
############################################################
# Ensure that previous findings are available...
# ...get value from $DFCHK_CFG file.
############################################################
if [ ! -f ${DFCHK_CFG} ]
then
touch ${DFCHK_CFG}
fi
PREVIOUS_OUTPUT=`head -1 $DFCHK_CFG`
if [ -z "${PREVIOUS_OUTPUT}" ]
then
echo "ERROR: previous value does not exist"
echo ${OUTPUT_FILE} > ${DFCHK_CFG}
exit 1
fi
############################################################
# Check for differences in current log against previous log.
############################################################
diff -ct ${PREVIOUS_OUTPUT} ${OUTPUT_FILE} | grep -v "\---" | egrep "^\-|^\+|^!"
> ${MAIL_FILE}
############################################################
# If mail file is empty then no filesystem usage has changed.
############################################################
NUM_LINES=`wc -l ${MAIL_FILE}|awk '{print $1}'`
if [ ${NUM_LINES} -eq 0 ]
then
# File is empty
echo "There has been no change to %used" > ${MAIL_FILE}
fi
mail -s "${SUBJECT}" root < ${MAIL_FILE}
rm ${MAIL_FILE}
############################################################
# Put current information in the config file.
# delete old information.
############################################################
echo ${OUTPUT_FILE} > ${DFCHK_CFG}
rm $PREVIOUS_OUTPUT
############################################################
# END OF SCRIPT
############################################################

Dave V.