cinqict

Wednesday, April 3, 2013

Enabling gc verbose logging

To enable garbage collection logging, you can put the -verbose:gc in the setDomainEnv.sh script. This makes it possible to enable the gc logging for multiple servers.
You can make use of the SERVER_NAME and DOMAIN_HOME variable, which are already set in the script, to write the logs to the standard log location.

In this example, the gc logs are enabled for all servers starting with ppls:


if echo ${SERVER_NAME} | grep -Eq '^ppls' ; then
EXTRA_JAVA_PROPERTIES="${EXTRA_JAVA_PROPERTIES} -verbose:gc -Xverbosegclog:/${DOMAIN_HOME}/servers/${SERVER_NAME}/logs/gc#.log,100,1000 "
export EXTRA_JAVA_PROPERTIES
fi


No comments:

Post a Comment