WildFly and Garbage Collection Logging: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 33: Line 33:
<pre>
<pre>
<jvm-options>
<jvm-options>
    <option value="-verbose:gc"/>
    <option value="-Xloggc:/path/to/log/Server1GC.log"/>
    <option value="-XX:+PrintGCDetails"/>
    <option value="-XX:+PrintGCDateStamps"/>
</jvm-options>
</jvm-options>
</pre>
</pre>


==Host Controller==
==Host Controller==

Revision as of 17:04, 1 November 2016

External

Internal

Overview

GC logging is enabled by default for standalone mode (to verify form which version on). It generates output to $JBOSS_HOME/standalone/log/gc.log.<digit>. The system uses log rotation with the number of log files limited to 5, and the size of each file limited to 3 MB.


Enabling GC Logging in Standalone Mode

Enabling GC Logging in Domain Mode

Server Node

The GC logging can be enabled for a specific server node, or generically, across the server group.

To enable GC logging for just one server node, modify the corresponding <jvm> declaration in the host.xml file.

To enable GC logging for an entire server group, edit the <ivm-options> section corresponding to the <jvm> configuration specified for the server group, in domain.xml.

In both cases, add the following JVM options:

<jvm-options>
    <option value="-verbose:gc"/>
    <option value="-Xloggc:/path/to/log/Server1GC.log"/>
    <option value="-XX:+PrintGCDetails"/>
    <option value="-XX:+PrintGCDateStamps"/>
</jvm-options>

Host Controller