Java Reference
In-Depth Information
QUICK SUMMARY
1. jcmd can be used to find the basic JVM information—including the value of all
the tuning flags—for a running application.
2. Default flag values can be found by including -XX:+PrintFlagsFinal on a com-
mand line. This is useful for determining the default ergonomic settings of flags
on a particular platform.
3. jinfo is useful for inspecting (and in some cases changing) individual flags.
Thread Information
jconsole and jvisualvm display information (in real time) about the number of threads
running in an application.
It can be very useful to look at the stack of running threads to determine if they are blocked.
The stacks can be obtained via jstack :
% jstack process_id
... Lots of output showing each thread's stack ...
Stack information can also be obtained from jcmd :
% jcmd process_id Thread.print
... Lots of output showing each thread's stack ...
See Chapter 9 for more details on monitoring thread stacks.
Class Information
Information about the number of classes in use by an application can be obtained from jcon-
sole or jstat . jstat can also provide information about class compilation.
See Chapter 12 for more details on class usage by applications, and Chapter 4 for details on
monitoring class compilation.
Search WWH ::




Custom Search