On Wed, Mar 26, 2003 at 02:25:52PM -0500, Jeff Kinz wrote: CORRECTION: mail -s "$NAME load is at $load" [EMAIL PROTECTED] should be : mail -n -s "$NAME load is at $load" [EMAIL PROTECTED] < /dev/null
resulting in.: #The name of the server NAME=`hostname` # Maximum load you want to allow MY_THRESHOLD="0.5" # of seconds to wait between load checks. SECONDS=5 # Loop almost forever. while (`true`) ; do # Replace $1 with which ever field of loadavg you want. load=`cat /proc/loadavg | awk '{print $1}'` if [ $load -gt $#MY_THRESHOLD ] ; then mail -n -s "$NAME load is at $load" [EMAIL PROTECTED] < /dev/null # If we stay in this loop you'll get a TON of emails on your cell phone. exit fi sleep $SECONDS done -- Jeff Kinz, Open-PC, Emergent Research, Hudson, MA. [EMAIL PROTECTED] copyright 2003. Use is restricted. Any use is an acceptance of the offer at http://www.kinz.org/policy.html. -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list -- Jeff Kinz, Open-PC, Emergent Research, Hudson, MA. [EMAIL PROTECTED] copyright 2003. Use is restricted. Any use is an acceptance of the offer at http://www.kinz.org/policy.html. -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list