blob: 0486a859f549640f7d342ca5c44f91af6d3e1952 [file] [log] [blame]
tbell16c34dd2009-05-04 18:28:26 -07001." Copyright 2004 Sun Microsystems, Inc. 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."
18." Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
19." CA 95054 USA or visit www.sun.com if you need additional information or
20." have any questions.
21."
tbell16c34dd2009-05-04 18:28:26 -070022.TH jstack 1 "04 May 2009"
23." Generated from HTML by html2man (author: Eric Armstrong)
duke6e45e102007-12-01 00:00:00 +000024
25.LP
tbell16c34dd2009-05-04 18:28:26 -070026.SH "Name"
duke6e45e102007-12-01 00:00:00 +000027jstack \- Stack Trace
28.br
29
30.LP
31.SH "SYNOPSIS"
32.LP
33
34.LP
35.nf
36\f3
37.fl
38\fP\f3jstack\fP [ option ] pid
39.fl
40\f3jstack\fP [ option ] executable core
41.fl
42\f3jstack\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
43.fl
44.fi
45
46.LP
47.SH "PARAMETERS"
48.LP
49
50.LP
51.LP
52Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS.
53.LP
54.RS 3
55.TP 3
56pid
tbell16c34dd2009-05-04 18:28:26 -070057process 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 +000058.RE
59
60.LP
61.RS 3
62.TP 3
63executable
64Java executable from which the core dump was produced.
65.br
66.TP 3
67core
68core file for which the stack trace is to be printed.
69.br
70.TP 3
71remote\-hostname\-or\-IP
tbell16c34dd2009-05-04 18:28:26 -070072remote debug server's (see jsadebugd(1)) hostname or IP address.
duke6e45e102007-12-01 00:00:00 +000073.br
74.TP 3
75server\-id
76optional unique id, if multiple debug servers are running on the same remote host.
77.RE
78
79.LP
80.SH "DESCRIPTION"
81.LP
82
83.LP
84.LP
85\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.:
86.br
87
88.LP
89.RS 3
90
91.LP
92.nf
93\f3
94.fl
95jstack \-J\-d64 \-m pid
96.fl
97\fP
98.fi
99.RE
100
101.LP
102.LP
tbell16c34dd2009-05-04 18:28:26 -0700103\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 +0000104.LP
tbell16c34dd2009-05-04 18:28:26 -0700105.LP
106For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
duke6e45e102007-12-01 00:00:00 +0000107.LP
108.SH "OPTIONS"
109.LP
110
111.LP
112.RS 3
113.TP 3
114\-F
tbell16c34dd2009-05-04 18:28:26 -0700115Force a stack dump when 'jstack [\-l] pid' does not respond.
116.TP 3
117\-l
118Long listing. Prints additional information about locks such as list of owned java.util.concurrent
119.na
120\f2ownable synchronizers\fP @
121.fi
122http://java.sun.com/javase/6/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html.
duke6e45e102007-12-01 00:00:00 +0000123.TP 3
124\-m
125prints mixed mode (both Java and native C/C++ frames) stack trace.
126.TP 3
127\-h
128prints a help message.
129.br
130.br
131.TP 3
132\-help
133prints a help message
134.br
135.RE
136
137.LP
138.SH "SEE ALSO"
139.LP
140.RS 3
141.TP 2
142o
143pstack(1)
144.TP 2
145o
146c++filt(1)
147.TP 2
148o
tbell16c34dd2009-05-04 18:28:26 -0700149jps(1)
duke6e45e102007-12-01 00:00:00 +0000150.TP 2
151o
tbell16c34dd2009-05-04 18:28:26 -0700152jsadebugd(1)
duke6e45e102007-12-01 00:00:00 +0000153.RE
154
155.LP
156.SH "KNOWN BUGS"
157.LP
158
159.LP
160.LP
161Mixed mode stack trace, the \-m option, does not work with the remote debug server.
162.LP
163
164.LP
165