JPS Tools
The JPS (Java Virtual machine process Status Tool) is a command that JDK 1.5 provides to show all of the current Java process PID, and is simple and useful for linux/ Simple view of the current Java process on the UNIX platform.
The JPS (Java Virtual machine process Status Tool) is a command that JDK 1.5 provides to show all of the current Java process PID, and is simple and useful for linux/ Simple view of the current Java process on the UNIX platform.
I think a lot of people have used the PS command in UNIX systems, which is mainly used to show the current system's progress, what processes it has, and its ID. JPS is also the same, its role is to display the current system of Java process, and its ID number. We can look through it to see how many Java processes we've started (since each Java program will monopolize a Java Virtual machine instance), and their process number (to prepare for the following programs), and opt to see the specific start-up parameters for those processes.
Usage: Play JPS under the current command line (need java_home, no words, to change the program folder).
JPS stored in the JAVA_HOME/BIN/JPS, when used for convenience please add java_home/bin/to path.
$> JPS
23991 Jps
23789 Bossmain
23651 Resin
More frequent use of the number of parameters:
-Q displays only the PID, does not display the class name, the jar file name, and the number of parameters passed to the main method
$> Jps-q
28680
23789
23651
-m output is 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/data/aoxj/resin/log/stdout.log-stderr/data/aoxj/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 outputs the number of 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/JD
K15/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
Please refer to Sun's official documentation for details.
Http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jps.html
-----------------------------------------------------------------------------------------------
JPS View Java Process lists all instances of the JVM instance: JPS List all JVM instances native JSP sudo jsp ps aux | grep Java sudo jps see the maximum number of processes JPS 192.168.0.77 list the entire JVM instance of the remote server192.168.0.77 machine, using the RMI protocol, the default connection port is 1099 (provided the remote service
1,jps View Java Process
List all instances of the JVM
Instance:
JPs
List all JVM instances on this machine
Jsp
sudo jsp
PS aux | grep java
sudo JPS See the most complete number of processes
JPS 192.168.0.77
List all JVM instances of the remote server192.168.0.77 machine, using RMI protocol, the default connection port is 1099
(Provided that the remote server provides the JSTATD service)
---------------------------------------------------------------------------
Note: The JPS command has a very bad place, it seems to only show the current user's Java process, to show other users or only can use the Unix/linux PS command.
The JPS command uses