1jhat(1)                     General Commands Manual                    jhat(1)
2
3
4

NAME

6       jhat - Java Heap Analysis Tool
7

SYNOPSIS

9       jhat [ options ] <heap-dump-file>
10
11
12

PARAMETERS

14       options
15          Options, if used, should follow immediately after the command name.
16
17       heap-dump-file
18          Java  binary heap dump file to be browsed. For a dump file that con‐
19          tains multiple heap dumps, you may specify which dump in the file by
20          appending "#<number> to the file name, i.e. "foo.hprof#3".
21

DESCRIPTION

23       The jhat command parses a java heap dump file and launches a webserver.
24       jhat enables you to browse heap dumps using your  favorite  webbrowser.
25       jhat  supports  pre-designed  queries (such as 'show all instances of a
26       known class "Foo"') as well as OQL (Object Query Language) - a SQL-like
27       query  language  to query heap dumps. Help on OQL is available from the
28       OQL help page shown by jhat. With the default port, OQL help is  avail‐
29       able at http://localhost:7000/oqlhelp/
30
31       There are several ways to generate a java heap dump:
32
33          * Use jmap -dump option to obtain a heap dump at runtime;
34
35          * Use jconsole option to obtain a heap dump via HotSpotDiagnos‐
36            ticMXBean @
37            http://java.sun.com/javase/6/docs/jre/api/management/exten
38            sion/com/sun/management/HotSpotDiagnosticsMXBean.html at runtime;
39
40          * Heap dump will be generated when OutOfMemoryError is thrown by
41            specifying -XX:+HeapDumpOnOutOfMemoryError VM option;
42
43          * Use hprof @
44            https://docs.oracle.com/javase/7/docs/technotes/sam
45            ples/hprof.html.
46
47
48       NOTE: This tool is experimental and may not be available in future ver‐
49       sions of the JDK.
50

OPTIONS

52       -stack false/true
53          Turn off tracking object allocation call stack. Note that if alloca‐
54          tion site information is not available in the heap dump, you have to
55          set this flag to false. Default is true.
56
57       -refs false/true
58          Turn off tracking of references to objects. Default is true. By
59          default, back pointers (objects pointing to a given object a.k.a
60          referrers or in-coming references) are calculated for all objects in
61          the heap.
62
63       -port port-number
64          Set the port for the jhat's HTTP server. Default is 7000.
65
66       -exclude exclude-file
67          Specify a file that lists data members that should be excluded from
68          the "reachable objects" query. For example, if the file lists
69          java.lang.String.value, then, whenever list of objects reachable
70          from a specific object "o" are calculated, reference paths involving
71          java.lang.String.value field will not considered.
72
73       -baseline baseline-dump-file
74          Specify a baseline heap dump. Objects in both heap dumps with the
75          same object ID will be marked as not being "new". Other objects will
76          be marked as "new". This is useful while comparing two different
77          heap dumps.
78
79       -debug int
80          Set debug level for this tool. 0 means no debug output. Set higher
81          values for more verbose modes.
82
83       -version
84          Report version number and exit.
85
86       -h
87          Output help message and exit.
88
89       -help
90          Output help message and exit.
91
92       -J<flag>
93          Pass <flag> to the Java virtual machine on which jhat is run. For
94          example, -J-Xmx512m to use a maximum heap size of 512MB.
95

SEE ALSO

97          * jmap - Java Memory Map
98
99          * jconsole - Java Monitoring and Management Console
100
101          * hprof - Heap and CPU profiling tool @
102            https://docs.oracle.com/javase/7/docs/technotes/sam
103            ples/hprof.html.
104
105
106                                  05 Aug 2006                          jhat(1)
Impressum