blob: 2bb0ffcc6fa104f466c20903931a2423b239491b [file] [log] [blame]
michaelm5ac8c152012-03-06 20:34:38 +00001." Copyright (c) 2004, 2011, 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.TH jmap 1 "10 May 2011"
23
24.LP
25.SH "Name"
26jmap \- Memory Map
27.LP
28.SH "SYNOPSIS"
29.LP
30.nf
31\f3
32.fl
33\fP\f3jmap\fP [ option ] pid
34.fl
35\f3jmap\fP [ option ] executable core
36.fl
37\f3jmap\fP [ option ] [server\-id@]remote\-hostname\-or\-IP
38.fl
39.fi
40
41.LP
42.SH "PARAMETERS"
43.LP
44.RS 3
45.TP 3
46option
47Options are mutually exclusive. Option, if used, should follow immediately after the command name.
48.TP 3
49pid
50process 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, jps(1) may be used.
51.br
52.TP 3
53executable
54Java executable from which the core dump was produced.
55.br
56.TP 3
57core
58core file for which the memory map is to be printed.
59.br
60.TP 3
61remote\-hostname\-or\-IP
62remote debug server's (see jsadebugd(1)) hostname or IP address.
63.br
64.TP 3
65server\-id
66optional unique id, if multiple debug servers are running on the same remote host.
67.br
68.RE
69
70.LP
71.SH "DESCRIPTION"
72.LP
73.LP
74\f3jmap\fP prints shared object memory maps or heap memory details of a given process or core file or a remote debug server. If the given process is running on a 64\-bit VM, you may need to specify the \f2\-J\-d64\fP option, e.g.:
75.LP
76.nf
77\f3
78.fl
79jmap \-J\-d64 \-heap pid
80.fl
81\fP
82.fi
83
84.LP
85.LP
86\f3NOTE: 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, \fP\f4PATH\fP\f3 environment variable should contain the location of \fP\f4jvm.dll\fP\f3 used by the target process or the location from which the Crash Dump file was produced.\fP
87.LP
88.LP
89\f3For example, \fP\f4set PATH=<jdk>\\jre\\bin\\client;%PATH%\fP
90.LP
91.br
92
93.LP
94.SH "OPTIONS"
95.LP
96.RS 3
97.TP 3
98<no option>
99When no option is used jmap prints shared object mappings. For each shared object loaded in the target VM, start address, the size of the mapping, and the full path of the shared object file are printed. This is similar to the Solaris \f3pmap\fP utility.
100.br
101.TP 3
102\-dump:[live,]format=b,file=<filename>
103Dumps the Java heap in hprof binary format to filename. The \f2live\fP suboption is optional. If specified, only the live objects in the heap are dumped. To browse the heap dump, you can use jhat(1) (Java Heap Analysis Tool) to read the generated file.
104.br
105.TP 3
106\-finalizerinfo
107Prints information on objects awaiting finalization.
108.br
109.TP 3
110\-heap
111Prints a heap summary. GC algorithm used, heap configuration and generation wise heap usage are printed.
112.br
113.TP 3
114\-histo[:live]
115Prints a histogram of the heap. For each Java class, number of objects, memory size in bytes, and fully qualified class names are printed. VM internal class names are printed with '*' prefix. If the \f2live\fP suboption is specified, only live objects are counted.
116.br
117.TP 3
118\-permstat
119Prints class loader wise statistics of permanent generation of Java heap. For each class loader, its name, liveness, address, parent class loader, and the number and size of classes it has loaded are printed. In addition, the number and size of interned Strings are printed.
120.br
121.TP 3
122\-F
123Force. Use with jmap \-dump or jmap \-histo option if the pid does not respond. The \f2live\fP suboption is not supported in this mode.
124.br
125.TP 3
126\-h
127Prints a help message.
128.br
129.br
130.TP 3
131\-help
132Prints a help message.
133.br
134.br
135.TP 3
136\-J<flag>
137Passes <flag> to the Java virtual machine on which jmap is run.
138.br
139.RE
140
141.LP
142.SH "SEE ALSO"
143.LP
144.RS 3
145.TP 2
146o
147pmap(1)
148.TP 2
149o
150jhat(1)
151.TP 2
152o
153jps(1)
154.TP 2
155o
156jsadebugd(1)
157.RE
158
159.LP
160