The JPS command uses

Source: Internet
Author: User

The JPS (Java Virtual machine process Status Tool) is a command that JDK 1.5 provides to show all current Java process PID, and is simple and practical, ideal 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 current Java process PID, and is simple and practical, ideal 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 the UNIX system, which is mainly used to show the current system's progress, which processes, and their IDs. JPS is also the same, its role is to display the current system of Java process, and its ID number. We can use it to see how many Java processes we've started (because each Java program will monopolize a Java Virtual machine instance), and their process number (to prepare for the following programs), and opt to see detailed startup parameters for those processes.

How to use: Hit JPS under the current command line (need java_home, no words, to the directory to change the program to play).

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


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/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 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/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

For details, please refer to Sun's official documentation.
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 remote server 192.168.0.77 all JVM instances of the machine, using the RMI protocol, the default connection port is 1099 (provided that 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 server 192.168.0.77 machine, using RMI protocol, the default connection port is 1099

(If the remote server provides JSTATD service)

---------------------------------------------------------------------------

Note: The JPS command has a very bad place, it appears that only the current user's Java process, to show other users or only unix/linux PS command.

The JPS command uses

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.