The default location for JVisualVM's heapdump files in Linux is the /tmp/ directory. Because of my development machine's limitations, and the resource use of my application /tmp/ isn't big enough to capture the file. Is there a way to set this as a parameter in JVisualVM?
I'm looking for something like:
./jvisualvm --heaplocation /my/desired/location
I have created a symlink to the default location using the following:
ln -sf /my/desired/location/visualvm.dat
However, that is an ugly hack. Any suggestions?
You could specify it in the file ${VISUALVM_HOME}/etc/visualvm.conf
Search for the line starting with visualvm_default_options
and add the setting to the end of the line (must be between the double quotes).
visualvm_default_options="... -J-Dvisualvm.tmpdir=/where/you/want"
note the ...
are a placeholder for the existing settings
The information has been taken from the property VISUALVM_TMP_DIR
in the class Storage.java
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.