blob: fcbe3cb56e1ef615e67e1f40defaebe2dd837bc3 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001.'" t
2."
3." Copyright 2004-2006 Sun Microsystems, Inc. All Rights Reserved.
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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21." CA 95054 USA or visit www.sun.com if you need additional information or
22." have any questions.
23."
24." `
25.TH jstack 1 "07 Aug 2006"
26." Generated by html2man
27
28.LP
29.SH NAME
30jstack \- Stack Trace
31.br
32
33.LP
34.SH "SYNOPSIS"
35.LP
36
37.LP
38.nf
39\f3
40.fl
41\fP\f3jstack\fP [ option ] pid
42.fl
43\f3jstack\fP [ option ] executable core
44.fl
45\f3jstack\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
46.fl
47.fi
48
49.LP
50.SH "PARAMETERS"
51.LP
52
53.LP
54.LP
55Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS.
56.LP
57.RS 3
58.TP 3
59pid
60process 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 may be used.
61.RE
62
63.LP
64.RS 3
65.TP 3
66executable
67Java executable from which the core dump was produced.
68.br
69.TP 3
70core
71core file for which the stack trace is to be printed.
72.br
73.TP 3
74remote\-hostname\-or\-IP
75remote debug server's (see jsadebugd) hostname or IP address.
76.br
77.TP 3
78server\-id
79optional unique id, if multiple debug servers are running on the same remote host.
80.RE
81
82.LP
83.SH "DESCRIPTION"
84.LP
85
86.LP
87.LP
88\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.:
89.br
90
91.LP
92.RS 3
93
94.LP
95.nf
96\f3
97.fl
98jstack \-J\-d64 \-m pid
99.fl
100\fP
101.fi
102.RE
103
104.LP
105.LP
106\f3NOTE \- This utility is unsupported and may or may not be available in future versions of the JDK. The only form of jstack that is available on Windows platforms is\fP
107.LP
108.nf
109\f3
110.fl
111\fP\f3 jstack pid \fP
112.fl
113.fi
114
115.LP
116.SH "OPTIONS"
117.LP
118
119.LP
120.RS 3
121.TP 3
122\-F
123Forces a stack dump when 'jstack pid' does not respond.
124.TP 3
125\-m
126prints mixed mode (both Java and native C/C++ frames) stack trace.
127.TP 3
128\-h
129prints a help message.
130.br
131.br
132.TP 3
133\-help
134prints a help message
135.br
136.RE
137
138.LP
139.SH "SEE ALSO"
140.LP
141.RS 3
142.TP 2
143o
144pstack(1)
145.TP 2
146o
147c++filt(1)
148.TP 2
149o
150jps
151.TP 2
152o
153jsadebugd
154.RE
155
156.LP
157.SH "KNOWN BUGS"
158.LP
159
160.LP
161.LP
162Mixed mode stack trace, the \-m option, does not work with the remote debug server.
163.LP
164
165.LP
166