How to: Enable verbose garbage collection at TSOM start-up

Technote (FAQ)


Question

Enabling java verbose garbage collection is useful when tuning java performance or trouble-shooting problems with java memory usage. (Verbose garbage collection provides a log of java's heap cleanup activities.) This document explains how to modify the existing TSOM start-up script [tsom_server.sh] to enable verbose garbage collection.

Cause

The Java Virtual Machine continuously performs unused object cleanup, also known as "garbage collection". However, these actions are not tracked or recorded. To keep a log of these activities two parameters must be specified at java start-up:

-verbose:gc {This enables logging of the garbage collection activity.}

-Xverbosegclog:[location] {This specifies the location of the log file.}

Example:

java -verbose:gc -Xverbosegclog:logs/gc.log

...would enable verbose logging into the file <jvm_working_directory>/logs/gc.log.

Answer

To modify the TSOM start-up script [tsom_server.sh] to enable verbose garbage collection:

1) Make a backup copy of the $TSOM_HOME/bin/tsom_server.sh

Note: Verbose garbage collection will affect the performance of TSOM. While the impact should be small, it is not desirable to enable verbose garbage collection at all times. Making a backup copy of your tsom_server.sh script will allow you to easily disable verbose garbage collection when it is no longer needed.

2) Edit $TSOM_HOME/bin/tsom_server.sh and modify the three './jre/bin/java' commands therein. Add the two verbose gc parameters [mentioned above] to the BEGINNING of the java commands. (The java commands are extremely long and have many parameters. Adding the new commands to the beginning of the list will allow you to more easily see if you have verbose garbage collection enabled.)

After modification, each of the three java commands should look something like this:

./jre/bin/java -verbose:gc -Xverbosegclog:logs/gc.log -Djava.library.path=$LD_LIBRARY_PATH -Xmx1024m -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses
=false ...

Note: The actual java commands are much longer.

3) Save the tsom_server.sh script.

4) Restart TSOM.

After restarting, you will find a new file in your logs directory: $TSOM_HOME/logs/gc.log. Provide this file to support if requested.

---------------------------------------------------------------------------------

For more information on java memory management, read "Understanding the Garbage Collector" in the IBM Java Diagnostics Guide.

For more information on tuning garbage collection in the IBM Java virtual machine, read "Fine-tuning Java garbage collection performance" in the developerWorks Technical Library.


Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Tivoli Security Operations Manager

Software version:

All Versions

Operating system(s):

AIX, Linux, Linux zSeries, Solaris

Reference #:

1438322

Modified date:

2012-05-21

Translate my page

Machine Translation

Content navigation