Friday, April 11, 2014

Useful JVM Options (mainly related to GC troubleshooting)

-XX:+PrintFlagsInitial - Prints all JVM options with default values
-XX:+PrintCommandLineFlags - Prints the command line flags that were passed
-XX:+PrintFlagsFinal - Prints all JVM options after processing the command line

-verbose:gc - logs garbage collector runs and how long they are taking
-XX:+PrintGCTimeStamps - Prints timestamps at garbage collection
-XX:+PrintGCDetails - includes data from -verbose:gc but also adds information about the new generation
-Xloggc:gc.log - redirects the gc logs to a log file rather than the standard output