Jstack: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=External= * http://download.oracle.com/javase/6/docs/technotes/tools/share/jstack.html * Insufficient memory or insufficient privileges to attach http://stackoverflow.com/qu...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 10: | Line 10: | ||
=Overview= | =Overview= | ||
JVM thread dumps can be generated with <tt>jstack</tt>, a tool that ships with the JDK. To take a full JVM thread dump, identify the PID of the target JVM and execute: | |||
jstack <pid> | jstack -l <''pid''> > <''dump-file-name.txt''> | ||
Note that without redirect, <tt>jstack</tt> sends the output to stdout. | |||
=Insufficient memory or insufficient privileges to attach= | =Insufficient memory or insufficient privileges to attach= |
Latest revision as of 15:41, 13 October 2017
External
- http://download.oracle.com/javase/6/docs/technotes/tools/share/jstack.html
- Insufficient memory or insufficient privileges to attach http://stackoverflow.com/questions/20149635/java-jstack-tool-insufficient-memory-or-insufficient-privilege-to-attach]
Internal
Overview
JVM thread dumps can be generated with jstack, a tool that ships with the JDK. To take a full JVM thread dump, identify the PID of the target JVM and execute:
jstack -l <pid> > <dump-file-name.txt>
Note that without redirect, jstack sends the output to stdout.
Insufficient memory or insufficient privileges to attach
When getting this, I made it work by using -F command line option:
jstack -F <pid>
Options
-F
Frce a thread dump. Use when jstack <pid> does not respond (process is hung).
-m
Print both java and native frames (mixed mode).
-l
Long listing. Prints additional information about locks.