JVisualVM for Linux console?

I need to be able to do some memory fetching in a virtual machine that runs on a Linux kernel that does not have XWindows. I tried to do this remotely, but apparently JVisualVM does not support fetching remote memory.

What are my alternatives?

Thanks!

+6
source share
4 answers

It depends on what type of sample you want. jmap console tool (from the JDK bin folder) allows you to use any kind of memory dump, etc.

+2
source

You can use jmap to take a memory sample (it's a bunch of dumps). The following command creates the heap.hprof file in the current directory.

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

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

+4
source

configure remote DISPLAY on your Linux server and run jvisualvm so that ui appears on your local xserver server. it may be slow, but it will work.

+2
source

The path to your software:

[software / 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 

The command to start the application:

 for Linux "jvisualvm" for Windows "double click the .exe file" 
0
source

Source: https://habr.com/ru/post/955029/


All Articles