문제

I need to be able to do some memory sampling on a VM that's running on a linux box that doesn't have any XWindows running. I've tried to do it remotely but apparently JVisualVM does not support remote memory sampling.

What are my alternatives?

Thanks!

도움이 되었습니까?

해결책 2

It depends on what type of sampling you want. jmap console tool (from JDK bin folder) allows some kind of memory dumping etc.

다른 팁

You can use jmap to take a memory sample (aka a heap dump). The command below creates a file heap.hprof in the current directory.

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

Once you have the sample you can transfer it to another machine for analysis with whatever tools you like. I recommend Memory Analyzer.

setup a remote DISPLAY on your linux server and run jvisualvm such that the ui displays on your local xserver. it might be slow, but it will work.

Path to your software :

[softwares/visualvm_14/bin] -> ll

-rw-r--r-- 1 xxxxxxx xx   6287 Dec 11 15:52 visualvm 
-rw-r--r-- 1 xxxxxxx xx 190464 Dec 11 15:52 visualvm.exe

1st file is for Lx OS
2nd file is for Windows OS

Command to start the application:

for Linux "jvisualvm"
for Windows "double click the .exe file"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top