Search This Blog

Wednesday, December 16, 2009

What is Garbage collection and how do you diagnose it?

A. Enabling verbose garbage collection (verbosegc) in WebSphere Application Server
Example: After deploying the new application suppose some class is creating some
objects then by heap dump can find which class is creating the objects then we can
inform the developers regarding this class.
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
Enabling verbosegc on releases of Version 6.0 and 6.1
• In the Administrative Console, expand Servers and then click on Application
Servers.
• Click on the server that is encountering the "OutOfMemory" condition.
• On the Configuration tab, under Server Infrastructure, expand Java and
Process Management, and click Process Definition.
• Under the Additional Properties section, click Java Virtual Machine.
• Select the Verbose garbage collection check box
• Click Apply.
• At the top of the Administrative Client, click Save to apply changes to the
master configuration.
• Stop and restart the Application Server.
• 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

No comments:

Post a Comment