Tip-jcmd

作者: cctoken | 来源:发表于2019-05-12 15:25 被阅读0次

    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指令查看

    相关文章

      网友评论

          本文标题:Tip-jcmd

          本文链接:https://www.haomeiwen.com/subject/ufecaqtx.html