Home > Uncategorized > Altering JVM's Garbage-Collection Profiling Format

Altering JVM's Garbage-Collection Profiling Format

Every information thread talking about GC dump for a spawned Java VM talks about the command

java -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -verbose:gc -cp $CLASSPATH <fqcn-main-class>

You could look at what is the output format, and what it means here. The timestamps logs the time in seconds and it would be cumbersome to figure out from when the application is running. Hence in order to we tweak in the date forma, we got to use this command instead:

java -XX:+PrintGCDetails -XX:+PrintGCDateStamps -verbose:gc -cp $CLASSPATH <fqcn-main-class>

where the datestamp fomat would be in yyyy-MM-ddTHH:mm:ss.SSS<+-GMT_Difference>.

Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.