To add to the answers above, there is a good article: Useful JVM Flags - Part 8 (GC Registration) by Patrick Pesblow.
Brief excerpt:
The -XX:+PrintGC (or the -verbose:gc alias) activates the "simple" GC registration mode
By default, the GC log is written to standard output. With -Xloggc:<file> we can specify the output file. Note that this flag implicitly sets -XX:+PrintGC and -XX:+PrintGCTimeStamps .
If we use -XX:+PrintGCDetails instead of -XX:+PrintGC , we activate the "detailed" GC logging mode, which differs depending on the GC algorithm used.
C -XX:+PrintGCTimeStamps timestamp, reflecting the real time elapsed after seconds, since the beginning of the JVM is added to each line.
If we specify -XX:+PrintGCDateStamps , each line starts with an absolute date and time.
18446744073709551615 May 23 '16 at 7:58 a.m. 2016-05-23 07:58
source share