Java Garbage Collection Logging: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 8: Line 8:


{{External|https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html#BABFAFAE}}
{{External|https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html#BABFAFAE}}
===Overview===
In Java 8, GC logging is enabled with the <tt>-Xloggc:<file></tt> (see below).
===Options===
====-Xloggc====


<pre>
<pre>

Revision as of 03:10, 13 February 2017

Internal

Command Line Options

Java 8

https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html#BABFAFAE

Overview

In Java 8, GC logging is enabled with the -Xloggc:<file> (see below).

Options

-Xloggc

-Xloggc:<file>

where <file> can be absolute or relative. In case of a relative path, it is relative to the current directory.

-verbose:gc
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=5
-XX:GCLogFileSize=3M