About GC Log Analyzer
The Garbage Collector Log Analyzer (GC Log Analyzer) is a tool to view and interpret Java heap, pause time, and operating system metrics gathered while running the Azul Zing Builds of OpenJDK (Zing).
The GC Log Analyzer offers significantly reduced memory usage and faster loading of large Garbage Collector log files. In addition, it offers graphs to give an insight into the JIT compilation activity, which is recorded in the gc.log
file since Zing 18.01.0.0.
GCLogAnalyzer2.jar
is self-contained and has no external dependencies.
Requires Java 11 or higher
GCLA System Requirements
The GC Log Analyzer runs with JRE or JDK version 11 or higher. Azul Zing is not required to run GCLA.
Download GCLA
GCLA runs on any platform and the latest version, 24.10.0.0, can be downloaded here.
GC Log Analyzer is also included in every release of Azul Zing Builds of OpenJDK. You can find GCLA in the /etc
directory of the Zing installation.
You can confirm your version of GCLA by navigating to Help > About
within GCLA.
Running GCLA
To run the GC Log Analyzer, use the following command in any terminal or command prompt window:
java -Xmx4g -jar GCLogAnalyzer2.jar gc.log
To run GC Log Analyzer in a non-GUI mode and create an HTML output, use the following as an example:
java -jar GCLogAnalyzer2.jar --generate-html ./output-html ./gc.log
This generates ./output-html/all-graphs.html
. If you need a batch of json files with data from your <logfile>
, use:
java -jar GCLogAnalyzer2.jar [--generate-html <dir> [--resize WxH]] [--dump-raw-data <dir>] gc.log
Starting with Zing 19.08.0.0 the SYSINFO line in the GC log is enhanced to include information about cgroup limits and usage, where applicable.
How to Enable GC Logging
In order to use GC Log Analyzer, it is necessary to first have a GC log to analyze.
To collect a GC log with basic information into a file, use:
-Xlog:gc:/path/to/file.log
To enable more detailed logging, use -Xlog:gc*
, such as:
-Xlog:gc*:/path/to/file.log
For more information, such as how to enable safepoint info and other fine-grained information, see Unified Garbage Collection Logging Recommendations.