今天为了追查一个outofmememory exception的问题, 用到了些java app 内存dump 的相关知识. 小总结一下, 防止遗忘.
cd $JAVA_HOME/bin
ps -aux to get the java appliaction process id
use jmap -heap:format=b [pid] to dump the heap
use jhat -J-mx768m -stack false heap.bin to make the dumped server
Then use browser to go http://ipaddress:7000 to read the dump