JPS (Java Virtual machine process Status Tool) is a JDK1.5 provides a command to display all current Java process PID, simple and practical, very suitable for linux/ Simple view of the current Java process on the UNIX platform. Many people use the PS command in UNIX systems, which is used primarily to show the current system's progress, which processes and process IDs. The same is true of JPS, which shows the current system's Java process and process ID. We can use it to see how many Java processes we've started (because each Java program will have a single Java Virtual machine instance) and opt to see the detailed startup parameters for those processes.
How to use: in the current command line to hit JPS (JPS stored in the JAVA_HOME/BIN/JPS, in order to facilitate the use of the java_home/bin/to join the path).
$> JPS
23991 Jps
23651 Resin
Compare Common parameters:
-Q displays only the PID, does not display the class name, the jar file name, and the arguments passed to the main method
$> Jps-q
28680
23789
23651
-m output parameters passed to the main method, which may be null on the embedded JVM
$> jps-m
28715 jps-m
23789 Bossmain
23651 resin-socketwait 32768-stdout/resin/log/stdout.log-stderr/resin/log/stderr.log
-L OUTPUT The full package name of the main class of the application or the full path name of the application's jar file
$> jps-l
28729 Sun.tools.jps.Jps
23789 Com.asiainfo.aimc.bossbi.BossMain
23651 Com.caucho.server.resin.Resin
-V Output parameters passed to the JVM
$> jps-v
23789 Bossmain
28802 jps-denv.class.path=/data/aoxj/bossbi/twsecurity/java/trustwork140.jar:/data/aoxj/bossbi/twsecurity/java/ :/data/aoxj/bossbi/twsecurity/java/twcmcc.jar:/data/aoxj/jdk15/lib/rt.jar:/data/aoxj/jdk15/lib/tools.jar- Dapplication.home=/data/aoxj/jdk15-xms8m
23651 resin-xss1m-dresin.home=/data/aoxj/resin-dserver.root=/data/aoxj/resin-djava.util.logging.manager= Com.caucho.log.logmanagerimpl-djavax.management.builder.initial=com.caucho.jmx.mbeanserverbuilderimpl
Disclaimer: This article by the Swiftlet Net original compilation, reproduced please keep the link: JPS command use
The JPS command uses