开发者

Send JVM -verbose output to stderr instead of stdout

开发者 https://www.devze.com 2022-12-28 07:38 出处:网络
I\'m running java with the -verbose:gc option to measure garbage collector behavior, but it sends the info to stdout, mixing with my program\'s normal output. How do I tell it to output this info to s

I'm running java with the -verbose:gc option to measure garbage collector behavior, but it sends the info to stdout, mixing with my program's normal output. How do I tell it to output this info to st开发者_StackOverflowderr?


On HP-UX -Xverbosegc [:help] | [0 | 1] [:file = [stdout | stderr | ]]

IBMs JDK Any platform that uses the IBM JDK
-Xverbosegclog[:[,,]]

Sun JDK -Xloggc:file Report on each garbage collection event, as with -verbose:gc, but log this data to file. In addition to the information -verbose:gc gives, each reported event will be preceeded by the time (in seconds) since the first garbage-collection event. Always use a local file system for storage of this file to avoid stalling the JVM due to network latency. The file may be truncated in the case of a full file system and logging will continue on the truncated file. This option overrides -verbose:gc if both are given on the command line.

0

精彩评论

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