Some Use Full Java
Commands While Working on Linux.
Print Heap Details
·
jmap -heap <PID>
Print shared object mappings for a
process
- jmap <PID>
Print Finializer Information (Number of
objects pending for finalization)
·
jmap -finalizerinfo
Print Thread Stack For Java Methods
·
Jstack <PID>(or jstack -F pid if jstack pid does not respond)
Print lock information for a process
·
jstack -l <PID>
Heap histogram for a process
·
jmap –histo <PID>
Print statistics on the class loader
·
jstat -class <PID>
Compiler Statistics
·
jstat -compiler <PID>
Compilation method Statistics
·
jstat
-printcompilation <PID>
Garbage Collection Statistics
·
jstat -gcutil <PID>
Garbage Collection Statistics with Causes
·
jstat –gccause <PID>
Garbage Collection Behavior
·
jstat -gc <PID>
Capacity Information
·
jstat -gccapacity <PID>
Behavior Of New Generation
·
jstat –gcnew <PID>
New Generation Capactiy
·
jstat –gcnewcapacity
<PID>
Behavior of the old and permanent
generations
·
jstat -gcold <PID>
Capacity of the old generation
·
jstat -gcoldcapacity <PID>
Capacity of the permanent generation
·
jstat
-gcpermcapacity <PID>
List the instrumented VMs
·
Jps
Java configuration information from a
running process
- jinfo <PID>
Dynamically set, unset, or change the
value of certain Java VM flags for a process
- jinfo -flag flag <PID>
Print Command Line Information
·
jinfo –flags <PID>
Print Java system properties
·
jinfo –sysprops <PID>
Pass a Java VM flag to the virtual
machine
·
jconsole -J flag <PID>
·
jhat -J flag <PID>
·
jmap -J flag <PID>
Print statistics of permanent generation
of Java heap, by class loader
·
jmap –permstat <PID>