Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I started a Tomcat7 user instance with tomcat7-instance/bin/, but how can I chek if that instance is running or not? Of course, an easier way than with ps | grep.

I know that to check the service status you can use service tomcat7 status, but this is an user instance.

I'm using Ubuntu 12.10 and 13.10.

share|improve this question
up vote 1 down vote accepted

If you installed from repositories then service tomcat7 status should work. Or /etc/init.d/tomcat7 status:

My output from running either of the above commands is below:

Tomcat servlet engine is running with pid 14416.

The way that debian checks is by the below command:

start-stop-daemon --test --start --pidfile /var/run/ --user tomcat7 --exec /usr/bin/java >/dev/null 2>&1; echo $?

If the value returned is anything but 0 then tomcat is running.

share|improve this answer
Is your OS Redhat/Centos? Do you use 3rd party repo, because with official Redhat repo there is no tomcat7 package – Shâu Shắc Nov 7 '13 at 3:59
My example is using Debian Wheezy. – jersten Nov 7 '13 at 4:13
The problem is that I want to check this for a tomcat user instance not the service itself. – Adrian Ber Nov 7 '13 at 9:53
Do you have access to start-stop-daemon? If you do then you should be able to run the example I posted above. – jersten Nov 7 '13 at 18:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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