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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.