Skip to content

Instantly share code, notes, and snippets.

@turf00
Last active October 19, 2017 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save turf00/78480d6e397b434f3e8f6125a4a7d0eb to your computer and use it in GitHub Desktop.
Save turf00/78480d6e397b434f3e8f6125a4a7d0eb to your computer and use it in GitHub Desktop.
GC Detailed Logging to file

Enable GC detailed logging to a file, max size 5M, max number of files 10.

File will be labelled .0 to .x depending on the number of files.

-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCTimeStamps
-XX:+PrintTenuringDistribution 
-XX:+PrintGCCause
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=10
-XX:GCLogFileSize=5M
-Xloggc:<file>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment