Enabling verbose garbage collection (verbosegc) in WebSphere Application Server
 Technote (troubleshooting)
 
Problem(Abstract)
Enabling verbose garbage collection (verbosegc) logging is often required when tuning and debugging many issues. This technote describes how to do this for the various versions of IBM® WebSphere® Application Server.
 
Resolving the problem
Enable verbosegc for the following versions of WebSphere Application Server:

Version 6.0 and 6.1
Version 5.1 and 5.0
Version 5.1 and 5.0 Deployment Manager
Version 5.1 and 5.0 Node Agent
Version 4.0 Advanced Edition
Version 4.0 Advanced Single Server Edition
Version 3.5

Note: While verbose garbage collection logging has negligible impact on the performance of your system, analysis of the collected verbosegc data can lead to improved performance.




Enabling verbosegc on releases of Version 6.0 and 6.1

  1. In the Administrative Console, expand Servers and then click on Application Servers.

  2. Click on the server that is encountering the "OutOfMemory" condition.

  3. On the Configuration tab, under Server Infrastructure, expand Java and Process Management, and click Process Definition.

  4. Under the Additional Properties section, click Java Virtual Machine.

  5. Select the Verbose garbage collection check box.

  6. Click Apply.

  7. At the top of the Administrative Client, click Save to apply changes to the master configuration.

  8. Stop and restart the Application Server.

  9. The verbose garbage collection output is written to either native_stderr.log or native_stdout.log for the Application Server, depending on the SDK operating system as follows:

    For AIX®, Microsoft® Windows®, or Linux®:
    native_stderr.log

    For Solaris™ or HP-UX:
    native_stdout.log

Notes:
  • For an HP-UX system, add the following parameter to the Generic JVM arguments on the Java Virtual Machine Settings page:

    -Xverbosegc:file=<name>

    Where <name> is a valid fully qualified filename.

  • For a Solaris system, add the following parameters to the Generic JVM arguments on the Java Virtual Machine Settings page:

    -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC

    The -XX:+PrintHeapAtGC parameter will generate a large amount of logging to the native_stdout.log file. Ensure there is adequate file system space when enabling this option.




Enabling verbosegc on Version 6.0 Deployment Manager
  1. Open the Administrative Console.

  2. Expand System Administration.

  3. Click Deployment Manager.

  4. Expand Java and Process Management.

  5. Click Process Definition.

  6. Click Java Virtual Machine

  7. Select the Verbose Garbage Collection check box.

  8. Click OK.

  9. Click Save.

  10. Click Save. The parameters will take affect at the next Deployment Manager restart.

Notes:
  • For an HP-UX system, add the following parameter to the Generic JVM arguments on the Java Virtual Machine Configuration page:

    -Xverbosegc:file=<name>

    Where <name> is a valid fully qualified filename.

  • For a Solaris 1.4 JVM system, add the following parameters to the Generic JVM arguments on the Java Virtual Machine Configuration page. This applies to releases of WebSphere Application Server V5.1 and higher:

    -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC

    The -XX:+PrintHeapAtGC parameter will generate a large amount of logging to the native_stdout.log file. Ensure there is adequate file system space when enabling this option.



Enabling verbosegc on Version 6.0 Node Agent
  1. Open the Administrative Console.

  2. Expand System Administration.

  3. Click Node Agents.

  4. Click on the Node Agent.

  5. Expand Java and Process Management.

  6. Click Process Definition.

  7. Click Java Virtual Machine.

  8. Select the Verbose Garbage Collection check box.

  9. Click OK.

  10. Click Save.

  11. Click Save. The parameters will take affect at the next Node Agent restart.

Notes:
  • For an HP-UX system, add the following parameter to the Generic JVM arguments on the Java Virtual Machine Configuration page:

    -Xverbosegc:file=<name>

    Where <name> is a valid fully qualified filename.

  • For a Solaris 1.4.X JVM system, add the following parameters to the Generic JVM arguments on the Java Virtual Machine Configuration page. This applies to releases of WebSphere Application Server V5.1 and higher:

    -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC

    The -XX:+PrintHeapAtGC parameter will generate a large amount of logging to the native_stdout.log file. Ensure there is adequate file system space when enabling this option.





Enabling verbosegc on releases of Version 5.1 and 5.0
  1. In the Administrative Client, expand Servers and then click on Application Servers.

  2. Click on the server that is encountering the "OutOfMemory" condition.

  3. Under the Additional Properties section, click Process Definition.

  4. Under the Additional Properties section, click Java Virtual Machine.

  5. Select the check box Verbose garbage collection.

  6. Click Apply.

  7. At the top of the Administrative Client, click Save to save the changes to your configuration.

  8. Stop and start the Application Server.

  9. The verbose garbage collection output is written to either native_stderr.log or native_stdout.log for the Application Server, depending on the SDK operating system as follows:

    For AIX®, Microsoft® Windows®, or Linux®:
    native_stderr.log

    For Solaris™ or HP-UX:
    native_stdout.log

Notes:
  • For an HP-UX system, add the following parameter to the Generic JVM arguments on the Java Virtual Machine Configuration page:

    -Xverbosegc:file=<name>

    Where <name> is a valid fully qualified filename.

  • For a Solaris 1.4 JVM system, add the following parameters to the Generic JVM arguments on the Java Virtual Machine Configuration page. This applies to releases of WebSphere Application Server V5.1 and higher:

    -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC

    The -XX:+PrintHeapAtGC parameter will generate a large amount of logging to the native_stdout.log file. Ensure there is adequate file system space when enabling this option.




Enabling verbosegc on releases of Version 5.1 and 5.0 Deployment Manager
  1. Open the Administrative Console.

  2. Expand System Administration.

  3. Click Deployment Manager.

  4. Click Process Definitions under Additional Properties.

  5. Click Java Virtual Machine.

  6. Select the Verbose Garbage Collection check box.

  7. Click OK.

  8. Click Save.

  9. Click Save. The parameters will take affect at the next Deployment Manager restart.

Notes:
  • For an HP-UX system, add the following parameter to the Generic JVM arguments on the Java Virtual Machine Configuration page:

    -Xverbosegc:file=<name>

    Where <name> is a valid fully qualified filename.

  • For a Solaris 1.4 JVM system, add the following parameters to the Generic JVM arguments on the Java Virtual Machine Configuration page. This applies to releases of WebSphere Application Server V5.1 and higher:

    -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC

    ]The -XX:+PrintHeapAtGC parameter will generate a large amount of logging to the native_stdout.log file. Please ensure there is adequate file system space when enabling this option.





Enabling verbosegc on releases of Version 5.1 and 5.0 Node Agent
  1. Open the Administrative Console.

  2. Expand System Administration.

  3. Click Node Agents.

  4. Click on the Node Agent.

  5. Click Process Definitions under Additional Properties.

  6. Click Java Virtual Machine.

  7. Select the Verbose Garbage Collection check box.

  8. Click OK.

  9. Click Save.

  10. Click Save. The parameters will take affect at the next Node Agent restart.

Notes:
  • For an HP-UX system, add the following parameter to the Generic JVM arguments on the Java Virtual Machine Configuration page:

    -Xverbosegc:file=<name>

    Where <name> is a valid fully qualified filename.

  • For a Solaris 1.4 JVM system, add the following parameters to the Generic JVM arguments on the Java Virtual Machine Configuration page. This applies to releases of WebSphere Application Server V5.1 and higher:

    -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC

    The -XX:+PrintHeapAtGC parameter will generate a large amount of logging to the native_stdout.log file. Please ensure there is adequate file system space when enabling this option.





Enabling verbosegc on releases of Version 4.0 Advanced Edition
  1. In the Administrative Client, select the Application Server and go to the JVM Settings tab.

  2. Click Advanced JVM Settings.

  3. Select the check box Enable garbage collection verbose mode.

  4. Click OK.

  5. Click Apply.

  6. Stop and restart the Application Server.

  7. The verbose garbage collection output will be placed in the stderr file for the Application Server.

Note:
  • For an HP-UX system, add the following parameter to the command line arguments field located on the Advanced JVM Settings panel:

    -Xverbosegc:file=<name>

    Where <name> is a valid fully qualified filename.





Enabling verbosegc on releases of Version 4.0 Advanced Single Server Edition
  1. Edit the server-cfg.xml file found in the directory, install_root/config.

  2. Search on command and find, commandLineArgument="".

  3. In the empty quotes, add -verbosegc so that it looks like the following:

    commandLineArgument="-verbosegc"

  4. Stop and restart the application server.

Note:
  • For an HP-UX system, also add to the following parameter to the commandLineArgument:

    -Xverbosegc:file=<name>

    Where <name> is a valid fully qualified filename.




Enabling verbosegc on releases of Version 3.5
  1. In the Administrative Client, select the Application Server and go to the General tab.

  2. Add the following line to the Command line arguments field:

    -verbosegc

  3. Click Apply.

  4. Stop and restart the Application Server.

  5. The verbose garbage collection output will be placed in the stderr file for the Application Server.

Note:
  • If using Solaris, enter the argument twice as follows:

    -verbosegc -verbosegc
 
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java SDK
Operating system(s): Windows
Software version: 6.1
Software edition:
Reference #: 1114927
IBM Group: Software Group
Modified date: Dec 31, 2007