#cpu报警 if [ $CPU -eq 4 ];then echo "wa=$WA and id=$ID cpu processor is ok" else echo "wa=$WA and id=$ID cpu processor have problem" |mutt -s "SYSTEM-memory" *********@163.com fi if [ $LOAD -gt 0.05 ];then echo "CPU-LOAD is beyond the rate" |mutt -s "CPU-LOAD" ***********@163.com else echo "CPU-LOAD is ok" fi #磁盘报警 if [ $DISK -gt 80 ];then echo "SYSTEM-DISK is beyond the 80%" |mutt -s "SYSTEM-DISK" ************@163.com else echo "SYSTEM-DISK is ok" fi #内存报警 memory=$(($FREE+$CACHE)) echo $memory if [ $memory -lt 1000 ];then echo "SYSTEM-memory less than 1000M " |mutt -s "SYSTEM-memory" *************@163.com else echo "SYSTEM-memory is ok" fi