Forrest logo
tool overview
On this page you find all important commands for the CLI tool jhat. If the command you are looking for is missing please ask our AI.

jhat

Jhat is a command line tool in the Java Development Kit (JDK) that stands for Java Heap Analysis Tool. It is used for analyzing heap dumps, which are binary snapshots of the Java Virtual Machine (JVM) memory. The tool helps to identify memory leaks and inefficient memory usage in Java applications. Jhat parses the heap dump file and generates an in-memory representation of the Java objects and their relationships. It provides a web-based interface that allows users to query and examine the heap dump data. The generated web page displays statistics about the heap, such as the total number of objects, their sizes, and the amount of memory consumed by different classes. Jhat enables searching and filtering of objects based on various criteria like class, package, object size, or reference chains. It offers powerful querying capabilities to locate objects that are causing memory leaks or contributing significantly to high memory usage. Users can navigate object references, view object details, and analyze object retention paths to understand memory utilization patterns and potential issues. Jhat is a helpful tool for memory profiling, optimization, and troubleshooting in Java applications.

List of commands for jhat:

  • jhat:tldr:52240 jhat: Analyze a heap dump, specifying an alternate port for the http server.
    $ jhat -p ${port} ${dump_file-bin}
    try on your machine
    explain this command
  • jhat:tldr:b7c46 jhat: Analyze a dump letting `jhat` use up to 8 GB RAM (2-4x dump size recommended).
    $ jhat -J-mx8G ${dump_file-bin}
    try on your machine
    explain this command
  • jhat:tldr:f028a jhat: Analyze a heap dump (from `jmap`), view via HTTP on port 7000.
    $ jhat ${dump_file-bin}
    try on your machine
    explain this command
tool overview