On 10/11/2010 21:50, Christopher Schultz wrote:
> Bill,
>=20
> On 11/7/2010 2:35 AM, Bill Wang wrote:
>> Thanks to Christopher , Rainer, and Rainer again. I will try to unders=
tand
>> the jsvc.
>=20
>> But for SMF, because we don't run tomcat as root, I am not sure if SMF=
can
>> be set and run by normal user. I need check that first.
>=20
>> My idea is, for most applications, normally I get three options: start=
, stop
>> and status. But tomcat's catalina.sh has only two choices, startup and=
>> shutdown. I can't find exist command/script to show the tomcat status=
=2E If I
>> can show the status, I can write the script to start the tomcat, when =
its
>> status show tomcat service is down.
>=20
>> So is it possible to ask tomcat develop team to write a general script=
or
>> tool to detect tomcat status directly?
>=20
> You could log an enhancement in bugzilla. As always, patches are
> welcome. Just understand that almost all code needs to be deployed into=
> a web application, and you might not be able to convince most Tomcat
> users to deploy a special web application merely to provide status
> information.
>=20
> It might be better to define protocol for determining status (such as a=
> simple HEAD request to a configurable URL that returns a specific strin=
g
> in the response, or a specific HTTP response code if everything is okay=
)
> and then write a small piece of code to check it from the command line
> and integrate that into catalina.sh. Provide a sample implementation
> (.jsp?) and let users choose how they want to do reporting.
>=20
> The reason something like this doesn't really exist is that it's so
> poorly defined. What is "healthy" for one webapp/server might not be
> sufficient for another one.
>=20
> -chris
You could set CATALINA_PID and check that the process ID* contained in
the file is active.
p
* Assuming that the process id is the right one, as I have a vague
memory about it being the wrong one.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
|