Detailed explanation of the use of java jps commands in Linux, javajps

Source: Internet
Author: User

Detailed explanation of the use of java jps commands in Linux, javajps

In Linux, you may always use the ps command to display the information of a process. For example, you can use the following command to display the Java Process executed by the current system:

ps -ef | grep java

For java processes, JDK later provides a tool to view the current pid of all java processes.

Location

Under the JAVA_HOME/bin/directory

Function

Jps (Java Virtual Machine Process Status Tool) is a command provided by JDK 1.5 to display the current pid of all java processes. It is simple and practical, it is very suitable for viewing some simple information about the current java Process on linux/unix platforms.

Use

Run jps-help to check the usage of this command.

# jps -helpusage: jps [-help]    jps [-q] [-mlvV] [

Specific [options] Option Analysis:

-Q: Only output VM identifiers, excluding classname, jar name, arguments in main method;
-M: output the main method parameter;
-L: Completely output package name, main application class name, full jar path name;
-V: Output jvm parameters;
-V: output parameters passed to JVM through the flag file (. hotspotrc file or-XX: Flags = specified file;

Instance

Jps command:

[root@119 app]# jps16464 jar2300 jar

Jps-q:

[root@119 app]# jps -q164642300

Jps-m

[root@119 app]# jps -m16464 jar2300 jar

Jps-l

[root@119 app]# jps -l16464 test-1.0.0-SNAPSHOT.jar9671 sun.tools.jps.Jps

Of course, you can also use parameters in combination, such

jps -ml

Special instructions

Jps only looks for the current user's Java Process, not all processes in the current system.

Thank you for reading this article. I hope it will help you. Thank you for your support for this site!

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.