You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by co...@compuserve.de on 2006/11/28 13:20:16 UTC
server not reachable in regular period of time
Hi all,
I run a Linux script to check every 5 minutes whether my server is still on:
#! /bin/bash
while true; do
sleep 300
`wget http://localhost:8080/myapp/index.jsp -o stdout`
result=`grep -c 'OK' stdout`
if [ $result -eq 0 ]; then
echo "server down" | mail -s "warning:server down"
myemail@yahoo.com
fi
done
>From this script I noticed that my server is not reachable every 70
minutes. Then, I open a browser and request my application. It still works.
Could any body please have an explanation for this phenomenon?
Thanks.
Gop
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: server not reachable in regular period of time
Posted by David Smith <dn...@cornell.edu>.
What does stdout have in it when your script registers a server down
condition?
--David
compuin5y313@compuserve.de wrote:
>Hi all,
>
>I run a Linux script to check every 5 minutes whether my server is still on:
>
>#! /bin/bash
>while true; do
> sleep 300
> `wget http://localhost:8080/myapp/index.jsp -o stdout`
> result=`grep -c 'OK' stdout`
> if [ $result -eq 0 ]; then
> echo "server down" | mail -s "warning:server down"
>myemail@yahoo.com
> fi
> done
>
>>From this script I noticed that my server is not reachable every 70
>minutes. Then, I open a browser and request my application. It still works.
>
>Could any body please have an explanation for this phenomenon?
>
>Thanks.
>
>Gop
>
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org