jdk/src/linux/doc/man/jstack.1
author tbell
Mon, 04 May 2009 18:28:26 -0700
changeset 2692 345bc8d65b19
parent 2 90ce3da70b43
child 5506 202f599c92aa
permissions -rw-r--r--
6837214: Update JDK7 man pages Reviewed-by: darcy, bpatel, tbell Contributed-by: jacob.royal@sun.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     1
." Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
."
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
." This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
." under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
." published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
."
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
." This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
." FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
." version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
." accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
." You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
." 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
."
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
." Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
." CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
." have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
."
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    22
.TH jstack 1 "04 May 2009"
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    23
." Generated from HTML by html2man (author: Eric Armstrong)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    26
.SH "Name"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
jstack \- Stack Trace
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
.SH "SYNOPSIS"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
\fP\f3jstack\fP [ option ] pid
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
\f3jstack\fP [ option ] executable core
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
\f3jstack\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
.SH "PARAMETERS"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
Options are mutually exclusive. Option, if used, should follow immediately after the command name. See OPTIONS.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
pid 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
executable 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
Java executable from which the core dump was produced. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
core 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
core file for which the stack trace is to be printed. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
remote\-hostname\-or\-IP 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    72
remote debug server's (see jsadebugd(1)) hostname or IP address. 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
server\-id 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
optional unique id, if multiple debug servers are running on the same remote host. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
.SH "DESCRIPTION"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    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.:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
jstack \-J\-d64 \-m pid
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   105
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   106
For example, \f2set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
.SH "OPTIONS"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
\-F 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   115
Force a stack dump when 'jstack [\-l] pid' does not respond. 
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   116
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   117
\-l 
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   118
Long listing. Prints additional information about locks such as list of owned java.util.concurrent 
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   119
.na
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   120
\f2ownable synchronizers\fP @
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   121
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   122
http://java.sun.com/javase/6/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer.html. 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
\-m 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
prints mixed mode (both Java and native C/C++ frames) stack trace. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
\-h 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
prints a help message.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
\-help 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
prints a help message
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
.SH "SEE ALSO"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
pstack(1) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
c++filt(1) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
o
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   149
jps(1) 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
o
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   152
jsadebugd(1) 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
.SH "KNOWN BUGS"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
Mixed mode stack trace, the \-m option, does not work with the remote debug server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165