rgallard | b643545 | 2013-11-25 20:19:02 -0800 | [diff] [blame] | 1 | '\" t |
| 2 | .\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. |
| 3 | .\"
|
| 4 | .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
| 5 | .\"
|
| 6 | .\" This code is free software; you can redistribute it and/or modify it
|
| 7 | .\" under the terms of the GNU General Public License version 2 only, as
|
| 8 | .\" published by the Free Software Foundation.
|
| 9 | .\"
|
| 10 | .\" This code is distributed in the hope that it will be useful, but WITHOUT
|
| 11 | .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
| 12 | .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
| 13 | .\" version 2 for more details (a copy is included in the LICENSE file that
|
| 14 | .\" accompanied this code).
|
| 15 | .\"
|
| 16 | .\" You should have received a copy of the GNU General Public License version
|
| 17 | .\" 2 along with this work; if not, write to the Free Software Foundation,
|
| 18 | .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
| 19 | .\"
|
| 20 | .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
| 21 | .\" or visit www.oracle.com if you need additional information or have any
|
| 22 | .\" questions.
|
| 23 | .\"
|
| 24 | .\" Arch: generic |
| 25 | .\" Software: JDK 8 |
| 26 | .\" Date: 21 November 2013 |
| 27 | .\" SectDesc: Troubleshooting Tools |
| 28 | .\" Title: jstack.1 |
| 29 | .\" |
| 30 | .if n .pl 99999 |
| 31 | .TH jstack 1 "21 November 2013" "JDK 8" "Troubleshooting Tools" |
| 32 | .\" -----------------------------------------------------------------
|
| 33 | .\" * Define some portability stuff
|
| 34 | .\" -----------------------------------------------------------------
|
| 35 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 36 | .\" http://bugs.debian.org/507673
|
| 37 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
| 38 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 39 | .ie \n(.g .ds Aq \(aq
|
| 40 | .el .ds Aq '
|
| 41 | .\" -----------------------------------------------------------------
|
| 42 | .\" * set default formatting
|
| 43 | .\" -----------------------------------------------------------------
|
| 44 | .\" disable hyphenation
|
| 45 | .nh
|
| 46 | .\" disable justification (adjust text to left margin only)
|
| 47 | .ad l
|
| 48 | .\" -----------------------------------------------------------------
|
| 49 | .\" * MAIN CONTENT STARTS HERE *
|
| 50 | .\" -----------------------------------------------------------------
|
duke | 6e45e10 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 51 | |
rgallard | b643545 | 2013-11-25 20:19:02 -0800 | [diff] [blame] | 52 | .SH NAME |
| 53 | jstack \- Prints Java thread stack traces for a Java process, core file, or remote debug server\&. This command is experimental and unsupported\&. |
| 54 | .SH SYNOPSIS |
| 55 | .sp |
| 56 | .nf |
| 57 | |
| 58 | \fBjstack\fR [ \fIoptions\fR ] \fIpid\fR |
| 59 | .fi |
| 60 | .nf |
| 61 | |
| 62 | \fBjstack\fR [ \fIoptions\fR ] \fIexecutable\fR \fIcore\fR |
| 63 | .fi |
| 64 | .nf |
| 65 | |
| 66 | \fBjstack\fR [ \fIoptions\fR ] [ \fIserver\-id\fR@ ] \fIremote\-hostname\-or\-IP\fR |
| 67 | .fi |
| 68 | .sp |
| 69 | .TP |
| 70 | \fIoptions\fR |
| 71 | The command-line options\&. See Options\&. |
| 72 | .TP |
| 73 | \fIpid\fR |
| 74 | The process ID for which the stack trace is printed\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&. |
| 75 | .TP |
| 76 | \fIexecutable\fR |
| 77 | The Java executable from which the core dump was produced\&. |
| 78 | .TP |
| 79 | \fIcore\fR |
| 80 | The core file for which the stack trace is to be printed\&. |
| 81 | .TP |
| 82 | \fIremote-hostname-or-IP\fR |
| 83 | The remote debug server \f3hostname\fR or \f3IP\fR address\&. See jsadebugd(1)\&. |
| 84 | .TP |
| 85 | \fIserver-id\fR |
| 86 | An optional unique ID to use when multiple debug servers are running on the same remote host\&. |
| 87 | .SH DESCRIPTION |
| 88 | The \f3jstack\fR command prints Java stack traces of Java threads for a specified Java process, core file, or remote debug server\&. For each Java frame, the full class name, method name, byte code index (BCI), and line number, when available, are printed\&. With the \f3-m\fR option, the \f3jstack\fR command prints both Java and native frames of all threads with the program counter (PC)\&. For each native frame, the closest native symbol to PC, when available, is printed\&. C++ mangled names are not demangled\&. To demangle C++ names, the output of this command can be piped to \f3c++filt\fR\&. When the specified process is running on a 64-bit Java Virtual Machine, you might need to specify the \f3-J-d64\fR option, for example: \f3jstack -J-d64 -m pid\fR\&. |
| 89 | .PP |
| 90 | \fINote:\fR This utility is unsupported and might not be available in future release of the JDK\&. In Windows Systems where the dbgeng\&.dll file is not present, Debugging Tools For Windows must be installed so these tools work\&. The \f3PATH\fR environment variable needs to contain the location of the jvm\&.dll that is used by the target process, or the location from which the crash dump file was produced\&. For example: |
| 91 | .sp |
| 92 | .nf |
| 93 | \f3set PATH=<jdk>\ejre\ebin\eclient;%PATH%\fP |
| 94 | .fi |
| 95 | .nf |
| 96 | \f3\fP |
| 97 | .fi |
| 98 | .sp |
| 99 | .SH OPTIONS |
| 100 | .TP |
| 101 | -F |
duke | 6e45e10 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 102 | .br |
rgallard | b643545 | 2013-11-25 20:19:02 -0800 | [diff] [blame] | 103 | Force a stack dump when \f3jstack\fR [\f3-l\fR] \f3pid\fR does not respond\&. |
| 104 | .TP |
| 105 | -l |
duke | 6e45e10 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 106 | .br |
rgallard | b643545 | 2013-11-25 20:19:02 -0800 | [diff] [blame] | 107 | Long listing\&. Prints additional information about locks such as a list of owned \f3java\&.util\&.concurrent\fR ownable synchronizers\&. See the \f3AbstractOwnableSynchronizer\fR class description at http://docs\&.oracle\&.com/javase/8/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer\&.html |
| 108 | .TP |
| 109 | -m |
duke | 6e45e10 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 110 | .br |
rgallard | b643545 | 2013-11-25 20:19:02 -0800 | [diff] [blame] | 111 | Prints a mixed mode stack trace that has both Java and native C/C++ frames\&. |
| 112 | .TP |
| 113 | -h |
duke | 6e45e10 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 114 | .br |
rgallard | b643545 | 2013-11-25 20:19:02 -0800 | [diff] [blame] | 115 | Prints a help message\&. |
| 116 | .TP |
| 117 | -help |
duke | 6e45e10 | 2007-12-01 00:00:00 +0000 | [diff] [blame] | 118 | .br |
rgallard | b643545 | 2013-11-25 20:19:02 -0800 | [diff] [blame] | 119 | Prints a help message\&. |
| 120 | .SH KNOWN\ BUGS |
| 121 | In mixed mode stack trace, the \f3-m\fR option does not work with the remote debug server\&. |
| 122 | .SH SEE\ ALSO |
| 123 | .TP 0.2i |
| 124 | \(bu |
| 125 | pstack(1) |
| 126 | .TP 0.2i |
| 127 | \(bu |
| 128 | C++filt(1) |
| 129 | .TP 0.2i |
| 130 | \(bu |
| 131 | jps(1) |
| 132 | .TP 0.2i |
| 133 | \(bu |
| 134 | jsadebugd(1) |
| 135 | .RE
|
| 136 | .br
|
| 137 | 'pl 8.5i
|
| 138 | 'bp
|