tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Jackson" <mjack...@cdi-hq.com>
Subject RE: Checking if Tomcat is up
Date Mon, 13 Jan 2003 19:34:02 GMT
I just use a shell script, which looks something like this:

	#!/bin/sh
	while [ true ]
	do
		sleep 300

		COUNT=`ps -fdae | grep tomcat | wc -l`
		if [ $COUNT > 0 ]; then
			continue;
		else
			echo "Tomcat down at `date`" | mail pager@somewhere -s "tomcat problem"
		fi

		wget http://ip/app/index.jsp > /dev/null 2>&1
		if [ $? = 0 ]; then
			continue;
		else
			echo "Tomcat not responding at `date`" | mail pager@somewhere -s
"possible tomcat problem"
		fi
	done

Some of the syntax may be incorrect, you'd have to fix it if you cared.  I'm
typing this
from memory.

--mikej
-=-----
mike jackson
mjackson@cdi-hq.com

> -----Original Message-----
> From: Scott Purcell [mailto:spurcell@vertisinc.com]
> Sent: Monday, January 13, 2003 11:27 AM
> To: Tomcat Users List
> Subject: RE: Checking if Tomcat is up
>
>
> That sounds good, you could probably create a small app with
> threads which uses the url class to connect to your tomcat, try
> and read a url. If that throws a error, your down, else your up.
> I use the url class quite a bit to ensure servers are alive
> before using xml-rpc on them.
>
>
> Scott
>
> -----Original Message-----
> From: Abhijat Thakur [mailto:athakur@bdnacorp.com]
> Sent: Monday, January 13, 2003 1:17 PM
> To: Tomcat Users List
> Subject: RE: Checking if Tomcat is up
>
>
> I have background threads running which keep checking if Tomcat
> is up or not. Lets say Tomcat hangs up or something then these
> background threads call to shutdown the application and tomcat
> clean up all the processes. This is to Monitor if my application
> is working properly.
>
> thanks
>
> abhijat
>
> -----Original Message-----
> From: Turner, John [mailto:JTurner@AAS.com]
> Sent: Monday, January 13, 2003 10:57 AM
> To: 'Tomcat Users List'
> Subject: RE: Checking if Tomcat is up
>
>
>
> Myabe I'm missing something, but if Tomcat is down how can your
> application
> run to be checking that Tomcat is up?  Your application needs Tomcat to
> execute.
>
> John
>
>
> > -----Original Message-----
> > From: Abhijat Thakur [mailto:athakur@bdnacorp.com]
> > Sent: Monday, January 13, 2003 1:55 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: Checking if Tomcat is up
> >
> >
> >
> > Is it pssible to check intemittently through my java
> > application if my Tomcat server is up ? What can i check for
> > to see if my Tomcat server is up. The scenaruio is that if
> > something happens to Tomcat where my it hangs up i should
> > ring my application down, for that i have to check
> > intermittently if my Tomcat is up. What is it that i can
> > check to see if Tomcat is up ?
> >
> > thanks
> >
> > abhijat
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:tomcat-user-help@jakarta.apache.org>
> >
>
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message