If the machine in question have the X11 client libraries installed, AND a reachable ssh server which allows X11 forwarding, AND an X11 server running on your local machine (perhaps http://sourceforge.net/projects/xming/)
AND you use a Sun Java 6u10 or later, you can ssh (with either -X or -Y) into the Linux box, and run jvisualvm there while showing its GUI-interface on your local machine.
Running on the same machine allows jvisualvm to attach directly to the running Java process instead of doing all kinds of configuration voodoo.
Um... actually, VisualVM has an excellent memory profiler that can tell you not just which objects eat your memory, but also where they're (perhaps inadvertedly) referenced.
Just press the "Heap dump" button on the Monitor tab and be amazed!
发布评论
评论(4)
如果有问题的机器安装了 X11 客户端库,以及允许 X11 转发的可访问 ssh 服务器,以及在本地机器上运行的 X11 服务器(可能 http://sourceforge.net/projects/xming/)
如果您使用 Sun Java 6u10 或更高版本,则可以通过 ssh(使用 -X 或 -Y)进入 Linux 机器,并在那里运行 jvisualvm,同时在本地计算机上显示其 GUI 界面。
在同一台机器上运行允许 jvisualvm 直接附加到正在运行的 Java 进程,而不用做各种配置巫术。
If the machine in question have the X11 client libraries installed, AND a reachable ssh server which allows X11 forwarding, AND an X11 server running on your local machine (perhaps http://sourceforge.net/projects/xming/)
AND you use a Sun Java 6u10 or later, you can ssh (with either -X or -Y) into the Linux box, and run jvisualvm there while showing its GUI-interface on your local machine.
Running on the same machine allows jvisualvm to attach directly to the running Java process instead of doing all kinds of configuration voodoo.
NetBeans Java Profiler 支持对远程 JVM 进行分析。可以使用 JMX 将 NetBeans 连接到远程 JVM。
JavaPassion 站点上提供的演示提供了一些有关如何入门的指导。
The NetBeans Java Profiler supports profiling of remote JVMs. One can have NetBeans connect to the remote JVM using JMX.
A presentation available on the JavaPassion site provides a few pointers on how to get started.
嗯...实际上,VisualVM 有一个优秀的内存分析器 它不仅可以告诉你哪些对象消耗了你的记忆,还可以告诉你它们在哪里(可能是无意中)被引用的。
只需按下“监视器”选项卡上的“堆转储”按钮,您就会大吃一惊!
Um... actually, VisualVM has an excellent memory profiler that can tell you not just which objects eat your memory, but also where they're (perhaps inadvertedly) referenced.
Just press the "Heap dump" button on the Monitor tab and be amazed!
我看了几个,最喜欢 YourKit。
它是迄今为止最容易使用的,并且与 JMX 配合得很好。
I looked at several and like YourKit the most.
It was by far the easiest to use and works great with JMX.