当前位置:网站首页>JVM debugging tool -jps

JVM debugging tool -jps

2022-06-24 07:05:00 Angryshark_ one hundred and twenty-eight

jps

Java Virtual Machine Process Status Tool

Command usage : jps [options] [hostid]

          options: Command options , Used to control the output format 

          hostid: Specify a specific host , It can be ip Address and domain name ,  Specific agreements can also be specified , port .

          [protocol:][[//]hostname][:port][/servername]

Function description : jps Is used to view the hotspot Process of virtual machine .

When... Is not specified hostid when , The default view is native jvm process , If not, view the specified hostid On the machine jvm process , here hostid The machine in question must be switched on jstatd service . jps Can be listed jvm process lvmid, Main class name ,main Function parameter , jvm Parameters ,jar Name and other information .

Common commands

View process number , Do not output the class name or method

> jps -q

2966
23766
3306
7531
21499
22508
3567

Output incoming main Method

> jps -m

23766 jar
4697 Jps -m
7531 Bootstrap
21499 jar
22508 jar

Output main Method or jar full name

> jps -l

23766 dataqualityassessment-0.0.1-SNAPSHOT.jar
5000 sun.tools.jps.Jps
21499 file_monitor-1.0.8-SNAPSHOT.jar
22508 dataqualityassessment-0.0.1-SNAPSHOT.jar

Output incoming JVM Parameters

> jps -v

2966 QuorumPeerMain -Dzookeeper.log.dir=. -Dzookeeper.root.logger=INFO,CONSOLE -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false
23766 jar -Xdebug -Xrunjdwp:transport=dt_socket,address=5006,server=y,suspend=n -Dspring.config.location=./application-test-77.properties
7531 Bootstrap
21499 jar
原网站

版权声明
本文为[Angryshark_ one hundred and twenty-eight]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240050385615.html