1 .\" Copyright (c) 1994, 2019, 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 .\" Automatically generated by Pandoc 2.3.1
  23 .\"
  24 .TH "JSTACK" "1" "2018" "JDK 13" "JDK Commands"
  25 .hy
  26 .SH NAME
  27 .PP
  28 jstack \- print Java stack traces of Java threads for a specified Java
  29 process
  30 .SH SYNOPSIS
  31 .PP
  32 \f[B]Note:\f[R] This command is experimental\ and unsupported.
  33 .PP
  34 \f[CB]jstack\f[R] [\f[I]options\f[R]] \f[I]pid\f[R]
  35 .TP
  36 .B \f[I]options\f[R]
  37 This represents the \f[CB]jstack\f[R] command\-line options.
  38 See \f[B]Options for the jstack Command\f[R].
  39 .RS
  40 .RE
  41 .TP
  42 .B \f[I]pid\f[R]
  43 The process ID for which the stack trace is printed.
  44 The process must be a Java process.
  45 To get a list of Java processes running on a machine, use either the
  46 \f[CB]ps\f[R] command or, if the JVM processes are not running in a
  47 separate docker instance, the \f[B]jps\f[R] command.
  48 .RS
  49 .PP
  50 \f[B]Note:\f[R] JDK 10 has added support for using the Attach API when
  51 attaching to Java processes running in a separate docker process.
  52 However, the \f[CB]jps\f[R] command will not list the JVM processes that
  53 are running in a separate docker instance.
  54 If you are trying to connect a Linux host with a Virtual Machine that is
  55 in a docker container, you must use tools such as \f[CB]ps\f[R] to look up
  56 the PID of the JVM.
  57 .RE
  58 .SH DESCRIPTION
  59 .PP
  60 The \f[CB]jstack\f[R] command prints Java stack traces of Java threads for
  61 a specified Java process.
  62 For each Java frame, the full class name, method name, byte code index
  63 (BCI), and line number, when available, are printed.
  64 C++ mangled names aren\[aq]t demangled.
  65 To demangle C++ names, the output of this command can be piped to
  66 \f[CB]c++filt\f[R].
  67 When the specified process is running on a 64\-bit JVM, you might need
  68 to specify the \f[CB]\-J\-d64\f[R] option, for example:
  69 \f[CB]jstack\ \-J\-d64\f[R] \f[I]pid\f[R].
  70 .PP
  71 \f[B]Note:\f[R]
  72 .PP
  73 This command is unsupported and might not be available in future
  74 releases of the JDK.
  75 In Windows Systems where the \f[CB]dbgeng.dll\f[R] file isn\[aq]t present,
  76 the Debugging Tools for Windows must be installed so that these tools
  77 work.
  78 The \f[CB]PATH\f[R] environment variable needs to contain the location of
  79 the \f[CB]jvm.dll\f[R] that is used by the target process, or the location
  80 from which the core dump file was produced.
  81 .SH OPTIONS FOR THE JSTACK COMMAND
  82 .TP
  83 .B \f[CB]\-l\f[R]
  84 The long listing option prints additional information about locks.
  85 .RS
  86 .RE
  87 .TP
  88 .B \f[CB]\-h\f[R] or \f[CB]\-help\f[R]
  89 Prints a help message.
  90 .RS
  91 .RE