# phpman > man > jmap(1)

> **TLDR:** Java memory map tool.
>
- Print shared object mappings for a Java process (output like pmap):
  `jmap {{java_pid}}`
- Print heap summary information:
  `jmap -heap {{filename.jar}} {{java_pid}}`
- Print histogram of heap usage by type:
  `jmap -histo {{java_pid}}`
- Dump contents of the heap into a binary file for analysis with jhat:
  `jmap -dump:format=b,file={{path/to/file}} {{java_pid}}`
- Dump live objects of the heap into a binary file for analysis with jhat:
  `jmap -dump:live,format=b,file={{path/to/file}} {{java_pid}}`

*Source: tldr-pages*

---

[jmap(1)](https://www.chedong.com/phpMan.php/man/jmap/1/markdown)                                 Troubleshooting Tools                                [jmap(1)](https://www.chedong.com/phpMan.php/man/jmap/1/markdown)



## NAME
       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.

## SYNOPSIS
       **jmap** [ _options_ ] _pid_

       **jmap** [ _options_ ] _executable_ _core_

       **jmap** [ _options_ ] [ _pid_ ] _server-id_@ ] _remote-hostname-or-IP_


       _options_
              The command-line options. See Options.

       _pid_    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)](https://www.chedong.com/phpMan.php/man/jps/1/markdown) command.

       _executable_
              The Java executable from which the core dump was produced.

       _core_   The core file for which the memory map is to be printed.

       _remote-hostname-or-IP_
              The remote debug server **hostname** or **IP** address. See [jsadebugd(1)](https://www.chedong.com/phpMan.php/man/jsadebugd/1/markdown).

       _server-id_
              An optional unique ID to use when multiple debug servers are running on the same
              remote host.

## DESCRIPTION
       The **jmap** 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 **-J-d64** option, for example:
       **jmap-J-d64** **-heap** **pid**.

       _Note:_ This utility is unsupported and might not be available in future releases of the JDK.
       On Windows Systems where the **dbgeng.dll** file is not present, Debugging Tools For Windows must
       be installed to make these tools work. The **PATH** environment variable should contain the
       location of the **jvm.dll** file that is used by the target process or the location from which
       the crash dump file was produced, for example: **set** **PATH=%JDK**___**HOME%\jre\bin\client;%PATH%**.

## OPTIONS
       <no option>
              When no option is used, the **jmap** 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 **pmap** utility.

       -dump:[live,] format=b, file=_filename_
              Dumps the Java heap in **hprof** binary format to **filename**. The **live** 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)](https://www.chedong.com/phpMan.php/man/jhat/1/markdown) command to read the generated file.

### -finalizerinfo
              Prints information about objects that are awaiting finalization.

### -heap
              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.

### -histo[:live]
              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 **live** suboption is specified,
              then only active objects are counted.

### -clstats
              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.

### -F
              Force. Use this option with the **jmap** **-dump** or **jmap** **-histo** option when the pid does not
              respond. The **live** suboption is not supported in this mode.

### -h
              Prints a help message.

### -help
              Prints a help message.

### -J_flag_
              Passes **flag** to the Java Virtual Machine where the **jmap** command is running.

## SEE ALSO
       • [jhat(1)](https://www.chedong.com/phpMan.php/man/jhat/1/markdown)

       • [jps(1)](https://www.chedong.com/phpMan.php/man/jps/1/markdown)

       • [jsadebugd(1)](https://www.chedong.com/phpMan.php/man/jsadebugd/1/markdown)



JDK 8                                     21 November 2013                                   [jmap(1)](https://www.chedong.com/phpMan.php/man/jmap/1/markdown)
