Created
June 8, 2016 18:29
-
-
Save juliojsb/550ae9c36a48d7e867e04391c7f04a0a to your computer and use it in GitHub Desktop.
JVM Flags for debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Activate Automatic Heap Dump on OutOfMemory | |
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/location/`date +%Y%m%d`.hprof | |
# Activate basic GC logging | |
-XX:+PrintGC | |
# Activate detailed GC logging | |
-XX:+PrintGCDetails | |
# Add Timestamps (can be used with basic or detailed GC logging) | |
-XX:+PrintGCTimeStamps | |
# GC logging to a file | |
-Xloggc:/path/to/location/gc.log | |
# GC file rotation | |
-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M | |
# Check wheter a class is loaded or unloaded from the JVM | |
-XX:+TraceClassLoading | |
-XX:-TraceClassUnloading |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment