标签:weblogic监控
#!/bin/bash user=weblogic ip=192.168.1.1 weblogicport=80 mail=450433231@qq.com port=`ssh $user@$ip "netstat -antp" 2>/dev/null|grep "$weblogicport"|grep "LISTEN"|wc -l` proc=`ssh $user@$ip "ps -ef"|grep weblogic|grep "/usr/java/"|wc -l` proc1=`ssh $user@$ip "ps -ef"|grep weblogic` if [ $port -eq 1 ] && [ $proc -eq 2 ];then echo "weblogic server check OK `date`" echo "Weblogic server check OK `date`" >>/root/weblogic.log else echo "Weblogic server check error" echo "`date` Weblogic server check error info $porc1"|mail -s "Welogic" $mail echo "Weblogic server check error `date`" >>/root/weblogic.log fi标签:weblogic监控
原文地址:http://blog.51cto.com/junhai/2128465