How to print garbage collection details with timestamp

Add these JVM parameters to print the garbage collection details with time stamp.
The log will be printed in the System.out

java -XX:+PrintGC -XX:+PrintGCDateStamps MyApplication

If you need more gc details then

java -XX:+PrintGCDetails -XX:+PrintGCDateStamps MyApplication

No comments:

Post a Comment