6941923: RFE: Handling large log files produced by long running Java Applications

Yasumasa Suenaga suenaga.yasumasa at oss.ntt.co.jp
Wed Sep 21 17:47:42 PDT 2011


Hi,

If we can think Java on Linux and Solaris only, syslog is best solution.
However, Windows usually doesn't have syslog.

So, I think that gclog is needed for logging GC stats with platform independent in realtime.


Thanks,
Yasumasa

(2011/09/18 6:33), Jesper Wilhelmsson wrote:
> I agree with Dmitry here. I think the ability to log to syslog would be more useful than implementing our own rotation.
> /Jesper
>
>
> 12 sep 2011 kl. 12:14 skrev Dmitry Samersoff<Dmitry.Samersoff at oracle.com>:
>
>> Yasumasa,
>>
>> Personally, I would prefer to add an ability to log to syslog then use standard well known log handling infrastructure.
>>
>> -Dmitry
>>
>>
>> On 2011-09-12 05:18, Yasumasa Suenaga wrote:
>>> Hi,
>>>
>>> I'm using "logrotate" tool on RHEL for various log rotation.
>>> Now, HotSpot has gclog rotation function for log size base.
>>> However, I need to rotate gc log synchronizing with logrotate tool.
>>>
>>>
>>> So, I've made a patch for executing gclog rotation from external tool.
>>>
>>>
>>>   * Changes in HotSpot (hotspot.patch):
>>>    * gclog rotation request is received via AttachListener.
>>>    * logrotation function ( rotatingFileStream::rotate_log() ) has
>>>      1 parameter. It's determined that gclog rotation is forced or not.
>>>    * HotSpot allows "GCLogFileSize == 0" . Because we can rotate gclog
>>>      via external tool.
>>>
>>>   * Changes in JDK (jdk.patch):
>>>    * gclog rotation is invoked via "jinfo" command with "-rotategclog"
>>>      option.
>>>    * With "-rotategclog -force" option, gclog is rotated mandatorily.
>>>    * "jinfo" is executed "rotategclog" command in AttachListener on
>>>      target JVM.
>>>
>>>
>>> I've attached these patch in this email. Please check it.
>>>
>>> I would like to contribute this patch, and I hope to apply this patch to
>>> JDK 6 / 7 / 8.
>>>
>>>
>>> Please cooperate.
>>>
>>> Best regards,
>>> Yasumasa
>>>
>>
>>
>> --
>> Dmitry Samersoff
>> Java Hotspot development team, SPB04
>> * There will come soft rains ...



More information about the serviceability-dev mailing list