Java Reference
In-Depth Information
Common switches
-lags
Display JVM flags only
-sysprops
Display system properties only
Notes
In practice, this is very rarely used—although it can occasionally be useful as a san‐
ity check that the expected program is actually what is executing.
jstack
Basic usage
jstack <process ID>
Description
The jstack utility produces a stack trace for each Java thread in the process.
Common switches
-F
Force a thread dump
-l
Long mode (contains additional information about locks)
Notes
Producing the stack trace does not stop or terminate the Java process. The files that
jstack produces can be very large, and some post-processing of the file is usually
necessary.
jmap
Basic usage
jmap <process>
Description
jmap provides a view of memory allocation for a running Java process.
Common switches
-histo
Produces a histogram of the current state of allocated memory.
-histo:live
This version of the histogram only displays information for live objects.
 
Search WWH ::




Custom Search