heapdump
dump java heap,类似jmap命令的heap dump功能。
命令选项
命令选项 | 描述 |
---|---|
-l, --live | 只dump存活的对象,默认导出所有 |
-h, --help | 帮助 |
<file> | 导出文件,默认导出到tmp目录 |
示例
bash
# 默认导出
[arthas@21536]$ heapdump
# 导出存活对象
[arthas@21536]$ heapdump -l
# 导出存活对象到指定文件
[arthas@21536]$ heapdump -l /tmp/dump.hprof
# 默认导出
[arthas@21536]$ heapdump
# 导出存活对象
[arthas@21536]$ heapdump -l
# 导出存活对象到指定文件
[arthas@21536]$ heapdump -l /tmp/dump.hprof
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8