blob: 34fdded3baf0662df9323cc3341419d95096c9e4 [file] [log] [blame]
bpatel87d64cc2010-07-14 15:42:06 -07001." Copyright (c) 2004, 2010, 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."
bpatel87d64cc2010-07-14 15:42:06 -070022.TH jstack 1 "02 Jun 2010"
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
32
33.LP
34.nf
35\f3
36.fl
37\fP\f3jstack\fP [ option ] pid
38.fl
39\f3jstack\fP [ option ] executable core
40.fl
41\f3jstack\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
42.fl
43.fi
44
45.LP
46.SH "PARAMETERS"
47.LP
48
49.LP
50.LP
51Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS.
52.LP
53.RS 3
54.TP 3
55pid
tbell16c34dd2009-05-04 18:28:26 -070056process 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 +000057.RE
58
59.LP
60.RS 3
61.TP 3
62executable
63Java executable from which the core dump was produced.
64.br
65.TP 3
66core
67core file for which the stack trace is to be printed.
68.br
69.TP 3
70remote\-hostname\-or\-IP
tbell16c34dd2009-05-04 18:28:26 -070071remote debug server's (see jsadebugd(1)) hostname or IP address.
duke6e45e102007-12-01 00:00:00 +000072.br
73.TP 3
74server\-id
75optional unique id, if multiple debug servers are running on the same remote host.
76.RE
77
78.LP
79.SH "DESCRIPTION"
80.LP
81
82.LP
83.LP
84\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.:
85.br
86
87.LP
88.RS 3
89
90.LP
91.nf
92\f3
93.fl
94jstack \-J\-d64 \-m pid
95.fl
96\fP
97.fi
98.RE
99
100.LP
101.LP
tbell16c34dd2009-05-04 18:28:26 -0700102\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 +0000103.LP
tbell16c34dd2009-05-04 18:28:26 -0700104.LP
105For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
duke6e45e102007-12-01 00:00:00 +0000106.LP
107.SH "OPTIONS"
108.LP
109
110.LP
111.RS 3
112.TP 3
113\-F
tbell16c34dd2009-05-04 18:28:26 -0700114Force a stack dump when 'jstack [\-l] pid' does not respond.
115.TP 3
116\-l
117Long listing. Prints additional information about locks such as list of owned java.util.concurrent
118.na
119\f2ownable synchronizers\fP @
120.fi
121http://java.sun.com/javase/6/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html.
duke6e45e102007-12-01 00:00:00 +0000122.TP 3
123\-m
124prints mixed mode (both Java and native C/C++ frames) stack trace.
125.TP 3
126\-h
127prints a help message.
128.br
129.br
130.TP 3
131\-help
132prints a help message
133.br
134.RE
135
136.LP
137.SH "SEE ALSO"
138.LP
139.RS 3
140.TP 2
141o
142pstack(1)
143.TP 2
144o
145c++filt(1)
146.TP 2
147o
tbell16c34dd2009-05-04 18:28:26 -0700148jps(1)
duke6e45e102007-12-01 00:00:00 +0000149.TP 2
150o
tbell16c34dd2009-05-04 18:28:26 -0700151jsadebugd(1)
duke6e45e102007-12-01 00:00:00 +0000152.RE
153
154.LP
155.SH "KNOWN BUGS"
156.LP
157
158.LP
159.LP
160Mixed mode stack trace, the \-m option, does not work with the remote debug server.
161.LP
duke6e45e102007-12-01 00:00:00 +0000162