In my /etc/init.d/tomcat shell startup script for linux I have

JAVA_OPTS="-server"
JAVA_OPTS="${JAVA_OPTS} -Xmx512m"
JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256m"
JAVA_OPTS="${JAVA_OPTS} -XX:+PrintGCDetails"
JAVA_OPTS="${JAVA_OPTS} -XX:+PrintGCTimeStamps"
JAVA_OPTS="${JAVA_OPTS} -XX:+UseConcMarkSweepGC"
JAVA_OPTS="${JAVA_OPTS} -XX:+CMSIncrementalMode"
JAVA_OPTS="${JAVA_OPTS} -XX:-TraceClassUnloading"
JAVA_OPTS="${JAVA_OPTS} -verbose:gc"
export JAVA_OPTS

The export line is necessary. The following 3 lines are what I think turn on garbage collecting logging:

JAVA_OPTS="${JAVA_OPTS} -XX:+PrintGCDetails"
JAVA_OPTS="${JAVA_OPTS} -XX:+PrintGCTimeStamps"
JAVA_OPTS="${JAVA_OPTS} -verbose:gc"

Then, in my catalina.out I have lines (the CMS- lines are from UseConcMarkSweepGC):

48124.665: [GC [1 CMS-initial-mark: 39226K(67176K)] 40336K(71656K), 0.0090660 secs]
48124.674: [CMS-concurrent-mark-start]
48125.090: [CMS-concurrent-mark: 0.416/0.416 secs]
48125.091: [CMS-concurrent-preclean-start]
48125.091: [CMS-concurrent-preclean: 0.000/0.000 secs]
48125.097: [GC[YG occupancy: 1135 K (4480 K)]48125.097: [Rescan (parallel) , 0.0093270 secs]48125.106: [weak refs processing, 0.0003890 secs] [1 CMS-remark: 39226K(67176K)] 40362K(71656K), 0.0101020 secs]
48125.107: [CMS-concurrent-sweep-start]
48125.158: [CMS-concurrent-sweep: 0.050/0.050 secs]
48125.158: [CMS-concurrent-reset-start]
48125.189: [CMS-concurrent-reset: 0.031/0.031 secs]
48402.052: [GC 48402.052: [ParNew: 4415K->0K(4480K), 0.0178790 secs] 43420K->39329K(71656K), 0.0181320 secs]



hruesga wrote:
i'fe tried to export CATALINA_OPTS setting as:

execute:

export CATALINA_OPTS=-Xloggc:/logs/gc.log
result: gc.log file doesn't create

java -verbose:gc
result: nothing happpens.





Caldarale, Charles R wrote:
From: hruesga [mailto:lord_dyna...@hotmail.com]
Subject: Re: Garbage collector

-Xmx3072m -Xms3072m
Unless you're in a 64-bit environment, that doesn't stand a chance of
working.

Maz Threads= 500
Is that supposed to be Max?  Where do you have that set?

minSpareThreads=25
maxSpareThreads=75
The threads settings are not really relevant to getting GC logs.

For the third time, tell us *exactly* what you're doing - step by step.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to