mirror of https://github.com/alibaba/arthas.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
701 B
Markdown
34 lines
701 B
Markdown
3 years ago
|
# heapdump
|
||
6 years ago
|
|
||
5 years ago
|
[`heapdump`在线教程](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=cn&id=command-heapdump)
|
||
5 years ago
|
|
||
3 years ago
|
::: tip
|
||
|
dump java heap, 类似 jmap 命令的 heap dump 功能。
|
||
|
:::
|
||
6 years ago
|
|
||
|
### 使用参考
|
||
|
|
||
3 years ago
|
#### dump 到指定文件
|
||
6 years ago
|
|
||
|
```bash
|
||
|
[arthas@58205]$ heapdump /tmp/dump.hprof
|
||
|
Dumping heap to /tmp/dump.hprof...
|
||
|
Heap dump file created
|
||
|
```
|
||
|
|
||
3 years ago
|
#### 只 dump live 对象
|
||
6 years ago
|
|
||
|
```bash
|
||
|
[arthas@58205]$ heapdump --live /tmp/dump.hprof
|
||
|
Dumping heap to /tmp/dump.hprof...
|
||
|
Heap dump file created
|
||
|
```
|
||
|
|
||
3 years ago
|
### dump 到临时文件
|
||
6 years ago
|
|
||
|
```bash
|
||
|
[arthas@58205]$ heapdump
|
||
|
Dumping heap to /var/folders/my/wy7c9w9j5732xbkcyt1mb4g40000gp/T/heapdump2019-09-03-16-385121018449645518991.hprof...
|
||
|
Heap dump file created
|
||
|
```
|