$ javac --add-exports jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED JMXClient.java
$ java --add-exports jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED JMXClient
1072: LongSleep
1092: JMXClient
$ java --add-exports jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED JMXClient -l 1072
java.lang:name=Metaspace,type=MemoryPool:
Information on the management interface of the MBean
java.lang:name=CodeHeap 'profiled nmethods',type=MemoryPool:
Information on the management interface of the MBean
JMImplementation:type=MBeanServerDelegate:
Represents the MBean server from the management point of view.
java.lang:type=Runtime:
Information on the management interface of the MBean
java.lang:type=Threading:
Information on the management interface of the MBean
java.lang:type=OperatingSystem:
Information on the management interface of the MBean
java.nio:name=direct,type=BufferPool:
Information on the management interface of the MBean
java.lang:type=Compilation:
Information on the management interface of the MBean
java.lang:name=CodeHeap 'non-nmethods',type=MemoryPool:
Information on the management interface of the MBean
java.lang:name=G1 Young Generation,type=GarbageCollector:
Information on the management interface of the MBean
java.lang:name=CodeCacheManager,type=MemoryManager:
Information on the management interface of the MBean
java.lang:name=Compressed Class Space,type=MemoryPool:
Information on the management interface of the MBean
java.lang:type=Memory:
Information on the management interface of the MBean
java.lang:name=G1 Eden Space,type=MemoryPool:
Information on the management interface of the MBean
java.lang:name=G1 Old Gen,type=MemoryPool:
Information on the management interface of the MBean
java.nio:name=mapped,type=BufferPool:
Information on the management interface of the MBean
java.util.logging:type=Logging:
Information on the management interface of the MBean
java.lang:name=G1 Old Generation,type=GarbageCollector:
Information on the management interface of the MBean
java.lang:type=ClassLoading:
Information on the management interface of the MBean
java.lang:name=Metaspace Manager,type=MemoryManager:
Information on the management interface of the MBean
com.sun.management:type=DiagnosticCommand:
Diagnostic Commands
java.lang:name=G1 Survivor Space,type=MemoryPool:
Information on the management interface of the MBean
java.lang:name=CodeHeap 'non-profiled nmethods',type=MemoryPool:
Information on the management interface of the MBean
com.sun.management:type=HotSpotDiagnostic:
Information on the management interface of the MBean
$ java --add-exports jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED JMXClient -d 1564 "com.sun.management:type=HotSpotDiagnostic"
com.sun.management:type=HotSpotDiagnostic
Information on the management interface of the MBean
Attributes:
DiagnosticOptions = [Ljavax.management.openmbean.CompositeData;@385c9627
ObjectName = com.sun.management:type=HotSpotDiagnostic
Operations:
void dumpHeap (java.lang.String p0, boolean p1)
javax.management.openmbean.CompositeData getVMOption (java.lang.String p0)
void setVMOption (java.lang.String p0, java.lang.String p1)
Notifications:
$ java --add-exports jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED JMXClient -c 1664 "com.sun.management:type=DiagnosticCommand" gcHeapInfo
garbage-first heap total 30720K, used 6989K [0x00000000e2400000, 0x00000000e25000f0, 0x0000000100000000)
region size 1024K, 6 young (6144K), 1 survivors (1024K)
Metaspace used 11259K, capacity 12222K, committed 12416K, reserved 1060864K
class space used 1326K, capacity 1544K, committed 1664K, reserved 1048576K