JPS
java process status 查看进程
jps
C:\Users\84407>jps
13680 Jps
14704 JConsole
10148 Launcher
8788
10844 ThreadConsole
jps -q
仅仅显示VM 标示,不显示jar,class, main参数等信息
C:\Users\84407>jps -q
18324
15336
19144
19816
jps -m
输出主函数传入的参数
C:\Users\84407>jps -m
15336 ThreadConsole
19144
19816 Launcher C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/annotations.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/httpclient-4.5.2.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/slf4j-api-1.7.10.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/log4j.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/snappy-in-java-0.5.1.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/util.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/jna.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/idea_rt.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/jps-model.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/jna-platform.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/oro-2.0.8.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/aether-dependency-resolver.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/httpcore-4.4.5.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1/lib/netty-all-4.1.13.Final.jar;C:/Program Files/
19148 Jps -m
IntelliJ IDEA的pid:19816,参数就是后面那一大堆
jps -l
输出应用程序主类完整package名称或jar完整名称
C:\Users\84407>jps -l
15336 com.jvm.jconsole.ThreadConsole
19144
19816 org.jetbrains.jps.cmdline.Launcher
9704 jdk.jcmd/sun.tools.jps.Jps
jps -v
列出jvm参数
15336 ThreadConsole -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2018.1\lib\idea_rt.jar=61866:C:\Program Files\JetBrains\IntelliJ IDEA 2018.1\bin -Dfile.encoding=UTF-8
19144 -Xms128m -Xmx750m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Dide.no.platform.update=true -Djb.vmOptionsFile=C:\Program Files\JetBrains\IntelliJ IDEA 2018.1\