jdk/src/linux/doc/man/jstack.1
changeset 21743 3d979da7bdf0
parent 9573 c02ff5a7c67b
child 31876 91b22707521a
equal deleted inserted replaced
21741:8cd632761233 21743:3d979da7bdf0
     1 ." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
     1 '\" t
     2 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2 .\"  Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
     3 ."
     3 .\"
     4 ." This code is free software; you can redistribute it and/or modify it
     4 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5 ." under the terms of the GNU General Public License version 2 only, as
     5 .\"
     6 ." published by the Free Software Foundation.
     6 .\" This code is free software; you can redistribute it and/or modify it
     7 ."
     7 .\" under the terms of the GNU General Public License version 2 only, as
     8 ." This code is distributed in the hope that it will be useful, but WITHOUT
     8 .\" published by the Free Software Foundation.
     9 ." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
     9 .\"
    10 ." FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    10 .\" This code is distributed in the hope that it will be useful, but WITHOUT
    11 ." version 2 for more details (a copy is included in the LICENSE file that
    11 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    12 ." accompanied this code).
    12 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
    13 ."
    13 .\" version 2 for more details (a copy is included in the LICENSE file that
    14 ." You should have received a copy of the GNU General Public License version
    14 .\" accompanied this code).
    15 ." 2 along with this work; if not, write to the Free Software Foundation,
    15 .\"
    16 ." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    16 .\" You should have received a copy of the GNU General Public License version
    17 ."
    17 .\" 2 along with this work; if not, write to the Free Software Foundation,
    18 ." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    18 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    19 ." or visit www.oracle.com if you need additional information or have any
    19 .\"
    20 ." questions.
    20 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    21 ."
    21 .\" or visit www.oracle.com if you need additional information or have any
    22 .TH jstack 1 "10 May 2011"
    22 .\" questions.
       
    23 .\"
       
    24 .\"     Arch: generic
       
    25 .\"     Software: JDK 8
       
    26 .\"     Date: 21 November 2013
       
    27 .\"     SectDesc: Troubleshooting Tools
       
    28 .\"     Title: jstack.1
       
    29 .\"
       
    30 .if n .pl 99999
       
    31 .TH jstack 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
       
    32 .\" -----------------------------------------------------------------
       
    33 .\" * Define some portability stuff
       
    34 .\" -----------------------------------------------------------------
       
    35 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
    36 .\" http://bugs.debian.org/507673
       
    37 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
       
    38 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
    39 .ie \n(.g .ds Aq \(aq
       
    40 .el       .ds Aq '
       
    41 .\" -----------------------------------------------------------------
       
    42 .\" * set default formatting
       
    43 .\" -----------------------------------------------------------------
       
    44 .\" disable hyphenation
       
    45 .nh
       
    46 .\" disable justification (adjust text to left margin only)
       
    47 .ad l
       
    48 .\" -----------------------------------------------------------------
       
    49 .\" * MAIN CONTENT STARTS HERE *
       
    50 .\" -----------------------------------------------------------------
    23 
    51 
    24 .LP
    52 .SH NAME    
    25 .SH "Name"
    53 jstack \- Prints Java thread stack traces for a Java process, core file, or remote debug server\&. This command is experimental and unsupported\&.
    26 jstack \- Stack Trace
    54 .SH SYNOPSIS    
       
    55 .sp     
       
    56 .nf     
       
    57 
       
    58 \fBjstack\fR [ \fIoptions\fR ] \fIpid\fR 
       
    59 .fi     
       
    60 .nf     
       
    61 
       
    62 \fBjstack\fR [ \fIoptions\fR ] \fIexecutable\fR \fIcore\fR
       
    63 .fi     
       
    64 .nf     
       
    65 
       
    66 \fBjstack\fR [ \fIoptions\fR ] [ \fIserver\-id\fR@ ] \fIremote\-hostname\-or\-IP\fR
       
    67 .fi     
       
    68 .sp     
       
    69 .TP     
       
    70 \fIoptions\fR
       
    71 The command-line options\&. See Options\&.
       
    72 .TP     
       
    73 \fIpid\fR
       
    74 The process ID for which the stack trace is printed\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&.
       
    75 .TP     
       
    76 \fIexecutable\fR
       
    77 The Java executable from which the core dump was produced\&.
       
    78 .TP     
       
    79 \fIcore\fR
       
    80 The core file for which the stack trace is to be printed\&.
       
    81 .TP     
       
    82 \fIremote-hostname-or-IP\fR
       
    83 The remote debug server \f3hostname\fR or \f3IP\fR address\&. See jsadebugd(1)\&.
       
    84 .TP     
       
    85 \fIserver-id\fR
       
    86 An optional unique ID to use when multiple debug servers are running on the same remote host\&.
       
    87 .SH DESCRIPTION    
       
    88 The \f3jstack\fR command prints Java stack traces of Java threads for a specified Java process, core file, or remote debug server\&. For each Java frame, the full class name, method name, byte code index (BCI), and line number, when available, are printed\&. With the \f3-m\fR option, the \f3jstack\fR command prints both Java and native frames of all threads with the program counter (PC)\&. For each native frame, the closest native symbol to PC, when available, is printed\&. C++ mangled names are not demangled\&. To demangle C++ names, the output of this command can be piped to \f3c++filt\fR\&. When the specified process is running on a 64-bit Java Virtual Machine, you might need to specify the \f3-J-d64\fR option, for example: \f3jstack -J-d64 -m pid\fR\&.
       
    89 .PP
       
    90 \fINote:\fR This utility is unsupported and might not be available in future release of the JDK\&. In Windows Systems where the dbgeng\&.dll file is not present, Debugging Tools For Windows must be installed so these tools work\&. The \f3PATH\fR environment variable needs to contain the location of the jvm\&.dll that is used by the target process, or the location from which the crash dump file was produced\&. For example:
       
    91 .sp     
       
    92 .nf     
       
    93 \f3set PATH=<jdk>\ejre\ebin\eclient;%PATH%\fP
       
    94 .fi     
       
    95 .nf     
       
    96 \f3\fP
       
    97 .fi     
       
    98 .sp     
       
    99 .SH OPTIONS    
       
   100 .TP
       
   101 -F
    27 .br
   102 .br
    28 
   103 Force a stack dump when \f3jstack\fR [\f3-l\fR] \f3pid\fR does not respond\&.
    29 .LP
   104 .TP
    30 .SH "SYNOPSIS"
   105 -l
    31 .LP
   106 .br
    32 .nf
   107 Long listing\&. Prints additional information about locks such as a list of owned \f3java\&.util\&.concurrent\fR ownable synchronizers\&. See the \f3AbstractOwnableSynchronizer\fR class description at http://docs\&.oracle\&.com/javase/8/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer\&.html
    33 \f3
   108 .TP
    34 .fl
   109 -m
    35 \fP\f3jstack\fP [ option ] pid
   110 .br
    36 .fl
   111 Prints a mixed mode stack trace that has both Java and native C/C++ frames\&.
    37 \f3jstack\fP [ option ] executable core
   112 .TP
    38 .fl
   113 -h
    39 \f3jstack\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
   114 .br
    40 .fl
   115 Prints a help message\&.
    41 .fi
   116 .TP
    42 
   117 -help
    43 .LP
   118 .br
    44 .SH "PARAMETERS"
   119 Prints a help message\&.
    45 .LP
   120 .SH KNOWN\ BUGS    
    46 .LP
   121 In mixed mode stack trace, the \f3-m\fR option does not work with the remote debug server\&.
    47 Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS.
   122 .SH SEE\ ALSO    
    48 .LP
   123 .TP 0.2i    
    49 .RS 3
   124 \(bu
    50 .TP 3
   125 pstack(1)
    51 pid 
   126 .TP 0.2i    
    52 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. 
   127 \(bu
       
   128 C++filt(1)
       
   129 .TP 0.2i    
       
   130 \(bu
       
   131 jps(1)
       
   132 .TP 0.2i    
       
   133 \(bu
       
   134 jsadebugd(1)
    53 .RE
   135 .RE
    54 
       
    55 .LP
       
    56 .RS 3
       
    57 .TP 3
       
    58 executable 
       
    59 Java executable from which the core dump was produced. 
       
    60 .br
   136 .br
    61 .TP 3
   137 'pl 8.5i
    62 core 
   138 'bp
    63 core file for which the stack trace is to be printed. 
       
    64 .br
       
    65 .TP 3
       
    66 remote\-hostname\-or\-IP 
       
    67 remote debug server's (see jsadebugd(1)) hostname or IP address. 
       
    68 .br
       
    69 .TP 3
       
    70 server\-id 
       
    71 optional 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
       
    85 jstack \-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
       
    95 For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
       
    96 .LP
       
    97 .SH "OPTIONS"
       
    98 .LP
       
    99 .RS 3
       
   100 .TP 3
       
   101 \-F 
       
   102 Force a stack dump when 'jstack [\-l] pid' does not respond. 
       
   103 .TP 3
       
   104 \-l 
       
   105 Long listing. Prints additional information about locks such as list of owned java.util.concurrent 
       
   106 .na
       
   107 \f2ownable synchronizers\fP @
       
   108 .fi
       
   109 http://download.oracle.com/javase/7/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html. 
       
   110 .TP 3
       
   111 \-m 
       
   112 prints mixed mode (both Java and native C/C++ frames) stack trace. 
       
   113 .TP 3
       
   114 \-h 
       
   115 prints a help message.
       
   116 .br
       
   117 .br
       
   118 .TP 3
       
   119 \-help 
       
   120 prints a help message
       
   121 .br
       
   122 .RE
       
   123 
       
   124 .LP
       
   125 .SH "SEE ALSO"
       
   126 .LP
       
   127 .RS 3
       
   128 .TP 2
       
   129 o
       
   130 pstack(1) 
       
   131 .TP 2
       
   132 o
       
   133 c++filt(1) 
       
   134 .TP 2
       
   135 o
       
   136 jps(1) 
       
   137 .TP 2
       
   138 o
       
   139 jsadebugd(1) 
       
   140 .RE
       
   141 
       
   142 .LP
       
   143 .SH "KNOWN BUGS"
       
   144 .LP
       
   145 .LP
       
   146 Mixed mode stack trace, the \-m option, does not work with the remote debug server.
       
   147 .LP
       
   148