The attached test will print all available operation names for the com.sun.management:type=DiagnosticCommand MBean. These constitute the Diagnostic Commands for the JVM and are available through a special tab in the Java Mission Control (JMC) tool. When I run the program it prints
gcClassHistogram - 2
gcClassStats - 2
gcRotateLog - 2
gcRun - 2
gcRunFinalization - 2
help - 2
jfrCheck - 2
jfrDump - 2
jfrStart - 2
jfrStop - 2
threadPrint - 2
vmCheckCommercialFeatures - 2
vmCommandLine - 2
vmFlags - 2
vmNativeMemory - 2
vmSystemProperties - 2
vmUnlockCommercialFeatures - 2
vmUptime - 2
vmVersion - 2
When I invoke jcmd <pid> help on the same process it prints
The following commands are available:
JFR.stop
JFR.start
JFR.dump
JFR.check
VM.native_memory
VM.check_commercial_features
VM.unlock_commercial_features
ManagementAgent.stop
ManagementAgent.start_local
ManagementAgent.start
GC.rotate_log
Thread.print
GC.class_stats
GC.class_histogram
GC.heap_dump
GC.run_finalization
GC.run
VM.uptime
VM.flags
VM.system_properties
VM.command_line
VM.version
help
For more information about a specific command use 'help <command>'.
It is understandable that the ManagementAgent commands are not available through the MBean but why is GC.heap_dump not present in the MBean? Is it because it is alredy available through the com.sun.management:type=HotSpotDiagnostic MBean with the operation name dumpHeap.
I was under the impression that all diagnostic commands should be available both through the MBean and through jcmd. Can GC.heap_dump be moved/duplicated in the com.sun.management:type=DiagnosticCommand MBean?
gcClassHistogram - 2
gcClassStats - 2
gcRotateLog - 2
gcRun - 2
gcRunFinalization - 2
help - 2
jfrCheck - 2
jfrDump - 2
jfrStart - 2
jfrStop - 2
threadPrint - 2
vmCheckCommercialFeatures - 2
vmCommandLine - 2
vmFlags - 2
vmNativeMemory - 2
vmSystemProperties - 2
vmUnlockCommercialFeatures - 2
vmUptime - 2
vmVersion - 2
When I invoke jcmd <pid> help on the same process it prints
The following commands are available:
JFR.stop
JFR.start
JFR.dump
JFR.check
VM.native_memory
VM.check_commercial_features
VM.unlock_commercial_features
ManagementAgent.stop
ManagementAgent.start_local
ManagementAgent.start
GC.rotate_log
Thread.print
GC.class_stats
GC.class_histogram
GC.heap_dump
GC.run_finalization
GC.run
VM.uptime
VM.flags
VM.system_properties
VM.command_line
VM.version
help
For more information about a specific command use 'help <command>'.
It is understandable that the ManagementAgent commands are not available through the MBean but why is GC.heap_dump not present in the MBean? Is it because it is alredy available through the com.sun.management:type=HotSpotDiagnostic MBean with the operation name dumpHeap.
I was under the impression that all diagnostic commands should be available both through the MBean and through jcmd. Can GC.heap_dump be moved/duplicated in the com.sun.management:type=DiagnosticCommand MBean?