Last active
July 4, 2019 09:54
-
-
Save alexandrnikitin/f3f5a5fe360aead13b48bddd1f024b24 to your computer and use it in GitHub Desktop.
JVM Large heap analysis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// install Eclipse Memory Analyzer (MAT) | |
wget http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/mat/1.6.1/rcp/MemoryAnalyzer-1.6.1.20161125-linux.gtk.x86_64.zip | |
unzip MemoryAnalyzer-1.6.1.20161125-linux.gtk.x86_64.zip | |
cd mat/ | |
// add more heap to mat | |
nano MemoryAnalyzer.ini | |
// create a dump | |
su - username // if needed | |
ps aux | grep java | |
/opt/jdk1.8.0_131/bin/jmap -dump:live,format=b,file=/tmp/22219javaheap.hrpof 22219 | |
./ParseHeapDump.sh /tmp/22219javaheap.hrpof // creates indexes | |
./ParseHeapDump.sh /tmp/22219javaheap.hrpof org.eclipse.mat.api:suspects // creates a report |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment