You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by brian janaszek <bm...@anklebiter.net> on 2003/04/08 18:16:51 UTC

RE: tomcat pid

> Personally I like grepping ;)  I add a java options like -Dname=tomcat
> and then ps -ef | grep java | grep tomcat tends to work.  
> 
> However, I do recall someone posting a modified catalina.sh which writes
> the process ID to a (configurable path) file on startup.  Search the
> archives for this.  Or modify Catalina.sh to do it yourself, it's pretty
> easy 
> (cat $$ > /tmp/tomcatpid.txt or something like that).
> 

Well, if you're starting Tomcat via an /etc/rc.d/init.d script, that'll
write the PID to /var/run/tomcat.pid.  Otherwise, you can do as Yoav
suggested, use grep, and keep track of the first instance you come
across (which will be the parent).  If I was still at work, I could cut
the syntax from our shutdown script, but...any decent shell tutorial
will tell you have to keep track of that stuff in a script.

brian


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org