Java View tool Jhat-windows

Source: Internet
Author: User
Tags jconsole

Analyzes the Java heap. This command is experimental and unsupported.

Synopsis

Jhat [ Options ] Heap-dump-file

Options

The command-line options. See Options.

Heap-dump-file

Java binary heap dump file to is browsed. For a dump file that contains multiple heap dumps, you can specify which dump in the file by appending to the #<number> file n Ame, for example, myfile.hprof#3 .

Description

The jhat command parses a Java heap dump file and starts a Web server. The jhat command lets you to the browse heap dumps with your favorite Web browser. jhatthe command supports predesigned queries such as show all instances of a known class MyClass , and Object Query Language (OQL). OQL is similar-to-SQL, except for querying heap dumps. Help on OQL are available from the OQL help page shown by the jhat command. With the default port, OQL-available at http://localhost:7000/oqlhelp/

There is several ways to generate a Java heap dump:

  • Use the jmap -dump option to obtain a heap dump at runtime. See jmap (1).

  • Use the jconsole option to obtain a heap dump through at HotSpotDiagnosticMXBean runtime. See jconsole (1) and the HotSpotDiagnosticMXBean interface description at
    http://docs.oracle.com/javase/8/docs/jre/api/management/extension/com/sun/management/HotSpotDiagnosticMXBean.html

  • Heap dump is generated if an is a OutOfMemoryError thrown by specifying -XX:+HeapDumpOnOutOfMemoryError , Java Virtual machine (JVM) option.

  • Use the hprof command. See the Hprof:a heap/cpu Profiling Tool at
    http://docs.oracle.com/javase/8/docs/technotes/samples/hprof.html

Options
-stack False|true

Turns off tracking object allocation call stack. IF Allocation site information is not available in the heap dump and then you have to set this flag to false . The default is true .

-refs False|true

Turns off tracking of references to objects. Default is true . By default, back pointers, which is objects, point to a specified object such as referrers or incoming references, AR E calculated for all objects in the heap.

-port Port-number

Sets the port for the jhat HTTP server. Default is 7000.

-exclude Exclude-file

Specifies a file, lists data members, that should is excluded from the reachable objects query. For example, if the file lists java.lang.String.value , then, then whenever the list of objects that is reachable from a specific object is calculated, reference paths that involve java.lang.String.value field is not considered.

-baseline Exclude-file

Specifies a baseline heap dump. Objects in both heap dumps with the same object ID is marked as not being new. Other objects is marked as new. This is the useful for comparing and the different heap dumps.

-debug int

Sets the debug level for this tool. A level of 0 means no debug output. Set higher values for more verbose modes.

-version

Reports the release number and exits

-H

Displays a help message and exits.

-help

Displays a help message and exits.

-J Flag

Passes to the flag Java Vsan on which, the jhat command is running. For example, the to use -J-Xmx512m a maximum heap size of MB.

Java View tool Jhat-windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.