Browse All Articles
> Redirecting verbose GC logs of WAS 6.1 to user specified file for Windows
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.