标签:
#!/bin/bash if [ "$1" = "-w" ] && [ "$2" -gt "0" ] && [ "$3" = "-c" ] && [ "$4" -gt "0" ]; then ip_conns=`netstat -na |grep ESTABLISHED |wc -l` if [ "$ip_conns" -ge "$4" ]; then echo "HttpProcessList: CRITICAL connet counts is: $ip_conns |TOTAL=$ip_conns;" $(exit 2) elif [ "$ip_conns" -ge "$2" ]; then echo "HttpProcessList: WARNING connet counts is: $ip_conns |TOTAL=$ip_conns;" $(exit 1) else echo "HttpProcessList: OK connet counts is: $ip_conns |TOTAL=$ip_conns;" $(exit 0) fi else echo "CheckHttpProcessList Error" fi
测试脚本./Check_httpd_processList.sh -w 60 -c 90
标签:
原文地址:http://www.cnblogs.com/Mrhuangrui/p/4627225.html