Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Redirecting verbose GC logs of WAS 6.1 to user specified file for Windows

Published on
10,794 Points
3 Endorsements
Last Modified:
Verbose logging is used to diagnose garbage collector problems.
By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file.

This article will describe the steps to redirect the verbose gc logs to user specified file for the Windows platform.

By default, -verbose:gc output is written to stderr.  The  -Xverbosegclog command can be used to redirect the verbosegc output to user specified file other than the native stdout/stderr file.


...causes -verbose:gc output to be written to the specified file.  If the file cannot be found, -verbose:gc tries to create the file, and then continues as normal if it is successful.  If it cannot create the file (for example, if an invalid filename is passed into the command), it will redirect the output to stderr.  If you specify <X> and <Y> the -verbose:gc output is redirected to <X> files, each containing <Y> GC cycles.  (Refer IBM 1.5.0 Java diag guide ).
Here are the steps to redirect the verbosegc output to user specified file:          
1)  In WAS 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)  Provide -Xverbosegclog:c:\verboseoutput.log command under Generic JVM Arguments.                                                              
6)  Restart your server.                                                  

Now, verboseoutput.log would have been created and the verbosegc output will get redirected to "verboseoutput.log" file.                        
1 Comment

Author Comment

It is tutorial how to setup....

not the  problem or resolution

detail steps required more than 300 words

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Join & Write a Comment

Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month