标签:访问时间
#!/bin/bash
lsof -i :80 &> /dev/null
LS=`echo $?`
elinkshttp://192.168.5.14 -dump &> /dev/null
CA=`echo $?`
T=`curl -s -o/dev/null -w %{time_total}"\n" "http://192.168.5.14" | cut-d "." -f1`
if [ $LS -ne 0];then
echo "unknow apache";exit 3
elif [ $CA -ne 0];then
echo "warning:there is somethingwrong with apache";exit 2
elif [ $T -ge 5];then
echo "warning:Response time is $Ts";exit 2
else
echo "Response time isok";exit 0
fi
本文出自 “运维之道” 博客,请务必保留此出处http://lrtao2010.blog.51cto.com/10425744/1701933
标签:访问时间
原文地址:http://lrtao2010.blog.51cto.com/10425744/1701933