RFR: 7164841: Improvements to the GC log file rotation
ss4766 at att.com
Mon Aug 19 20:20:51 UTC 2013
Question about ".current" log: When a JVM re-starts with these args, would it check for existing .current and append to it or just overwrite .current? Needs to append or else the current file contents get blown away.
> Time stamp is the start of first rotation file created, and all
> rotation files share the same time stamp in file name.
I would only tweak it so that the time stamp on all rotation files is set to the time at which each file is created.
The bug seems to suggest that (to my interpretation) and that would fit with other common log formatting for things like apache.
" In this case, the date stamp would correspond to the creation time of each log segment."
From: Yumin Qi [mailto:yumin.qi at oracle.com]
Sent: Monday, August 19, 2013 1:48 PM
Scott and Yasumasa,
Thanks for your information for bug 6950794.
According to my current implementation, it is easy to identify which
file is the current log ---- it ends up with .current appendix. At app
exit, it did not renamed to other name so still is the last and latest
I will make modification based on current implementation to cover
suggestions mentioned in bug 6950794.
This will be only targeted to if gc log file rotations successfully set:
Log file name will be <filename>-pid%p-YYYY-MM-DD_HH-MM-SS.%i which
p is pid and i be one of 0, ...., n-1. I am not planning to parse
command line to get those info since they are available internally. Hope
this will solve the problems mentioned in bug 6950794.
So the rotation will be:
1) File name, like mentioned above, example:
Time stamp is the start of first rotation file created, and all
rotation files share the same time stamp in file name.
2) Time stamp of each rotation begings still logged when it is
3) For rotation in same file, the file name will be
Let me know what you think.
More information about the hotspot-gc-dev