Shell scripting (BASH) : Notify admin user if script load crossed certain limit
It is possible to monitor UNIX system load average and if it crossed certain limit an email can be send to admin user or even text via pager/sms.
1) Download/view chksysload.bash script
2) Open script using vi:
# vi chksysload.bash
3) Customize it according to your needs:
# Setup up limit below
NOTIFY="6.0"
# Setup admin user email-id
EMAIL="me@mycorp.net"
# Subject for email
SUBJECT="Alert $(hostname) load average"
4) Save and close the file.
5) Install script as cronjob
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Bash Shell Find out Linux / FreeBSD / UNIX system load average
- How to: Check the bash shell script is being run by root or not
- Bash shell script tip: Run commands from a variable
- Run a perl or shell script cron job on the first Monday or the Nth weekday of the month
- Shell scripting (BASH) : How to create temporary random file name
Discussion on This Article:
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!



Where is chksysload.bash? The link is broken. Please check and make this script available.
Thanks
Johnny
Johnny,
Link is fixed. Have a fun!