Dear Group,
I'm look for shell script to Monitor CPU usage and send mail once it exceed 75% I'm running Suse10.4.
Dear Group,
I'm look for shell script to Monitor CPU usage and send mail once it exceed 75% I'm running Suse10.4.
sorry bad post
How is checking the memory usage going to help you detect high CPU load?
use this for CPU usage:
if ! ps -e -o pcpu | awk '{c+=$1} END {if(c>75) exit 1;}'; then
mailx -s "subject" -c "cc@user" "to@user" < emailbody
fi