Finding JVMs (Java Virtual Machine) in a machine (JPS)
by rajesh[ Edit ] 2008-04-13 12:52:51
We can find all the JVMs (Java Virtual Machines ) running in a system/machine using the jps command
Example:
root@host [/usr/local/jakarta/tomcat]# jps
5206
It list all the process ids of the JVM. In the above example 5206 is the process id of the JVM
The jps tool lists the instrumented Java Virtual Machines (JVMs) on the target system. The tool is limited to reporting information on JVMs for which it has the access permissions.
If jps is run without specifying a hostid, it will look for instrumented JVMs on the local host.
Credit: http://java.sun.com/javase/6/docs/technotes/tools/share/jps.html
Exmaple with options:
root@host [/usr/local/jakarta/tomcat]# jps -lvVm
5206 -Djava.endorsed.dirs=../common/endorsed -verbose
28350 sun.tools.jps.Jps -lvVm -Denv.class.path=.:/usr/local/jdk/lib/classes.zip -Dapplication.home=/usr/local/jdk1.5.0_05 -Xms8m