< prev index next >

src/jdk.jcmd/share/man/jmap.1

Print this page


   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

































   1 '\" t
   2 .\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
   3 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 .\"
   5 .\" This code is free software; you can redistribute it and/or modify it
   6 .\" under the terms of the GNU General Public License version 2 only, as
   7 .\" published by the Free Software Foundation.
   8 .\"
   9 .\" This code is distributed in the hope that it will be useful, but WITHOUT
  10 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 .\" version 2 for more details (a copy is included in the LICENSE file that
  13 .\" accompanied this code).
  14 .\"
  15 .\" You should have received a copy of the GNU General Public License version
  16 .\" 2 along with this work; if not, write to the Free Software Foundation,
  17 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 .\"
  19 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 .\" or visit www.oracle.com if you need additional information or have any
  21 .\" questions.
  22 .\"
  23 .\"     Arch: generic
  24 .\"     Software: JDK 8
  25 .\"     Date: 21 November 2013
  26 .\"     SectDesc: Troubleshooting Tools
  27 .\"     Title: jmap.1
  28 .\"
  29 .if n .pl 99999
  30 .TH jmap 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
  31 .\" -----------------------------------------------------------------
  32 .\" * Define some portability stuff
  33 .\" -----------------------------------------------------------------
  34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  35 .\" http://bugs.debian.org/507673
  36 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  37 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  38 .ie \n(.g .ds Aq \(aq
  39 .el       .ds Aq '
  40 .\" -----------------------------------------------------------------
  41 .\" * set default formatting
  42 .\" -----------------------------------------------------------------
  43 .\" disable hyphenation
  44 .nh
  45 .\" disable justification (adjust text to left margin only)
  46 .ad l
  47 .\" -----------------------------------------------------------------
  48 .\" * MAIN CONTENT STARTS HERE *
  49 .\" -----------------------------------------------------------------
  50 
  51 .SH NAME    
  52 jmap \- Prints shared object memory maps or heap memory details for a process, core file, or remote debug server\&. This command is experimental and unsupported\&.
  53 .SH SYNOPSIS    
  54 .sp     
  55 .nf     
  56 
  57 \fBjmap\fR [ \fIoptions\fR ] \fIpid\fR
  58 .fi     
  59 .nf     
  60 
  61 \fBjmap\fR [ \fIoptions\fR ] \fIexecutable\fR \fIcore\fR
  62 .fi     
  63 .nf     
  64 
  65 \fBjmap\fR [ \fIoptions\fR ] [ \fIpid\fR ] \fIserver\-id\fR@ ] \fIremote\-hostname\-or\-IP\fR
  66 .fi     
  67 .sp     
  68 .TP     
  69 \fIoptions\fR
  70 The command-line options\&. See Options\&.
  71 .TP     
  72 \fIpid\fR
  73 The process ID for which the memory map is to be printed\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&.
  74 .TP     
  75 \fIexecutable\fR
  76 The Java executable from which the core dump was produced\&.
  77 .TP     
  78 \fIcore\fR
  79 The core file for which the memory map is to be printed\&.
  80 .TP     
  81 \fIremote-hostname-or-IP\fR
  82 The remote debug server \f3hostname\fR or \f3IP\fR address\&. See jsadebugd(1)\&.
  83 .TP     
  84 \fIserver-id\fR
  85 An optional unique ID to use when multiple debug servers are running on the same remote host\&.
  86 .SH DESCRIPTION    
  87 The \f3jmap\fR command prints shared object memory maps or heap memory details of a specified process, core file, or remote debug server\&. If the specified process is running on a 64-bit Java Virtual Machine (JVM), then you might need to specify the \f3-J-d64\fR option, for example: \f3jmap\fR\f3-J-d64 -heap pid\fR\&.
  88 .PP
  89 \fINote:\fR This utility is unsupported and might not be available in future releases of the JDK\&. On Windows Systems where the \f3dbgeng\&.dll\fR file is not present, Debugging Tools For Windows must be installed to make these tools work\&. The \f3PATH\fR environment variable should contain the location of the \f3jvm\&.dll\fR file that is used by the target process or the location from which the crash dump file was produced, for example: \f3set PATH=%JDK_HOME%\ejre\ebin\eclient;%PATH%\fR\&.
  90 .SH OPTIONS    
  91 .TP     
  92 <no option>
  93 When no option is used, the \f3jmap\fR command prints shared object mappings\&. For each shared object loaded in the target JVM, the start address, size of the mapping, and the full path of the shared object file are printed\&. This behavior is similar to the Oracle Solaris \f3pmap\fR utility\&.
  94 .TP
  95 -dump:[live,] format=b, file=\fIfilename\fR
  96 .br
  97 Dumps the Java heap in \f3hprof\fR binary format to \f3filename\fR\&. The \f3live\fR suboption is optional, but when specified, only the active objects in the heap are dumped\&. To browse the heap dump, you can use the jhat(1) command to read the generated file\&.
  98 .TP
  99 -finalizerinfo
 100 .br
 101 Prints information about objects that are awaiting finalization\&.
 102 .TP
 103 -heap
 104 .br
 105 Prints a heap summary of the garbage collection used, the head configuration, and generation-wise heap usage\&. In addition, the number and size of interned Strings are printed\&.
 106 .TP
 107 -histo[:live]
 108 .br
 109 Prints a histogram of the heap\&. For each Java class, the number of objects, memory size in bytes, and the fully qualified class names are printed\&. The JVM internal class names are printed with an asterisk (*) prefix\&. If the \f3live\fR suboption is specified, then only active objects are counted\&.
 110 .TP
 111 -clstats
 112 .br
 113 Prints class loader wise statistics of Java heap\&. For each class loader, its name, how active it is, address, parent class loader, and the number and size of classes it has loaded are printed\&.
 114 .TP
 115 -F
 116 .br
 117 Force\&. Use this option with the \f3jmap -dump\fR or \f3jmap -histo\fR option when the pid does not respond\&. The \f3live\fR suboption is not supported in this mode\&.
 118 .TP
 119 -h
 120 .br
 121 Prints a help message\&.
 122 .TP
 123 -help
 124 .br
 125 Prints a help message\&.
 126 .TP
 127 -J\fIflag\fR
 128 .br
 129 Passes \f3flag\fR to the Java Virtual Machine where the \f3jmap\fR command is running\&.
 130 .SH SEE\ ALSO    
 131 .TP 0.2i    
 132 \(bu
 133 jhat(1)
 134 .TP 0.2i    
 135 \(bu
 136 jps(1)
 137 .TP 0.2i    
 138 \(bu
 139 jsadebugd(1)
 140 .RE
 141 .br
 142 'pl 8.5i
 143 'bp
< prev index next >