2692
|
1 |
." Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
|
2
|
2 |
." 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.
|
2692
|
21 |
."
|
|
22 |
.TH jstack 1 "04 May 2009"
|
|
23 |
." Generated from HTML by html2man (author: Eric Armstrong)
|
2
|
24 |
|
|
25 |
.LP
|
2692
|
26 |
.SH "Name"
|
2
|
27 |
jstack \- 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
|
|
52 |
Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS.
|
|
53 |
.LP
|
|
54 |
.RS 3
|
|
55 |
.TP 3
|
|
56 |
pid
|
2692
|
57 |
process 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.
|
2
|
58 |
.RE
|
|
59 |
|
|
60 |
.LP
|
|
61 |
.RS 3
|
|
62 |
.TP 3
|
|
63 |
executable
|
|
64 |
Java executable from which the core dump was produced.
|
|
65 |
.br
|
|
66 |
.TP 3
|
|
67 |
core
|
|
68 |
core file for which the stack trace is to be printed.
|
|
69 |
.br
|
|
70 |
.TP 3
|
|
71 |
remote\-hostname\-or\-IP
|
2692
|
72 |
remote debug server's (see jsadebugd(1)) hostname or IP address.
|
2
|
73 |
.br
|
|
74 |
.TP 3
|
|
75 |
server\-id
|
|
76 |
optional 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
|
|
95 |
jstack \-J\-d64 \-m pid
|
|
96 |
.fl
|
|
97 |
\fP
|
|
98 |
.fi
|
|
99 |
.RE
|
|
100 |
|
|
101 |
.LP
|
|
102 |
.LP
|
2692
|
103 |
\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.
|
2
|
104 |
.LP
|
2692
|
105 |
.LP
|
|
106 |
For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
|
2
|
107 |
.LP
|
|
108 |
.SH "OPTIONS"
|
|
109 |
.LP
|
|
110 |
|
|
111 |
.LP
|
|
112 |
.RS 3
|
|
113 |
.TP 3
|
|
114 |
\-F
|
2692
|
115 |
Force a stack dump when 'jstack [\-l] pid' does not respond.
|
|
116 |
.TP 3
|
|
117 |
\-l
|
|
118 |
Long listing. Prints additional information about locks such as list of owned java.util.concurrent
|
|
119 |
.na
|
|
120 |
\f2ownable synchronizers\fP @
|
|
121 |
.fi
|
|
122 |
http://java.sun.com/javase/6/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html.
|
2
|
123 |
.TP 3
|
|
124 |
\-m
|
|
125 |
prints mixed mode (both Java and native C/C++ frames) stack trace.
|
|
126 |
.TP 3
|
|
127 |
\-h
|
|
128 |
prints a help message.
|
|
129 |
.br
|
|
130 |
.br
|
|
131 |
.TP 3
|
|
132 |
\-help
|
|
133 |
prints a help message
|
|
134 |
.br
|
|
135 |
.RE
|
|
136 |
|
|
137 |
.LP
|
|
138 |
.SH "SEE ALSO"
|
|
139 |
.LP
|
|
140 |
.RS 3
|
|
141 |
.TP 2
|
|
142 |
o
|
|
143 |
pstack(1)
|
|
144 |
.TP 2
|
|
145 |
o
|
|
146 |
c++filt(1)
|
|
147 |
.TP 2
|
|
148 |
o
|
2692
|
149 |
jps(1)
|
2
|
150 |
.TP 2
|
|
151 |
o
|
2692
|
152 |
jsadebugd(1)
|
2
|
153 |
.RE
|
|
154 |
|
|
155 |
.LP
|
|
156 |
.SH "KNOWN BUGS"
|
|
157 |
.LP
|
|
158 |
|
|
159 |
.LP
|
|
160 |
.LP
|
|
161 |
Mixed mode stack trace, the \-m option, does not work with the remote debug server.
|
|
162 |
.LP
|
|
163 |
|
|
164 |
.LP
|
|
165 |
|