Hi,
Nagios is also an excellent tool along these lines.

You didn't mention you tomcat version, but recent ones have a switch in
$CATALINA_HOME/bin/catalina.sh which writes the PID out to a file of
your choice.  This will be the actual PID and you don't have to write
the script yourself.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: QM [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, July 27, 2004 8:55 PM
>To: Tomcat Users List
>Subject: Re: tomcat PID creation and monitoring
>
>On Tue, Jul 27, 2004 at 02:14:13PM -0700, Caleb Walker wrote:
>: PID=$!
>: echo $PID > $pid_file
>: Doing this makes tomcat create a pid file that I can then monitor
with
>: our monitoring server.  What it does is look at the PID file and
>: compares that with the running processes.
>: What is happening is our monitoring system will display the service
as
>: down and I go into the server and the service is not down but the
>: running processes do not match the PID file like the tomcat processes
>: restart without using my PID file creation script.
>
>1/ IIRC, the script that fires off Tomcat calls commons-daemon (jsvc
>is the native Linux portion) so $! won't give you a reliable PID.
>
>2/ Write (or find) an application-level watchdog that will occasionally
>access the service itself and fire an action on failure.  (A homegrown
>tool could start with "lynx -dump" or something of that nature.)
>
>For example, BigIP performs an app-level ping by hitting a specified
URL
>and testing the response content.
>
>-QM
>
>--
>
>software  -- http://www.brandxdev.net
>tech news -- http://www.RoarNetworX.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to