Reputation: 66
I need to know if it is possible to declare a output path for a heap space dump in the java visualVM. Is there any parameter that I can use for the java visual VM?
I have to trace a specific service on my server and need to get a dump of the heap space.
thanks.
UPDATE
Thanks a lot. I found a solution for my problem. I connected to my service with jmx remote. There it is possible to save the heapdump on any other drive of the server.
Upvotes: 3
Views: 7300
Reputation: 31
For VisualVM 1.4.4 the following settings are needed in etc/visualvm.conf
:
visualvm_default_userdir="<set-your-path>"
visualvm_default_options="<...> -J-Djava.io.tmpdir=<set-your-path>"
visualvm_default_userdir
sets it for jmx based heap dumps.visualvm_default_options
sets it for process based heap dumps.Upvotes: 3
Reputation: 6981
You can use the following visualvm.tmpdir
system property to change the directory, where VisualVM stores snapshots, thread dumps and heap dumps. Usage:
visualvm -J-Dvisualvm.tmpdir=[custom_tmp_dir]
Upvotes: 5
Reputation: 688
You can change location of the temporary directory that VisualVM uses inside of /etc/visualvm.conf file as follows:
visualvm_default_options=" ... -J-Djava.io.tmpdir=<PATH> -J-Dvisualvm.tmpdir=<THE SAME PATH>"
Upvotes: 2