+1 on David's suggestion As a precaution for retrieving non-cached information from the server I would also use the no-cache parameter e.g. --no-cache
Here is a quick test on my tomcat running on localhost:8080 with the --nocache parameter bash-3.1$ wget --no-cache http://localhost:8080/index.jsp | grep 'HTTP/1.1 200' --11:05:29-- http://localhost:8080/index.jsp => `index.jsp.1' Resolving localhost... 127.0.0.1 Connecting to localhost|127.0.0.1|:8080... connected. HTTP request sent, awaiting response... 200 OK Length: 8,132 (7.9K) [text/html] 100%[====================================>] 8,132 --.--K/s 11:05:29 (30.37 MB/s) - `index.jsp.1' saved [8132/8132] Would you have any interest in automating this task? Viel Gluck, Martin -- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents ----- Original Message ----- From: "David Smith" <[EMAIL PROTECTED]> To: "Tomcat Users List" <users@tomcat.apache.org> Sent: Tuesday, November 28, 2006 10:45 AM Subject: Re: server not reachable in regular period of time > Looks to me suspiciously like an issue with wget instead of tomcat. > Wget is making an attempt using a stale cached connection, failing, and > retrying. For some reason the result of the retry isn't present in the > stdout file. > > You could try adding the -S option to wget and then check for the string > 'HTTP/1.1 200' instead. That seems to me to be a more reliable method. > > --David > > [EMAIL PROTECTED] wrote: > >>unfortunately it is in German: >> >>--15:17:51-- http://localhost:8080/myapp/index.jsp >> (Versuch: 5) => `index.jsp' >>Verbindungsaufbau zu >>xxx|yyy|:8080... fehlgeschlagen: Die Wartezeit für die Verbindung ist >>abgelaufen. >>Erneuter Versuch. >> >>in English the whole stdout should mean: >> >>--15:17:51-- http://localhost:8080/myapp/index.jsp >> (attempt: 5) => `index.jsp' >>connection establishing to >>xxx|yyy|:8080... failed: the idle time for the connection is expred. >>new attemtpt. >> >> >> >>----- Originalnachricht ----- >>Von: David Smith <[EMAIL PROTECTED]> >>Datum: Dienstag, 28. November 2006 1:31 pm >>Betreff: Re: server not reachable in regular period of time >> >> >> >>>What does stdout have in it when your script registers a server down >>>condition? >>> >>>--David >>> >>>[EMAIL PROTECTED] 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" >>>>[EMAIL PROTECTED] >>>> 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: [EMAIL PROTECTED] >>>>For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>>> >>>> >>>> >>>-------------------------------------------------------------------- >>>- >>>To start a new topic, e-mail: users@tomcat.apache.org >>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >>> >> >> >>--------------------------------------------------------------------- >>To start a new topic, e-mail: users@tomcat.apache.org >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >