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 "JMAP" "1" "2018" "JDK 13" "JDK Commands"
  25 .hy
  26 .SH NAME
  27 .PP
  28 jmap \- print details of a specified process
  29 .SH SYNOPSIS
  30 .PP
  31 \f[B]Note:\f[R] This command is experimental\ and unsupported.
  32 .PP
  33 \f[CB]jmap\f[R] [\f[I]options\f[R]] \f[I]pid\f[R]
  34 .TP
  35 .B \f[I]options\f[R]
  36 This represents the \f[CB]jmap\f[R] command\-line options.
  37 See \f[B]Options for the jmap Command\f[R].
  38 .RS
  39 .RE
  40 .TP
  41 .B \f[I]pid\f[R]
  42 The process ID for which the information specified by the
  43 \f[I]options\f[R] is to be 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]jmap\f[R] command prints details of a specified running process.
  61 .PP
  62 \f[B]Note:\f[R]
  63 .PP
  64 This command is unsupported and might not be available in future
  65 releases of the JDK.
  66 On Windows Systems where the \f[CB]dbgeng.dll\f[R] file isn\[aq]t present,
  67 the Debugging Tools for Windows must be installed to make these tools
  68 work.
  69 The \f[CB]PATH\f[R] environment variable should contain the location of
  70 the \f[CB]jvm.dll\f[R] file that\[aq]s used by the target process or the
  71 location from which the core dump file was produced.
  72 .SH OPTIONS FOR THE JMAP COMMAND
  73 .TP
  74 .B \f[CB]\-clstats\f[R] \f[I]pid\f[R]
  75 Connects to a running process and prints class loader statistics of Java
  76 heap.
  77 .RS
  78 .RE
  79 .TP
  80 .B \f[CB]\-finalizerinfo\f[R] \f[I]pid\f[R]
  81 Connects to a running process and prints information on objects awaiting
  82 finalization.
  83 .RS
  84 .RE
  85 .TP
  86 .B \f[CB]\-histo\f[R][\f[CB]:live\f[R]] \f[I]pid\f[R]
  87 Connects to a running process and prints a histogram of the Java object
  88 heap.
  89 If the \f[CB]live\f[R] suboption is specified, it then counts only live
  90 objects.
  91 .RS
  92 .RE
  93 .TP
  94 .B \f[CB]\-dump:\f[R]\f[I]dump_options\f[R] \f[I]pid\f[R]
  95 Connects to a running process and dumps the Java heap.
  96 The \f[I]dump_options\f[R] include:
  97 .RS
  98 .IP \[bu] 2
  99 \f[CB]live\f[R] \-\-\- When specified, dumps only the live objects; if not
 100 specified, then dumps all objects in the heap.
 101 .IP \[bu] 2
 102 \f[CB]format=b\f[R] \-\-\- Dumps the Java heap in \f[CB]hprof\f[R] binary
 103 format
 104 .IP \[bu] 2
 105 \f[CB]file=\f[R]\f[I]filename\f[R] \-\-\- Dumps the heap to
 106 \f[I]filename\f[R]
 107 .PP
 108 Example: \f[CB]jmap\ \-dump:live,format=b,file=heap.bin\f[R] \f[I]pid\f[R]
 109 .RE