April 22, 2020
Estimated Post Reading Time ~

Log File rotation in AEM/CQ5

Statement: JVM Log file rotation parameters
Solution:
Add the below parameters in the start.bat/start.sh file of AEM:
  • XX:+HeapDumpOnOutOfMemoryError — Write an heapdump if the JVM runs out of heap space
  • XX:+HeapDumpOnCtrlBreak — On windows create an heapdump when pressing ctrl+break
  • verbose:gc — Verbose garbage collection logging
  • XX:+PrintGCTimeStamps — Print timestamps in the GC log
  • XX:+PrintGCDetails — Even more GC information
  • Xloggc:gc.log — Write the GC logs to this file and not to stdout
  • XX:+UseGCLogFileRoatation — Enable GC log rotation
  • XX:+NumberOfGCLogFiles=10 —Keep 10 versions of that GC log file
JVM Parameter
Description


§  verbose:gc
§  verbose garbage collection logging
§  XX:+PrintGCTimeStamps
§  print timestamps in the GC log
§  XX:+PrintGCDetails
§  even more GC information
§  Xloggc:gc.log
§  write the GC logs to this file and not to stdout
§  XX:+UseGCLogFileRoatation
§  (since Java 6u32 or Java 7u2) — enable GC log rotation
§  XX:+NumberOfGCLogFiles=10
§  (since Java 6u32 or Java 7u2) — and keep 10 versions of that GC log file

Logfile rotation related findings
Finding ID
Title
Total Risk
Effort to fix
LR1
verbose:gc
Medium
Low
LR2
XX:+PrintGCTimeStamps
Medium
Low
LR3
XX:+PrintGCDetails
Medium
Low
LR4
Xloggc:gc.log
Medium
Low
LR5
XX:+UseGCLogFileRoatation
Medium
Low
LR6
XX:+NumberOfGCLogFiles=10
Medium
Low


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.