blob: e70b10ed5e713ba41016cf6fdc910a2efadd4021 [file] [log] [blame]
bpatel4bf512b2011-05-11 08:30:46 -07001." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
duke6e45e102007-12-01 00:00:00 +00002." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3."
4." This code is free software; you can redistribute it and/or modify it
5." under the terms of the GNU General Public License version 2 only, as
6." published by the Free Software Foundation.
7."
8." This code is distributed in the hope that it will be useful, but WITHOUT
9." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11." version 2 for more details (a copy is included in the LICENSE file that
12." accompanied this code).
13."
14." You should have received a copy of the GNU General Public License version
15." 2 along with this work; if not, write to the Free Software Foundation,
16." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17."
ohair2283b9d2010-05-25 15:58:33 -070018." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19." or visit www.oracle.com if you need additional information or have any
20." questions.
duke6e45e102007-12-01 00:00:00 +000021."
bpatel4bf512b2011-05-11 08:30:46 -070022.TH jstack 1 "10 May 2011"
duke6e45e102007-12-01 00:00:00 +000023
24.LP
tbell16c34dd2009-05-04 18:28:26 -070025.SH "Name"
duke6e45e102007-12-01 00:00:00 +000026jstack \- Stack Trace
27.br
28
29.LP
30.SH "SYNOPSIS"
31.LP
duke6e45e102007-12-01 00:00:00 +000032.nf
33\f3
34.fl
35\fP\f3jstack\fP [ option ] pid
36.fl
37\f3jstack\fP [ option ] executable core
38.fl
39\f3jstack\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
40.fl
41.fi
42
43.LP
44.SH "PARAMETERS"
45.LP
duke6e45e102007-12-01 00:00:00 +000046.LP
47Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS.
48.LP
49.RS 3
50.TP 3
51pid
tbell16c34dd2009-05-04 18:28:26 -070052process id for which the stack trace is to be printed. The process must be a Java process. To get a list of Java processes running on a machine, jps(1) may be used.
duke6e45e102007-12-01 00:00:00 +000053.RE
54
55.LP
56.RS 3
57.TP 3
58executable
59Java executable from which the core dump was produced.
60.br
61.TP 3
62core
63core file for which the stack trace is to be printed.
64.br
65.TP 3
66remote\-hostname\-or\-IP
tbell16c34dd2009-05-04 18:28:26 -070067remote debug server's (see jsadebugd(1)) hostname or IP address.
duke6e45e102007-12-01 00:00:00 +000068.br
69.TP 3
70server\-id
71optional unique id, if multiple debug servers are running on the same remote host.
72.RE
73
74.LP
75.SH "DESCRIPTION"
76.LP
duke6e45e102007-12-01 00:00:00 +000077.LP
78\f3jstack\fP prints Java stack traces of Java threads for a given Java process or core file or a remote debug server. For each Java frame, the full class name, method name, 'bci' (byte code index) and line number, if available, are printed. With the \-m option, jstack prints both Java and native frames of all threads along with the 'pc' (program counter). For each native frame, the closest native symbol to 'pc', if available, is printed. C++ mangled names are not demangled. To demangle C++ names, the output of this command may be piped to \f3c++filt\fP. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.:
79.br
80
81.LP
duke6e45e102007-12-01 00:00:00 +000082.nf
83\f3
84.fl
85jstack \-J\-d64 \-m pid
86.fl
87\fP
88.fi
duke6e45e102007-12-01 00:00:00 +000089
90.LP
91.LP
tbell16c34dd2009-05-04 18:28:26 -070092\f3NOTE\fP \- This utility is unsupported and may or may not be available in future versions of the JDK. In Windows Systems where dbgeng.dll is not present, 'Debugging Tools For Windows' needs to be installed to have these tools working. Also, \f2PATH\fP environment variable should contain the location of \f2jvm.dll\fP used by the target process or the location from which the Crash Dump file was produced.
duke6e45e102007-12-01 00:00:00 +000093.LP
tbell16c34dd2009-05-04 18:28:26 -070094.LP
95For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
duke6e45e102007-12-01 00:00:00 +000096.LP
97.SH "OPTIONS"
98.LP
duke6e45e102007-12-01 00:00:00 +000099.RS 3
100.TP 3
101\-F
tbell16c34dd2009-05-04 18:28:26 -0700102Force a stack dump when 'jstack [\-l] pid' does not respond.
103.TP 3
104\-l
105Long listing. Prints additional information about locks such as list of owned java.util.concurrent
106.na
107\f2ownable synchronizers\fP @
108.fi
bpatel4bf512b2011-05-11 08:30:46 -0700109http://download.oracle.com/javase/7/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html.
duke6e45e102007-12-01 00:00:00 +0000110.TP 3
111\-m
112prints mixed mode (both Java and native C/C++ frames) stack trace.
113.TP 3
114\-h
115prints a help message.
116.br
117.br
118.TP 3
119\-help
120prints a help message
121.br
122.RE
123
124.LP
125.SH "SEE ALSO"
126.LP
127.RS 3
128.TP 2
129o
130pstack(1)
131.TP 2
132o
133c++filt(1)
134.TP 2
135o
tbell16c34dd2009-05-04 18:28:26 -0700136jps(1)
duke6e45e102007-12-01 00:00:00 +0000137.TP 2
138o
tbell16c34dd2009-05-04 18:28:26 -0700139jsadebugd(1)
duke6e45e102007-12-01 00:00:00 +0000140.RE
141
142.LP
143.SH "KNOWN BUGS"
144.LP
duke6e45e102007-12-01 00:00:00 +0000145.LP
146Mixed mode stack trace, the \-m option, does not work with the remote debug server.
147.LP
duke6e45e102007-12-01 00:00:00 +0000148