#! /bin/bash
rmail="**********@139.com"
L="25"
host=`hostname`
while :; do
load=`uptime |awk '{print $10}' |cut -d'.' -f 1`
if [ $load -gt $L ] ; then
uptime |awk '{print $8,$9,$10,$11,$12}'>/tmp/mail.txt
mail -s $host:`cat /tmp/mail.txt|awk '{print $3$4$5}'` $rmail
sleep 600
fi
sleep 3
done
阅读(4254) | 评论(0) | 转发(2) |