8

I want to heap dump on Linux, but I don't have enough local disk space to hold the multi-gigabyte heap dump. Instead, it will be posted to another server.

<command> | curl -X POST -d @- http://otherlocation

Attempted solutions:

(1) Heap dump to stdout of jmap. I cannot figure out how to do this.

(2) Create a named pipe and dump to that. Java will not overwrite an existing file.

Can I work around #1 or #2 deficiancies? How can I heap dump to http://otherlocation ?

Paul Draper
  • 78,542
  • 46
  • 206
  • 285

1 Answers1

0

If you can connect to the host remotely, then you can use java visualvm to produce a heap dump (need to run jstad in ur remote machine)

http://docs.oracle.com/javase/7/docs/technotes/guides/visualvm/applications_remote.html

rpfun12
  • 89
  • 6