Analyze remote large heap dump

Aladdin :

I'm having Java heap dump with about 70 GB in remote Debian machine, I can't analyse it in my local machine using MAT, although I can get an overview and suspicious leak reports as HTML pages, but they are brief and there are href for the objects there that don't point to anything (maybe MAT doesn't mean to create actual links there but just for styling purposes).

However, is there anyway to fully analyze a heap dump of that size?

Mark Bramnik :

If you can't run MAT on that server, then you might want to run a jhat utility.

It will run the web server on a port (that you can override) and will provide a web console and query language called OQL (object query language) that you can use to analyze the heap dump. It looks somewhat like SQL.

Here is an example:

jhat -J-Xmx32g -port 7000 <PATH_TO_HEAPDUMP>

And then access in browser:

http://<IP>:7000

There are many tutorials about OQL, here is one of them

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=148239&siteId=1