• <bdo id='rZ2J6'></bdo><ul id='rZ2J6'></ul>
  • <legend id='rZ2J6'><style id='rZ2J6'><dir id='rZ2J6'><q id='rZ2J6'></q></dir></style></legend>

      <small id='rZ2J6'></small><noframes id='rZ2J6'>

      <i id='rZ2J6'><tr id='rZ2J6'><dt id='rZ2J6'><q id='rZ2J6'><span id='rZ2J6'><b id='rZ2J6'><form id='rZ2J6'><ins id='rZ2J6'></ins><ul id='rZ2J6'></ul><sub id='rZ2J6'></sub></form><legend id='rZ2J6'></legend><bdo id='rZ2J6'><pre id='rZ2J6'><center id='rZ2J6'></center></pre></bdo></b><th id='rZ2J6'></th></span></q></dt></tr></i><div id='rZ2J6'><tfoot id='rZ2J6'></tfoot><dl id='rZ2J6'><fieldset id='rZ2J6'></fieldset></dl></div>
        <tfoot id='rZ2J6'></tfoot>

        如何将详细的垃圾收集输出重定向到文件?

        How to redirect verbose garbage collection output to a file?(如何将详细的垃圾收集输出重定向到文件?)
        • <bdo id='LaIOA'></bdo><ul id='LaIOA'></ul>
            <tbody id='LaIOA'></tbody>
            • <legend id='LaIOA'><style id='LaIOA'><dir id='LaIOA'><q id='LaIOA'></q></dir></style></legend>

              <i id='LaIOA'><tr id='LaIOA'><dt id='LaIOA'><q id='LaIOA'><span id='LaIOA'><b id='LaIOA'><form id='LaIOA'><ins id='LaIOA'></ins><ul id='LaIOA'></ul><sub id='LaIOA'></sub></form><legend id='LaIOA'></legend><bdo id='LaIOA'><pre id='LaIOA'><center id='LaIOA'></center></pre></bdo></b><th id='LaIOA'></th></span></q></dt></tr></i><div id='LaIOA'><tfoot id='LaIOA'></tfoot><dl id='LaIOA'><fieldset id='LaIOA'></fieldset></dl></div>
              <tfoot id='LaIOA'></tfoot>

              <small id='LaIOA'></small><noframes id='LaIOA'>

                  本文介绍了如何将详细的垃圾收集输出重定向到文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何将详细垃圾回收输出重定向到文件?Sun 的网站显示了一个适用于 Unix 的示例,但它不适用于 Windows.

                  解决方案

                  来自java -X的输出:

                  <上一页>-Xloggc: 将 GC 状态记录到带有时间戳的文件中

                  记录在这里:

                  <块引用>

                  -Xloggc:文件名

                  设置详细的 GC 事件信息应重定向到的文件以进行日志记录.写入此文件的信息类似于 -verbose:gc 的输出,其中包含自每个记录事件之前的第一个 GC 事件以来经过的时间.-Xloggc 选项覆盖 -verbose:gc 如果两者都使用相同的 java 命令.

                  例子:

                   -Xloggc:garbage-collection.log

                  所以输出看起来像这样:

                  <上一页>0.590:[GC 896K->278K(5056K),0.0096650 秒]0.906:[GC 1174K->774K(5056K),0.0106856 秒]1.320:[GC 1670K->1009K(5056K),0.0101132 秒]1.459:[GC 1902K->1055K(5056K),0.0030196 秒]1.600:[GC 1951K->1161K(5056K),0.0032375 秒]1.686:[GC 1805K->1238K(5056K),0.0034732 秒]1.690:[完整 GC 1238K->1238K(5056K),0.0631661 秒]1.874:[GC 62133K->61257K(65060K),0.0014464 秒]

                  How do I redirect verbose garbage collection output to a file? Sun’s website shows an example for Unix but it doesn't work for Windows.

                  解决方案

                  From the output of java -X:

                      -Xloggc:<file>    log GC status to a file with time stamps
                  

                  Documented here:

                  -Xloggc:filename

                  Sets the file to which verbose GC events information should be redirected for logging. The information written to this file is similar to the output of -verbose:gc with the time elapsed since the first GC event preceding each logged event. The -Xloggc option overrides -verbose:gc if both are given with the same java command.

                  Example:

                      -Xloggc:garbage-collection.log

                  So the output looks something like this:

                  0.590: [GC 896K->278K(5056K), 0.0096650 secs]
                  0.906: [GC 1174K->774K(5056K), 0.0106856 secs]
                  1.320: [GC 1670K->1009K(5056K), 0.0101132 secs]
                  1.459: [GC 1902K->1055K(5056K), 0.0030196 secs]
                  1.600: [GC 1951K->1161K(5056K), 0.0032375 secs]
                  1.686: [GC 1805K->1238K(5056K), 0.0034732 secs]
                  1.690: [Full GC 1238K->1238K(5056K), 0.0631661 secs]
                  1.874: [GC 62133K->61257K(65060K), 0.0014464 secs]
                  

                  这篇关于如何将详细的垃圾收集输出重定向到文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                    <i id='62eYK'><tr id='62eYK'><dt id='62eYK'><q id='62eYK'><span id='62eYK'><b id='62eYK'><form id='62eYK'><ins id='62eYK'></ins><ul id='62eYK'></ul><sub id='62eYK'></sub></form><legend id='62eYK'></legend><bdo id='62eYK'><pre id='62eYK'><center id='62eYK'></center></pre></bdo></b><th id='62eYK'></th></span></q></dt></tr></i><div id='62eYK'><tfoot id='62eYK'></tfoot><dl id='62eYK'><fieldset id='62eYK'></fieldset></dl></div>
                      <bdo id='62eYK'></bdo><ul id='62eYK'></ul>
                        <tbody id='62eYK'></tbody>

                        <small id='62eYK'></small><noframes id='62eYK'>

                        <legend id='62eYK'><style id='62eYK'><dir id='62eYK'><q id='62eYK'></q></dir></style></legend>
                        • <tfoot id='62eYK'></tfoot>