2022-07-15 22:37:32 +08:00
|
|
|
# vmoption
|
2019-09-03 16:32:08 +08:00
|
|
|
|
2020-08-07 18:28:00 +08:00
|
|
|
[`vmoption`在线教程](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=cn&id=command-vmoption)
|
2020-07-21 13:41:27 +08:00
|
|
|
|
2022-07-15 22:37:32 +08:00
|
|
|
::: tip
|
|
|
|
查看,更新 VM 诊断相关的参数
|
|
|
|
:::
|
2019-09-03 16:32:08 +08:00
|
|
|
|
2022-08-09 18:42:39 +08:00
|
|
|
## 使用参考
|
2019-09-03 16:32:08 +08:00
|
|
|
|
2022-08-09 18:42:39 +08:00
|
|
|
### 查看所有的 option
|
2019-09-03 16:32:08 +08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
[arthas@56963]$ vmoption
|
|
|
|
KEY VALUE ORIGIN WRITEABLE
|
|
|
|
---------------------------------------------------------------------------------------------
|
|
|
|
HeapDumpBeforeFullGC false DEFAULT true
|
|
|
|
HeapDumpAfterFullGC false DEFAULT true
|
|
|
|
HeapDumpOnOutOfMemory false DEFAULT true
|
|
|
|
Error
|
|
|
|
HeapDumpPath DEFAULT true
|
|
|
|
CMSAbortablePrecleanW 100 DEFAULT true
|
|
|
|
aitMillis
|
|
|
|
CMSWaitDuration 2000 DEFAULT true
|
|
|
|
CMSTriggerInterval -1 DEFAULT true
|
|
|
|
PrintGC false DEFAULT true
|
|
|
|
PrintGCDetails true MANAGEMENT true
|
|
|
|
PrintGCDateStamps false DEFAULT true
|
|
|
|
PrintGCTimeStamps false DEFAULT true
|
|
|
|
PrintGCID false DEFAULT true
|
|
|
|
PrintClassHistogramBe false DEFAULT true
|
|
|
|
foreFullGC
|
|
|
|
PrintClassHistogramAf false DEFAULT true
|
|
|
|
terFullGC
|
|
|
|
PrintClassHistogram false DEFAULT true
|
|
|
|
MinHeapFreeRatio 0 DEFAULT true
|
|
|
|
MaxHeapFreeRatio 100 DEFAULT true
|
|
|
|
PrintConcurrentLocks false DEFAULT true
|
|
|
|
```
|
|
|
|
|
2022-08-09 18:42:39 +08:00
|
|
|
### 查看指定的 option
|
2019-09-03 16:32:08 +08:00
|
|
|
|
|
|
|
```bash
|
2021-07-22 16:06:40 +08:00
|
|
|
$ vmoption PrintGC
|
|
|
|
KEY VALUE ORIGIN WRITEABLE
|
|
|
|
---------------------------------------------------------------------------------
|
|
|
|
PrintGC false MANAGEMENT true
|
2019-09-03 16:32:08 +08:00
|
|
|
```
|
|
|
|
|
2022-08-09 18:42:39 +08:00
|
|
|
### 更新指定的 option
|
2019-09-03 16:32:08 +08:00
|
|
|
|
|
|
|
```bash
|
2021-07-22 16:06:40 +08:00
|
|
|
$ vmoption PrintGC true
|
|
|
|
Successfully updated the vm option.
|
|
|
|
NAME BEFORE-VALUE AFTER-VALUE
|
|
|
|
------------------------------------
|
|
|
|
PrintGC false true
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ vmoption PrintGCDetails true
|
2019-09-03 16:32:08 +08:00
|
|
|
Successfully updated the vm option.
|
2021-07-22 16:06:40 +08:00
|
|
|
NAME BEFORE-VALUE AFTER-VALUE
|
|
|
|
-------------------------------------------
|
|
|
|
PrintGCDetails false true
|
2019-09-03 16:32:08 +08:00
|
|
|
```
|