Objective: To email when processes are consuming high memory and CPU loads. Usage: Add to cron and check email.

Save the above code in /root/scripts/serverLoad.sh and adjust cron to run every minute as so:

This will run every <minute> <hour> <day> <month> <day of week>, or essentially every minute. Make sure to tweak your Email address!