That's a good idea. Thanks!

Take care,
-FB


On Saturday, June 7, 2003, at 03:23 PM, Tim Funk wrote:


The easy kluge is to hack the startup scripts (or write wrappers) around the startup scripts to maintain this status in some file, for arguements sake: cowbell.txt

In startup.sh --> echo "starting" > cowbell.txt
In startup.sh, a timer does wgets on a static asset. Once the asset is returned correctly: echo "started" > cowbell.txt


In shutdown.sh --> echo "stopping" > cowbell.txt
In shutdown.sh --> A timer looking for the java process id. Once the process ID is gone, echo "stopped" > cowbell.txt



-Tim


Francisco J. Bido wrote:
Thanks Tim,
Those suggestions work pretty well for checking the "running" and the "stopped" states. The ones giving me a headache are really "starting up" and "shutting down". The only thing I can think of at this point is to monitor the size of catalina.out and trigger an event went it doesn't change.
This is nasty since many things can cause the file to appear idle i.e., a busy CPU. Any thoughts on these assessing these remaining states?
-FB
On Saturday, June 7, 2003, at 02:41 PM, Tim Funk wrote:
Depending on your needs if you just need UP or down, you can use wget or a similar agent.

You can also set CATALINA_PID in unix before calling the startup scripts and the file referenced by CATALINA_PID will contain the process ID.

Or you can write a LifeCycle Listener to trap startup and shutdown events.


-Tim


Francisco J. Bido wrote:

Is there any way to assess Tomcat's state via an environment variable? For example, I would like to poll an environment variable to see if Tomcat is:
1. starting up
2. running
3. shutting down
4. stopped
There're a bunch of other states out there but the above fulfill my immediate needs.
Parsing through the catalina.out log file is the only way I know how to do this but this is approach is way too clumsy and ugly.
Thanks!
-FB




---------------------------------------------------------------------
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]


---------------------------------------------------------------------
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