Garbage collection log issue when we use "-Xloggc:gc.log.`date +%Y%m%d%H%M%S" option in domain mode
Issue
- We found every time when we restart JBoss server instance, the gc.log gets overwrite,and the old log will be lost. We use below JVM option in host.xml file :
<jvm-options>
<option value="-verbose:gc"/>
<option value="-Xloggc:/home/user/log/gc.log.date +%Y%m%d%H%M%S"/>
</jvm-options>
- To keep a back up of old Garbage Collection log file we can use
-Xloggc:/home/user/log/gc.log.date +%Y%m%d%H%M%Soption. But in domain modedate +%Y%m%d%H%M%Sis not resolved, server read this JVM option as string and creates Garbage collection log file with name
gc.log.`date +%Y%m%d%H%M%S
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.