I am running Tomcat 6.0.31 on Ubuntu 10.10 and using tge Sun JDK (java-6-sun). Although tomcat is running its process does not show up when I run jps
(Java Virtual Machine Process Status Tool). The only output I see is the pid for the jps process itself. Why would the Tomcat process not show up?

- 302,674
- 57
- 556
- 614

- 115
- 1
- 6
-
1Have you tried running jps as root? Perhaps it is a permissions issue? – Pace Jun 09 '11 at 04:07
-
For newer JVMs, @Pace's comment points to the right answer: `jps -l` shows a different process list than `sudo jps -l` does. I have to use `sudo` to see Tomcat when it's running as root. – Lambart Jan 04 '18 at 01:03
4 Answers
You are probably running into Bug 7009828:
In Java 6 Update 23 and Java 6 Update 24, Java consider the java.io.tmpdir
property when deciding where to place some files that were needed for jps
, jconsole
and jvisulavm
to detect locally running JVMs. This means that every JVM instance that had this system property defined to something other than the default (/tmp
) would be invisible to these tools.
Tomcat installations in particular default to setting this property to their installations temp
folder.
So: either upgrade to Java 6 Update 25 or later (where the bug is fixed) or start jps
with -J-Djava.io.tmpdir=/path-to-tomcat-installation/temp
.

- 9,601
- 3
- 48
- 76

- 302,674
- 57
- 556
- 614
Could it be due to the /tmp/hsperfdata_$USER
directories being removed by a cron job running on your system? See http://www.semicomplete.com/blog/geekery/jps-shows-nothing-useful.html for more information.

- 493
- 1
- 4
- 8
-
This appears to be the problem for me too.. long running processes disappear from `jps` output, and cron job seems to be the culprit. Why didn't Java designers think about this when deciding to put those process files in the `/tmp` directory? – ADTC Feb 20 '14 at 06:44
Check your vm args whether -XX:-UsePerfData
present.
If so, remove it, and restart jvm

- 496
- 8
- 9
Check the ownership of the /tmp/hsperfdata_* directories like so:
ls -ld /tmp/hsperfdata_*
Each directory will be owned by the user which owns that java process. If the process you're interested in isn't owned by you then the data won't be accessible. However, if you run jstatd as root then it will be able to access all the data.
sudo jstatd <rest of options...>

- 1,179
- 12
- 15