shell监控 利用外部smtp发送至189邮箱
#!/bin/shfor IP in `cat /usr/jshell/ip.txt`
do
CON=`/opt/mysql/bin/mysqladmin -u**** -p**** -h $IP processlist -v | wc -l`
if [ $CON -ge 50 ] ;then
echo "connections $CON"|mail -s "Mysql Report From $IP" 189******00@189.cn
fi;
done;
页:
[1]