开发者

How create a memory dump of a Java process run as windows service?

How create a memory dump of a Java process run as win开发者_如何学JAVAdows service? With tools like jVisualVM, jstack or jconsole I can not see the process because the service run with a system account.

Edit: With jVisualVM i can see the process but it show only a "Not supported for this JVM."


To use the tools, you need to run then as the same user as the service. If you don't want this security feature, you need to set up JMX for the server will allow remote access (which will also work on the same box as a different user)

If you use taskmgr to create a low level memory dump you will have trouble finding any tools which can make sense of the output. You need to use a Java tool to trigger the dump.


If you are using Windows 7 / Vista, run taskmgr as administrator, find your process, right click, "Create Memory Dump". Your other tools may work correctly if they are run as Administrator too. The process needs to be elevated to take a memory dump of a process that isn't yours.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜