文章分类 -  监控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 阅读全文
posted @ 2017-03-11 22:18 reborn枪 阅读(59) 评论(0) 推荐(0)
摘要:[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 阅读全文
posted @ 2017-03-11 11:43 reborn枪 阅读(63) 评论(0) 推荐(0)
摘要:[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 ... 阅读全文
posted @ 2017-03-11 11:41 reborn枪 阅读(59) 评论(0) 推荐(0)
摘要:[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... 阅读全文
posted @ 2017-03-11 11:40 reborn枪 阅读(65) 评论(0) 推荐(0)