質問

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