Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux high load send mail

max=3; load=$(cat /proc/loadavg | cut -d' ' -f1); [[ "${load%.*}" -ge "$max" ]] && mail -s "Load exceeded $max on $(hostname -s)" username@example.com
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #linux #high #load #send #mail
ADD COMMENT
Topic
Name
9+8 =