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.
50 lines
15 KiB
JavaScript
50 lines
15 KiB
JavaScript
import{_ as r,o as i,c as t,a as e,b as d,d as a,e as s,r as l}from"./app.5024572d.js";const o={},c=a(`<h3 id="arthas3-0-\u7684\u65B0\u7279\u6027" tabindex="-1"><a class="header-anchor" href="#arthas3-0-\u7684\u65B0\u7279\u6027" aria-hidden="true">#</a> Arthas3.0 \u7684\u65B0\u7279\u6027</h3><h4 id="\u5728\u7EBF\u8BCA\u65AD\u529F\u80FD" tabindex="-1"><a class="header-anchor" href="#\u5728\u7EBF\u8BCA\u65AD\u529F\u80FD" aria-hidden="true">#</a> \u5728\u7EBF\u8BCA\u65AD\u529F\u80FD</h4><p>Arthas3.0 \u4E2D\u6700\u91CD\u8981\u7684\u7279\u6027\uFF0C\u4E0D\u9700\u8981\u767B\u9646\u673A\u5668\u5C31\u53EF\u4EE5\u5BF9\u5E94\u7528\u8FDB\u884C\u8BCA\u65AD\uFF0C\u4F53\u9A8C\u548C\u672C\u5730\u8BCA\u65AD\u5B8C\u5168\u4E00\u81F4</p><h5 id="\u4F7F\u7528\u6B65\u9AA4" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528\u6B65\u9AA4" aria-hidden="true">#</a> \u4F7F\u7528\u6B65\u9AA4</h5><p>TODO</p><h5 id="\u52A8\u56FE\u6F14\u793A" tabindex="-1"><a class="header-anchor" href="#\u52A8\u56FE\u6F14\u793A" aria-hidden="true">#</a> \u52A8\u56FE\u6F14\u793A</h5><p>TODO</p><h4 id="\u7BA1\u9053\u652F\u6301" tabindex="-1"><a class="header-anchor" href="#\u7BA1\u9053\u652F\u6301" aria-hidden="true">#</a> \u7BA1\u9053\u652F\u6301</h4><p>Arthas 3.0 \u5F00\u59CB\u652F\u6301\u7BA1\u9053, \u7387\u5148\u63D0\u4F9B\u4E86<code>grep</code>,<code>wc</code>,<code>plaintext</code>\u7684\u652F\u6301\u3002</p><h3 id="\u53BB-groovy-\u4F9D\u8D56" tabindex="-1"><a class="header-anchor" href="#\u53BB-groovy-\u4F9D\u8D56" aria-hidden="true">#</a> \u53BB groovy \u4F9D\u8D56</h3><p>groovy \u8868\u8FBE\u5F0F\u5728 arthas2.0 \u4E2D\u5927\u91CF\u4F7F\u7528\uFF0C\u4F8B\u5982 watch \u8868\u8FBE\u5F0F</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">watch</span> com.alibaba.sample.petstore.web.store.module.screen.ItemList <span class="token function">add</span> <span class="token string">"params + ' ' + returnObj"</span> params.size<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">==</span><span class="token number">2</span>
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u5176\u4E2D<code>"params + ' ' + returnObj"</code>\u4EE5\u53CA<code>params.size()==2</code>\u80CC\u540E\u5176\u5B9E\u90FD\u4F7F\u7528\u4E86 groovy \u6765\u8FDB\u884C\u8868\u8FBE\u5F0F\u6C42\u503C\uFF0C\u5982\u679C\u53CD\u590D\u5927\u91CF\u7684\u8FD0\u884C\u8FD9\u4E9B\u8868\u8FBE\u5F0F\uFF0Cgroovy \u4F1A\u521B\u5EFA\u5927\u91CF\u7684 classloader\uFF0C\u6253\u6EE1 perm \u533A\u4ECE\u800C\u89E6\u53D1 FGC\u3002</p><p>\u4E3A\u4E86\u907F\u514D\u8FD9\u4E2A\u95EE\u9898\uFF0CArthas 3.0 \u4E2D\u4F7F\u7528\u4E86 ognl \u8FD9\u4E2A\u66F4\u52A0\u8F7B\u91CF\u7684\u8868\u8FBE\u5F0F\u6C42\u503C\u5E93\u6765\u4EE3\u66FF groovy\uFF0C\u5F7B\u5E95\u89E3\u51B3\u4E86 groovy \u5F15\u8D77\u7684 FGC \u98CE\u9669\u3002\u4F46\u7531\u4E8E\u8FD9\u4E2A\u66FF\u6362\uFF0C\u5BFC\u81F4\u539F\u6765\u4F7F\u7528 groovy \u811A\u672C\u7F16\u5199\u7684\u81EA\u5B9A\u4E49\u811A\u672C\u5931\u6548\u3002\u8FD9\u4E2A\u95EE\u9898\u7559\u5F85\u540E\u7EED\u89E3\u51B3\u3002</p>`,14),v=s("\u5728 3.0 \u4E2D\uFF0Cwatch \u547D\u4EE4\u7684\u8868\u8FBE\u5F0F\u90E8\u5206\u7684\u4E66\u5199\u6709\u4E86\u4E00\u4E9B\u6539\u53D8\uFF0C\u8BE6\u89C1"),u={href:"https://arthas.aliyun.com/doc/watch",target:"_blank",rel:"noopener noreferrer"},m=s("\u8FD9\u91CC"),h=a(`<h4 id="\u63D0\u5347-rt-\u7EDF\u8BA1\u7CBE\u5EA6" tabindex="-1"><a class="header-anchor" href="#\u63D0\u5347-rt-\u7EDF\u8BA1\u7CBE\u5EA6" aria-hidden="true">#</a> \u63D0\u5347 rt \u7EDF\u8BA1\u7CBE\u5EA6</h4><p>Arthas 2.0 \u4E2D\uFF0C\u7EDF\u8BA1 rt \u90FD\u662F\u4EE5<code>ms</code>\u4E3A\u5355\u4F4D\uFF0C\u5BF9\u4E8E\u67D0\u4E9B\u6BD4\u8F83\u5C0F\u7684\u65B9\u6CD5\u8C03\u7528\uFF0C\u8017\u65F6\u5728\u6BEB\u79D2\u4EE5\u4E0B\u7684\u90FD\u4F1A\u88AB\u8BA4\u4E3A\u662F 0ms\uFF0C\u9020\u6210 trace \u603B\u65F6\u95F4\u548C\u5404\u65B9\u6CD5\u7684\u65F6\u95F4\u76F8\u52A0\u4E0D\u4E00\u81F4\u7B49\u95EE\u9898\uFF08\u867D\u7136\u8FD9\u91CC\u9762\u786E\u5B9E\u4F1A\u6709\u8BEF\u5DEE\uFF0C\u4E3B\u8981 Arthas \u81EA\u8EAB\u7684\u5F00\u9500\uFF09\u3002Arthas 3.0 \u4E2D\u6240\u6709 rt \u7684\u5355\u4F4D\u7EDF\u4E00\u6539\u4E3A\u4F7F\u7528<code>ns</code>\u6765\u7EDF\u8BA1\uFF0C\u7CBE\u51C6\u6355\u83B7\u4F60\u7684\u65B9\u6CD5\u8017\u65F6\uFF0C\u8BA9 0ms \u8FD9\u6837\u65E0\u610F\u4E49\u7684\u7EDF\u8BA1\u6570\u636E\u4E0D\u518D\u51FA\u73B0\uFF01</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ tt -l
|
|
INDEX TIMESTAMP COST(ms) IS-RET IS-EXP OBJECT CLASS METHOD
|
|
------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
1000 2017-02-24 10:56:46 808.743525 true false 0x3bd5e918 TestTraceServlet doGet
|
|
1001 2017-02-24 10:56:55 805.799155 true false 0x3bd5e918 TestTraceServlet doGet
|
|
1002 2017-02-24 10:57:04 808.026935 true false 0x3bd5e918 TestTraceServlet doGet
|
|
1003 2017-02-24 10:57:22 805.036963 true false 0x3bd5e918 TestTraceServlet doGet
|
|
1004 2017-02-24 10:57:24 803.581886 true false 0x3bd5e918 TestTraceServlet doGet
|
|
1005 2017-02-24 10:57:39 814.657657 true false 0x3bd5e918 TestTraceServlet doGet
|
|
</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></div><h4 id="watch-stack-trace-\u547D\u4EE4\u652F\u6301\u6309\u8017\u65F6\u8FC7\u6EE4" tabindex="-1"><a class="header-anchor" href="#watch-stack-trace-\u547D\u4EE4\u652F\u6301\u6309\u8017\u65F6\u8FC7\u6EE4" aria-hidden="true">#</a> watch/stack/trace \u547D\u4EE4\u652F\u6301\u6309\u8017\u65F6\u8FC7\u6EE4</h4><p>\u6211\u4EEC\u5728 trace \u7684\u65F6\u5019\uFF0C\u7ECF\u5E38\u4F1A\u51FA\u73B0\u67D0\u4E2A\u65B9\u6CD5\u95F4\u9699\u6027\u7684 rt \u98D9\u9AD8\uFF0C\u4F46\u662F\u6211\u4EEC\u53EA\u60F3\u77E5\u9053 rt \u9AD8\u7684\u65F6\u5019\uFF0C\u662F\u54EA\u91CC\u6162\u4E86\uFF0C\u5BF9\u4E8E\u6B63\u5E38 rt \u7684\u65B9\u6CD5\u6211\u4EEC\u5E76\u4E0D\u5173\u5FC3\uFF0CArthas 3.0 \u652F\u6301\u4E86\u6309<code>#cost</code>(\u65B9\u6CD5\u6267\u884C\u8017\u65F6,\u5355\u4F4D\u4E3A<code>ms</code>)\u8FDB\u884C\u8FC7\u6EE4\uFF0C\u53EA\u8F93\u51FA\u7B26\u5408\u6761\u4EF6\u7684 trace \u8DEF\u5F84\uFF0C\u76EE\u524D\uFF0C\u8FD9\u4E09\u4E2A\u547D\u4EE4\u7684\u76F8\u5173\u6587\u6863\u5DF2\u7ECF\u505A\u4E86\u66F4\u65B0\uFF0C\u589E\u52A0\u4E86\u8BE5\u7528\u6CD5\u7684\u793A\u4F8B\u3002</p><h4 id="sysprop-\u547D\u4EE4\u64CD\u4F5C-systemproperty" tabindex="-1"><a class="header-anchor" href="#sysprop-\u547D\u4EE4\u64CD\u4F5C-systemproperty" aria-hidden="true">#</a> sysprop \u547D\u4EE4\u64CD\u4F5C SystemProperty</h4><p>sysprop \u547D\u4EE4\u652F\u6301\u67E5\u770B\u6240\u6709\u7684\u7CFB\u7EDF\u5C5E\u6027\uFF0C\u4EE5\u53CA\u9488\u5BF9\u7279\u5B9A\u5C5E\u6027\u8FDB\u884C\u67E5\u770B\u548C\u4FEE\u6539\u3002</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ sysprop
|
|
...
|
|
os.arch x86_64
|
|
java.ext.dirs /Users/wangtao/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.
|
|
8.0_51.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library
|
|
/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
|
|
user.dir /Users/wangtao/work/ali-tomcat-home/ant-develop/output/build
|
|
catalina.vendor alibaba
|
|
line.separator
|
|
|
|
java.vm.name Java HotSpot(TM) 64-Bit Server VM
|
|
file.encoding UTF-8
|
|
org.apache.tomcat.util.http.ServerCookie.ALLOW_EQUA true
|
|
LS_IN_VALUE
|
|
com.taobao.tomcat.info Apache Tomcat/7.0.70.1548
|
|
java.specification.version 1.8
|
|
$ sysprop java.version
|
|
java.version=1.8.0_51
|
|
$ sysprop production.mode true
|
|
Successfully changed the system property.
|
|
production.mode=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 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><h4 id="thread-\u547D\u4EE4\u652F\u6301\u6307\u5B9A\u91C7\u6837\u65F6\u95F4" tabindex="-1"><a class="header-anchor" href="#thread-\u547D\u4EE4\u652F\u6301\u6307\u5B9A\u91C7\u6837\u65F6\u95F4" aria-hidden="true">#</a> thread \u547D\u4EE4\u652F\u6301\u6307\u5B9A\u91C7\u6837\u65F6\u95F4</h4><p>thread \u547D\u4EE4\u8BA1\u7B97\u7EBF\u7A0B cpu \u5360\u7528\u7684\u903B\u8F91\uFF0C\u9ED8\u8BA4\u662F\u91C7\u6837 100ms \u5185\u5404\u4E2A\u7EBF\u7A0B\u7684 cpu \u4F7F\u7528\u60C5\u51B5\u5E76\u8BA1\u7B97 cpu \u6D88\u8017\u5360\u6BD4\u3002\u6709\u65F6\u5019 100ms \u7684\u65F6\u95F4\u95F4\u9694\u592A\u77ED\uFF0C\u770B\u4E0D\u51FA\u95EE\u9898\u6240\u5728\uFF0CArthas3.0 \u4E2D thread \u547D\u4EE4\u652F\u6301\u8BBE\u7F6E\u91C7\u6837\u95F4\u9694(\u4EE5<code>ms</code>\u4E3A\u5355\u4F4D)\uFF0C\u53EF\u4EE5\u89C2\u5BDF\u4EFB\u610F\u65F6\u95F4\u6BB5\u5185\u7684 cpu \u6D88\u8017\u5360\u6BD4\u60C5\u51B5\u3002</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ thread -i 1000
|
|
Threads Total: 74, NEW: 0, RUNNABLE: 17, BLOCKED: 0, WAITING: 15, TIMED_WAITING: 42, TERMINATED: 0
|
|
ID NAME GROUP PRIORITY STATE %CPU TIME INTERRUPTED DAEMON
|
|
78 com.taobao.config.client.timer main 5 TIMED_WAITING 22 0:0 false true
|
|
92 Abandoned connection cleanup thread main 5 TIMED_WAITING 15 0:2 false true
|
|
361 as-command-execute-daemon system 10 RUNNABLE 14 0:0 false true
|
|
67 HSF-Remoting-Timer-10-thread-1 main 10 TIMED_WAITING 12 0:2 false true
|
|
113 JamScheduleThread system 9 TIMED_WAITING 2 0:0 false true
|
|
14 Thread-3 main 5 RUNNABLE 2 0:0 false false
|
|
81 com.taobao.remoting.TimerThread main 5 TIMED_WAITING 2 0:0 false true
|
|
104 http-bio-7001-AsyncTimeout main 5 TIMED_WAITING 2 0:0 false true
|
|
123 nioEventLoopGroup-2-1 system 10 RUNNABLE 2 0:0 false false
|
|
127 nioEventLoopGroup-3-2 system 10 RUNNABLE 2 0:0 false false
|
|
345 nioEventLoopGroup-3-3 system 10 RUNNABLE 2 0:0 false false
|
|
358 nioEventLoopGroup-3-4 system 10 RUNNABLE 2 0:0 false false
|
|
27 qos-boss-1-1 main 5 RUNNABLE 2 0:0 false true
|
|
22 EagleEye-AsyncAppender-Thread-BizLog main 5 TIMED_WAITING 1 0:0 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 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><h4 id="trace-\u547D\u4EE4\u81EA\u52A8\u9AD8\u4EAE\u663E\u793A\u6700\u8017\u65F6\u65B9\u6CD5\u8C03\u7528" tabindex="-1"><a class="header-anchor" href="#trace-\u547D\u4EE4\u81EA\u52A8\u9AD8\u4EAE\u663E\u793A\u6700\u8017\u65F6\u65B9\u6CD5\u8C03\u7528" aria-hidden="true">#</a> trace \u547D\u4EE4\u81EA\u52A8\u9AD8\u4EAE\u663E\u793A\u6700\u8017\u65F6\u65B9\u6CD5\u8C03\u7528</h4><p>trace \u547D\u4EE4\u73B0\u5728\u4F1A\u81EA\u52A8\u663E\u793A</p><p>![Untitled2](TODO /Untitled2.gif)</p>`,14);function p(b,T){const n=l("ExternalLinkIcon");return i(),t("div",null,[c,e("p",null,[v,e("a",u,[m,d(n)])]),h])}const E=r(o,[["render",p],["__file","arthas3.html.vue"]]);export{E as default};
|