To enable GC logging, as well as to have the log file rollover once it hits a certain size (e.g. 10 MB), here are the JVM arguments that you can pass in (Windows example):
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Xloggc:C:\TEMP\gc.log
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:+PrintGCDetails
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -verbosegc
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:+PrintGCDateStamps
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:+PrintGCTimeStamps
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:+PrintHeapAtGC
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:+PrintTenuringDistribution
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:+PrintGCApplicationStoppedTime
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:+PrintReferenceGC
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:+PrintAdaptiveSizePolicy
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:+UseGCLogFileRotation
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:NumberOfGCLogFiles=10
set CQ_JVM_OPTS=%CQ_JVM_OPTS% -XX:GCLogFileSize=10M
No comments:
Post a Comment
If you have any doubts or questions, please let us know.