Java Garbage Collection Logging

From NovaOrdis Knowledge Base
Revision as of 02:55, 13 February 2017 by Ovidiu (talk | contribs)
Jump to navigation Jump to search

Internal

Command Line Options

Java 8

https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html#BABFAFAE
-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