开发者

Java - Need Verbose GC logging to Separate Files

开发者 https://www.devze.com 2023-03-29 05:23 出处:网络
I understand there\'s -Xloggc option exists for outputting GC output to separate file.But it doesn\'t work for me.I\'ve 16 java processes with same main running on on开发者_运维问答e machine so I can\

I understand there's -Xloggc option exists for outputting GC output to separate file. But it doesn't work for me. I've 16 java processes with same main running on on开发者_运维问答e machine so I can't really hardcode file path. Ideally I want to specify only directory where separate pid specific files are created. Is that possible? Note I don't want GC output mixed with stdout and hence a need for separate file.

Version : SunJDK 1.5_13


Can you change the loggc directory with

-Xloggc:/path/`date +%Y%M%d%H%m%S`.gc.log


Couldn't you mix standard out and GC and then grep out what you want? There should be much coming out of standard out, or at least not much that you couldn't redirect elsewhere if you are using a logging framework.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号