If you have secure environments in which there are strict ingress/egress rules and cannot open up jmx ports for tools like VisualVM or set JVM parameters like -XX:+ HeapDumpOnOutOfMemoryError
$ jmap -dump:format=b,file=/tmp/heapdump <pid>
Dumping heap to /tmp/heapdump ...
Heap dump file created
Once the dump has been generated, you can analyze the heap using Eclipse memory analyzer (MAT)
-XX:HeapDumpPath=/tmp/heapdump
In such cases you can use jmap utility such as$ jmap -dump:format=b,file=/tmp/heapdump <pid>
Dumping heap to /tmp/heapdump ...
Heap dump file created
Once the dump has been generated, you can analyze the heap using Eclipse memory analyzer (MAT)
No comments:
Post a Comment