Maybe you can get somewhere looking at the parent process ID (PPID)
column in ps output
and knowing the PID of cronolog process.

Best regards,
Konstantin Kolinko

2011/10/28 Cooper man <michael.coo...@spika.com>:
>
> The danger with that is if you have multiple jvms running on one machine as
> we do, you will get a list of ids
>
>
> Raghu GS wrote:
>>
>> Thank you so much for coming up with a solution for this problem.
>> I found a better hack for this problem here
>> http://www.tomcatexpert.com/comment/reply/249/220
>>
>>
>> Cooper man wrote:
>>>
>>> No problem , glad I can be of help as it took me so long to figure it out
>>> too
>>>
>>>
>>> You need to change the block where the pid is assigned which should be
>>> just under the line I described
>>>
>>>  if [ ! -z "$CATALINA_PID" ]; then
>>>
>>>       fi
>>>
>>> And this is a bit of a hack but something like this will give you the
>>> correct pid.
>>> Set application.name or soehting similar as a jave env variable and then
>>>
>>>  if [ ! -z "$CATALINA_PID" ]; then
>>>         ps aux | grep tomcat  | grep application.name=YOUR_APP_NAME |
>>> head -n 1 | awk '{ print $2 }' > $CATALINA_PID
>>>       fi
>>>
>>>
>>>
>>>
>>>
>>> Raghu GS wrote:
>>>>
>>>> Hi Cooper Man
>>>>
>>>> You are a genius.
>>>> you have perfectly guessed our setup and problem.
>>>> And I am very happy about finding the root cause finally.
>>>> Is there any solution for this problem?
>>>>
>>>> Cooper man wrote:
>>>>>
>>>>> Hi Raghu,
>>>>>
>>>>> My guess is that you have changed the logging to use cronolog and as
>>>>> such the PID being written is actually the logging process and not the
>>>>> catalina process. Check your catalina.sh file
>>>>> If you see something like this
>>>>>
>>>>> org.apache.catalina.startup.Bootstrap "$@" start 2>&1
>>>>> |/usr/bin/cronolog "$CATALINA_BASE"
>>>>>
>>>>> Then there is your answer
>>>>>
>>>>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to