RFR: 7164841: Improvements to the GC log file rotation
STIRLING, SCOTT
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.
Regarding:
> 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.
From http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6950794:
" In this case, the date stamp would correspond to the creation time of each log segment."
Scott Stirling
AT&T, Boston
-----Original Message-----
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
log file.
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:
gc.log-pid1234-2013-08-19_08-20-00.1 with
-Xloggc:gc.log -XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=1M
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
started, finished.
3) For rotation in same file, the file name will be
<filename>-pid%p-YYYY-MM-DD_HH-MM-SS
Let me know what you think.
Thanks
Yumin
More information about the hotspot-gc-dev
mailing list