tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: tomcat PID creation and monitoring
Date Wed, 28 Jul 2004 13:03:00 GMT
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/ 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 []
>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
>: 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
>: 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
>and testing the response content.
>software  --
>tech news --
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message