文章分类 - 监控web
摘要:[root@db01-51 scripts]# cat check_web3.sh #!/bin/bash if [ "`curl -s www.baidu.com|egrep "百度一下"|wc -l`" = "1" ] then echo "httpd is running" else echo "httpd is stopped" fi
阅读全文
摘要:[root@db01-51 scripts]# cat check_web.sh #/bin/bash if [ "`curl -I www.baidu.com &>/dev/null && echo $?`" = "0" ] then echo "httpd is running" else echo "httpd is stoppd" fi
阅读全文
摘要:[root@db01-51 scripts]# cat check_web.sh #!/bin/bash if [ `curl -I www.baidu.com 2>/dev/null|head -1|egrep "200|302|301"|wc -l` -eq 1 ] then echo "httpd is running" else echo "httpd is ...
阅读全文
摘要:[root@db01-51 scripts]# cat check_web.sh #!/bin/bash if [ "`curl -I -s -w "%{http_code}\n" -o /dev/null www.baidu.com`" = "200" ] then echo "httpd is running" else echo "httpd is stopped...
阅读全文

浙公网安备 33010602011771号