Bootstrap FreeKB - IBM WebSphere - Rotate SystemOut.log SystemErr.log
IBM WebSphere - Rotate SystemOut.log SystemErr.log

Updated:   |  IBM WebSphere articles

In the WebSphere admin console, select​ Troubleshooting > Logs and traceyour server > JVM Logs.

In this example, the SystemOut.log will be rotated once every 24 hours, and 14 rotated log file will be retained.

 

The rotated SystemOut and SystemErr log files will have the year, month, date and hour, minute, second appended. In this example, the rotated log files are dated October 26 2022 (10/26/2022) through November 7 2022 (11/7/2022).

-rw-rw-r--. 1 wasadmin wasadmins 33906977 Oct 26 22:54 SystemOut_22.10.26_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins 59178088 Oct 27 22:46 SystemOut_22.10.27_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins 31497340 Oct 28 22:10 SystemOut_22.10.28_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins  4339671 Oct 29 22:02 SystemOut_22.10.29_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins  6198389 Oct 30 22:44 SystemOut_22.10.30_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins 49910205 Oct 31 22:58 SystemOut_22.10.31_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins 44636568 Nov  1 22:47 SystemOut_22.11.01_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins 37482675 Nov  2 22:58 SystemOut_22.11.02_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins 41051685 Nov  3 22:58 SystemOut_22.11.03_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins 31510529 Nov  4 22:56 SystemOut_22.11.04_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins  5295680 Nov  5 22:58 SystemOut_22.11.05_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins  3528179 Nov  6 21:58 SystemOut_22.11.06_22.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins 37760275 Nov  7 21:53 SystemOut_22.11.07_22.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins     6724 Nov  7 22:47 SystemOut_22.11.07_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins 40023269 Nov  8 21:18 SystemOut.log

 

AVOID TROUBLE

Do not gzip compress the rotated SystemOut.log and SystemErr.log files. I found this out the hard way. For some reason, if you gzip compress the rotated SystemOut and SystemErr log files, when the rotation occurs, this causes the gzip compressed log files to be blanked out to 0 bytes.

-rw-rw-r--. 1 wasadmin wasadmins    115342 Oct 24 20:10 SystemOut_22.10.24_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins     90257 Oct 25 20:10 SystemOut_22.10.25_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins     97154 Oct 26 20:10 SystemOut_22.10.26_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins    102269 Oct 27 20:10 SystemOut_22.10.27_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins         0 Nov  8 00:01 SystemOut_22.10.28_23.00.00.log.gz
-rw-rw-r--. 1 wasadmin wasadmins         0 Nov  8 00:01 SystemOut_22.10.29_23.00.00.log.gz
-rw-rw-r--. 1 wasadmin wasadmins         0 Nov  8 00:01 SystemOut_22.10.30_23.00.00.log.gz
-rw-rw-r--. 1 wasadmin wasadmins         0 Nov  8 00:01 SystemOut_22.10.31_23.00.00.log.gz
-rw-rw-r--. 1 wasadmin wasadmins         0 Nov  8 00:01 SystemOut_22.11.01_23.00.00.log.gz
-rw-rw-r--. 1 wasadmin wasadmins         0 Nov  8 00:01 SystemOut_22.11.02_23.00.00.log.gz
-rw-rw-r--. 1 wasadmin wasadmins         0 Nov  8 00:01 SystemOut_22.11.03_23.00.00.log.gz
-rw-rw-r--. 1 wasadmin wasadmins         0 Nov  8 00:01 SystemOut_22.11.04_23.00.00.log.gz
-rw-rw-r--. 1 wasadmin wasadmins         0 Nov  8 00:01 SystemOut_22.11.05_23.00.00.log.gz
-rw-rw-r--. 1 wasadmin wasadmins 471828086 Nov  7 22:59 SystemOut_22.11.07_23.00.00.log
-rw-rw-r--. 1 wasadmin wasadmins 630993311 Nov  8 21:20 SystemOut.log

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


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