- #!/bin/bash
- source config.sh
- loadavg=$(cat /proc/loadavg | awk '{print $1}' )
- tmp_loadavg=$(echo "$loadavg * 100" | bc -l | cut -d'.' -f1)
- if [ $tmp_loadavg -ge 90 ]; then
- echo """
- hi
- i'm clara. a server Manager bot
- the server CPU Load average is greater than 0.9
- """ | mutt -s "CPU Lo" $email
- fi
|