FreeKB - Rotate native_stderr.log native_stdout.log in WebSphere
Rotate native_stderr.log native_stdout.log in WebSphere

Home > Search


Rotate the verbose garbage collection log

By default, the verbose garbage collection logs will not rotate, which will cause the log to become very large. A very large log is nearly impossible to work with. For example, in the screen shot below, there was an attempt to load a 124 MB log in IBMs Garbage Collection and Memory Visualizer tool. The tool started to hang at near 60 MB, and would take hours to load the log. The loading of the log should only take a few moments.

 

To configre the logs to be rotated, in the WebSphere admin console, select Servers > Server Types > your_JVM > Java and Process Management > Process Definition > Java Virtual Machines. In Generic JVM arguments, enter -Xverbosegclog:home/profiles/your_profile/logs/your_server/native_stderr.%Y%m%d.%H%M%S.%pid.txt,14,100000. This will configure your system to only retain a total of 14 native_stderr.logs. A new native_stderr.log will be created once every 100000 garbage collection cycles.

Restart the JVM for this change to take effect.

Another option (and probably the preferred option), is to use LogRotate (on Linux).



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments