Skip to content

Instantly share code, notes, and snippets.

@virgium03
Created June 22, 2015 08:43
Show Gist options
  • Save virgium03/83f7ea8b1dd4237d902c to your computer and use it in GitHub Desktop.
Save virgium03/83f7ea8b1dd4237d902c to your computer and use it in GitHub Desktop.
Java enable GC logs
-XX:+PrintGCDetails Print details at garbage collection
-XX:+PrintGCTimeStamps Print timestamps at garbage collection (or -XX:+PrintGCDateStamps)
-Xloggc:heroes-gc.log Log GC verbose output to specified file. The verbose output is controlled by the normal verbose GC flags
-XX:+UseGCLogFileRotation Enabled GC log rotation, requires -Xloggc
-XX:NumberOfGCLogFiles=5 Set the number of files to use when rotating logs, must be >= 1
-XX:GCLogFileSize=1M The size of the log file at which point the log will be rotated, must be >= 8K
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment