1 ." Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. |
1 '\" t |
2 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
2 .\" Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. |
3 ." |
3 .\" |
4 ." This code is free software; you can redistribute it and/or modify it |
4 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 ." under the terms of the GNU General Public License version 2 only, as |
5 .\" |
6 ." published by the Free Software Foundation. |
6 .\" This code is free software; you can redistribute it and/or modify it |
7 ." |
7 .\" under the terms of the GNU General Public License version 2 only, as |
8 ." This code is distributed in the hope that it will be useful, but WITHOUT |
8 .\" published by the Free Software Foundation. |
9 ." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9 .\" |
10 ." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
10 .\" This code is distributed in the hope that it will be useful, but WITHOUT |
11 ." version 2 for more details (a copy is included in the LICENSE file that |
11 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
12 ." accompanied this code). |
12 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
13 ." |
13 .\" version 2 for more details (a copy is included in the LICENSE file that |
14 ." You should have received a copy of the GNU General Public License version |
14 .\" accompanied this code). |
15 ." 2 along with this work; if not, write to the Free Software Foundation, |
15 .\" |
16 ." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
16 .\" You should have received a copy of the GNU General Public License version |
17 ." |
17 .\" 2 along with this work; if not, write to the Free Software Foundation, |
18 ." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
18 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
19 ." or visit www.oracle.com if you need additional information or have any |
19 .\" |
20 ." questions. |
20 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
21 ." |
21 .\" or visit www.oracle.com if you need additional information or have any |
22 .TH jhat 1 "10 May 2011" |
22 .\" questions. |
|
23 .\" |
|
24 .\" Arch: generic |
|
25 .\" Software: JDK 8 |
|
26 .\" Date: 21 November 2013 |
|
27 .\" SectDesc: Troubleshooting Tools |
|
28 .\" Title: jhat.1 |
|
29 .\" |
|
30 .if n .pl 99999 |
|
31 .TH jhat 1 "21 November 2013" "JDK 8" "Troubleshooting Tools" |
|
32 .\" ----------------------------------------------------------------- |
|
33 .\" * Define some portability stuff |
|
34 .\" ----------------------------------------------------------------- |
|
35 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
36 .\" http://bugs.debian.org/507673 |
|
37 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
|
38 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
39 .ie \n(.g .ds Aq \(aq |
|
40 .el .ds Aq ' |
|
41 .\" ----------------------------------------------------------------- |
|
42 .\" * set default formatting |
|
43 .\" ----------------------------------------------------------------- |
|
44 .\" disable hyphenation |
|
45 .nh |
|
46 .\" disable justification (adjust text to left margin only) |
|
47 .ad l |
|
48 .\" ----------------------------------------------------------------- |
|
49 .\" * MAIN CONTENT STARTS HERE * |
|
50 .\" ----------------------------------------------------------------- |
23 |
51 |
24 .LP |
52 .SH NAME |
25 .SH "Name" |
53 jhat \- Analyzes the Java heap\&. This command is experimental and unsupported\&. |
26 jhat \- Java Heap Analysis Tool |
54 .SH SYNOPSIS |
27 .LP |
55 .sp |
28 .SH "SYNOPSIS" |
56 .nf |
29 .LP |
|
30 .nf |
|
31 \f3 |
|
32 .fl |
|
33 \fP\f3jhat\fP [ \f2options\fP ] <heap\-dump\-file> |
|
34 .fl |
|
35 |
57 |
36 .fl |
58 \fBjhat\fR [ \fIoptions\fR ] \fIheap\-dump\-file\fR |
37 .fi |
59 .fi |
38 |
60 .sp |
39 .LP |
61 .TP |
40 .SH "PARAMETERS" |
62 \fIoptions\fR |
41 .LP |
63 The command-line options\&. See Options\&. |
42 .RS 3 |
64 .TP |
43 .TP 3 |
65 \fIheap-dump-file\fR |
44 options |
66 Java binary heap dump file to be browsed\&. For a dump file that contains multiple heap dumps, you can specify which dump in the file by appending \f3#<number>\fR to the file name, for example, \f3myfile\&.hprof#3\fR\&. |
45 Options, if used, should follow immediately after the command name. |
67 .SH DESCRIPTION |
46 .TP 3 |
68 The \f3jhat\fR command parses a Java heap dump file and starts a web server\&. The \f3jhat\fR command lets you to browse heap dumps with your favorite web browser\&. The \f3jhat\fR command supports predesigned queries such as show all instances of a known class \f3MyClass\fR, and Object Query Language (OQL)\&. OQL is similar to SQL, except for querying heap dumps\&. Help on OQL is available from the OQL help page shown by the \f3jhat\fR command\&. With the default port, OQL help is available at http://localhost:7000/oqlhelp/ |
47 heap\-dump\-file |
69 .PP |
48 Java binary heap dump file to be browsed. For a dump file that contains multiple heap dumps, you may specify which dump in the file by appending "#<number> to the file name, i.e. "foo.hprof#3". |
70 There are several ways to generate a Java heap dump: |
|
71 .TP 0.2i |
|
72 \(bu |
|
73 Use the \f3jmap -dump\fR option to obtain a heap dump at runtime\&. See jmap(1)\&. |
|
74 .TP 0.2i |
|
75 \(bu |
|
76 Use the \f3jconsole\fR option to obtain a heap dump through \f3HotSpotDiagnosticMXBean\fR at runtime\&. See jconsole(1) and the \f3HotSpotDiagnosticMXBean\fR interface description at http://docs\&.oracle\&.com/javase/8/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean\&.html |
|
77 .TP 0.2i |
|
78 \(bu |
|
79 Heap dump is generated when an \f3OutOfMemoryError\fR is thrown by specifying the \f3-XX:+HeapDumpOnOutOfMemoryError\fR Java Virtual Machine (JVM) option\&. |
|
80 .TP 0.2i |
|
81 \(bu |
|
82 Use the \f3hprof\fR command\&. See the HPROF: A Heap/CPU Profiling Tool at http://docs\&.oracle\&.com/javase/8/docs/technotes/samples/hprof\&.html |
|
83 .SH OPTIONS |
|
84 .TP |
|
85 -stack false|true |
|
86 .br |
|
87 Turns off tracking object allocation call stack\&. If allocation site information is not available in the heap dump, then you have to set this flag to \f3false\fR\&. The default is \f3true\fR\&. |
|
88 .TP |
|
89 -refs false|true |
|
90 .br |
|
91 Turns off tracking of references to objects\&. Default is \f3true\fR\&. By default, back pointers, which are objects that point to a specified object such as referrers or incoming references, are calculated for all objects in the heap\&. |
|
92 .TP |
|
93 -port \fIport-number\fR |
|
94 .br |
|
95 Sets the port for the \f3jhat\fR HTTP server\&. Default is 7000\&. |
|
96 .TP |
|
97 -exclude \fIexclude-file\fR |
|
98 .br |
|
99 Specifies a file that lists data members that should be excluded from the reachable objects query\&. For example, if the file lists \f3java\&.lang\&.String\&.value\fR, then, then whenever the list of objects that are reachable from a specific object \f3o\fR are calculated, reference paths that involve \f3java\&.lang\&.String\&.value\fR field are not considered\&. |
|
100 .TP |
|
101 -baseline \fIexclude-file\fR |
|
102 .br |
|
103 Specifies a baseline heap dump\&. Objects in both heap dumps with the same object ID are marked as not being new\&. Other objects are marked as new\&. This is useful for comparing two different heap dumps\&. |
|
104 .TP |
|
105 -debug \fIint\fR |
|
106 .br |
|
107 Sets the debug level for this tool\&. A level of 0 means no debug output\&. Set higher values for more verbose modes\&. |
|
108 .TP |
|
109 -version |
|
110 .br |
|
111 Reports the release number and exits |
|
112 .TP |
|
113 -h |
|
114 .br |
|
115 Dsiplays a help message and exits\&. |
|
116 .TP |
|
117 -help |
|
118 .br |
|
119 Displays a help message and exits\&. |
|
120 .TP |
|
121 -J\fIflag\fR |
|
122 .br |
|
123 Passes \f3flag\fR to the Java Virtual Machine on which the \f3jhat\fR command is running\&. For example, \f3-J-Xmx512m\fR to use a maximum heap size of 512 MB\&. |
|
124 .SH SEE\ ALSO |
|
125 .TP 0.2i |
|
126 \(bu |
|
127 jmap(1) |
|
128 .TP 0.2i |
|
129 \(bu |
|
130 jconsole(1) |
|
131 .TP 0.2i |
|
132 \(bu |
|
133 HPROF: A Heap/CPU Profiling Tool at http://docs\&.oracle\&.com/javase/8/docs/technotes/samples/hprof\&.html |
49 .RE |
134 .RE |
50 |
135 .br |
51 .LP |
136 'pl 8.5i |
52 .SH "DESCRIPTION" |
137 'bp |
53 .LP |
|
54 .LP |
|
55 The \f3jhat\fP command parses a java heap dump file and launches a webserver. jhat enables you to browse heap dumps using your favorite webbrowser. jhat supports pre\-designed queries (such as 'show all instances of a known class "Foo"') as well as \f3OQL\fP (\f3O\fPbject \f3Q\fPuery \f3L\fPanguage) \- a SQL\-like query language to query heap dumps. Help on OQL is available from the OQL help page shown by jhat. With the default port, OQL help is available at http://localhost:7000/oqlhelp/ |
|
56 .LP |
|
57 .LP |
|
58 There are several ways to generate a java heap dump: |
|
59 .LP |
|
60 .RS 3 |
|
61 .TP 2 |
|
62 o |
|
63 Use jmap(1) \-dump option to obtain a heap dump at runtime; |
|
64 .TP 2 |
|
65 o |
|
66 Use jconsole(1) option to obtain a heap dump via |
|
67 .na |
|
68 \f2HotSpotDiagnosticMXBean\fP @ |
|
69 .fi |
|
70 http://download.oracle.com/javase/7/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html at runtime; |
|
71 .TP 2 |
|
72 o |
|
73 Heap dump will be generated when OutOfMemoryError is thrown by specifying \-XX:+HeapDumpOnOutOfMemoryError VM option; |
|
74 .TP 2 |
|
75 o |
|
76 Use |
|
77 .na |
|
78 \f2hprof\fP @ |
|
79 .fi |
|
80 http://java.sun.com/developer/technicalArticles/Programming/HPROF.html. |
|
81 .RE |
|
82 |
|
83 .LP |
|
84 .LP |
|
85 \f3NOTE:\fP This tool is \f3experimental\fP and may \f3not\fP be available in future versions of the JDK. |
|
86 .LP |
|
87 .SH "OPTIONS" |
|
88 .LP |
|
89 .RS 3 |
|
90 .TP 3 |
|
91 \-stack false/true |
|
92 Turn off tracking object allocation call stack. Note that if allocation site information is not available in the heap dump, you have to set this flag to false. Default is true. |
|
93 .TP 3 |
|
94 \-refs false/true |
|
95 Turn off tracking of references to objects. Default is true. By default, back pointers (objects pointing to a given object a.k.a referrers or in\-coming references) are calculated for all objects in the heap. |
|
96 .TP 3 |
|
97 \-port port\-number |
|
98 Set the port for the jhat's HTTP server. Default is 7000. |
|
99 .TP 3 |
|
100 \-exclude exclude\-file |
|
101 Specify a file that lists data members that should be excluded from the "reachable objects" query. For example, if the file lists \f2java.lang.String.value\fP, then, whenever list of objects reachable from a specific object "o" are calculated, reference paths involving \f2java.lang.String.value\fP field will not considered. |
|
102 .TP 3 |
|
103 \-baseline baseline\-dump\-file |
|
104 Specify a baseline heap dump. Objects in both heap dumps with the same object ID will be marked as not being "new". Other objects will be marked as "new". This is useful while comparing two different heap dumps. |
|
105 .TP 3 |
|
106 \-debug int |
|
107 Set debug level for this tool. 0 means no debug output. Set higher values for more verbose modes. |
|
108 .TP 3 |
|
109 \-version |
|
110 Report version number and exit. |
|
111 .TP 3 |
|
112 \-h |
|
113 Output help message and exit. |
|
114 .TP 3 |
|
115 \-help |
|
116 Output help message and exit. |
|
117 .TP 3 |
|
118 \-J<flag> |
|
119 Pass <flag> to the Java virtual machine on which jhat is run. For example, \-J\-Xmx512m to use a maximum heap size of 512MB. |
|
120 .RE |
|
121 |
|
122 .LP |
|
123 .SH "SEE ALSO" |
|
124 .LP |
|
125 .RS 3 |
|
126 .TP 2 |
|
127 o |
|
128 jmap(1) |
|
129 .TP 2 |
|
130 o |
|
131 jconsole(1) |
|
132 .TP 2 |
|
133 o |
|
134 .na |
|
135 \f2hprof \- Heap and CPU profiling tool\fP @ |
|
136 .fi |
|
137 http://java.sun.com/developer/technicalArticles/Programming/HPROF.html |
|
138 .RE |
|
139 |
|
140 .LP |
|
141 |
|