jcmd是重新组合jmap,jsp等实用程序的有前途的工具......
你可以找到介绍和手册页,但它仍然很轻.
在网络上,我发现显然存在像GC.heap_info这样的命令,我从来没有能够用于我的测试.
其中一些命令需要特殊标志.例如,-XX:NativeMemoryTracking=detail会给你VM.native_memory命令.
但是对于其他一些人来说,不清楚如何激活它们或者它是否依赖于jdk版本等等.
我甚至找不到现有命令的详尽列表.
任何信息?
将
Thx 编辑为@apangin响应,我已经开始通过jvm版本计算可用命令的简短摘要.
免责声明:它仅来自代码拆解,而不是真正的测试
jdk8
- 救命
- VM.uptime [选项]
- VM.flags [选项]
- VM.system_properties
- VM.command_line
- VM.version
- VM.native_memory [选项]
- VM.check_commercial_features
- VM.unlock_commercial_features
- Thread.print [options]
- GC.run
- GC.run_finalization
- GC.rotate_log
- GC.class_stats [选项]
- GC.class_histogram [选项]
- GC.heap_dump [选项]
- ManagementAgent.start_local
- ManagementAgent.start [选项]
- ManagementAgent.stopJFR.start [options]
- JFR.stop [选项]
- JFR.dump [选项]
- JFR.check [选项]
jdk9
只有额外的
- VM.set_flag [选项]
- VM.info
- VM.class_hierarchy [options]
- VM.dynlibs
- VM.print_touched_methods
- JVMTI.data_dump
- JVMTI.agent_load [options]
- GC.finalizer_info
- GC.heap_info
- ManagementAgent.status
- ManagementAgent.stop
- Compiler.queue
- Compiler.codelist …