jstack.1 revision 5116:d45bc4307996
1." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. 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 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. 21." 22.TH jstack 1 "10 May 2011" 23 24.LP 25.SH "Name" 26jstack \- Stack Trace 27.br 28 29.LP 30.SH "SYNOPSIS" 31.LP 32.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 46.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 52process 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. 53.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 67remote debug server's (see jsadebugd(1)) hostname or IP address. 68.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 77.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 82.nf 83\f3 84.fl 85jstack \-J\-d64 \-m pid 86.fl 87\fP 88.fi 89 90.LP 91.LP 92\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. 93.LP 94.LP 95For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP 96.LP 97.SH "OPTIONS" 98.LP 99.RS 3 100.TP 3 101\-F 102Force 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 109http://download.oracle.com/javase/7/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html. 110.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 136jps(1) 137.TP 2 138o 139jsadebugd(1) 140.RE 141 142.LP 143.SH "KNOWN BUGS" 144.LP 145.LP 146Mixed mode stack trace, the \-m option, does not work with the remote debug server. 147.LP 148 149