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!