Expand my Community achievements bar.

SOLVED

GC logs are in visible on AEM

Avatar

Level 3

Hi Guys ,

I am using the below command , on my start script in AEM.

-XX:+UseParallelGC -XX:+UseParallelOldGC

-XX:ReservedCodeCacheSize=128m -XX:ParallelGCThreads=4 -XX:+UseAdaptiveGCBoundary -XX:MaxTenuringThresh

old=4 -XX:-UseGCOverheadLimit -Xloggc:../logs/gc.log -XX:+PrintGCDetails -verbosegc -XX:+PrintGCDateSta

mps -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:+PrintReferenceGC -XX:

+PrintAdaptiveSizePolicy -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M

However i don't see any GC logs getting captured .

Please let us know how to enable gc logs on AEM .

Thanks in advance . !

Thanks

Harish

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

You should be able to do the lsof call also as user (the same user how is used to run the AEM java process).

jörg

View solution in original post

9 Replies

Avatar

Employee Advisor

This question is not specific to AEM, but rather Java in general.

The location depends on the way how you start AEM. If you are using the start script (crx-quickstart/bin/start) on a Unix system, you'll find the gc.log in the logs directory, which is a sibling to crx-quickstart; because the workding directory is crx-quickstart. If you want to have it next to all other AEM logs, just use "-Xloggc:logs/gc.log"

Jörg

Avatar

Level 3

HI Jörg,

Thanks for your response !

I am still not able to see the logs anywhere.

The command i use in my AEM start sctipt is as below.

java -server -Xmx2048M -Xms1024M -Djava.io.tmpdir=/AEM/tmp -Djava.awt.headless=true -Doak.q

ueryLimitInMemory=50000 -Doak.queryLimitReads=10000 -Dupdate.limit=25000 -Doak.fastQuerySize=true -XX:+HeapDumpOnOutOfMemoryError -X

X:+UseParallelGC -XX:+UseParallelOldGC -XX:ReservedCodeCacheSize=128m -XX:ParallelGCThreads=4 -XX:+UseAdaptiveGCBoundary -XX:MaxTenurin

gThreshold=4 -XX:-UseGCOverheadLimit -Xloggc:logs/gc.log -XX:+PrintGCDetails -verbosegc -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -

XX:+PrintHeapAtGC -XX:+PrintTenuringDistribution -XX:+PrintReferenceGC -XX:+PrintAdaptiveSizePolicy -XX:+UseGCLogFileRotation -XX:Numbe

rOfGCLogFiles=10 -XX:GCLogFileSize=10M -Dsling.run.modes=publish,crx3,crx3tar,prod -jar crx-quickstart/app/cq-quickstart-6.3.0-standalo

ne-quickstart.jar start -c crx-quickstart -i launchpad -p 4503 -Dsling.properties=conf/sling.properties

I am not able to see the gc.log  created anywhere above .

Please let us know at the earliest as soon as possible.

Thanks

Harish

Avatar

Employee Advisor

if you have access to the same system user which is running the AEM JVM, you can use "lsof" to determine the path of the gc.log; you can use something like this:

lsof -p ${PID OF THE JAVA PROCESS} | grep gc.log

it should print the full path to the gc.log file. Alternatively you can also use the "find" tool to search for the gc.log file.

Avatar

Level 3

Hi Jörg,

I am able to find the gc.log written in one location , crx-quickstart/repository/segmentstore/gc.log

However I still don't see much info in the file . The content of this log file is simply as below,

290526208,0,1526522404342,1,366450

1824527872,178152448,1528941626785,2,1953257

can you please let me know if I am missing something  else

Thanks

Harish

Avatar

Employee Advisor

Hi,

I guess that you are seeing the gc.log of the Oak segmentstore, but not the GC log of the Java Virtual Machine. There must be another gc.log file. You can specify the gc.log as absolute path so it should be easier to spot.

Jörg

Avatar

Level 3

Hi Jörg

Thank you very much for your response .

Unfortunately i am still not able to see the GC logs generated on the machine .

I am doing this activity as a user who has the access to a complete mount point in unix system.

Hope a root user access is not necessary .

Thanks

Hairsh

Avatar

Correct answer by
Employee Advisor

You should be able to do the lsof call also as user (the same user how is used to run the AEM java process).

jörg

Avatar

Level 10

Thanks JOerg for the useful responses.

Avatar

Level 3

HI jörg,

Thanks for your responses !

Yes finally i am able to see a file named "gc.log.0.current" created just besides the crx-quickstart folder.

Thanks

Harish