jdk/src/linux/doc/man/jhat.1
changeset 2 90ce3da70b43
child 2692 345bc8d65b19
equal deleted inserted replaced
0:fd16c54261b3 2:90ce3da70b43
       
     1 .'" t
       
     2 ."
       
     3 ." Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
       
     4 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     5 ."
       
     6 ." This code is free software; you can redistribute it and/or modify it
       
     7 ." under the terms of the GNU General Public License version 2 only, as
       
     8 ." published by the Free Software Foundation.
       
     9 ."
       
    10 ." This code is distributed in the hope that it will be useful, but WITHOUT
       
    11 ." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    12 ." FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    13 ." version 2 for more details (a copy is included in the LICENSE file that
       
    14 ." accompanied this code).
       
    15 ."
       
    16 ." You should have received a copy of the GNU General Public License version
       
    17 ." 2 along with this work; if not, write to the Free Software Foundation,
       
    18 ." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    19 ."
       
    20 ." Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
       
    21 ." CA 95054 USA or visit www.sun.com if you need additional information or
       
    22 ." have any questions.
       
    23 ."
       
    24 ." `
       
    25 .TH jhat 1 "05 Aug 2006"
       
    26 ." Generated by html2roff
       
    27 
       
    28 .LP
       
    29 .SH NAME
       
    30 jhat \- Java Heap Analysis Tool
       
    31 .LP
       
    32 .SH "SYNOPSIS"
       
    33 .LP
       
    34 
       
    35 .LP
       
    36 .nf
       
    37 \f3
       
    38 .fl
       
    39 \fP\f3jhat\fP [ \f2options\fP ] <heap\-dump\-file>
       
    40 .fl
       
    41 
       
    42 .fl
       
    43 .fi
       
    44 
       
    45 .LP
       
    46 .SH "PARAMETERS"
       
    47 .LP
       
    48 
       
    49 .LP
       
    50 .TP 3
       
    51 options 
       
    52 Options, if used, should follow immediately after the command name. 
       
    53 .TP 3
       
    54 heap\-dump\-file 
       
    55 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". 
       
    56 .LP
       
    57 .SH "DESCRIPTION"
       
    58 .LP
       
    59 
       
    60 .LP
       
    61 .LP
       
    62 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/
       
    63 .LP
       
    64 .LP
       
    65 There are several ways to generate a java heap dump:
       
    66 .LP
       
    67 .RS 3
       
    68 .TP 2
       
    69 *
       
    70 Use jmap \-dump option to obtain a heap dump at runtime; 
       
    71 .TP 2
       
    72 *
       
    73 Use jconsole option to obtain a heap dump via 
       
    74 .na
       
    75 \f2HotSpotDiagnosticMXBean\fP @
       
    76 .fi
       
    77 http://java.sun.com/javase/6/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticsMXBean.html at runtime; 
       
    78 .TP 2
       
    79 *
       
    80 Heap dump will be generated when OutOfMemoryError is thrown by specifying \-XX:+HeapDumpOnOutOfMemoryError VM option; 
       
    81 .TP 2
       
    82 *
       
    83 Use 
       
    84 .na
       
    85 \f2hprof\fP @
       
    86 .fi
       
    87 http://java.sun.com/developer/technicalArticles/Programming/HPROF.html. 
       
    88 .RE
       
    89 
       
    90 .LP
       
    91 .LP
       
    92 \f3NOTE:\fP This tool is \f3experimental\fP and may \f3not\fP be available in future versions of the JDK.
       
    93 .LP
       
    94 .SH "OPTIONS"
       
    95 .LP
       
    96 
       
    97 .LP
       
    98 .TP 3
       
    99 \-stack false/true 
       
   100 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. 
       
   101 .TP 3
       
   102 \-refs false/true 
       
   103 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. 
       
   104 .TP 3
       
   105 \-port port\-number 
       
   106 Set the port for the jhat's HTTP server. Default is 7000. 
       
   107 .TP 3
       
   108 \-exclude exclude\-file 
       
   109 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. 
       
   110 .TP 3
       
   111 \-baseline baseline\-dump\-file 
       
   112 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. 
       
   113 .TP 3
       
   114 \-debug int 
       
   115 Set debug level for this tool. 0 means no debug output. Set higher values for more verbose modes. 
       
   116 .TP 3
       
   117 \-version\  
       
   118 Report version number and exit. 
       
   119 .TP 3
       
   120 \-h\  
       
   121 Output help message and exit. 
       
   122 .TP 3
       
   123 \-help\  
       
   124 Output help message and exit. 
       
   125 .TP 3
       
   126 \-J<flag>\  
       
   127 Pass <flag> to the Java virtual machine on which jhat is run. For example, \-J\-Xmx512m to use a maximum heap size of 512MB. 
       
   128 .LP
       
   129 .SH "SEE ALSO"
       
   130 .LP
       
   131 .RS 3
       
   132 .TP 2
       
   133 *
       
   134 jmap \- Java Memory Map 
       
   135 .TP 2
       
   136 *
       
   137 jconsole \- Java Monitoring and Management Console 
       
   138 .TP 2
       
   139 *
       
   140 .na
       
   141 \f2hprof \- Heap and CPU profiling tool\fP @
       
   142 .fi
       
   143 http://java.sun.com/developer/technicalArticles/Programming/HPROF.html 
       
   144 .RE
       
   145 
       
   146 .LP
       
   147 
       
   148 .LP
       
   149