How to enable GC log and -XX:+HeapDumpOnOutOfMemoryError for JBoss Fuse and A-MQ

Solution Unverified - Updated -

Issue

  • Unable to generate the GC log based on the timestamp in JBoss Fuse and JBoss A-MQ.

  • The following "KARAF_OPTS" are added in the "$KARAF_HOME/bin/setenv" script:

#
# The following section shows the possible configuration options for the default
# karaf scripts
#
# export JAVA_MIN_MEM # Minimum memory for the JVM
# export JAVA_MAX_MEM # Maximum memory for the JVM
# export JAVA_PERM_MEM # Minimum perm memory for the JVM
# export JAVA_MAX_PERM_MEM # Maximum memory for the JVM
# export KARAF_HOME # Karaf home folder
# export KARAF_DATA # Karaf data folder
# export KARAF_BASE # Karaf base folder
# export KARAF_OPTS # Additional available Karaf options

export KARAF_OPTS="-verbose:gc -Xloggc:data/gc.log.'date+%Y%m%d%H%M%S' -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError"
  • While starting/stopping the JBoss Fuse it throws the following error in the console:
./stop: KARAF_OPTS=-verbose:gc -Xloggc:data/gc.log.'date+%Y%m%d%H%M%S' -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError: is not an identifier

Environment

  • Red Hat JBoss A-MQ
    • 6.x
  • Red Hat JBoss Fuse
    • 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