• <legend id='A1CsF'><style id='A1CsF'><dir id='A1CsF'><q id='A1CsF'></q></dir></style></legend>

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

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

        如何在 Windows 上获取不在控制台中运行的 Java 进程的线程和堆转储

        How to get a thread and heap dump of a Java process on Windows that#39;s not running in a console(如何在 Windows 上获取不在控制台中运行的 Java 进程的线程和堆转储)
      1. <tfoot id='vbCBS'></tfoot>

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

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

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

                    <tbody id='vbCBS'></tbody>
                  本文介绍了如何在 Windows 上获取不在控制台中运行的 Java 进程的线程和堆转储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个从控制台运行的 Java 应用程序,该控制台又执行另一个 Java 进程.我想获得该子进程的线程/堆转储.

                  I have a Java application that I run from a console which in turn executes an another Java process. I want to get a thread/heap dump of that child process.

                  在 Unix 上,我可以执行 kill -3 <pid> 但在 Windows AFAIK 上,获取线程转储的唯一方法是控制台中的 Ctrl-Break.但这只会给我父进程的转储,而不是子进程.

                  On Unix, I could do a kill -3 <pid> but on Windows AFAIK the only way to get a thread dump is Ctrl-Break in the console. But that only gives me the dump of the parent process, not the child.

                  还有其他方法可以获得堆转储吗?

                  Is there another way to get that heap dump?

                  推荐答案

                  假设您知道 pid,您可以使用 jmap 获取任何正在运行的进程的转储.

                  You can use jmap to get a dump of any process running, assuming you know the pid.

                  使用任务管理器或资源监视器获取 pid.那么

                  Use Task Manager or Resource Monitor to get the pid. Then

                  jmap -dump:format=b,file=cheap.hprof <pid>
                  

                  获取该进程的堆.

                  这篇关于如何在 Windows 上获取不在控制台中运行的 Java 进程的线程和堆转储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 中的默认语言环境设置以使其保持一致?)

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

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

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