- JPS, TOP and JSTACK,
jps to find java info, like classname, parameters of main, JVM arguments, pid, jps -m -l
top to find the most CPU-bound thread, top -Hp pid
jstack to dump stacks of thread, jstack pid | grep thread_id_in_hex
- JMAP & JHAT
jmap to see heap memory usage, including
jmap -permstat pid, class loader, class info and object,
jmap -heap pid, heap memory info, GC algorithm, heap configuration and generation info
jmap -histo:live pid, number of live object and size
jhat to analyze and show dump of jmap
jmap -dump:format=b,file=d.dat pid, jhat -port 8888 d.dat
- jstat to monitor JVM
jstat -gc pid interval
jstat -gcutil