LinuxCommandLibrary

jhat

java Heap Analysis Tool

TLDR

Analyze heap dump

$ jhat [dump.hprof]
copy
Use custom port
$ jhat -port [8080] [dump.hprof]
copy
Analyze with increased memory
$ jhat -J-Xmx8G [dump.hprof]
copy
Compare with baseline
$ jhat -baseline [old.hprof] [new.hprof]
copy
Analyze specific dump in multi-dump file
$ jhat [file.hprof#2]
copy

SYNOPSIS

jhat [options] heap-dump-file

DESCRIPTION

jhat is the Java Heap Analysis Tool. It parses heap dump files and launches a web server for browsing heap contents. Supports pre-designed queries and OQL (Object Query Language) for custom analysis. Access the web interface at http://localhost:7000 by default.

PARAMETERS

-port port

HTTP server port (default 7000).
-baseline file
Baseline dump for comparison.
-stack boolean
Track allocation call stacks.
-refs boolean
Track object references.
-exclude file
Exclude data members from queries.
-Jflag
Pass flag to JVM (e.g., -J-Xmx8G).

CAVEATS

Deprecated since JDK 9. Use VisualVM, Eclipse MAT, or other heap analyzers instead. Still works with JDK 8.

SEE ALSO

jmap(1), jstack(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community