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.
62 lines
17 KiB
JavaScript
62 lines
17 KiB
JavaScript
import{_ as t,o as l,c as o,a as e,b as a,e as n,d as i,r as d}from"./app.5024572d.js";const c={},r=e("h1",{id:"options",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#options","aria-hidden":"true"},"#"),n(" options")],-1),u={href:"https://arthas.aliyun.com/doc/arthas-tutorials.html?language=cn&id=command-options",target:"_blank",rel:"noopener noreferrer"},p=e("code",null,"options",-1),b=n("\u5728\u7EBF\u6559\u7A0B"),m=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"\u63D0\u793A"),e("p",null,"\u5168\u5C40\u5F00\u5173")],-1),v=e("thead",null,[e("tr",null,[e("th",null,"\u540D\u79F0"),e("th",null,"\u9ED8\u8BA4\u503C"),e("th",null,"\u63CF\u8FF0")])],-1),h=e("tr",null,[e("td",null,"unsafe"),e("td",null,"false"),e("td",null,"\u662F\u5426\u652F\u6301\u5BF9\u7CFB\u7EDF\u7EA7\u522B\u7684\u7C7B\u8FDB\u884C\u589E\u5F3A\uFF0C\u6253\u5F00\u8BE5\u5F00\u5173\u53EF\u80FD\u5BFC\u81F4\u628A JVM \u641E\u6302\uFF0C\u8BF7\u614E\u91CD\u9009\u62E9\uFF01")],-1),f=e("tr",null,[e("td",null,"dump"),e("td",null,"false"),e("td",null,[n("\u662F\u5426\u652F\u6301\u88AB\u589E\u5F3A\u4E86\u7684\u7C7B dump \u5230\u5916\u90E8\u6587\u4EF6\u4E2D\uFF0C\u5982\u679C\u6253\u5F00\u5F00\u5173\uFF0Cclass \u6587\u4EF6\u4F1A\u88AB dump \u5230"),e("code",null,"/${application working dir}/arthas-class-dump/"),n("\u76EE\u5F55\u4E0B\uFF0C\u5177\u4F53\u4F4D\u7F6E\u8BE6\u89C1\u63A7\u5236\u53F0\u8F93\u51FA")])],-1),k=e("tr",null,[e("td",null,"batch-re-transform"),e("td",null,"true"),e("td",null,"\u662F\u5426\u652F\u6301\u6279\u91CF\u5BF9\u5339\u914D\u5230\u7684\u7C7B\u6267\u884C retransform \u64CD\u4F5C")],-1),g=e("tr",null,[e("td",null,"json-format"),e("td",null,"false"),e("td",null,"\u662F\u5426\u652F\u6301 json \u5316\u7684\u8F93\u51FA")],-1),_=e("tr",null,[e("td",null,"disable-sub-class"),e("td",null,"false"),e("td",null,"\u662F\u5426\u7981\u7528\u5B50\u7C7B\u5339\u914D\uFF0C\u9ED8\u8BA4\u5728\u5339\u914D\u76EE\u6807\u7C7B\u7684\u65F6\u5019\u4F1A\u9ED8\u8BA4\u5339\u914D\u5230\u5176\u5B50\u7C7B\uFF0C\u5982\u679C\u60F3\u7CBE\u786E\u5339\u914D\uFF0C\u53EF\u4EE5\u5173\u95ED\u6B64\u5F00\u5173")],-1),x=e("td",null,"support-default-method",-1),w=e("td",null,"true",-1),E=n("\u662F\u5426\u652F\u6301\u5339\u914D\u5230 default method\uFF0C \u9ED8\u8BA4\u4F1A\u67E5\u627E interface\uFF0C\u5339\u914D\u91CC\u9762\u7684 default method\u3002\u53C2\u8003 "),j={href:"https://github.com/alibaba/arthas/issues/1105",target:"_blank",rel:"noopener noreferrer"},y=n("#1105"),T=e("tr",null,[e("td",null,"save-result"),e("td",null,"false"),e("td",null,[n("\u662F\u5426\u6253\u5F00\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7\u529F\u80FD\uFF0C\u6253\u5F00\u4E4B\u540E\u6240\u6709\u547D\u4EE4\u7684\u8FD0\u884C\u7ED3\u679C\u90FD\u5C06\u4FDD\u5B58\u5230"),e("code",null,"~/logs/arthas-cache/result.log"),n("\u4E2D")])],-1),O=e("tr",null,[e("td",null,"job-timeout"),e("td",null,"1d"),e("td",null,"\u5F02\u6B65\u540E\u53F0\u4EFB\u52A1\u7684\u9ED8\u8BA4\u8D85\u65F6\u65F6\u95F4\uFF0C\u8D85\u8FC7\u8FD9\u4E2A\u65F6\u95F4\uFF0C\u4EFB\u52A1\u81EA\u52A8\u505C\u6B62\uFF1B\u6BD4\u5982\u8BBE\u7F6E 1d, 2h, 3m, 25s\uFF0C\u5206\u522B\u4EE3\u8868\u5929\u3001\u5C0F\u65F6\u3001\u5206\u3001\u79D2")],-1),A=e("tr",null,[e("td",null,"print-parent-fields"),e("td",null,"true"),e("td",null,"\u662F\u5426\u6253\u5370\u5728 parent class \u91CC\u7684 filed")],-1),V=e("tr",null,[e("td",null,"verbose"),e("td",null,"false"),e("td",null,"\u662F\u5426\u6253\u5370\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F")],-1),N=e("tr",null,[e("td",null,"strict"),e("td",null,"true"),e("td",null,"\u662F\u5426\u542F\u7528 strict \u6A21\u5F0F")],-1),M=i(`<h2 id="\u67E5\u770B\u6240\u6709\u7684-options" tabindex="-1"><a class="header-anchor" href="#\u67E5\u770B\u6240\u6709\u7684-options" aria-hidden="true">#</a> \u67E5\u770B\u6240\u6709\u7684 options</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ options
|
|
LEVEL TYPE NAME VALUE SUMMARY DESCRIPTION
|
|
-------------------------------------------------------------------------------------------------------
|
|
<span class="token number">0</span> boolea unsafe <span class="token boolean">false</span> 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.
|
|
<span class="token number">1</span> boolea dump <span class="token boolean">false</span> Option to dump the e This option enables the enhanced classes t
|
|
n nhanced classes o be dumped to external <span class="token function">file</span> <span class="token keyword">for</span> further d
|
|
e-compilation and analysis.
|
|
<span class="token number">1</span> boolea batch-re-tra <span class="token boolean">true</span> Option to support ba This options enables to reTransform classe
|
|
n nsform tch reTransform Clas s with batch mode.
|
|
s
|
|
<span class="token number">2</span> boolea json-format <span class="token boolean">false</span> Option to support JS This option enables to <span class="token function">format</span> object outpu
|
|
n ON <span class="token function">format</span> of object t with JSON when <span class="token parameter variable">-x</span> option selected.
|
|
output
|
|
<span class="token number">1</span> boolea disable-sub- <span class="token boolean">false</span> Option to control <span class="token keyword">in</span> This option disable to include sub class w
|
|
n class clude sub class when hen matching class.
|
|
class matching
|
|
<span class="token number">1</span> boolea support-defa <span class="token boolean">true</span> Option to control <span class="token keyword">in</span> This option disable to include default met
|
|
n ult-method clude default method hod <span class="token keyword">in</span> interface when matching class.
|
|
<span class="token keyword">in</span> interface when c
|
|
lass matching
|
|
<span class="token number">1</span> boolea save-result <span class="token boolean">false</span> Option to print <span class="token function">comm</span> This option enables to save each <span class="token builtin class-name">command</span><span class="token string">'s
|
|
n and'</span>s result to log result to log file, <span class="token function">which</span> path is <span class="token variable">\${user.
|
|
file home}</span>/logs/arthas-cache/result.log.
|
|
<span class="token number">2</span> String job-timeout 1d Option to job timeou This option setting job timeout,The unit c
|
|
t an be d, h, m, s <span class="token keyword">for</span> day, hour, minute, se
|
|
cond. 1d is one day <span class="token keyword">in</span> default
|
|
<span class="token number">1</span> boolea print-parent <span class="token boolean">true</span> Option to print all This option enables print files <span class="token keyword">in</span> parent
|
|
n <span class="token parameter variable">-fields</span> fileds <span class="token keyword">in</span> parent cla class, default value true.
|
|
ss
|
|
<span class="token number">1</span> boolea verbose <span class="token boolean">false</span> Option to print verb This option enables print verbose informat
|
|
n ose information ion, default value false.
|
|
<span class="token number">1</span> boolea strict <span class="token boolean">true</span> Option to strict mod By default, strict mode is true, not allow
|
|
n e ed to <span class="token builtin class-name">set</span> object properties. Want to <span class="token builtin class-name">set</span> o
|
|
bject properties, execute <span class="token variable"><span class="token variable">\`</span>options strict
|
|
<span class="token boolean">false</span><span class="token variable">\`</span></span>
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="\u83B7\u53D6-option-\u7684\u503C" tabindex="-1"><a class="header-anchor" href="#\u83B7\u53D6-option-\u7684\u503C" aria-hidden="true">#</a> \u83B7\u53D6 option \u7684\u503C</h2><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ options json-format
|
|
LEVEL TYPE NAME VALUE SUMMARY DESCRIPTION
|
|
--------------------------------------------------------------------------------------------
|
|
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.
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>\u9ED8\u8BA4\u60C5\u51B5\u4E0B<code>json-format</code>\u4E3A false\uFF0C\u5982\u679C\u5E0C\u671B<code>watch</code>/<code>tt</code>\u7B49\u547D\u4EE4\u7ED3\u679C\u4EE5 json \u683C\u5F0F\u8F93\u51FA\uFF0C\u5219\u53EF\u4EE5\u8BBE\u7F6E<code>json-format</code>\u4E3A true\u3002</p></div><h2 id="\u8BBE\u7F6E\u6307\u5B9A\u7684-option" tabindex="-1"><a class="header-anchor" href="#\u8BBE\u7F6E\u6307\u5B9A\u7684-option" aria-hidden="true">#</a> \u8BBE\u7F6E\u6307\u5B9A\u7684 option</h2><p>\u4F8B\u5982\uFF0C\u60F3\u6253\u5F00\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7\u529F\u80FD\uFF0C\u8F93\u5165\u5982\u4E0B\u547D\u4EE4\u5373\u53EF\uFF1A</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ options save-result true
|
|
NAME BEFORE-VALUE AFTER-VALUE
|
|
----------------------------------------
|
|
save-result false true
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="\u6253\u5F00-unsafe-\u5F00\u5173-\u652F\u6301-jdk-package-\u4E0B\u7684\u7C7B" tabindex="-1"><a class="header-anchor" href="#\u6253\u5F00-unsafe-\u5F00\u5173-\u652F\u6301-jdk-package-\u4E0B\u7684\u7C7B" aria-hidden="true">#</a> \u6253\u5F00 unsafe \u5F00\u5173\uFF0C\u652F\u6301 jdk package \u4E0B\u7684\u7C7B</h2><p>\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C<code>watch</code>/<code>trace</code>/<code>tt</code>/<code>trace</code>/<code>monitor</code>\u7B49\u547D\u4EE4\u4E0D\u652F\u6301<code>java.*</code> package \u4E0B\u7684\u7C7B\u3002\u53EF\u4EE5\u8BBE\u7F6E<code>unsafe</code>\u4E3A true\uFF0C\u5219\u53EF\u4EE5\u589E\u5F3A\u3002</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ options unsafe <span class="token boolean">true</span>
|
|
NAME BEFORE-VALUE AFTER-VALUE
|
|
-----------------------------------
|
|
unsafe <span class="token boolean">false</span> <span class="token boolean">true</span>
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">watch</span> java.lang.invoke.Invokers callSiteForm
|
|
Press Q or Ctrl+C to abort.
|
|
Affect<span class="token punctuation">(</span>class count: <span class="token number">1</span> , method count: <span class="token number">1</span><span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">61</span> ms, listenerId: <span class="token number">1</span>
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="\u5173\u95ED-strict-\u6A21\u5F0F-\u5141\u8BB8\u5728-ognl-\u8868\u8FBE\u5F0F\u91CC\u8BBE\u7F6E\u5BF9\u8C61\u5C5E\u6027" tabindex="-1"><a class="header-anchor" href="#\u5173\u95ED-strict-\u6A21\u5F0F-\u5141\u8BB8\u5728-ognl-\u8868\u8FBE\u5F0F\u91CC\u8BBE\u7F6E\u5BF9\u8C61\u5C5E\u6027" aria-hidden="true">#</a> \u5173\u95ED strict \u6A21\u5F0F\uFF0C\u5141\u8BB8\u5728 ognl \u8868\u8FBE\u5F0F\u91CC\u8BBE\u7F6E\u5BF9\u8C61\u5C5E\u6027</h2><div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>since 3.6.0</p></div><p>\u5BF9\u4E8E\u65B0\u7528\u6237\uFF0C\u5728\u7F16\u5199 ognl \u8868\u8FBE\u5F0F\u65F6\uFF0C\u53EF\u80FD\u4F1A\u51FA\u73B0\u8BEF\u7528\u3002</p><p>\u6BD4\u5982\u5BF9\u4E8E<code>Student</code>\uFF0C\u5224\u65AD\u5E74\u9F84\u7B49\u4E8E 18 \u65F6\uFF0C\u53EF\u80FD\u6761\u4EF6\u8868\u8FBE\u5F0F\u4F1A\u8BEF\u5199\u4E3A<code>target.age=18</code>\uFF0C\u8FD9\u4E2A\u8868\u8FBE\u5F0F\u5B9E\u9645\u4E0A\u662F\u628A\u5F53\u524D\u5BF9\u8C61\u7684<code>age</code>\u8BBE\u7F6E\u4E3A 18 \u4E86\u3002\u6B63\u786E\u7684\u5199\u6CD5\u662F<code>target.age==18</code>\u3002</p><p>\u4E3A\u4E86\u9632\u6B62\u51FA\u73B0\u7C7B\u4F3C\u4E0A\u9762\u7684\u8BEF\u7528\uFF0CArthas \u9ED8\u8BA4\u542F\u7528<code>strict</code>\u6A21\u5F0F\uFF0C\u5728<code>ognl</code>\u8868\u8FBE\u5F0F\u91CC\uFF0C\u7981\u6B62\u66F4\u65B0\u5BF9\u8C61\u7684 Property \u6216\u8005\u8C03\u7528<code>setter</code>\u51FD\u6570\u3002</p><p>\u4EE5<code>MathGame</code>\u4E3A\u4F8B\uFF0C\u4F1A\u51FA\u73B0\u4EE5\u4E0B\u7684\u9519\u8BEF\u63D0\u793A\u3002</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ 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.
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>\u7528\u6237\u5982\u679C\u786E\u5B9A\u8981\u5728<code>ognl</code>\u8868\u8FBE\u5F0F\u91CC\u66F4\u65B0\u5BF9\u8C61\uFF0C\u53EF\u4EE5\u6267\u884C<code>options strict false</code>\uFF0C\u5173\u95ED<code>strict</code>\u6A21\u5F0F\u3002</p><ul><li>\u66F4\u591A\u4FE1\u606F\u53C2\u8003\uFF1A https://github.com/alibaba/arthas/issues/2128</li></ul>`,21);function L(S,C){const s=d("ExternalLinkIcon");return l(),o("div",null,[r,e("p",null,[e("a",u,[p,b,a(s)])]),m,e("table",null,[v,e("tbody",null,[h,f,k,g,_,e("tr",null,[x,w,e("td",null,[E,e("a",j,[y,a(s)])])]),T,O,A,V,N])]),M])}const U=t(c,[["render",L],["__file","options.html.vue"]]);export{U as default};
|