Java Garbage Collection Logging: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(35 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=


* [[Java Garbage Collection#Garbage_Collection_Logging|Java Garbage Collection]]
* [[Java Memory#Garbage_Collection_Logging|Java Memory]]


=Command Line Options=
=Java 9=


==Java 8==
"-Xloggc:" becomes "-Xlog:gc:"


{{External|https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html#BABFAFAE}}
'PrintGCDateStamps' was dropped.


===Overview===
=Java 8=


In Java 8, GC logging is enabled with the <tt>-Xloggc:<file></tt> (see below).
{{Internal|Java 8 Garbage Collection Logging#Overview|Java 8 Garbage Collection Logging}}


===Options===
=Application Specific GC Logging=


====-Xloggc====
==WildFly GC Logging==


 
{{Internal|WildFly_JVM_Settings#Standalone_Mode_GC_Logging|WildFly GC Logging in Standalone Mode}}
<pre>
{{Internal|WildFly_JVM_Settings#Domain_Mode_GC_Logging|WildFly GC Logging in Domain Mode}}
-Xloggc:<file>
</pre>
 
where <file> can be absolute or relative. In case of a relative path, it is relative to the current directory.
 
<pre>
-verbose:gc
</pre>
 
<pre>
-XX:+PrintGCDetails
</pre>
 
<pre>
-XX:+PrintGCDateStamps
</pre>
 
<pre>
-XX:+UseGCLogFileRotation
</pre>
 
<pre>
-XX:NumberOfGCLogFiles=5
</pre>
 
<pre>
-XX:GCLogFileSize=3M
</pre>

Latest revision as of 19:22, 28 December 2020

Internal

Java 9

"-Xloggc:" becomes "-Xlog:gc:"

'PrintGCDateStamps' was dropped.

Java 8

Java 8 Garbage Collection Logging

Application Specific GC Logging

WildFly GC Logging

WildFly GC Logging in Standalone Mode
WildFly GC Logging in Domain Mode