This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# this script was initially written for Redhat/CentOS | |
# file is /etc/cron.daily/diskAlert.cron | |
# requires enabling outgoing sendmail from localhost to a valid | |
# smtp server, which is usually disabled by default | |
ADMIN="[email protected],[email protected]" | |
THRESHOLD=90 | |
df -PkH | grep -vE '^Filesystem|tmpfs|cdrom|media' | awk '{ print $5 " " $6 }' | while read output; | |
do |