- 论坛徽章:
- 39
|
本帖最后由 关阴月飞 于 2013-02-28 21:55 编辑
- URL1="http://1.1.1.2/static/html/SA_Test_Page.html"
- URL2="http://1.1.1.3/static/html/SA_Test_Page.html"
- URL3="http://1.1.1.4/static/html/SA_Test_Page.html"
- URL4="http://1.1.1.5/static/html/SA_Test_Page.html"
- URL5="http://1.1.1.6/static/html/SA_Test_Page.html"
- for i in $URL{1..5}
- do
- HTTPOKID=`curl -o /dev/null -s -m 10 --connect-timeout 10 -w %{http_code} $i`
- if [ $HTTPOKID -eq 200 ];then
- echo "OK!"
- else
- /bin/echo -e "$i 无法访问,$HTTPOKID1,请立即处理!" | sendEmail -f monitor@test.com -t wenglian@test.com -u error -s smtp.exmail.qq.com -xu monitor@test.com -xp 1168 >> err.txt 2>&1
- fi
- done
复制代码 |
|