java应用内存dump和分析工具

yzmm
922 阅读
首先:# ps -ef |grep java 找到程序的PID,然后用jmap dump分析。

# jmap -dump:format=b,file=test.bin 23160

压缩后下载到本地。

# zip -r test.bin.zip test.bin

本机解压后使用jat查看:

[yz@yz:Downloads]$ jhat test.bin

Reading from test.bin...

Dump file created Mon Jan 19 18:06:51 CST 2015

Snapshot read, resolving...

Resolving 1602637 objects...

Chasing references, expect 320 dots................................................................................................................................................................................................................................................................................................................................

Eliminating duplicate references................................................................................................................................................................................................................................................................................................................................

Snapshot resolved.

Started HTTP server on port 7000

Server is ready.

访问:http://localhost:7000/ 分析 或者下载eclipse的MemoryAnalyzer分析。

评论 (0)

发表评论