jps command of java virtual machine

1. Concept

    jps is a small tool provided by jdk to view the current java process, which can be regarded as the abbreviation of JavaVirtual Machine Process Status Tool. Very simple and practical. Only find the current user's Java process, not all processes in the current system.

2. Grammar

       jps [-q] [-mlvV] [<hostid>]

Parameter Description:

      -q: Only output the VM identifier, excluding classname, jar name, arguments in main method;

      -m: output the parameters of the main method;

       -l: output complete package name, application main class name, full path name of jar;

      -v: output jvm parameters;

      -V: output the parameters passed to the JVM through the flag file (.hotspotrc file or the file specified by -XX:Flags=;

     hostid: <hostname>[:<port>]

Three, example

1. If you don’t know what parameters jps has, you can enter jps -help to get more parameters

2. Output the full path name of the main class or jar: jps -l

 Scenario: JVM tuning

Learning address: https://www.jb51.net/article/108138.htm

 

Guess you like

Origin blog.csdn.net/baidu_28068985/article/details/108176206