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]
