Question & Answer
How do you get verbose GC output to another log besides native_stderr?
Verbose GC data is captured by default in the native_stderr.log for AIX®, Windows® and Linux® and native_stdout.log for Solaris and HP.
Note: For writing verbose gc to a specified log in Solaris and HP-UX, please see this link.
At present there is no capability to rotate native_stderr logs in WebSphere. Therefore you can use -Xverbosegclog to minimize the size/contents of the native_stderr log file.
** Note: When using Verbose GC to analyze JVM problems, it is best to leave the verbose GC logging to the default location. When writing Verbose GC to a specified log, occasional error messages are omitted or not set in-line with the data. This can make diagnosing the problem very difficult and prolong time to resolution.**
|WebSphere Application Server 8.5, 8.0, 7.0|
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.
The dump agent tokens can be used in the filename. See Dump agent tokens for more information. If you do not specify <file>, verbosegc.%Y%m%d.%H%M%S.%pid.txt is used.
- In the administrative console, click Servers > Server Types > WebSphere application servers > server_name. Then, under Server Infrastructure, click Java™ and process management > Process definition.
- Select Java Virtual Machine .
- Specify values for the JVM settings as needed and click OK.
- Click Save on the console task bar.
- Restart the application server.
15 June 2018