This discussion is archived
6 Replies Latest reply: Sep 9, 2013 6:13 AM by 232ea32a-ab25-4cb1-9e33-6b656dd341c3 RSS

GC log rotation question

232ea32a-ab25-4cb1-9e33-6b656dd341c3 Newbie
Currently Being Moderated

Hi,

 

So after JDK 1.6.0_34 (as far as I know), java introduced GC log rotation JVM args (see below)

 

-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=1M

 

  • Prior to these JVM arg additions, on any java application start, your GC log would get wiped. In my case a tomcat server running java code.

 

  • So now I would assume when these JVM arg's are present, the GC log continues to rotate and not get wiped on application start up. However the above behavior still persists ever after JDK 1.6.0_34 with the new JVM args present.

 

  • I should mention while the java application is running, the GC log DOES rotate (i.e., gc_log.txt.0, becomes gc_log.txt.1), but when application is restarted the LAST GC log is erased completely.

This behavior isn't really "log rotation/backup", I've had to introduce my own shell/bat scripts to rotate the latest GC logs manually outside of these JVMargs. I'm not sure if I'm misunderstanding how to use the new JVM args or if oracle doesn't consider this a bug and this is normal behavior.

 

I did file a bug on this, 9005051. However there is no guarantee your bug request ever makes it to the public bug database and oracle doesn't provide reasoning back to the submitter when the bug is rejected or not looked at, so I don't really know what happened with my bug request.

 

If anyone has any insight into this, I would really appreciate it.

 

Thank you!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points