1

I'm monitoring an application with VisualVM on a remote server running Tomcat 7. When I try to open the heap dump browser all I get is a window prompting me to enter a path for the dump file to be saved but there is no browser window.

I'm starting tomcat with the below variables

export JAVA_OPTS="-Dcom.sun.management.jmxremote=true \ -Dcom.sun.management.jmxremote.port=9090 \ -Dcom.sun.management.jmxremote.ssl=false \ -Dcom.sun.management.jmxremote.authenticate=false \ -Djava.rmi.server.hostname=host ip"

Is there a way for me to open a heap dump browser window when connecting to a remote application?

3 Answers 3

2

Unfortunately there's no direct way to do that. You can use jVisualVM to monitor a remote java process but taking a heap dump is not possible. If you think about it, it makes sense because your heap dump file (.hprof) is usually of the size of MBs or GBs depending on your running java process and it's not easy to capture and transfer all that data in real time.

If you've access to running programs on that remote server, log into that and use jmap to take heap dump by pointing your java ProcessID like this,

jmap -dump:file=absolute-path-of-dumpfile ProcessID

and then copy the dump to your local for analysis.

For more info, you can refer to this SO link

1
  • After that, You can use jHat or eclipse MAT, the latter is cooler ;)
    – maslan
    Commented Jan 23, 2015 at 20:10
1

You can actually do that with JProfiler but this is a licensed tool. I believe trial version does not include feature for remote JVM. Google it.

1

Actually you can take a heap dump from a remote application but you can't browse it immediately. The dialog asks you to provide path on the remote system where the heap dump file will be saved for you. To open it in VisualVM you have to manually transfer the file to your local machine and use File | Load... in VisualVM.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.