I am working on linux server.

I want to know whether there exists a PID for each tomcat service running on any server.

If there exists a PID for a particular tomcat service, then can we find the service name corresponding to that PID?

Can we list all the tomcat services running on the server?

  • You tagged both Linux and ibm-unix-system-services; can you clarify the OS you're working in? – Jeff Schaller Jun 29 '17 at 12:09
  • @JeffSchaller I am working on linux server. Sorry for the inconvenience caused. – Aditya Jun 29 '17 at 12:11

ps -ef |grep tomcat

sun 5144 1 0 10:21 pts/1 00:00:06 /Java/jdk/bin/java
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/java/tomcat/common/endorsed -classpath :/java/tomcat/bin/bootstrap.jar:/java/tomcat/bin/commons-logging-api.jar
-Dcatalina.base=/java/tomcat -Dcatalina.home=/java/tomcat -Djava.io.tmpdir=/java/tomcat/temp org.apache.catalina.startup.Bootstrap start


  • Thanks for your efforts. Actually when I am executing this command: ps -ef | grep tomcat. It is not showing anything. But there are some services in which instead of Dcatalina it is showing Dwapper and Djavax. Can you please tell me what is that? And how to find out those services from command line? – Aditya Jun 29 '17 at 12:15

You can use netstat to capture the PID. But this will depend on whether or not the service is actually running on the server. netstat would capture the port it is binding to as well as the PID and program name. Granted that you have Tomocat running on port 80, you can try the following:

netstat -tulnp | grep '80'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.