JSTAT:JVM Statistics Monitoring Tool
The Jstat command monitors various runtime state information for the JVM virtual machine, including memory status, garbage collection, loading of classes, and so on.
Jstat command format: jstat [option Vmid [interval] [count]]
Jstat command Examples
Command: JSTAT-GC 1203 500 3
Command explanation: Check the status of garbage collection with process ID 1203 every 500 milliseconds, query 3 times
Command options
Options |
Role |
-class |
Output class load, unload quantity, and time consumed by class load |
-gc |
Monitor Java heap status, including edge Zone, Survivor Zone, old age, permanent generation capacity, used space, GC time, etc. |
-gcnew |
Monitor New generation GC status |
-gcold |
Monitor the status of GC in the old age |
-gccause |
Basically the same as-GC, but output causes the last GC to produce |
-compiler |
Output JIT compiler compiled methods, time-consuming and other information |
Monitoring and troubleshooting tools in the JDK -03 (jstat)