Any effective way of rotating gc.log
846658Mar 11 2011 — edited Mar 11 2011Hi
The JVM option -Xloggc:gc.log
Version : Java 1.6
Issue replication :
A fresh gc.log
=========
$ file gc.log
gc.log: ASCII text, with very long lines
After nullyfying the gc.log file
==============
$ cat /dev/null > gc.log
file gc.log
gc.log: data
Try to open the file
=============
$ less gc.log
"gc.log" may be a binary file. See it anyway?
you get all kinds of null characters in the beginning of the file.
The only way to read the file is via tail.
Does JVM has any option for effectively rotating gc.log file without introducing null characters.
-- Jeljo