update doc

This commit is contained in:
hengyunabc
2022-03-25 21:32:33 +08:00
parent 575d5f3be8
commit 95f207f409
226 changed files with 561 additions and 430 deletions
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>&lt;no title&gt; &mdash; Arthas 3.5.6 文档</title>
<title>&lt;no title&gt; &mdash; Arthas 3.6.0 文档</title>
@@ -72,7 +72,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+63 -31
View File
@@ -16,42 +16,51 @@ options
| save-result | false | 是否打开执行结果存日志功能,打开之后所有命令的运行结果都将保存到`~/logs/arthas-cache/result.log`中 |
| job-timeout | 1d | 异步后台任务的默认超时时间,超过这个时间,任务自动停止;比如设置 1d, 2h, 3m, 25s,分别代表天、小时、分、秒 |
| print-parent-fields | true | 是否打印在parent class里的filed |
| verbose | false | 是否打印更多详细信息 |
| strict | true | 是否启用strict模式 |
### 查看所有的options
```bash
$ options
LEVEL TYPE NAME VALUE SUMMARY DESCRIPTION
--------------------------------------------------------------------------------------------
0 bool unsafe false Option to support This option enables to proxy function
ean system-level class ality of JVM classes. Due to serious
security risk a JVM crash is possibly
be introduced. Do not activate it un
less you are able to manage.
1 bool dump false Option to dump the This option enables the enhanced clas
ean enhanced classes ses to be dumped to external file for
further de-compilation and analysis.
1 bool batch-re-tr true Option to support This options enables to reTransform c
ean ansform batch reTransform lasses with batch mode.
Class
2 bool json-format false Option to support This option enables to format object
ean JSON format of obj output with JSON when -x option selec
ect output ted.
1 bool disable-sub false Option to control This option disable to include sub cl
ean -class include sub class ass when matching class.
when class matchin
g
1 bool save-result false Option to print co This option enables to save each comm
ean mmand's result to and's result to log file, which path
log file is ${user.home}/logs/arthas-cache/res
ult.log.
2 Stri job-timeout 1d Option to job time This option setting job timeout,The u
ng out nit can be d, h, m, s for day, hour,
minute, second. 1d is one day in defa
ult
1 bool print-paren true Option to print al This option enables print files in pa
ean t-fields l fileds in parent rent class, default value true.
class
LEVEL TYPE NAME VALUE SUMMARY DESCRIPTION
-------------------------------------------------------------------------------------------------------
0 boolea unsafe false Option to support sy This option enables to proxy functionality
n stem-level class of JVM classes. Due to serious security r
isk a JVM crash is possibly be introduced.
Do not activate it unless you are able to
manage.
1 boolea dump false Option to dump the e This option enables the enhanced classes t
n nhanced classes o be dumped to external file for further d
e-compilation and analysis.
1 boolea batch-re-tra true Option to support ba This options enables to reTransform classe
n nsform tch reTransform Clas s with batch mode.
s
2 boolea json-format false Option to support JS This option enables to format object outpu
n ON format of object t with JSON when -x option selected.
output
1 boolea disable-sub- false Option to control in This option disable to include sub class w
n class clude sub class when hen matching class.
class matching
1 boolea support-defa true Option to control in This option disable to include default met
n ult-method clude default method hod in interface when matching class.
in interface when c
lass matching
1 boolea save-result false Option to print comm This option enables to save each command's
n and's result to log result to log file, which path is ${user.
file home}/logs/arthas-cache/result.log.
2 String job-timeout 1d Option to job timeou This option setting job timeout,The unit c
t an be d, h, m, s for day, hour, minute, se
cond. 1d is one day in default
1 boolea print-parent true Option to print all This option enables print files in parent
n -fields fileds in parent cla class, default value true.
ss
1 boolea verbose false Option to print verb This option enables print verbose informat
n ose information ion, default value false.
1 boolea strict true Option to strict mod By default, strict mode is true, not allow
n e ed to set object properties. Want to set o
bject properties, execute `options strict
false`
```
@@ -96,3 +105,26 @@ $ watch java.lang.invoke.Invokers callSiteForm
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 61 ms, listenerId: 1
```
### 关闭strict模式,允许在ognl表达式里设置对象属性
> since 3.6.0
对于新用户,在编写ognl表达式时,可能会出现误用。
比如对于`Student`,判断年龄等于18时,可能条件表达式会误写为`target.age=18`,这个表达式实际上是把当前对象的`age`设置为18了。正确的写法是`target.age==18`。
为了防止出现类似上面的误用,Arthas默认启用`strict`模式,在`ognl`表达式里,禁止更新对象的Property或者调用`setter`函数。
以`MathGame`为例,会出现以下的错误提示。
```
$ watch demo.MathGame primeFactors 'target' 'target.illegalArgumentCount=1'
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 206 ms, listenerId: 1
watch failed, condition is: target.illegalArgumentCount=1, express is: target, By default, strict mode is true, not allowed to set object properties. Want to set object properties, execute `options strict false`, visit /Users/admin/logs/arthas/arthas.log for more details.
```
用户如果确定要在`ognl`表达式里更新对象,可以执行`options strict false`,关闭`strict`模式。
* 更多信息参考: https://github.com/alibaba/arthas/issues/2128
+1 -1
View File
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '3.5.6',
VERSION: '3.6.0',
LANGUAGE: 'zh_CN',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>进阶使用 &mdash; Arthas 3.5.6 文档</title>
<title>进阶使用 &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>表达式核心变量 &mdash; Arthas 3.5.6 文档</title>
<title>表达式核心变量 &mdash; Arthas 3.6.0 文档</title>
@@ -72,7 +72,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>以Java Agent的方式启动 &mdash; Arthas 3.5.6 文档</title>
<title>以Java Agent的方式启动 &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Arthas Properties &mdash; Arthas 3.5.6 文档</title>
<title>Arthas Properties &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Arthas3.0的新特性 &mdash; Arthas 3.5.6 文档</title>
<title>Arthas3.0的新特性 &mdash; Arthas 3.6.0 文档</title>
@@ -72,7 +72,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Arthas 3.0新特性介绍 &mdash; Arthas 3.5.6 文档</title>
<title>Arthas 3.0新特性介绍 &mdash; Arthas 3.6.0 文档</title>
@@ -72,7 +72,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Arthas后台异步任务 &mdash; Arthas 3.5.6 文档</title>
<title>Arthas后台异步任务 &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>auth &mdash; Arthas 3.5.6 文档</title>
<title>auth &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>base64 &mdash; Arthas 3.5.6 文档</title>
<title>base64 &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>批处理功能 &mdash; Arthas 3.5.6 文档</title>
<title>批处理功能 &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>cat &mdash; Arthas 3.5.6 文档</title>
<title>cat &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>classloader &mdash; Arthas 3.5.6 文档</title>
<title>classloader &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>cls &mdash; Arthas 3.5.6 文档</title>
<title>cls &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>命令列表 &mdash; Arthas 3.5.6 文档</title>
<title>命令列表 &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>联系我们 &mdash; Arthas 3.5.6 文档</title>
<title>联系我们 &mdash; Arthas 3.6.0 文档</title>
@@ -73,7 +73,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>dashboard &mdash; Arthas 3.5.6 文档</title>
<title>dashboard &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Docker &mdash; Arthas 3.5.6 文档</title>
<title>Docker &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>下载 &mdash; Arthas 3.5.6 文档</title>
<title>下载 &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>dump &mdash; Arthas 3.5.6 文档</title>
<title>dump &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>echo &mdash; Arthas 3.5.6 文档</title>
<title>echo &mdash; Arthas 3.6.0 文档</title>
@@ -74,7 +74,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+1 -1
View File
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 20cef68d6d8ef26763caeb64247d3070
config: 28bddd0f1f169a517644caa143d60952
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>&lt;no title&gt; &mdash; Arthas 3.5.6 documentation</title>
<title>&lt;no title&gt; &mdash; Arthas 3.6.0 documentation</title>
@@ -71,7 +71,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+65 -37
View File
@@ -15,47 +15,51 @@ options
| support-default-method | true | whether to enable matching default method in interface. The default value is `true`. Refer to [#1105](https://github.com/alibaba/arthas/issues/1105) |
| save-result | false | whether to save execution result. All execution results will be saved to `~/logs/arthas-cache/result.log` when it's turned on|
| job-timeout | 1d | default timeout for background jobs. Background job will be terminated once it's timed out (i.e. 1d, 2h, 3m, 25s)| print-parent-fields | true | This option enables print files in parent class, default value true.|
| verbose | false | This option enables print verbose information|
| strict | true | whether to enable strict mode |
### View all options
```bash
$ options
LEVEL TYPE NAME VALUE SUMMARY DESCRIPTION
--------------------------------------------------------------------------------------------
0 bool unsafe false Option to support This option enables to proxy function
ean system-level class ality of JVM classes. Due to serious
security risk a JVM crash is possibly
be introduced. Do not activate it un
less you are able to manage.
1 bool dump false Option to dump the This option enables the enhanced clas
ean enhanced classes ses to be dumped to external file for
further de-compilation and analysis.
1 bool batch-re-tr true Option to support This options enables to reTransform c
ean ansform batch reTransform lasses with batch mode.
Class
2 bool json-format false Option to support This option enables to format object
ean JSON format of obj output with JSON when -x option selec
ect output ted.
1 bool disable-sub false Option to control This option disable to include sub cl
ean -class include sub class ass when matching class.
when class matchin
g
1 bool debug-for-a false Option to print DE This option enables to print DEBUG me
ean sm BUG message if ASM ssage of ASM for each method invocati
is involved on.
1 bool save-result false Option to print co This option enables to save each comm
ean mmand's result to and's result to log file, which path
log file is ${user.home}/logs/arthas-cache/res
ult.log.
2 Stri job-timeout 1d Option to job time This option setting job timeout,The u
ng out nit can be d, h, m, s for day, hour,
minute, second. 1d is one day in defa
ult
1 bool print-paren true Option to print al This option enables print files in pa
ean t-fields l fileds in parent rent class, default value true.
class
LEVEL TYPE NAME VALUE SUMMARY DESCRIPTION
-------------------------------------------------------------------------------------------------------
0 boolea unsafe false Option to support sy This option enables to proxy functionality
n stem-level class of JVM classes. Due to serious security r
isk a JVM crash is possibly be introduced.
Do not activate it unless you are able to
manage.
1 boolea dump false Option to dump the e This option enables the enhanced classes t
n nhanced classes o be dumped to external file for further d
e-compilation and analysis.
1 boolea batch-re-tra true Option to support ba This options enables to reTransform classe
n nsform tch reTransform Clas s with batch mode.
s
2 boolea json-format false Option to support JS This option enables to format object outpu
n ON format of object t with JSON when -x option selected.
output
1 boolea disable-sub- false Option to control in This option disable to include sub class w
n class clude sub class when hen matching class.
class matching
1 boolea support-defa true Option to control in This option disable to include default met
n ult-method clude default method hod in interface when matching class.
in interface when c
lass matching
1 boolea save-result false Option to print comm This option enables to save each command's
n and's result to log result to log file, which path is ${user.
file home}/logs/arthas-cache/result.log.
2 String job-timeout 1d Option to job timeou This option setting job timeout,The unit c
t an be d, h, m, s for day, hour, minute, se
cond. 1d is one day in default
1 boolea print-parent true Option to print all This option enables print files in parent
n -fields fileds in parent cla class, default value true.
ss
1 boolea verbose false Option to print verb This option enables print verbose informat
n ose information ion, default value false.
1 boolea strict true Option to strict mod By default, strict mode is true, not allow
n e ed to set object properties. Want to set o
bject properties, execute `options strict
false`
```
@@ -99,4 +103,28 @@ $ options unsafe true
$ watch java.lang.invoke.Invokers callSiteForm
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 61 ms, listenerId: 1
```
```
### Turn off strict mode, allow setting object properties in ognl expressions
> since 3.6.0
For new users, there may be misuses when writing ognl expressions.
For example, for `Student`, when judging the age is equal to 18, the conditional expression may be mistakenly written as `target.age=18`, which actually sets the `age` of the current object to 18. The correct spelling is `target.age==18`.
In order to prevent misuse like the above, Arthas enables `strict` mode by default, in `ognl` expressions, it is forbidden to update the property of the object or call the `setter` method.
Take `MathGame` as an example, the following error message will appear.
```
$ watch demo.MathGame primeFactors 'target' 'target.illegalArgumentCount=1'
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 1) cost in 206 ms, listenerId: 1
watch failed, condition is: target.illegalArgumentCount=1, express is: target, By default, strict mode is true, not allowed to set object properties. Want to set object properties, execute `options strict false`, visit /Users/admin/logs/arthas/arthas.log for more details.
```
If the user want to change the object properties in the `ognl` expression, you can execute `options strict false` to turn off the `strict` mode.
* For more information, please refer to: https://github.com/alibaba/arthas/issues/2128
+1 -1
View File
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '3.5.6',
VERSION: '3.6.0',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Advanced Usage &mdash; Arthas 3.5.6 documentation</title>
<title>Advanced Usage &mdash; Arthas 3.6.0 documentation</title>
@@ -73,7 +73,7 @@
<div class="version">
3.5.6
3.6.0
</div>
+2 -2
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fundamental Fields in Expressions &mdash; Arthas 3.5.6 documentation</title>
<title>Fundamental Fields in Expressions &mdash; Arthas 3.6.0 documentation</title>
@@ -73,7 +73,7 @@
<div class="version">
3.5.6
3.6.0
</div>

Some files were not shown because too many files have changed in this diff Show More