mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
add heapdump command doc. close #837
This commit is contained in:
@@ -41,7 +41,7 @@ public class HeapDumpCommand extends AnnotatedCommand {
|
||||
}
|
||||
|
||||
@Option(shortName = "l", longName = "live", flag = true)
|
||||
@Description("Only dump live objects, default value true")
|
||||
@Description("Dump only live objects; if not specified, all objects in the heap are dumped.")
|
||||
public void setLive(boolean live) {
|
||||
this.live = live;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* [sc](sc.md)
|
||||
* [sm](sm.md)
|
||||
* [dump](dump.md)
|
||||
* [heapdump](heapdump.md)
|
||||
|
||||
* [jad](jad.md)
|
||||
* [classloader](classloader.md)
|
||||
|
||||
@@ -15,6 +15,7 @@ All Commands
|
||||
* [sc](sc.md)
|
||||
* [sm](sm.md)
|
||||
* [dump](dump.md)
|
||||
* [heapdump](heapdump.md)
|
||||
|
||||
* [jad](jad.md)
|
||||
* [classloader](classloader.md)
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
heapdump
|
||||
===
|
||||
|
||||
> dump java heap in hprof binary format, like `jmap`.
|
||||
|
||||
|
||||
### Usage
|
||||
|
||||
#### Dump to file
|
||||
|
||||
```bash
|
||||
[arthas@58205]$ heapdump /tmp/dump.hprof
|
||||
Dumping heap to /tmp/dump.hprof...
|
||||
Heap dump file created
|
||||
```
|
||||
|
||||
#### Dump only live objects
|
||||
|
||||
```bash
|
||||
[arthas@58205]$ heapdump --live /tmp/dump.hprof
|
||||
Dumping heap to /tmp/dump.hprof...
|
||||
Heap dump file created
|
||||
```
|
||||
|
||||
#### Dump to tmp file
|
||||
|
||||
```bash
|
||||
[arthas@58205]$ heapdump
|
||||
Dumping heap to /var/folders/my/wy7c9w9j5732xbkcyt1mb4g40000gp/T/heapdump2019-09-03-16-385121018449645518991.hprof...
|
||||
Heap dump file created
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
heapdump
|
||||
===
|
||||
|
||||
> dump java heap, 类似jmap命令的heap dump功能。
|
||||
|
||||
|
||||
### 使用参考
|
||||
|
||||
#### dump到指定文件
|
||||
|
||||
```bash
|
||||
[arthas@58205]$ heapdump /tmp/dump.hprof
|
||||
Dumping heap to /tmp/dump.hprof...
|
||||
Heap dump file created
|
||||
```
|
||||
|
||||
#### 只dump live对象
|
||||
|
||||
```bash
|
||||
[arthas@58205]$ heapdump --live /tmp/dump.hprof
|
||||
Dumping heap to /tmp/dump.hprof...
|
||||
Heap dump file created
|
||||
```
|
||||
|
||||
### dump到临时文件
|
||||
|
||||
```bash
|
||||
[arthas@58205]$ heapdump
|
||||
Dumping heap to /var/folders/my/wy7c9w9j5732xbkcyt1mb4g40000gp/T/heapdump2019-09-03-16-385121018449645518991.hprof...
|
||||
Heap dump file created
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user