Symptoms
When the garbage collection log is enabled, using the flag -XX:+PrintGCTimeStamps
will additionally print a timestamp at the start of each log entry. This timestamp that is relative to when the JVM first start up.
By using this timestamp, matching the time frame of garbage collection entries with other log entries is very difficult and time consuming. Is there a flag that will print the datetime stamp instead?
Resolution
If you are using Sun Java SE 6 update 4 and later, use the flag -XX:+PrintGCDateStamps
in your java start-up options to get a printout of the datetime stamp. This printout will make it easier to match time frame of garbage collection log entries with other log entries.
Sample out:
2010-03-26T10:05:38.707-0700: 67.030: [GC 67.030: [ParNew: 18624K->2624K(18624K), 0.0147134 secs] 87601K->73654K(138332K), 0.0148235 secs]
Applies to
Sun Java SE 6 update 4 and later