* * * * * THRESHOLD="10.00"; LOAD=$(/usr/bin/uptime | /bin/awk '{print $8}' | /bin/cut -d "," -f 1;); if /usr/bin/test $(/bin/echo "$LOAD > $THRESHOLD" | /usr/bin/bc -l) = 1 ; then /bin/echo "Load average too high: $LOAD " | /bin/mail -s "calliope load avg: $LOAD" 3304445555@vtext.com; else /bin/echo ""; fi; > /dev/null 2>&1
Tuesday, November 27, 2012
Cron Job to be texted/emailed when a server has a high load average
You could feasibly add this to your cron tab. Better have an unlimited text plan.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment