产品的质量依赖于过程的质量, 而过程的质量依赖于企业文化和管理!
欢迎大家来到我的小窝~!
checkport自动检测apache端口重启策略
上一篇 /
下一篇 2011-08-26 15:11:30
/ 个人分类:apache
set LogFile=system.log
5ia&K)h'xbID0rem检测URL
J%v;zCo[X}g7e6~0set
CheckUrl=http://www.baidu.com51Testing软件测试网8SV0Dpi}!kD
rem使用wget下载网页首页文件,并记录日志51Testing软件测试网WT+Ab&F6Px
.\wget -t 3 -T 2 --no-cache -a
wget.log -d %CheckUrl% -O .\Index.html51Testing软件测试网 ~Eu)Xb
IF ERRORLEVEL 1 (
7tG2s jC^Mp6Gf%Z'v0 find "Connection timed out" .\wget.log
>NUL51Testing软件测试网fDW8J/J5IS-`'LZX3[]8~
IF not ERRORLEVEL 1 (
kPt+h0nC VZ^*O0 set TextLog=Connection timed out
OQ.w'}A@!a;_@0 call :WriteLog
J\1eIJek~0 call :RestartWeb
%mo| e:K0 ) else (51Testing软件测试网V7eu[#z3g5V
set TextLog=error occurred
NM!~l-i
x N,rw0 call :WriteLog
Ms6X1fK0 copy /Y index.html
"%date:~0,4%%date:~5,2%%date:~8,2% %time:~0,2%%time:~3,2%%time:~6,2%.html"51Testing软件测试网6h&K:Y3H2i'L:n
copy /Y wget.log
"%date:~0,4%%date:~5,2%%date:~8,2%
%time:~0,2%%time:~3,2%%time:~6,2%.log"51Testing软件测试网] k"W*o^
call :RestartWeb
'@.iT)PwEJ{g-[0 )
+c)l\;B*@e*?gbit0) else (
DQstG0 find "newtopbg_logo" .\Index.html
>NUL51Testing软件测试网W mmw'~3X-z M$A
IF ERRORLEVEL 1 (51Testing软件测试网;~9~NK[b(tV
set TextLog=apache error51Testing软件测试网7btm2F+g
^*]
call :WriteLog
4Hm6q\3\$sx0 call :RestartWeb
i!D4bP(s0 )
9so8a{(a F1J+`&k|N0)51Testing软件测试网
K1ofESxB9h3lL
收藏
举报
TAG: