jcmd
Sends diagnostic command requests to a running Java Virtual Machine (JVM).
Synopsis
jcmd [-l|-h|-help]
jcmd pid|main-class PerfCounter.print
jcmd pid|main-class -f filename
jcmd pid|main-class command[ arguments]
Description
The jcmd utility is used to send diagnostic command requests to the JVM. It must be used on the same machine on which the JVM is running, and have the same effective user and group identifiers that were used to launch the JVM.
使用方式
jcmd 或者 jcmd -l 可以查看当前机器上,所有jvm的实例进程
image.png
jcmd -h 可以查看帮助文档
image.png
通过 jcmd <pid|main-class> help 的方式可以获得当前进程,哪些command是支持的
image.png
再通过 jcmd <pid|main-class> help command 的方式,可以查看当前的command的使用方式
image.png
最后 可以执行 jcmd <pid|main-class> <command arguments> send command to vm
image.png关于具体的 command的含义可以通过help指令查看
网友评论