Enable GC logging for troubleshooting purposes.
To enable GC logging:
-
Go to the operations center dashboard and select the gear icon for the controller you want to modify.
Figure 1. Operations center dashboard -
Select Configure on the left pane to access the controller’s configuration.
Figure 2. Configure controller -
In the Java Options field, enter the following command and select Save.
-Xlog:gc*=info,gc+heap=debug,gc+ref*=debug,gc+ergo*=trace,gc+age*=trace:file=$JENKINS_HOME/gc.log:utctime,pid,level,tags:filecount=2,filesize=100M
Figure 3. Java Options example -
Restart the controller for the changes to take effect.
-
Navigate to the operations center dashboard.
-
Select the name of the controller and the select
.Figure 4. Restarting controller
-
Accessing the GC Logs
By default the GC logs are written to $JENKINS_HOME
which is related to /var/jenkins_home/
.
To write GC logs to the overlay filesystem and not to the PersistantVolume
, modify the variable $JENKINS_HOME
. The directory needs to be writeable by the container.
Example:
-Xloggc:/tmp/gc.log
This will write the GC logs to `/tmp
.