Java
Diagnostics Commands
Monitor and diagnose JVM applications. Use diagnostic tools for heap analysis, thread dumps, garbage collection statistics, and flight recordings.
9 commands
Pro Tips
Use 'jcmd <pid> VM.flags' to see all JVM flags including defaults and ergonomics.
Start JFR recording with 'jcmd <pid> JFR.start' for low-overhead production profiling.
Use 'jstat -gc <pid> 1000' to monitor GC activity every second.
Common Mistakes
Heap dumps can be very large and may cause application pause - use with caution in production.
jmap and jstack can hang if the target JVM is unresponsive - use -F flag as fallback.