Date: 2016mar3
Language: Java
OS: Linux
Keywords: Jetty, Tomcat, servlet
Q. Why can't jps find my long-running Java process?
A. jps finds itself so its good to use the -l option you can tell process apart.
1. Your process and jps both need to use the same tmp folder
jps -l -J-Djava.io.tmpdir=/the-tmp-dir
where /the-tmp-dir is the same as your process.
2. Since its long running maybe the files were cleaned up form the tmp folder.
Make a file called /etc/tmpfiles.d/jps.conf that contains:
x /tmp/hsperfdata_*
This will exclude the tracking files from cleanup.
You can restart you long running process to recreate these files.