rhces 发表于 2018-8-24 09:26:09

shell监控 利用外部smtp发送至189邮箱

#!/bin/sh  
for 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]
查看完整版本: shell监控 利用外部smtp发送至189邮箱