Finding JVMs (Java Virtual Machine) in a machine (JPS)
We can find all the JVMs (Java Virtual Machines ) running in a system/machine using the jps command
root@host [/usr/local/jakarta/tomcat]# jps
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.
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