2 Replies Latest reply on Mar 28, 2014 4:50 AM by nielsvanderbeke

    gclogs to stdout out jboss 7.1.1

    nielsvanderbeke

      Hi,

       

      I have somme jboss instances running with verbose gc jvm parameters but the gc logging does not end up in a log file.

      i used jvm parameters : -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps

       

      Using lsof i can see stdout and stderr are piped to somme where, but it is not the processcontroller log file , not the host controller log file and not the jboss server log file.

       

      [tele1558(root):/root] lsof -p 26034 | grep -v ".jar"

      java 26034 Sjbscrt    0r FIFO 0,8      0t0 151761310 pipe

      java 26034 Sjbscrt    1w FIFO 0,8      0t0 151761311 pipe

       

      I can nog use -Xloggc:/dir/gclog.log because i want auto log rotation on file size .

      Ik now there are experimental jvm options to allow this rotation but they are not available in my jvm version and because they are experimental i can not trust they will be available in feature jvm versions.

       

      • -XX:+UseGCLogFileRotation
        must be used with -Xloggc:<filename>;
      • -XX:NumberOfGCLogFiles=<number of files>
        must be >=1, default is one;
      • -XX:GCLogFileSize=<number>M (or K)
        default will be set to 512K.

       

      Can somme one help me to configure correct redirection of gc logs to jboss server.log?

       

      Thanks.

        • 1. Re: gclogs to stdout out jboss 7.1.1
          wdfink

          As you are using the domain mode I think the gc.log will go somewhere as the console might not valid.

          But I did not see an issue to use the gc.log static for each restart with a time stamp as it will not be very big

          • 2. Re: gclogs to stdout out jboss 7.1.1
            nielsvanderbeke

            I configured the jboss server to start with loggc option in host.xml

             

                <server name="jbscrtCatA1" group="jbscrtCat" auto-start="true">
                    <paths>
                        <path name="custom.jboss.server.log.dir" path="/sup/loc/sft/jbscrt/machineA/log/jbscrtCatA1"/>
                    </paths>
                    <system-properties>
                        <property name="tnLogDir" value="/sup/loc/sft/jbscrt/machineA/log/jbscrtCatA1" boot-time="false"/>
                    </system-properties>
                    <socket-bindings socket-binding-group="standard-sockets" port-offset="3"/>
                    <jvm name="default">
                        <jvm-options>
                            <option value="-XX:OnOutOfMemoryError=&quot;kill -3 %p  &quot; -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/sup/loc/sft/jbscrt/machineA/log/jbscrtCatA1/ -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:/sup/loc/sft/jbscrt/machineA/log/jbscrtCatA1/gclog.log"/>
                        </jvm-options>
                    </jvm>

             

                </server>

             

            But he does not create the gclog.log file

             

            [tele1558(Sjbscrt):/sup/loc/sft/jbscrt/machineA/log/jbscrtCatA1] ps eww -p 1992

              PID TTY      STAT   TIME COMMAND

            1992 ?        Sl     0:04 /sup/lib/sft/java/install/jdk1.6.0_18/bin/java

            -D[Server:jbscrtCatA1]

            -XX:PermSize=768m

            -XX:MaxPermSize=768m

            -Xms768m

            -Xmx768m

            -XX:OnOutOfMemoryError="kill -3 %p  "

            -XX:+HeapDumpOnOutOfMemoryError

            -XX:HeapDumpPath=/sup/loc/sft/jbscrt/machineA/log/jbscrtCatA1/

            -verbose:gc

            -XX:+PrintGCDetails

            -XX:+PrintGCTimeStamps

            -Xloggc:/sup/loc/sft/jbscrt/machineA/log/jbscrtCatA1/gclog.log

            -Dsun.rmi.dgc.client.gcInterval=3600000

            -Dsun.rmi.dgc.server.gcInterval=3600000

            -Djboss.domain.config.dir=/sup/llb/sft/jbscrt/machineAdmin/parm/mngdroot/jbscrt/configuration

            -Djboss.domain.log.dir=/sup/loc/sft/jbscrt/machineAdmin/log/

            -Dsun.rmi.dgc.client.gcInterval=3600000

            -Dorg.jboss.resolver.warning=true

            -Dsun.rmi.dgc.server.gcInterval=3600000

            -Djava.awt.headless=true

            -Djboss.domain.deployment.dir=/sup/llb/sft/jbscrt/machineA/data/stage/sup/deployment

            -Djboss.modules.system.pkgs=org.jboss.byteman

            -Djava.net.preferIPv4Stack=true

            -Djboss.domain.base.dir=/sup/llb/sft/jbscrt/machineAdmin/parm/mngdroot/jbscrt

            -DteleEnv=sup

            -DtnEnv=sup

            -Djboss.domain.temp.dir=/sup/loc/sft/jbscrt/machineA/work/sup

            -Djboss.home.dir=/sup/llb/sft/jbscrt/common/install/7.1.1

            -D[Host=true

            -Djboss.domain.servers.dir=/sup/llb/sft/jbscrt/machineA/data/stage/sup/server

            -Djboss.domain.data.dir=/sup/loc/sft/jbscrt/machineA/data/store

            -Djboss.server.log.dir=/sup/llb/sft/jbscrt/machineA/data/stage/sup/server/jbscrtCatA1/log

            -Djboss.server.temp.dir=/sup/llb/sft/jbscrt/machineA/data/stage/sup/server/jbscrtCatA1/tmp

            -Djboss.server.data.dir=/sup/llb/sft/jbscrt/machineA/data/stage/sup/server/jbscrtCatA1/data

            -Dorg.jboss.boot.log.file=/sup/llb/sft/jbscrt/machineA/data/stage/sup/server/jbscrtCatA1/log/boot.log

            -Dlogging.configuration=file:/sup/llb/sft/jbscrt/machineAdmin/parm/mngdroot/jbscrt/configuration/logging.properties

            -jar /sup/llb/sft/jbscrt/common/install/7.1.1/jboss-modules.jar

            -mp /sup/llb/sft/jbscrt/common/install/7.1.1/modules

            -jaxpmodule javax.xml.jaxp-provider org.jboss.as.server

             

             

            If i manualy run the process, everyting works fine and i see the loggc.log

             

            /sup/lib/sft/java/install/jdk1.6.0_18/bin/java -D[Server:jbscrtCatA1] -XX:PermSize=128m -XX:MaxPermSize=128m -Xms128m -Xmx128m -XX:OnOutOfMemoryError="kill -3 %p  " -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/sup/loc/sft/jbscrt/machineA/log/jbscrtCatA1/ -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:/sup/loc/sft/jbscrt/machineA/log/jbscrtCatA1/gclog.log -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.domain.config.dir=/sup/llb/sft/jbscrt/machineAdmin/parm/mngdroot/jbscrt/configuration -Djboss.domain.log.dir=/sup/loc/sft/jbscrt/machineAdmin/log/ -Dsun.rmi.dgc.client.gcInterval=3600000 -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.awt.headless=true -Djboss.domain.deployment.dir=/sup/llb/sft/jbscrt/machineA/data/stage/sup/deployment -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.net.preferIPv4Stack=true -Djboss.domain.base.dir=/sup/llb/sft/jbscrt/machineAdmin/parm/mngdroot/jbscrt -DteleEnv=sup -DtnEnv=sup -Djboss.domain.temp.dir=/sup/loc/sft/jbscrt/machineA/work/sup -Djboss.home.dir=/sup/llb/sft/jbscrt/common/install/7.1.1 -D[Host=true -Djboss.domain.servers.dir=/sup/llb/sft/jbscrt/machineA/data/stage/sup/server -Djboss.domain.data.dir=/sup/loc/sft/jbscrt/machineA/data/store -Djboss.server.log.dir=/sup/llb/sft/jbscrt/machineA/data/stage/sup/server/jbscrtCatA1/log -Djboss.server.temp.dir=/sup/llb/sft/jbscrt/machineA/data/stage/sup/server/jbscrtCatA1/tmp -Djboss.server.data.dir=/sup/llb/sft/jbscrt/machineA/data/stage/sup/server/jbscrtCatA1/data -Dorg.jboss.boot.log.file=/sup/llb/sft/jbscrt/machineA/data/stage/sup/server/jbscrtCatA1/log/boot.log -Dlogging.configuration=file:/sup/llb/sft/jbscrt/machineAdmin/parm/mngdroot/jbscrt/configuration/logging.properties -jar /sup/llb/sft/jbscrt/common/install/7.1.1/jboss-modules.jar -mp /sup/llb/sft/jbscrt/common/install/7.1.1/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.server