The "Go" JPS command uses

Source: Internet
Author: User

Original link http://blog.csdn.net/fwch1982/article/details/7947451

The JPS (Java Virtual machine Process Status Tool) is a command that JDK 1.5 provides to show all current Java process PID

Simple and practical, ideal for simple viewing of the current Java process on the Linux/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 if we've actually started.

Several Java processes (because each Java program will monopolize a Java Virtual machine instance), and their process number (to prepare for the next few programs),

You can also view the detailed startup parameters for these processes through opt.

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 parameters 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/da Ta/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

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

1,JPS viewing Java processes

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 "Go" JPS command uses

Related Article

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.