Garbage collection log issue when we use "-Xloggc:gc.log.`date +%Y%m%d%H%M%S" option in domain mode

Solution Unverified - Updated -

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%S option. But in domain mode date +%Y%m%d%H%M%S is 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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content