mirror of https://github.com/alibaba/arthas.git
add 3.x docs
parent
0658c70522
commit
c36d2f10aa
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
import{_ as e,o as c,c as t}from"./app.4d248835.js";const _={};function o(r,n){return c(),t("div")}const a=e(_,[["render",o],["__file","404.html.vue"]]);export{a as default};
|
@ -0,0 +1 @@
|
||||
const t=JSON.parse('{"key":"v-3706649a","path":"/404.html","title":"","lang":"zh-CN","frontmatter":{"layout":"NotFound"},"excerpt":"","headers":[],"git":{},"filePathRelative":null,"version":"3.7.3"}');export{t as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-463d120e","path":"/en/doc/advanced-use.html","title":"Other features","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Arthas Async Jobs","slug":"arthas-async-jobs","link":"#arthas-async-jobs","children":[]},{"level":2,"title":"Log the output","slug":"log-the-output","link":"#log-the-output","children":[]},{"level":2,"title":"Docker","slug":"docker","link":"#docker","children":[]},{"level":2,"title":"Web Console","slug":"web-console","link":"#web-console","children":[]},{"level":2,"title":"Arthas Tunnel","slug":"arthas-tunnel","link":"#arthas-tunnel","children":[]},{"level":2,"title":"How to use ognl","slug":"how-to-use-ognl","link":"#how-to-use-ognl","children":[]},{"level":2,"title":"IDEA Plugin","slug":"idea-plugin","link":"#idea-plugin","children":[]},{"level":2,"title":"Arthas Properties","slug":"arthas-properties","link":"#arthas-properties","children":[]},{"level":2,"title":"Start as a Java Agent","slug":"start-as-a-java-agent","link":"#start-as-a-java-agent","children":[]},{"level":2,"title":"Arthas Spring Boot Starter","slug":"arthas-spring-boot-starter","link":"#arthas-spring-boot-starter","children":[]},{"level":2,"title":"HTTP API","slug":"http-api","link":"#http-api","children":[]},{"level":2,"title":"Batch Processing","slug":"batch-processing","link":"#batch-processing","children":[]},{"level":2,"title":"as3.sh and arthas-boot3 tips","slug":"as3-sh-and-arthas-boot3-tips","link":"#as3-sh-and-arthas-boot3-tips","children":[]},{"level":2,"title":"User data report","slug":"user-data-report","link":"#user-data-report","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":2},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/advanced-use.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-0d09f68d","path":"/doc/advanced-use.html","title":"\u5176\u4ED6\u7279\u6027","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Arthas \u540E\u53F0\u5F02\u6B65\u4EFB\u52A1","slug":"arthas-\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1","link":"#arthas-\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1","children":[]},{"level":2,"title":"\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7","slug":"\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7","link":"#\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7","children":[]},{"level":2,"title":"Docker","slug":"docker","link":"#docker","children":[]},{"level":2,"title":"Web Console","slug":"web-console","link":"#web-console","children":[]},{"level":2,"title":"Arthas Tunnel","slug":"arthas-tunnel","link":"#arthas-tunnel","children":[]},{"level":2,"title":"ognl \u8868\u8FBE\u5F0F\u7528\u6CD5","slug":"ognl-\u8868\u8FBE\u5F0F\u7528\u6CD5","link":"#ognl-\u8868\u8FBE\u5F0F\u7528\u6CD5","children":[]},{"level":2,"title":"IDEA Plugin","slug":"idea-plugin","link":"#idea-plugin","children":[]},{"level":2,"title":"Arthas Properties","slug":"arthas-properties","link":"#arthas-properties","children":[]},{"level":2,"title":"\u4EE5 java agent \u65B9\u5F0F\u542F\u52A8","slug":"\u4EE5-java-agent-\u65B9\u5F0F\u542F\u52A8","link":"#\u4EE5-java-agent-\u65B9\u5F0F\u542F\u52A8","children":[]},{"level":2,"title":"Arthas Spring Boot Starter","slug":"arthas-spring-boot-starter","link":"#arthas-spring-boot-starter","children":[]},{"level":2,"title":"HTTP API","slug":"http-api","link":"#http-api","children":[]},{"level":2,"title":"\u6279\u5904\u7406\u529F\u80FD","slug":"\u6279\u5904\u7406\u529F\u80FD","link":"#\u6279\u5904\u7406\u529F\u80FD","children":[]},{"level":2,"title":"as3.sh \u548C arthas-boot3 \u6280\u5DE7","slug":"as3-sh-\u548C-arthas-boot3-\u6280\u5DE7","link":"#as3-sh-\u548C-arthas-boot3-\u6280\u5DE7","children":[]},{"level":2,"title":"\u7528\u6237\u6570\u636E\u56DE\u62A5","slug":"\u7528\u6237\u6570\u636E\u56DE\u62A5","link":"#\u7528\u6237\u6570\u636E\u56DE\u62A5","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":2},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/advanced-use.md","version":"3.7.3"}');export{e as data};
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,30 @@
|
||||
import{_ as i,o as l,c,a,b as e,w as t,e as s,d,r}from"./app.4d248835.js";const p={},h=a("h1",{id:"other-features",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#other-features","aria-hidden":"true"},"#"),s(" Other features")],-1),u=a("h2",{id:"arthas-async-jobs",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#arthas-async-jobs","aria-hidden":"true"},"#"),s(" Arthas Async Jobs")],-1),b=a("p",null,"If you need to investigate an issue, but you are unsure about the exact time it occurs, you can run the monitoring command in the background and save the output to a log file.",-1),m=s("Arthas Async Jobs"),v=a("h2",{id:"log-the-output",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#log-the-output","aria-hidden":"true"},"#"),s(" Log the output")],-1),_=a("p",null,"All execution records are fully saved in the log file for subsequent analysis.",-1),k=s("log the output"),g=a("h2",{id:"docker",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#docker","aria-hidden":"true"},"#"),s(" Docker")],-1),f=a("p",null,"Arthas configuration reference for using in Docker containers.",-1),x=s("Docker"),A=a("h2",{id:"web-console",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#web-console","aria-hidden":"true"},"#"),s(" Web Console")],-1),w=a("p",null,"Arthas supports living inside a browser. The communication between arthas and browser is via websocket.",-1),y=s("Web Console"),j=a("h2",{id:"arthas-tunnel",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#arthas-tunnel","aria-hidden":"true"},"#"),s(" Arthas Tunnel")],-1),I=a("p",null,"Arthas Tunnel Server/Client enables remote management/connection to Java services across multiple servers.",-1),T=s("Arthas Tunnel"),S=a("h2",{id:"how-to-use-ognl",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#how-to-use-ognl","aria-hidden":"true"},"#"),s(" How to use ognl")],-1),P={href:"https://github.com/alibaba/arthas/issues/11",target:"_blank",rel:"noopener noreferrer"},B=s("Basic ognl example"),C={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},E=s("Ognl special uses"),J=a("h2",{id:"idea-plugin",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#idea-plugin","aria-hidden":"true"},"#"),s(" IDEA Plugin")],-1),D=a("p",null,"Build arthas commands more efficiently in the IntelliJ IDEA compiler.",-1),N=s("IDEA Plugin"),O=a("h2",{id:"arthas-properties",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#arthas-properties","aria-hidden":"true"},"#"),s(" Arthas Properties")],-1),H=a("p",null,"Arthas supports configuration options reference.",-1),L=s("Arthas Properties"),V=a("h2",{id:"start-as-a-java-agent",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#start-as-a-java-agent","aria-hidden":"true"},"#"),s(" Start as a Java Agent")],-1),U=s("Start as a Java Agent"),F=a("h2",{id:"arthas-spring-boot-starter",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#arthas-spring-boot-starter","aria-hidden":"true"},"#"),s(" Arthas Spring Boot Starter")],-1),R=a("p",null,"Starting with the application.",-1),W=s("Arthas Spring Boot Starter"),$=a("h2",{id:"http-api",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#http-api","aria-hidden":"true"},"#"),s(" HTTP API")],-1),q=a("p",null,"The Http API provides structured data and supports more complex interactive functions, making it easier to integrate Arthas into custom interfaces.",-1),z=s("HTTP API"),M=a("h2",{id:"batch-processing",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#batch-processing","aria-hidden":"true"},"#"),s(" Batch Processing")],-1),G=a("p",null,[s("It is convenient for running multiple commands in bulk with custom scripts. It can be used in conjunction with the "),a("code",null,"--select"),s(" parameter to specify the process name.")],-1),K=s("Batch Processing"),Q=d(`<h2 id="as3-sh-and-arthas-boot3-tips" tabindex="-1"><a class="header-anchor" href="#as3-sh-and-arthas-boot3-tips" aria-hidden="true">#</a> as3.sh and arthas-boot3 tips</h2><ul><li>Select the process to be attached via the <code>select</code> option.</li></ul><p>Normally, <code>as3.sh</code>/<code>arthas-boot3.jar</code> needs to a pid, bacause the pid will change.</p><p>For example, with <code>math-game.jar</code> already started, use the <code>jps</code> command to see.</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ jps
|
||||
<span class="token number">58883</span> math-game.jar
|
||||
<span class="token number">58884</span> Jps
|
||||
</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><p>The <code>select</code> option allows you to specify a process name, which is very convenient.</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ ./as3.sh <span class="token parameter variable">--select</span> math-game
|
||||
Arthas script version: <span class="token number">3.3</span>.6
|
||||
<span class="token punctuation">[</span>INFO<span class="token punctuation">]</span> JAVA_HOME: /tmp/java/8.0.222-zulu
|
||||
Arthas home: /Users/admin/.arthas/lib/3.3.6/arthas
|
||||
Calculating attach execution time<span class="token punctuation">..</span>.
|
||||
Attaching to <span class="token number">59161</span> using version /Users/admin/.arthas/lib/3.3.6/arthas<span class="token punctuation">..</span>.
|
||||
|
||||
real 0m0.572s
|
||||
user 0m0.281s
|
||||
sys 0m0.039s
|
||||
Attach success.
|
||||
telnet connecting to arthas server<span class="token punctuation">..</span>. current timestamp is <span class="token number">1594280799</span>
|
||||
Trying <span class="token number">127.0</span>.0.1<span class="token punctuation">..</span>.
|
||||
Connected to localhost.
|
||||
Escape character is <span class="token string">'^]'</span><span class="token builtin class-name">.</span>
|
||||
,---. ,------. ,--------.,--. ,--. ,---. ,---.
|
||||
/ O <span class="token punctuation">\\</span> <span class="token operator">|</span> .--. <span class="token string">''</span>--. .--<span class="token string">'| '</span>--<span class="token string">' | / O \\ '</span> .-<span class="token string">'
|
||||
| .-. || '</span>--<span class="token string">'.'</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> .--. <span class="token operator">||</span> .-. <span class="token operator">|</span><span class="token variable"><span class="token variable">\`</span><span class="token builtin class-name">.</span> <span class="token variable">\`</span></span>-.
|
||||
<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">||</span> <span class="token operator">|</span><span class="token punctuation">\\</span> <span class="token punctuation">\\</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">||</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>.-<span class="token string">' |
|
||||
\`--'</span> <span class="token variable"><span class="token variable">\`</span>--'<span class="token variable">\`</span></span>--<span class="token string">' '</span>--<span class="token string">' \`--'</span> <span class="token variable"><span class="token variable">\`</span>--' <span class="token variable">\`</span></span>--<span class="token string">'\`--'</span> <span class="token variable"><span class="token variable">\`</span>--'<span class="token variable">\`</span></span>-----'
|
||||
|
||||
|
||||
wiki https://arthas.aliyun.com/3.x/doc
|
||||
tutorials https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
|
||||
version <span class="token number">3.3</span>.6
|
||||
pid <span class="token number">58883</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></div><h2 id="user-data-report" tabindex="-1"><a class="header-anchor" href="#user-data-report" aria-hidden="true">#</a> User data report</h2><p>After the <code>3.1.4</code> version, arthas support user data report.</p><p>At startup, use the <code>stat-url</code> option, such as: <code>./as3.sh --stat-url 'http://192.168.10.11:8080/api/stat'</code></p><p>There is a sample data report in the tunnel server that users can implement on their own.</p>`,11),X={href:"https://github.com/alibaba/arthas/blob/master/tunnel-server/src/main/java/com/alibaba/arthas/tunnel/server/app/web/StatController.java",target:"_blank",rel:"noopener noreferrer"},Y=s("StatController.java");function Z(aa,sa){const n=r("RouterLink"),o=r("ExternalLinkIcon");return l(),c("div",null,[h,u,b,a("ul",null,[a("li",null,[e(n,{to:"/en/doc/async.html"},{default:t(()=>[m]),_:1})])]),v,_,a("ul",null,[a("li",null,[e(n,{to:"/en/doc/save-log.html"},{default:t(()=>[k]),_:1})])]),g,f,a("ul",null,[a("li",null,[e(n,{to:"/en/doc/docker.html"},{default:t(()=>[x]),_:1})])]),A,w,a("ul",null,[a("li",null,[e(n,{to:"/en/doc/web-console.html"},{default:t(()=>[y]),_:1})])]),j,I,a("ul",null,[a("li",null,[e(n,{to:"/en/doc/tunnel.html"},{default:t(()=>[T]),_:1})])]),S,a("ul",null,[a("li",null,[a("a",P,[B,e(o)])]),a("li",null,[a("a",C,[E,e(o)])])]),J,D,a("ul",null,[a("li",null,[e(n,{to:"/en/doc/idea-plugin.html"},{default:t(()=>[N]),_:1})])]),O,H,a("ul",null,[a("li",null,[e(n,{to:"/en/doc/arthas-properties.html"},{default:t(()=>[L]),_:1})])]),V,a("ul",null,[a("li",null,[e(n,{to:"/en/doc/agent.html"},{default:t(()=>[U]),_:1})])]),F,R,a("ul",null,[a("li",null,[e(n,{to:"/en/doc/spring-boot-starter.html"},{default:t(()=>[W]),_:1})])]),$,q,a("ul",null,[a("li",null,[e(n,{to:"/en/doc/http-api.html"},{default:t(()=>[z]),_:1})])]),M,G,a("ul",null,[a("li",null,[e(n,{to:"/en/doc/batch-support.html"},{default:t(()=>[K]),_:1})])]),Q,a("p",null,[a("a",X,[Y,e(o)])])])}const na=i(p,[["render",Z],["__file","advanced-use.html.vue"]]);export{na as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-46e53834","path":"/doc/advice-class.html","title":"\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/advice-class.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-a736375c","path":"/en/doc/advice-class.html","title":"Fundamental Fields in Expressions","lang":"en-US","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/advice-class.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,16 @@
|
||||
import{_ as s,o as l,c as o,a as e,b as a,d as r,e as t,r as i}from"./app.4d248835.js";const c={},d=r(`<h1 id="fundamental-fields-in-expressions" tabindex="-1"><a class="header-anchor" href="#fundamental-fields-in-expressions" aria-hidden="true">#</a> Fundamental Fields in Expressions</h1><p>There is a very fundamental class <code>Advice</code> for the expressions used in filtering, tracing or monitoring and other aspects in commands.</p><div class="language-java ext-java line-numbers-mode"><pre class="language-java"><code><span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">Advice</span> <span class="token punctuation">{</span>
|
||||
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">ClassLoader</span> loader<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">Class</span><span class="token generics"><span class="token punctuation"><</span><span class="token operator">?</span><span class="token punctuation">></span></span> clazz<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">ArthasMethod</span> method<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">Object</span> target<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">Object</span><span class="token punctuation">[</span><span class="token punctuation">]</span> params<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">Object</span> returnObj<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">Throwable</span> throwExp<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token keyword">boolean</span> isBefore<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token keyword">boolean</span> isThrow<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token keyword">boolean</span> isReturn<span class="token punctuation">;</span>
|
||||
|
||||
<span class="token comment">// getter/setter</span>
|
||||
<span class="token punctuation">}</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></div><p>Description for the variables in the class <code>Advice</code>:</p><table><thead><tr><th style="text-align:right;">Name</th><th style="text-align:left;">Specification</th></tr></thead><tbody><tr><td style="text-align:right;">loader</td><td style="text-align:left;">the class loader for the current called class</td></tr><tr><td style="text-align:right;">clazz</td><td style="text-align:left;">the reference to the current called class</td></tr><tr><td style="text-align:right;">method</td><td style="text-align:left;">the reference to the current called method</td></tr><tr><td style="text-align:right;">target</td><td style="text-align:left;">the instance of the current called class</td></tr><tr><td style="text-align:right;">params</td><td style="text-align:left;">the parameters for the current call, which is an array (when there's no parameter, it will be an empty array)</td></tr><tr><td style="text-align:right;">returnObj</td><td style="text-align:left;">the return value from the current call - only available when the method call returns normally (<code>isReturn==true</code>), and <code>null</code> is for <code>void</code> return value</td></tr><tr><td style="text-align:right;">throwExp</td><td style="text-align:left;">the exceptions thrown from the current call - only available when the method call throws exception (<code>isThrow==true</code>)</td></tr><tr><td style="text-align:right;">isBefore</td><td style="text-align:left;">flag to indicate the method is about to execute. <code>isBefore==true</code> but <code>isThrow==false</code> and <code>isReturn==false</code> since it's no way to know how the method call will end</td></tr><tr><td style="text-align:right;">isThrow</td><td style="text-align:left;">flag to indicate the method call ends with exception thrown</td></tr><tr><td style="text-align:right;">isReturn</td><td style="text-align:left;">flag to indicate the method call ends normally without exception thrown</td></tr></tbody></table>`,5),p=t("All variables listed above can be used directly in the "),h={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},u=t("OGNL expression"),k=t(". The command will not execute and exit if there's illegal OGNL grammar or unexpected variable in the expression."),m={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},g=t("typical use cases"),v=t(";"),f={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},y=t("OGNL language guide"),b=t(".");function w(x,_){const n=i("ExternalLinkIcon");return l(),o("div",null,[d,e("p",null,[p,e("a",h,[u,a(n)]),k]),e("ul",null,[e("li",null,[e("a",m,[g,a(n)]),v]),e("li",null,[e("a",f,[y,a(n)]),b])])])}const N=s(c,[["render",w],["__file","advice-class.html.vue"]]);export{N as default};
|
@ -0,0 +1,16 @@
|
||||
import{_ as e,o as l,c as o,a as s,b as n,d as r,e as a,r as i}from"./app.4d248835.js";const c={},p=r(`<h1 id="\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF" tabindex="-1"><a class="header-anchor" href="#\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF" aria-hidden="true">#</a> \u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF</h1><p>\u65E0\u8BBA\u662F\u5339\u914D\u8868\u8FBE\u5F0F\u4E5F\u597D\u3001\u89C2\u5BDF\u8868\u8FBE\u5F0F\u4E5F\u7F62\uFF0C\u4ED6\u4EEC\u6838\u5FC3\u5224\u65AD\u53D8\u91CF\u90FD\u662F\u56F4\u7ED5\u7740\u4E00\u4E2A Arthas \u4E2D\u7684\u901A\u7528\u901A\u77E5\u5BF9\u8C61 <code>Advice</code> \u8FDB\u884C\u3002</p><p>\u5B83\u7684\u7B80\u7565\u4EE3\u7801\u7ED3\u6784\u5982\u4E0B</p><div class="language-java ext-java line-numbers-mode"><pre class="language-java"><code><span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">Advice</span> <span class="token punctuation">{</span>
|
||||
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">ClassLoader</span> loader<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">Class</span><span class="token generics"><span class="token punctuation"><</span><span class="token operator">?</span><span class="token punctuation">></span></span> clazz<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">ArthasMethod</span> method<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">Object</span> target<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">Object</span><span class="token punctuation">[</span><span class="token punctuation">]</span> params<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">Object</span> returnObj<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token class-name">Throwable</span> throwExp<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token keyword">boolean</span> isBefore<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token keyword">boolean</span> isThrow<span class="token punctuation">;</span>
|
||||
<span class="token keyword">private</span> <span class="token keyword">final</span> <span class="token keyword">boolean</span> isReturn<span class="token punctuation">;</span>
|
||||
|
||||
<span class="token comment">// getter/setter</span>
|
||||
<span class="token punctuation">}</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></div><p>\u8FD9\u91CC\u5217\u4E00\u4E2A\u8868\u683C\u6765\u8BF4\u660E\u4E0D\u540C\u53D8\u91CF\u7684\u542B\u4E49</p><table><thead><tr><th style="text-align:right;">\u53D8\u91CF\u540D</th><th style="text-align:left;">\u53D8\u91CF\u89E3\u91CA</th></tr></thead><tbody><tr><td style="text-align:right;">loader</td><td style="text-align:left;">\u672C\u6B21\u8C03\u7528\u7C7B\u6240\u5728\u7684 ClassLoader</td></tr><tr><td style="text-align:right;">clazz</td><td style="text-align:left;">\u672C\u6B21\u8C03\u7528\u7C7B\u7684 Class \u5F15\u7528</td></tr><tr><td style="text-align:right;">method</td><td style="text-align:left;">\u672C\u6B21\u8C03\u7528\u65B9\u6CD5\u53CD\u5C04\u5F15\u7528</td></tr><tr><td style="text-align:right;">target</td><td style="text-align:left;">\u672C\u6B21\u8C03\u7528\u7C7B\u7684\u5B9E\u4F8B</td></tr><tr><td style="text-align:right;">params</td><td style="text-align:left;">\u672C\u6B21\u8C03\u7528\u53C2\u6570\u5217\u8868\uFF0C\u8FD9\u662F\u4E00\u4E2A\u6570\u7EC4\uFF0C\u5982\u679C\u65B9\u6CD5\u662F\u65E0\u53C2\u65B9\u6CD5\u5219\u4E3A\u7A7A\u6570\u7EC4</td></tr><tr><td style="text-align:right;">returnObj</td><td style="text-align:left;">\u672C\u6B21\u8C03\u7528\u8FD4\u56DE\u7684\u5BF9\u8C61\u3002\u5F53\u4E14\u4EC5\u5F53 <code>isReturn==true</code> \u6210\u7ACB\u65F6\u5019\u6709\u6548\uFF0C\u8868\u660E\u65B9\u6CD5\u8C03\u7528\u662F\u4EE5\u6B63\u5E38\u8FD4\u56DE\u7684\u65B9\u5F0F\u7ED3\u675F\u3002\u5982\u679C\u5F53\u524D\u65B9\u6CD5\u65E0\u8FD4\u56DE\u503C <code>void</code>\uFF0C\u5219\u503C\u4E3A null</td></tr><tr><td style="text-align:right;">throwExp</td><td style="text-align:left;">\u672C\u6B21\u8C03\u7528\u629B\u51FA\u7684\u5F02\u5E38\u3002\u5F53\u4E14\u4EC5\u5F53 <code>isThrow==true</code> \u6210\u7ACB\u65F6\u6709\u6548\uFF0C\u8868\u660E\u65B9\u6CD5\u8C03\u7528\u662F\u4EE5\u629B\u51FA\u5F02\u5E38\u7684\u65B9\u5F0F\u7ED3\u675F\u3002</td></tr><tr><td style="text-align:right;">isBefore</td><td style="text-align:left;">\u8F85\u52A9\u5224\u65AD\u6807\u8BB0\uFF0C\u5F53\u524D\u7684\u901A\u77E5\u8282\u70B9\u6709\u53EF\u80FD\u662F\u5728\u65B9\u6CD5\u4E00\u5F00\u59CB\u5C31\u901A\u77E5\uFF0C\u6B64\u65F6 <code>isBefore==true</code> \u6210\u7ACB\uFF0C\u540C\u65F6 <code>isThrow==false</code> \u548C <code>isReturn==false</code>\uFF0C\u56E0\u4E3A\u5728\u65B9\u6CD5\u521A\u5F00\u59CB\u65F6\uFF0C\u8FD8\u65E0\u6CD5\u786E\u5B9A\u65B9\u6CD5\u8C03\u7528\u5C06\u4F1A\u5982\u4F55\u7ED3\u675F\u3002</td></tr><tr><td style="text-align:right;">isThrow</td><td style="text-align:left;">\u8F85\u52A9\u5224\u65AD\u6807\u8BB0\uFF0C\u5F53\u524D\u7684\u65B9\u6CD5\u8C03\u7528\u4EE5\u629B\u5F02\u5E38\u7684\u5F62\u5F0F\u7ED3\u675F\u3002</td></tr><tr><td style="text-align:right;">isReturn</td><td style="text-align:left;">\u8F85\u52A9\u5224\u65AD\u6807\u8BB0\uFF0C\u5F53\u524D\u7684\u65B9\u6CD5\u8C03\u7528\u4EE5\u6B63\u5E38\u8FD4\u56DE\u7684\u5F62\u5F0F\u7ED3\u675F\u3002</td></tr></tbody></table><p>\u6240\u6709\u53D8\u91CF\u90FD\u53EF\u4EE5\u5728\u8868\u8FBE\u5F0F\u4E2D\u76F4\u63A5\u4F7F\u7528\uFF0C\u5982\u679C\u5728\u8868\u8FBE\u5F0F\u4E2D\u7F16\u5199\u4E86\u4E0D\u7B26\u5408 OGNL \u811A\u672C\u8BED\u6CD5\u6216\u8005\u5F15\u5165\u4E86\u4E0D\u5728\u8868\u683C\u4E2D\u7684\u53D8\u91CF\uFF0C\u5219\u9000\u51FA\u547D\u4EE4\u7684\u6267\u884C\uFF1B\u7528\u6237\u53EF\u4EE5\u6839\u636E\u5F53\u524D\u7684\u5F02\u5E38\u4FE1\u606F\u4FEE\u6B63<code>\u6761\u4EF6\u8868\u8FBE\u5F0F</code>\u6216<code>\u89C2\u5BDF\u8868\u8FBE\u5F0F</code></p>`,7),d=a("\u7279\u6B8A\u7528\u6CD5\u8BF7\u53C2\u8003\uFF1A"),k={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},u=a("https://github.com/alibaba/arthas/issues/71"),h=a("OGNL \u8868\u8FBE\u5F0F\u5B98\u7F51\uFF1A"),g={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},v=a("https://commons.apache.org/proper/commons-ognl/language-guide.html");function m(y,b){const t=i("ExternalLinkIcon");return l(),o("div",null,[p,s("ul",null,[s("li",null,[d,s("a",k,[u,n(t)])]),s("li",null,[h,s("a",g,[v,n(t)])])])])}const w=e(c,[["render",m],["__file","advice-class.html.vue"]]);export{w as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-37178538","path":"/doc/agent.html","title":"\u4EE5 Java Agent \u7684\u65B9\u5F0F\u542F\u52A8","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/agent.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,2 @@
|
||||
import{_ as s,o as r,c as n,a as e,b as o,w as c,d as i,e as a,r as d}from"./app.4d248835.js";const l={},h=i(`<h1 id="start-as-a-java-agent" tabindex="-1"><a class="header-anchor" href="#start-as-a-java-agent" aria-hidden="true">#</a> Start as a Java Agent</h1><p>Usually Arthas dynamic attach the applications on the fly, but from version <code>3.2.0</code> onwards, Arthas supports starting directly as a java agent.</p><p>For example, download the full arthas zip package, decompress it and start it by specifying <code>arthas-agent.jar</code> with the parameter <code>-javaagent</code>.</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>java -javaagent:/tmp/test/arthas-agent.jar -jar math-game.jar
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,4),p=a("The default configuration is in the "),m=e("code",null,"arthas.properties",-1),_=a(" file in the decompression directory. Reference: "),u=a("Arthas Properties"),g=e("p",null,"Reference: https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html",-1);function v(f,j){const t=d("RouterLink");return r(),n("div",null,[h,e("p",null,[p,m,_,o(t,{to:"/en/doc/arthas-properties.html"},{default:c(()=>[u]),_:1})]),g])}const y=s(l,[["render",v],["__file","agent.html.vue"]]);export{y as default};
|
@ -0,0 +1,2 @@
|
||||
import{_ as s,o,c as n,a as e,b as r,w as c,d,e as a,r as i}from"./app.4d248835.js";const l={},h=d(`<h1 id="\u4EE5-java-agent-\u7684\u65B9\u5F0F\u542F\u52A8" tabindex="-1"><a class="header-anchor" href="#\u4EE5-java-agent-\u7684\u65B9\u5F0F\u542F\u52A8" aria-hidden="true">#</a> \u4EE5 Java Agent \u7684\u65B9\u5F0F\u542F\u52A8</h1><p>\u901A\u5E38 Arthas \u662F\u4EE5\u52A8\u6001 attach \u7684\u65B9\u5F0F\u6765\u8BCA\u65AD\u5E94\u7528\uFF0C\u4F46\u4ECE<code>3.2.0</code>\u7248\u672C\u8D77\uFF0CArthas \u652F\u6301\u76F4\u63A5\u4EE5 java agent \u7684\u65B9\u5F0F\u542F\u52A8\u3002</p><p>\u6BD4\u5982\u4E0B\u8F7D\u5168\u91CF\u7684 arthas zip \u5305\uFF0C\u89E3\u538B\u4E4B\u540E\u4EE5 <code>-javaagent</code> \u7684\u53C2\u6570\u6307\u5B9A<code>arthas-agent.jar</code>\u6765\u542F\u52A8\uFF1A</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>java -javaagent:/tmp/test/arthas-agent.jar -jar math-game.jar
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,4),_=a("\u9ED8\u8BA4\u7684\u914D\u7F6E\u9879\u5728\u89E3\u538B\u76EE\u5F55\u91CC\u7684"),p=e("code",null,"arthas.properties",-1),m=a("\u6587\u4EF6\u91CC\u3002\u53C2\u8003\uFF1A"),u=a("Arthas Properties"),v=e("p",null,"Java Agent \u673A\u5236\u53C2\u8003\uFF1A https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html",-1);function g(j,x){const t=i("RouterLink");return o(),n("div",null,[h,e("p",null,[_,p,m,r(t,{to:"/doc/arthas-properties.html"},{default:c(()=>[u]),_:1})]),v])}const b=s(l,[["render",g],["__file","agent.html.vue"]]);export{b as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-f6b5c310","path":"/en/doc/agent.html","title":"Start as a Java Agent","lang":"en-US","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/agent.md","version":"3.7.3"}');export{e as data};
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
const t="/3.x/images/arthas-output-recording.png";export{t as _};
|
@ -0,0 +1 @@
|
||||
const s="/3.x/images/arthas-output.jpg",t="/3.x/images/arthas-output-svg.jpg";export{s as _,t as a};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-74fb2694","path":"/en/doc/arthas-properties.html","title":"Arthas Properties","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Supported configuration items","slug":"supported-configuration-items","link":"#supported-configuration-items","children":[{"level":3,"title":"disable specify commands","slug":"disable-specify-commands","link":"#disable-specify-commands","children":[]}]},{"level":2,"title":"Configured order","slug":"configured-order","link":"#configured-order","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/arthas-properties.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,13 @@
|
||||
import{_ as e,o as t,c as a,d as s}from"./app.4d248835.js";const r={},i=s(`<h1 id="arthas-properties" tabindex="-1"><a class="header-anchor" href="#arthas-properties" aria-hidden="true">#</a> Arthas Properties</h1><p><code>arthas.properties</code>\u6587\u4EF6\u5728 arthas \u7684\u76EE\u5F55\u4E0B\u3002</p><ul><li>\u5982\u679C\u662F\u81EA\u52A8\u4E0B\u8F7D\u7684 arthas\uFF0C\u5219\u76EE\u5F55\u5728<code>~/.arthas/lib/3.x.x/arthas/</code>\u4E0B\u9762</li><li>\u5982\u679C\u662F\u4E0B\u8F7D\u7684\u5B8C\u6574\u5305\uFF0C\u5728 arthas \u89E3\u538B\u76EE\u5F55\u4E0B</li></ul><h2 id="\u652F\u6301\u7684\u914D\u7F6E\u9879" tabindex="-1"><a class="header-anchor" href="#\u652F\u6301\u7684\u914D\u7F6E\u9879" aria-hidden="true">#</a> \u652F\u6301\u7684\u914D\u7F6E\u9879</h2><div class="custom-container warning"><p class="custom-container-title">\u6CE8\u610F</p><p>\u6CE8\u610F\u914D\u7F6E\u5FC5\u987B\u662F<code>\u9A7C\u5CF0</code>\u7684\uFF0C\u548C spring boot \u7684<code>-</code>\u98CE\u683C\u4E0D\u4E00\u6837\u3002spring boot \u5E94\u7528\u624D\u540C\u65F6\u652F\u6301<code>\u9A7C\u5CF0</code> \u548C <code>-</code>\u98CE\u683C\u7684\u914D\u7F6E\u3002</p></div><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>#arthas.config.overrideAll=true
|
||||
arthas.telnetPort=3658
|
||||
arthas.httpPort=8563
|
||||
arthas.ip=127.0.0.1
|
||||
|
||||
# seconds
|
||||
arthas.sessionTimeout=1800
|
||||
|
||||
#arthas.appName=demoapp
|
||||
#arthas.tunnelServer=ws://127.0.0.1:7777/ws
|
||||
#arthas.agentId=mmmmmmyiddddd
|
||||
</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></div><ul><li>\u5982\u679C\u914D\u7F6E <code>arthas.telnetPort</code>\u4E3A -1 \uFF0C\u5219\u4E0D listen telnet \u7AEF\u53E3\u3002<code>arthas.httpPort</code>\u7C7B\u4F3C\u3002</li><li>\u5982\u679C\u914D\u7F6E <code>arthas.telnetPort</code>\u4E3A 0 \uFF0C\u5219\u968F\u673A telnet \u7AEF\u53E3\uFF0C\u5728<code>~/logs/arthas/arthas.log</code>\u91CC\u53EF\u4EE5\u627E\u5230\u5177\u4F53\u7AEF\u53E3\u65E5\u5FD7\u3002<code>arthas.httpPort</code>\u7C7B\u4F3C\u3002</li></ul><div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>\u5982\u679C\u662F\u9632\u6B62\u4E00\u4E2A\u673A\u5668\u4E0A\u542F\u52A8\u591A\u4E2A arthas \u7AEF\u53E3\u51B2\u7A81\u3002\u53EF\u4EE5\u914D\u7F6E\u4E3A\u968F\u673A\u7AEF\u53E3\uFF0C\u6216\u8005\u914D\u7F6E\u4E3A -1\uFF0C\u5E76\u4E14\u901A\u8FC7 tunnel server \u6765\u4F7F\u7528 arthas\u3002</p></div><h3 id="\u7981\u6B62\u6307\u5B9A\u547D\u4EE4" tabindex="-1"><a class="header-anchor" href="#\u7981\u6B62\u6307\u5B9A\u547D\u4EE4" aria-hidden="true">#</a> \u7981\u6B62\u6307\u5B9A\u547D\u4EE4</h3><div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>since 3.5.2</p></div><p>\u6BD4\u5982\u914D\u7F6E\uFF1A</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>arthas.disabledCommands=stop,dump
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u4E5F\u53EF\u4EE5\u5728\u547D\u4EE4\u884C\u914D\u7F6E\uFF1A <code>--disabled-commands stop,dump</code> \u3002</p><div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0Carthas-spring-boot-starter \u4F1A\u7981\u6389<code>stop</code>\u547D\u4EE4\u3002</p></div><h2 id="\u914D\u7F6E\u7684\u4F18\u5148\u7EA7" tabindex="-1"><a class="header-anchor" href="#\u914D\u7F6E\u7684\u4F18\u5148\u7EA7" aria-hidden="true">#</a> \u914D\u7F6E\u7684\u4F18\u5148\u7EA7</h2><p>\u914D\u7F6E\u7684\u4F18\u5148\u7EA7\u662F\uFF1A\u547D\u4EE4\u884C\u53C2\u6570 > System Env > System Properties > arthas.properties \u3002</p><p>\u6BD4\u5982\uFF1A</p><ul><li><code>./as3.sh --telnet-port 9999</code> \u4F20\u5165\u7684\u914D\u7F6E\u4F1A\u8986\u76D6\u6389<code>arthas.properties</code>\u91CC\u7684\u9ED8\u8BA4\u503C<code>arthas.telnetPort=3658</code>\u3002</li><li>\u5982\u679C\u5E94\u7528\u81EA\u8EAB\u8BBE\u7F6E\u4E86 system properties <code>arthas.telnetPort=8888</code>\uFF0C\u5219\u4F1A\u8986\u76D6\u6389<code>arthas.properties</code>\u91CC\u7684\u9ED8\u8BA4\u503C<code>arthas.telnetPort=3658</code>\u3002</li></ul><p>\u5982\u679C\u60F3\u8981 <code>arthas.properties</code>\u7684\u4F18\u5148\u7EA7\u6700\u9AD8\uFF0C\u5219\u53EF\u4EE5\u914D\u7F6E <code>arthas.config.overrideAll=true</code> \u3002</p>`,19),d=[i];function o(n,c){return t(),a("div",null,d)}const p=e(r,[["render",o],["__file","arthas-properties.html.vue"]]);export{p as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-5c517900","path":"/doc/arthas-properties.html","title":"Arthas Properties","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u652F\u6301\u7684\u914D\u7F6E\u9879","slug":"\u652F\u6301\u7684\u914D\u7F6E\u9879","link":"#\u652F\u6301\u7684\u914D\u7F6E\u9879","children":[{"level":3,"title":"\u7981\u6B62\u6307\u5B9A\u547D\u4EE4","slug":"\u7981\u6B62\u6307\u5B9A\u547D\u4EE4","link":"#\u7981\u6B62\u6307\u5B9A\u547D\u4EE4","children":[]}]},{"level":2,"title":"\u914D\u7F6E\u7684\u4F18\u5148\u7EA7","slug":"\u914D\u7F6E\u7684\u4F18\u5148\u7EA7","link":"#\u914D\u7F6E\u7684\u4F18\u5148\u7EA7","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/arthas-properties.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,13 @@
|
||||
import{_ as e,o as t,c as a,d as i}from"./app.4d248835.js";const o={},r=i(`<h1 id="arthas-properties" tabindex="-1"><a class="header-anchor" href="#arthas-properties" aria-hidden="true">#</a> Arthas Properties</h1><p>The <code>arthas.properties</code> file is in the arthas directory.</p><ul><li>If it is automatically downloaded arthas, the directory is under <code>~/.arthas/lib/3.x.x/arthas/</code></li><li>If it is a downloaded complete package, under the decompression directory of arthas</li></ul><h2 id="supported-configuration-items" tabindex="-1"><a class="header-anchor" href="#supported-configuration-items" aria-hidden="true">#</a> Supported configuration items</h2><div class="custom-container warning"><p class="custom-container-title">WARNING</p><p>Note that the configuration must be <code>camel case</code>, which is different from the <code>-</code> style of spring boot. Only the spring boot application supports both <code>camel case</code> and <code>-</code> style configuration.</p></div><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>#arthas.config.overrideAll=true
|
||||
arthas.telnetPort=3658
|
||||
arthas.httpPort=8563
|
||||
arthas.ip=127.0.0.1
|
||||
|
||||
# seconds
|
||||
arthas.sessionTimeout=1800
|
||||
|
||||
#arthas.appName=demoapp
|
||||
#arthas.tunnelServer=ws://127.0.0.1:7777/ws
|
||||
#arthas.agentId=mmmmmmyiddddd
|
||||
</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></div><ul><li>If the configuration of <code>arthas.telnetPort</code> is -1, the telnet port will not be listened. <code>arthas.httpPort</code> is similar.</li><li>If you configure <code>arthas.telnetPort</code> to 0, then random listen telnet port, you can find the random port log in <code>~/logs/arthas/arthas.log</code>. <code>arthas.httpPort</code> is similar.</li></ul><div class="custom-container tip"><p class="custom-container-title">TIP</p><p>If you want to prevent multiple arthas port conflicts on a machine. It can be configured as a random port, or configured as -1, and use arthas through the tunnel server.</p></div><h3 id="disable-specify-commands" tabindex="-1"><a class="header-anchor" href="#disable-specify-commands" aria-hidden="true">#</a> disable specify commands</h3><div class="custom-container tip"><p class="custom-container-title">TIP</p><p>since 3.5.2</p></div><p>Such as configuration:</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>arthas.disabledCommands=stop,dump
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>It can also be configured on the command line: <code>--disabled-commands stop,dump</code>.</p><div class="custom-container tip"><p class="custom-container-title">TIP</p><p>By default, arthas-spring-boot-starter will disable the <code>stop</code> command.</p></div><h2 id="configured-order" tabindex="-1"><a class="header-anchor" href="#configured-order" aria-hidden="true">#</a> Configured order</h2><p>The order of configuration is: command line parameters > System Env > System Properties > arthas.properties.</p><p>such as:</p><ul><li><code>./as3.sh --telnet-port 9999</code> command line configuration will overwrite the default value <code>arthas.telnetPort=3658</code> in <code>arthas.properties</code>.</li><li>If the application itself sets system properties <code>arthas.telnetPort=8888</code>, it will override the default value <code>arthas.telnetPort=3658</code> in <code>arthas.properties</code>.</li></ul><p>If you want <code>arthas.properties</code> to have the highest order, you can configure <code>arthas.config.overrideAll=true</code>.</p>`,19),s=[r];function n(d,c){return t(),a("div",null,s)}const h=e(o,[["render",n],["__file","arthas-properties.html.vue"]]);export{h as default};
|
@ -0,0 +1 @@
|
||||
const s="/3.x/images/arthas-web-ui.png";export{s as _};
|
@ -0,0 +1 @@
|
||||
const s="/3.x/images/arthas.png";export{s as _};
|
@ -0,0 +1,49 @@
|
||||
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.4d248835.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/3.x/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};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-02eb6d0d","path":"/doc/arthas3.html","title":"","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"Arthas3.0 \u7684\u65B0\u7279\u6027","slug":"arthas3-0-\u7684\u65B0\u7279\u6027","link":"#arthas3-0-\u7684\u65B0\u7279\u6027","children":[]},{"level":3,"title":"\u53BB groovy \u4F9D\u8D56","slug":"\u53BB-groovy-\u4F9D\u8D56","link":"#\u53BB-groovy-\u4F9D\u8D56","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/arthas3.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,14 @@
|
||||
import{_ as o,o as s,c,a as e,b as a,e as t,d as i,r as d}from"./app.4d248835.js";const r={},l=e("h1",{id:"arthas-async-jobs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#arthas-async-jobs","aria-hidden":"true"},"#"),t(" Arthas Async Jobs")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=en&id=case-async-jobs",target:"_blank",rel:"noopener noreferrer"},h=e("code",null,"Async Jobs",-1),p=t(" online tutorial"),b=t("Asynchronous jobs in arthas. The idea is borrowed from "),m={href:"http://man7.org/linux/man-pages/man1/jobs.1p.html",target:"_blank",rel:"noopener noreferrer"},g=t("linux jobs"),f=t("."),k=i(`<h2 id="_1-use-to-run-the-command-in-the-background" tabindex="-1"><a class="header-anchor" href="#_1-use-to-run-the-command-in-the-background" aria-hidden="true">#</a> 1. Use & to run the command in the background</h2><p>For example, execute the trace command in the background:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>trace Test t <span class="token operator">&</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>By doing this, the current command is put to the background to run, you can continue to execute other commands in the console.</p><h2 id="_2-list-background-jobs" tabindex="-1"><a class="header-anchor" href="#_2-list-background-jobs" aria-hidden="true">#</a> 2. List background jobs</h2><p>If you want to list all background jobs, you can execute the <code>jobs</code> command and the results are as follows:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">jobs</span>
|
||||
<span class="token punctuation">[</span><span class="token number">10</span><span class="token punctuation">]</span>*
|
||||
Stopped <span class="token function">watch</span> com.taobao.container.Test <span class="token builtin class-name">test</span> <span class="token string">"params[0].{? #this.name == null }"</span> <span class="token parameter variable">-x</span> <span class="token number">2</span>
|
||||
execution count <span class="token builtin class-name">:</span> <span class="token number">19</span>
|
||||
start <span class="token function">time</span> <span class="token builtin class-name">:</span> Fri Sep <span class="token number">22</span> 09:59:55 CST <span class="token number">2017</span>
|
||||
<span class="token function">timeout</span> <span class="token function">date</span> <span class="token builtin class-name">:</span> Sat Sep <span class="token number">23</span> 09:59:55 CST <span class="token number">2017</span>
|
||||
session <span class="token builtin class-name">:</span> 3648e874-5e69-473f-9eed-7f89660b079b <span class="token punctuation">(</span>current<span class="token punctuation">)</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></div><p>You can see that there is currently a background job executing:</p><ul><li>job id is 10, <code>*</code> indicates that this job is created by the current session.</li><li>status is <code>Stopped</code></li><li>execution count is the number of executions, which have been executed 19 times since the start.</li><li>timeout date: timeout timestamp, when the time exceeds this timestamp, the job will be automatically timeout and exit.</li></ul><h2 id="_3-suspend-and-cancel-job" tabindex="-1"><a class="header-anchor" href="#_3-suspend-and-cancel-job" aria-hidden="true">#</a> 3. Suspend and cancel job</h2><p>When the job is executing in the foreground, for example, directly executing the command <code>trace Test t</code>, or executing the background job command <code>trace Test t &</code>, then putting the job back to the foreground via <code>fg</code> command, the console cannot continue to execute other command, but can receive and process the following keyboard events:</p><ul><li>\u2018ctrl + z\u2019: Suspends the job, the job status will change to <code>Stopped</code>, and the job can be restarted by <code>bg <job-id></code> or <code>fg <job-id></code></li><li>\u2018ctrl + c\u2019: Stops the job</li><li>\u2018ctrl + d\u2019: According to linux semantics this should lead to exit the terminal, right now Arthas has not implemented this yet, therefore simply ignore this keystroke.</li></ul><h2 id="_4-fg-bg-switch-the-job-from-the-foreground-to-the-background-and-vise-verse" tabindex="-1"><a class="header-anchor" href="#_4-fg-bg-switch-the-job-from-the-foreground-to-the-background-and-vise-verse" aria-hidden="true">#</a> 4. fg/bg, switch the job from the foreground to the background, and vise verse</h2><ul><li>When a job is executed in the background or in suspended status (use <code>ctrl + z</code> to suspend job), <code>fg <job-id></code> can transfer the job to the foreground to continue to run.</li><li>When a job is in suspended status (use <code>ctrl + z</code> to suspend job), <code>bg <job-id></code> can put the job to the background to continue to run.</li><li>A job created by other session can only be put to the foreground to run by using <code>fg</code> in the current session.</li></ul><h2 id="_5-redirect-the-output" tabindex="-1"><a class="header-anchor" href="#_5-redirect-the-output" aria-hidden="true">#</a> 5. Redirect the output</h2><p>The job output can be redirect to the specified file by <code>></code> or <code>>></code>, and can be used together with <code>&</code>. By doing this, you can achieve running commands asynchronously, for example:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ trace Test t <span class="token operator">>></span> test.out <span class="token operator">&</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>At this time, the trace command will be executed in the background, and the result will be output to the <code>test.out</code> file under the <code>working directory</code> of the application. You can continue to execute other commands. And you can view the command execution result in the file. You can execute the <code>pwd</code> command to view the <code>working directory</code> of the current application.</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">cat</span> test.out
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>If no redirect file is specified, the result will be output to the <code>~/logs/arthas-cache/</code> directory, for example:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ trace Test t <span class="token operator">>></span> <span class="token operator">&</span>
|
||||
job <span class="token function">id</span> <span class="token builtin class-name">:</span> <span class="token number">2</span>
|
||||
cache location <span class="token builtin class-name">:</span> /Users/admin/logs/arthas-cache/28198/2
|
||||
</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><p>At this time, the command will be executed asynchronously in the background, and the result will be asynchronously saved in the file (<code>~/logs/arthas-cache/\${PID}/\${JobId}</code>);</p><ul><li>At this time, the execution of the task is not affected by the session disconnection; the default timeout period of the task is 1 day, and the default timeout period can be modified through the global <code>options</code> command;</li><li>The result of this command will be output asynchronously to the file; at this time, regardless of whether <code>save-result</code> is true or not, the result will not be written asynchronously to <code>~/logs/arthas-cache/result.log</code>.</li></ul><h2 id="_6-stop-job" tabindex="-1"><a class="header-anchor" href="#_6-stop-job" aria-hidden="true">#</a> 6. Stop job</h2><p>If you want to stop background job, just <code>kill <job-id></code>.</p><h2 id="_7-others" tabindex="-1"><a class="header-anchor" href="#_7-others" aria-hidden="true">#</a> 7. Others</h2><ul><li>Support up to 8 commands at the same time to redirect the output to the log files.</li><li>Do not open too many background jobs at the same time to avoid negative performance effect to the target JVM.</li><li>If you do not want to stop the Arthas service and continue to perform background tasks, you can exit the Arthas console by executing <code>quit</code> command (<code>stop</code> command will stop the Arthas service)</li></ul>`,27);function v(x,j){const n=d("ExternalLinkIcon");return s(),c("div",null,[l,e("p",null,[e("a",u,[h,p,a(n)])]),e("p",null,[b,e("a",m,[g,a(n)]),f]),k])}const _=o(r,[["render",v],["__file","async.html.vue"]]);export{_ as default};
|
@ -0,0 +1 @@
|
||||
const l=JSON.parse('{"key":"v-4f82df66","path":"/doc/async.html","title":"Arthas \u540E\u53F0\u5F02\u6B65\u4EFB\u52A1","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"1. \u4F7F\u7528&\u5728\u540E\u53F0\u6267\u884C\u4EFB\u52A1","slug":"_1-\u4F7F\u7528-\u5728\u540E\u53F0\u6267\u884C\u4EFB\u52A1","link":"#_1-\u4F7F\u7528-\u5728\u540E\u53F0\u6267\u884C\u4EFB\u52A1","children":[]},{"level":2,"title":"2. \u901A\u8FC7 jobs \u67E5\u770B\u4EFB\u52A1","slug":"_2-\u901A\u8FC7-jobs-\u67E5\u770B\u4EFB\u52A1","link":"#_2-\u901A\u8FC7-jobs-\u67E5\u770B\u4EFB\u52A1","children":[]},{"level":2,"title":"3. \u4EFB\u52A1\u6682\u505C\u548C\u53D6\u6D88","slug":"_3-\u4EFB\u52A1\u6682\u505C\u548C\u53D6\u6D88","link":"#_3-\u4EFB\u52A1\u6682\u505C\u548C\u53D6\u6D88","children":[]},{"level":2,"title":"4. fg\u3001bg \u547D\u4EE4\uFF0C\u5C06\u547D\u4EE4\u8F6C\u5230\u524D\u53F0\u3001\u540E\u53F0\u7EE7\u7EED\u6267\u884C","slug":"_4-fg\u3001bg-\u547D\u4EE4-\u5C06\u547D\u4EE4\u8F6C\u5230\u524D\u53F0\u3001\u540E\u53F0\u7EE7\u7EED\u6267\u884C","link":"#_4-fg\u3001bg-\u547D\u4EE4-\u5C06\u547D\u4EE4\u8F6C\u5230\u524D\u53F0\u3001\u540E\u53F0\u7EE7\u7EED\u6267\u884C","children":[]},{"level":2,"title":"5. \u4EFB\u52A1\u8F93\u51FA\u91CD\u5B9A\u5411","slug":"_5-\u4EFB\u52A1\u8F93\u51FA\u91CD\u5B9A\u5411","link":"#_5-\u4EFB\u52A1\u8F93\u51FA\u91CD\u5B9A\u5411","children":[]},{"level":2,"title":"6. \u505C\u6B62\u547D\u4EE4","slug":"_6-\u505C\u6B62\u547D\u4EE4","link":"#_6-\u505C\u6B62\u547D\u4EE4","children":[]},{"level":2,"title":"7. \u5176\u4ED6","slug":"_7-\u5176\u4ED6","link":"#_7-\u5176\u4ED6","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1}]},"filePathRelative":"doc/async.md","version":"3.7.3"}');export{l as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-786f7161","path":"/en/doc/async.html","title":"Arthas Async Jobs","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"1. Use & to run the command in the background","slug":"_1-use-to-run-the-command-in-the-background","link":"#_1-use-to-run-the-command-in-the-background","children":[]},{"level":2,"title":"2. List background jobs","slug":"_2-list-background-jobs","link":"#_2-list-background-jobs","children":[]},{"level":2,"title":"3. Suspend and cancel job","slug":"_3-suspend-and-cancel-job","link":"#_3-suspend-and-cancel-job","children":[]},{"level":2,"title":"4. fg/bg, switch the job from the foreground to the background, and vise verse","slug":"_4-fg-bg-switch-the-job-from-the-foreground-to-the-background-and-vise-verse","link":"#_4-fg-bg-switch-the-job-from-the-foreground-to-the-background-and-vise-verse","children":[]},{"level":2,"title":"5. Redirect the output","slug":"_5-redirect-the-output","link":"#_5-redirect-the-output","children":[]},{"level":2,"title":"6. Stop job","slug":"_6-stop-job","link":"#_6-stop-job","children":[]},{"level":2,"title":"7. Others","slug":"_7-others","link":"#_7-others","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1}]},"filePathRelative":"en/doc/async.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,14 @@
|
||||
import{_ as t,o,c,a as e,b as n,e as a,d as i,r as l}from"./app.4d248835.js";const d={},r=e("h1",{id:"arthas-\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#arthas-\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1","aria-hidden":"true"},"#"),a(" Arthas \u540E\u53F0\u5F02\u6B65\u4EFB\u52A1")],-1),p={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=cn&id=case-async-jobs",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1",-1),h=a("\u5728\u7EBF\u6559\u7A0B"),b=a("arthas \u4E2D\u7684\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1\uFF0C\u4F7F\u7528\u4E86\u4EFF linux \u7CFB\u7EDF\u4EFB\u52A1\u76F8\u5173\u7684\u547D\u4EE4\u3002"),m={href:"https://ehlxr.me/2017/01/18/Linux-%E4%B8%AD-fg%E3%80%81bg%E3%80%81jobs%E3%80%81-%E6%8C%87%E4%BB%A4/",target:"_blank",rel:"noopener noreferrer"},g=a("linux \u4EFB\u52A1\u76F8\u5173\u4ECB\u7ECD"),v=a("\u3002"),_=i(`<h2 id="_1-\u4F7F\u7528-\u5728\u540E\u53F0\u6267\u884C\u4EFB\u52A1" tabindex="-1"><a class="header-anchor" href="#_1-\u4F7F\u7528-\u5728\u540E\u53F0\u6267\u884C\u4EFB\u52A1" aria-hidden="true">#</a> 1. \u4F7F\u7528&\u5728\u540E\u53F0\u6267\u884C\u4EFB\u52A1</h2><p>\u6BD4\u5982\u5E0C\u671B\u6267\u884C\u540E\u53F0\u6267\u884C trace \u547D\u4EE4\uFF0C\u90A3\u4E48\u8C03\u7528\u4E0B\u9762\u547D\u4EE4</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>trace Test t <span class="token operator">&</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u8FD9\u65F6\u547D\u4EE4\u5728\u540E\u53F0\u6267\u884C\uFF0C\u53EF\u4EE5\u5728 console \u4E2D\u7EE7\u7EED\u6267\u884C\u5176\u4ED6\u547D\u4EE4\u3002</p><h2 id="_2-\u901A\u8FC7-jobs-\u67E5\u770B\u4EFB\u52A1" tabindex="-1"><a class="header-anchor" href="#_2-\u901A\u8FC7-jobs-\u67E5\u770B\u4EFB\u52A1" aria-hidden="true">#</a> 2. \u901A\u8FC7 jobs \u67E5\u770B\u4EFB\u52A1</h2><p>\u5982\u679C\u5E0C\u671B\u67E5\u770B\u5F53\u524D\u6709\u54EA\u4E9B arthas \u4EFB\u52A1\u5728\u6267\u884C\uFF0C\u53EF\u4EE5\u6267\u884C jobs \u547D\u4EE4\uFF0C\u6267\u884C\u7ED3\u679C\u5982\u4E0B</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">jobs</span>
|
||||
<span class="token punctuation">[</span><span class="token number">10</span><span class="token punctuation">]</span>*
|
||||
Stopped <span class="token function">watch</span> com.taobao.container.Test <span class="token builtin class-name">test</span> <span class="token string">"params[0].{? #this.name == null }"</span> <span class="token parameter variable">-x</span> <span class="token number">2</span>
|
||||
execution count <span class="token builtin class-name">:</span> <span class="token number">19</span>
|
||||
start <span class="token function">time</span> <span class="token builtin class-name">:</span> Fri Sep <span class="token number">22</span> 09:59:55 CST <span class="token number">2017</span>
|
||||
<span class="token function">timeout</span> <span class="token function">date</span> <span class="token builtin class-name">:</span> Sat Sep <span class="token number">23</span> 09:59:55 CST <span class="token number">2017</span>
|
||||
session <span class="token builtin class-name">:</span> 3648e874-5e69-473f-9eed-7f89660b079b <span class="token punctuation">(</span>current<span class="token punctuation">)</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></div><p>\u53EF\u4EE5\u770B\u5230\u76EE\u524D\u6709\u4E00\u4E2A\u540E\u53F0\u4EFB\u52A1\u5728\u6267\u884C\u3002</p><ul><li>job id \u662F 10, <code>*</code> \u8868\u793A\u6B64 job \u662F\u5F53\u524D session \u521B\u5EFA</li><li>\u72B6\u6001\u662F Stopped</li><li>execution count \u662F\u6267\u884C\u6B21\u6570\uFF0C\u4ECE\u542F\u52A8\u5F00\u59CB\u5DF2\u7ECF\u6267\u884C\u4E86 19 \u6B21</li><li>timeout date \u662F\u8D85\u65F6\u7684\u65F6\u95F4\uFF0C\u5230\u8FD9\u4E2A\u65F6\u95F4\uFF0C\u4EFB\u52A1\u5C06\u4F1A\u81EA\u52A8\u8D85\u65F6\u9000\u51FA</li></ul><h2 id="_3-\u4EFB\u52A1\u6682\u505C\u548C\u53D6\u6D88" tabindex="-1"><a class="header-anchor" href="#_3-\u4EFB\u52A1\u6682\u505C\u548C\u53D6\u6D88" aria-hidden="true">#</a> 3. \u4EFB\u52A1\u6682\u505C\u548C\u53D6\u6D88</h2><p>\u5F53\u4EFB\u52A1\u6B63\u5728\u524D\u53F0\u6267\u884C\uFF0C\u6BD4\u5982\u76F4\u63A5\u8C03\u7528\u547D\u4EE4<code>trace Test t</code>\u6216\u8005\u8C03\u7528\u540E\u53F0\u6267\u884C\u547D\u4EE4<code>trace Test t &</code>\u540E\u53C8\u901A\u8FC7<code>fg</code>\u547D\u4EE4\u5C06\u4EFB\u52A1\u8F6C\u5230\u524D\u53F0\u3002\u8FD9\u65F6 console \u4E2D\u65E0\u6CD5\u7EE7\u7EED\u6267\u884C\u547D\u4EE4\uFF0C\u4F46\u662F\u53EF\u4EE5\u63A5\u6536\u5E76\u5904\u7406\u4EE5\u4E0B\u4E8B\u4EF6\uFF1A</p><ul><li>\u2018ctrl + z\u2019\uFF1A\u5C06\u4EFB\u52A1\u6682\u505C\u3002\u901A\u8FC7<code>jbos</code>\u67E5\u770B\u4EFB\u52A1\u72B6\u6001\u5C06\u4F1A\u53D8\u4E3A Stopped\uFF0C\u901A\u8FC7<code>bg <job-id></code>\u6216\u8005<code>fg <job-id></code>\u53EF\u8BA9\u4EFB\u52A1\u91CD\u65B0\u5F00\u59CB\u6267\u884C</li><li>\u2018ctrl + c\u2019\uFF1A\u505C\u6B62\u4EFB\u52A1</li><li>\u2018ctrl + d\u2019\uFF1A\u6309\u7167 linux \u8BED\u4E49\u5E94\u5F53\u662F\u9000\u51FA\u7EC8\u7AEF\uFF0C\u76EE\u524D arthas \u4E2D\u662F\u7A7A\u5B9E\u73B0\uFF0C\u4E0D\u5904\u7406</li></ul><h2 id="_4-fg\u3001bg-\u547D\u4EE4-\u5C06\u547D\u4EE4\u8F6C\u5230\u524D\u53F0\u3001\u540E\u53F0\u7EE7\u7EED\u6267\u884C" tabindex="-1"><a class="header-anchor" href="#_4-fg\u3001bg-\u547D\u4EE4-\u5C06\u547D\u4EE4\u8F6C\u5230\u524D\u53F0\u3001\u540E\u53F0\u7EE7\u7EED\u6267\u884C" aria-hidden="true">#</a> 4. fg\u3001bg \u547D\u4EE4\uFF0C\u5C06\u547D\u4EE4\u8F6C\u5230\u524D\u53F0\u3001\u540E\u53F0\u7EE7\u7EED\u6267\u884C</h2><ul><li>\u4EFB\u52A1\u5728\u540E\u53F0\u6267\u884C\u6216\u8005\u6682\u505C\u72B6\u6001\uFF08<code>ctrl + z</code>\u6682\u505C\u4EFB\u52A1\uFF09\u65F6\uFF0C\u6267\u884C<code>fg <job-id></code>\u5C06\u53EF\u4EE5\u628A\u5BF9\u5E94\u7684\u4EFB\u52A1\u8F6C\u5230\u524D\u53F0\u7EE7\u7EED\u6267\u884C\u3002\u5728\u524D\u53F0\u6267\u884C\u65F6\uFF0C\u65E0\u6CD5\u5728 console \u4E2D\u6267\u884C\u5176\u4ED6\u547D\u4EE4</li><li>\u5F53\u4EFB\u52A1\u5904\u4E8E\u6682\u505C\u72B6\u6001\u65F6\uFF08<code>ctrl + z</code>\u6682\u505C\u4EFB\u52A1\uFF09\uFF0C\u6267\u884C<code>bg <job-id></code>\u5C06\u53EF\u4EE5\u628A\u5BF9\u5E94\u7684\u4EFB\u52A1\u5728\u540E\u53F0\u7EE7\u7EED\u6267\u884C</li><li>\u975E\u5F53\u524D session \u521B\u5EFA\u7684 job\uFF0C\u53EA\u80FD\u7531\u5F53\u524D session fg \u5230\u524D\u53F0\u6267\u884C</li></ul><h2 id="_5-\u4EFB\u52A1\u8F93\u51FA\u91CD\u5B9A\u5411" tabindex="-1"><a class="header-anchor" href="#_5-\u4EFB\u52A1\u8F93\u51FA\u91CD\u5B9A\u5411" aria-hidden="true">#</a> 5. \u4EFB\u52A1\u8F93\u51FA\u91CD\u5B9A\u5411</h2><p>\u53EF\u901A\u8FC7<code>></code>\u6216\u8005<code>>></code>\u5C06\u4EFB\u52A1\u8F93\u51FA\u7ED3\u679C\u8F93\u51FA\u5230\u6307\u5B9A\u7684\u6587\u4EF6\u4E2D\uFF0C\u53EF\u4EE5\u548C<code>&</code>\u4E00\u8D77\u4F7F\u7528\uFF0C\u5B9E\u73B0 arthas \u547D\u4EE4\u7684\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1\u3002\u6BD4\u5982\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ trace Test t <span class="token operator">>></span> test.out <span class="token operator">&</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u8FD9\u65F6 trace \u547D\u4EE4\u4F1A\u5728\u540E\u53F0\u6267\u884C\uFF0C\u5E76\u4E14\u628A\u7ED3\u679C\u8F93\u51FA\u5230\u5E94\u7528<code>\u5DE5\u4F5C\u76EE\u5F55</code>\u4E0B\u9762\u7684<code>test.out</code>\u6587\u4EF6\u3002\u53EF\u7EE7\u7EED\u6267\u884C\u5176\u4ED6\u547D\u4EE4\u3002\u5E76\u53EF\u67E5\u770B\u6587\u4EF6\u4E2D\u7684\u547D\u4EE4\u6267\u884C\u7ED3\u679C\u3002\u53EF\u4EE5\u6267\u884C<code>pwd</code>\u547D\u4EE4\u67E5\u770B\u5F53\u524D\u5E94\u7528\u7684<code>\u5DE5\u4F5C\u76EE\u5F55</code>\u3002</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">cat</span> test.out
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u5982\u679C\u6CA1\u6709\u6307\u5B9A\u91CD\u5B9A\u5411\u6587\u4EF6\uFF0C\u5219\u4F1A\u628A\u7ED3\u679C\u8F93\u51FA\u5230<code>~/logs/arthas-cache/</code>\u76EE\u5F55\u4E0B\uFF0C\u6BD4\u5982\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ trace Test t <span class="token operator">>></span> <span class="token operator">&</span>
|
||||
job <span class="token function">id</span> <span class="token builtin class-name">:</span> <span class="token number">2</span>
|
||||
cache location <span class="token builtin class-name">:</span> /Users/admin/logs/arthas-cache/28198/2
|
||||
</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><p>\u6B64\u65F6\u547D\u4EE4\u4F1A\u5728\u540E\u53F0\u5F02\u6B65\u6267\u884C\uFF0C\u5E76\u5C06\u7ED3\u679C\u5F02\u6B65\u4FDD\u5B58\u5728\u6587\u4EF6\uFF08<code>~/logs/arthas-cache/\${PID}/\${JobId}</code>\uFF09\u4E2D\uFF1B</p><ul><li>\u6B64\u65F6\u4EFB\u52A1\u7684\u6267\u884C\u4E0D\u53D7 session \u65AD\u5F00\u7684\u5F71\u54CD\uFF1B\u4EFB\u52A1\u9ED8\u8BA4\u8D85\u65F6\u65F6\u95F4\u662F 1 \u5929\uFF0C\u53EF\u4EE5\u901A\u8FC7\u5168\u5C40 <code>options</code> \u547D\u4EE4\u4FEE\u6539\u9ED8\u8BA4\u8D85\u65F6\u65F6\u95F4\uFF1B</li><li>\u6B64\u547D\u4EE4\u7684\u7ED3\u679C\u5C06\u5F02\u6B65\u8F93\u51FA\u5230 \b \u6587\u4EF6\u4E2D\uFF1B\u6B64\u65F6\u4E0D\u7BA1 <code>save-result</code> \u662F\u5426\u4E3A true\uFF0C\u90FD\u4E0D\u4F1A\u518D\u5F80<code>~/logs/arthas-cache/result.log</code> \u4E2D\u5F02\u6B65\u5199\u7ED3\u679C\u3002</li></ul><h2 id="_6-\u505C\u6B62\u547D\u4EE4" tabindex="-1"><a class="header-anchor" href="#_6-\u505C\u6B62\u547D\u4EE4" aria-hidden="true">#</a> 6. \u505C\u6B62\u547D\u4EE4</h2><p>\u5F02\u6B65\u6267\u884C\u7684\u547D\u4EE4\uFF0C\u5982\u679C\u5E0C\u671B\u505C\u6B62\uFF0C\u53EF\u6267\u884C<code>kill <job-id></code></p><h2 id="_7-\u5176\u4ED6" tabindex="-1"><a class="header-anchor" href="#_7-\u5176\u4ED6" aria-hidden="true">#</a> 7. \u5176\u4ED6</h2><ul><li>\u6700\u591A\u540C\u65F6\u652F\u6301 8 \u4E2A\u547D\u4EE4\u4F7F\u7528\u91CD\u5B9A\u5411\u5C06\u7ED3\u679C\u5199\u65E5\u5FD7</li><li>\u8BF7\u52FF\u540C\u65F6\u5F00\u542F\u8FC7\u591A\u7684\u540E\u53F0\u5F02\u6B65\u547D\u4EE4\uFF0C\u4EE5\u514D\u5BF9\u76EE\u6807 JVM \u6027\u80FD\u9020\u6210\u5F71\u54CD</li><li>\u5982\u679C\u4E0D\u60F3\u505C\u6B62 arthas\uFF0C\u7EE7\u7EED\u6267\u884C\u540E\u53F0\u4EFB\u52A1\uFF0C\u53EF\u4EE5\u6267\u884C <code>quit</code> \u9000\u51FA arthas \u63A7\u5236\u53F0\uFF08<code>stop</code> \u4F1A\u505C\u6B62 arthas \u670D\u52A1\uFF09</li></ul>`,27);function k(f,x){const s=l("ExternalLinkIcon");return o(),c("div",null,[r,e("p",null,[e("a",p,[u,h,n(s)])]),e("p",null,[b,e("a",m,[g,n(s)]),v]),_])}const E=t(d,[["render",k],["__file","async.html.vue"]]);export{E as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-d0358c7e","path":"/doc/auth.html","title":"auth","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u914D\u7F6E\u7528\u6237\u540D\u548C\u5BC6\u7801","slug":"\u914D\u7F6E\u7528\u6237\u540D\u548C\u5BC6\u7801","link":"#\u914D\u7F6E\u7528\u6237\u540D\u548C\u5BC6\u7801","children":[]},{"level":2,"title":"\u672C\u5730\u8FDE\u63A5\u4E0D\u9274\u6743","slug":"\u672C\u5730\u8FDE\u63A5\u4E0D\u9274\u6743","link":"#\u672C\u5730\u8FDE\u63A5\u4E0D\u9274\u6743","children":[]},{"level":2,"title":"\u5728 telnet console \u91CC\u9274\u6743","slug":"\u5728-telnet-console-\u91CC\u9274\u6743","link":"#\u5728-telnet-console-\u91CC\u9274\u6743","children":[]},{"level":2,"title":"Web console \u5BC6\u7801\u9A8C\u8BC1","slug":"web-console-\u5BC6\u7801\u9A8C\u8BC1","link":"#web-console-\u5BC6\u7801\u9A8C\u8BC1","children":[]},{"level":2,"title":"HTTP API \u9A8C\u8BC1","slug":"http-api-\u9A8C\u8BC1","link":"#http-api-\u9A8C\u8BC1","children":[{"level":3,"title":"Authorization Header \u65B9\u5F0F\uFF08\u63A8\u8350\uFF09","slug":"authorization-header-\u65B9\u5F0F-\u63A8\u8350","link":"#authorization-header-\u65B9\u5F0F-\u63A8\u8350","children":[]},{"level":3,"title":"URL \u53C2\u6570\u4F20\u9012\u65B9\u5F0F","slug":"url-\u53C2\u6570\u4F20\u9012\u65B9\u5F0F","link":"#url-\u53C2\u6570\u4F20\u9012\u65B9\u5F0F","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/auth.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,13 @@
|
||||
import{_ as t,o as i,c as o,a as e,b as d,d as a,e as n,r}from"./app.4d248835.js";const c={},l=a(`<h1 id="auth" tabindex="-1"><a class="header-anchor" href="#auth" aria-hidden="true">#</a> auth</h1><div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>\u9A8C\u8BC1\u5F53\u524D\u4F1A\u8BDD</p></div><h2 id="\u914D\u7F6E\u7528\u6237\u540D\u548C\u5BC6\u7801" tabindex="-1"><a class="header-anchor" href="#\u914D\u7F6E\u7528\u6237\u540D\u548C\u5BC6\u7801" aria-hidden="true">#</a> \u914D\u7F6E\u7528\u6237\u540D\u548C\u5BC6\u7801</h2><p>\u5728 attach \u65F6\uFF0C\u53EF\u4EE5\u5728\u547D\u4EE4\u884C\u6307\u5B9A\u5BC6\u7801\u3002\u6BD4\u5982\uFF1A</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>java -jar arthas-boot3.jar --password ppp
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><ul><li><p>\u53EF\u4EE5\u901A\u8FC7 <code>--username</code> \u9009\u9879\u6765\u6307\u5B9A\u7528\u6237\uFF0C\u9ED8\u8BA4\u503C\u662F<code>arthas</code>\u3002</p></li><li><p>\u4E5F\u53EF\u4EE5\u5728 <code>arthas.properties</code> \u91CC\u4E2D\u914D\u7F6E username/password\u3002\u547D\u4EE4\u884C\u7684\u4F18\u5148\u7EA7\u5927\u4E8E\u914D\u7F6E\u6587\u4EF6\u3002</p></li><li><p>\u5982\u679C\u53EA\u914D\u7F6E<code>username</code>\uFF0C\u6CA1\u6709\u914D\u7F6E<code>password</code>\uFF0C\u5219\u4F1A\u751F\u6210\u968F\u673A\u5BC6\u7801\uFF0C\u6253\u5370\u5728<code>~/logs/arthas/arthas.log</code>\u4E2D</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>Using generated security password: 0vUBJpRIppkKuZ7dYzYqOKtranj4unGh
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li></ul><h2 id="\u672C\u5730\u8FDE\u63A5\u4E0D\u9274\u6743" tabindex="-1"><a class="header-anchor" href="#\u672C\u5730\u8FDE\u63A5\u4E0D\u9274\u6743" aria-hidden="true">#</a> \u672C\u5730\u8FDE\u63A5\u4E0D\u9274\u6743</h2><p>\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u5728<code>arthas.properties</code>\u6587\u4EF6\u91CC\u6709\u914D\u7F6E\uFF1A</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>arthas.localConnectionNonAuth=true
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u5F53\u914D\u7F6E\u5BC6\u7801\u65F6\uFF0C\u4F7F\u7528\u672C\u5730\u8FDE\u63A5\uFF0C\u4E5F\u4E0D\u9700\u8981\u9274\u6743\u3002\u9ED8\u8BA4\u914D\u7F6E\u503C\u662F true\uFF0C\u65B9\u4FBF\u672C\u5730\u8FDE\u63A5\u4F7F\u7528\u3002\u53EA\u6709\u8FDC\u7A0B\u8FDE\u63A5\u65F6\uFF0C\u624D\u9700\u8981\u9274\u6743\u3002</p><h2 id="\u5728-telnet-console-\u91CC\u9274\u6743" tabindex="-1"><a class="header-anchor" href="#\u5728-telnet-console-\u91CC\u9274\u6743" aria-hidden="true">#</a> \u5728 telnet console \u91CC\u9274\u6743</h2><p>\u8FDE\u63A5\u5230 arthas \u540E\uFF0C\u76F4\u63A5\u6267\u884C\u547D\u4EE4\u4F1A\u63D0\u793A\u9700\u8981\u9274\u6743\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token punctuation">[</span>arthas@37430<span class="token punctuation">]</span>$ <span class="token builtin class-name">help</span>
|
||||
Error<span class="token operator">!</span> <span class="token builtin class-name">command</span> not permitted, try to use <span class="token string">'auth'</span> <span class="token builtin class-name">command</span> to authenticates.
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p>\u4F7F\u7528<code>auth</code>\u547D\u4EE4\u6765\u9274\u6743\uFF0C\u6210\u529F\u4E4B\u540E\u53EF\u4EE5\u6267\u884C\u5176\u5B83\u547D\u4EE4\u3002</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>[arthas@37430]$ auth ppp
|
||||
Authentication result: true
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><ul><li>\u53EF\u4EE5\u901A\u8FC7 <code>--username</code> \u9009\u9879\u6765\u6307\u5B9A\u7528\u6237\uFF0C\u9ED8\u8BA4\u503C\u662F<code>arthas</code>\u3002</li></ul><h2 id="web-console-\u5BC6\u7801\u9A8C\u8BC1" tabindex="-1"><a class="header-anchor" href="#web-console-\u5BC6\u7801\u9A8C\u8BC1" aria-hidden="true">#</a> Web console \u5BC6\u7801\u9A8C\u8BC1</h2><p>\u6253\u5F00\u6D4F\u89C8\u5668\uFF0C\u4F1A\u6709\u5F39\u7A97\u63D0\u793A\u9700\u8981\u8F93\u5165 \u7528\u6237\u540D \u548C \u5BC6\u7801\u3002</p><p>\u6210\u529F\u4E4B\u540E\uFF0C\u5219\u53EF\u4EE5\u76F4\u63A5\u8FDE\u63A5\u4E0A web console\u3002</p><h2 id="http-api-\u9A8C\u8BC1" tabindex="-1"><a class="header-anchor" href="#http-api-\u9A8C\u8BC1" aria-hidden="true">#</a> HTTP API \u9A8C\u8BC1</h2><h3 id="authorization-header-\u65B9\u5F0F-\u63A8\u8350" tabindex="-1"><a class="header-anchor" href="#authorization-header-\u65B9\u5F0F-\u63A8\u8350" aria-hidden="true">#</a> Authorization Header \u65B9\u5F0F\uFF08\u63A8\u8350\uFF09</h3><p>Arthas \u91C7\u7528\u7684\u662F HTTP \u6807\u51C6\u7684 Basic Authorization\uFF0C\u5BA2\u6237\u7AEF\u8BF7\u6C42\u65F6\u589E\u52A0\u5BF9\u5E94\u7684 header \u5373\u53EF\u3002</p>`,22),u=n("\u53C2\u8003\uFF1A"),p={href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication",target:"_blank",rel:"noopener noreferrer"},h=n("https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication"),m=a(`<p>\u4F8B\u5982\uFF0C\u7528\u6237\u540D\u662F\uFF1A<code>admin</code>\uFF0C\u5BC6\u7801\u662F <code>admin</code>\uFF0C\u5219\u7EC4\u5408\u4E3A\u5B57\u7B26\u4E32\uFF1A <code>admin:admin</code>\uFF0Cbase64 \u7ED3\u679C\u662F\uFF1A <code>YWRtaW46YWRtaW4=</code>\uFF0C\u5219 HTTP \u8BF7\u6C42\u589E\u52A0<code>Authorization</code> header\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">curl</span> <span class="token string">'http://localhost:8563/api'</span> <span class="token punctuation">\\</span>
|
||||
<span class="token parameter variable">-H</span> <span class="token string">'Authorization: Basic YWRtaW46YWRtaW4='</span> <span class="token punctuation">\\</span>
|
||||
--data-raw <span class="token string">'{"action":"exec","command":"version"}'</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><h3 id="url-\u53C2\u6570\u4F20\u9012\u65B9\u5F0F" tabindex="-1"><a class="header-anchor" href="#url-\u53C2\u6570\u4F20\u9012\u65B9\u5F0F" aria-hidden="true">#</a> URL \u53C2\u6570\u4F20\u9012\u65B9\u5F0F</h3><p>\u4E3A\u4E86\u65B9\u4FBF\u5404\u79CD\u7279\u6B8A\u60C5\u51B5\uFF0C\u652F\u6301\u4E86\u4EE5 parameters \u65B9\u5F0F\u4F20\u9012 username \u548C password\u3002\u6BD4\u5982\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">curl</span> <span class="token string">'http://localhost:8563/api?password=admin'</span> <span class="token punctuation">\\</span>
|
||||
--data-raw <span class="token string">'{"action":"exec","command":"version"}'</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div>`,5);function v(b,g){const s=r("ExternalLinkIcon");return i(),o("div",null,[l,e("ul",null,[e("li",null,[u,e("a",p,[h,d(s)])])]),m])}const _=t(c,[["render",v],["__file","auth.html.vue"]]);export{_ as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-f76c33a6","path":"/en/doc/auth.html","title":"auth","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Configure username and password","slug":"configure-username-and-password","link":"#configure-username-and-password","children":[]},{"level":2,"title":"Local connection does not require authentication","slug":"local-connection-does-not-require-authentication","link":"#local-connection-does-not-require-authentication","children":[]},{"level":2,"title":"Authenticate in the telnet console","slug":"authenticate-in-the-telnet-console","link":"#authenticate-in-the-telnet-console","children":[]},{"level":2,"title":"Web console Authentication","slug":"web-console-authentication","link":"#web-console-authentication","children":[]},{"level":2,"title":"HTTP API Authentication","slug":"http-api-authentication","link":"#http-api-authentication","children":[{"level":3,"title":"HTTP Authorization Header(recommended)","slug":"http-authorization-header-recommended","link":"#http-authorization-header-recommended","children":[]},{"level":3,"title":"URL parameters","slug":"url-parameters","link":"#url-parameters","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/auth.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,13 @@
|
||||
import{_ as s,o as i,c as o,a as e,b as r,d as a,e as n,r as c}from"./app.4d248835.js";const d={},l=a(`<h1 id="auth" tabindex="-1"><a class="header-anchor" href="#auth" aria-hidden="true">#</a> auth</h1><div class="custom-container tip"><p class="custom-container-title">TIP</p><p>Authenticates the current session</p></div><h2 id="configure-username-and-password" tabindex="-1"><a class="header-anchor" href="#configure-username-and-password" aria-hidden="true">#</a> Configure username and password</h2><p>When attaching, you can specify a password on the command line. such as:</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>java -jar arthas-boot3.jar --password ppp
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><ul><li><p>The user can be specified by the <code>--username</code> option, the default value is <code>arthas</code>.</p></li><li><p>You can also configure username/password in <code>arthas.properties</code>. The priority of the command line is higher than that of the configuration file.</p></li><li><p>If only <code>username</code> is configured and no <code>password</code> is configured, a random password will be generated and printed in <code>~/logs/arthas/arthas.log</code></p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>Using generated security password: 0vUBJpRIppkKuZ7dYzYqOKtranj4unGh
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li></ul><h2 id="local-connection-does-not-require-authentication" tabindex="-1"><a class="header-anchor" href="#local-connection-does-not-require-authentication" aria-hidden="true">#</a> Local connection does not require authentication</h2><p>By default, there are configurations in the <code>arthas.properties</code> file:</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>arthas.localConnectionNonAuth=true
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>When the password is configured, connect from localhost, the authentication is not required. The default configuration value is true, which is convenient for local connection. Authentication is only required when connecting remotely.</p><h2 id="authenticate-in-the-telnet-console" tabindex="-1"><a class="header-anchor" href="#authenticate-in-the-telnet-console" aria-hidden="true">#</a> Authenticate in the telnet console</h2><p>After connecting to arthas, directly executing the command will prompt for authentication:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token punctuation">[</span>arthas@37430<span class="token punctuation">]</span>$ <span class="token builtin class-name">help</span>
|
||||
Error<span class="token operator">!</span> <span class="token builtin class-name">command</span> not permitted, try to use <span class="token string">'auth'</span> <span class="token builtin class-name">command</span> to authenticates.
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p>Use the <code>auth</code> command to authenticate, and you can execute other commands after success.</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>[arthas@37430]$ auth ppp
|
||||
Authentication result: true
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><ul><li>The user can be specified by the <code>--username</code> option, the default value is <code>arthas</code>.</li></ul><h2 id="web-console-authentication" tabindex="-1"><a class="header-anchor" href="#web-console-authentication" aria-hidden="true">#</a> Web console Authentication</h2><p>Open the browser, there will be a pop-up window prompting you to enter your username and password.</p><p>After success, you can directly connect to the web console.</p><h2 id="http-api-authentication" tabindex="-1"><a class="header-anchor" href="#http-api-authentication" aria-hidden="true">#</a> HTTP API Authentication</h2><h3 id="http-authorization-header-recommended" tabindex="-1"><a class="header-anchor" href="#http-authorization-header-recommended" aria-hidden="true">#</a> HTTP Authorization Header(recommended)</h3><p>Arthas uses the HTTP standard Basic Authorization.</p>`,22),u=n("Reference: "),h={href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication",target:"_blank",rel:"noopener noreferrer"},p=n("https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication"),m=a(`<p>For example, if the user name is: <code>admin</code> and the password is <code>admin</code>, the combination is a string: <code>admin:admin</code>, the base64 result is: <code>YWRtaW46YWRtaW4=</code>, then the HTTP request adds the <code>Authorization</code> header:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">curl</span> <span class="token string">'http://localhost:8563/api'</span> <span class="token punctuation">\\</span>
|
||||
<span class="token parameter variable">-H</span> <span class="token string">'Authorization: Basic YWRtaW46YWRtaW4='</span> <span class="token punctuation">\\</span>
|
||||
--data-raw <span class="token string">'{"action":"exec","command":"version"}'</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><h3 id="url-parameters" tabindex="-1"><a class="header-anchor" href="#url-parameters" aria-hidden="true">#</a> URL parameters</h3><p>It supports passing username and password in parameters. such as:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">curl</span> <span class="token string">'http://localhost:8563/api?password=admin'</span> <span class="token punctuation">\\</span>
|
||||
--data-raw <span class="token string">'{"action":"exec","command":"version"}'</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div>`,5);function v(b,g){const t=c("ExternalLinkIcon");return i(),o("div",null,[l,e("ul",null,[e("li",null,[u,e("a",h,[p,r(t)])])]),m])}const x=s(d,[["render",v],["__file","auth.html.vue"]]);export{x as default};
|
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 49.484 28.284"><g transform="translate(-229 -126.358)" fill="currentColor"><rect width="35" height="5" rx="2" transform="rotate(-45 296.902 -200.874)"/><rect width="35" height="5" rx="2" transform="rotate(-135 169.502 20.377)"/></g></svg>
|
After Width: | Height: | Size: 291 B |
@ -0,0 +1,11 @@
|
||||
import{_ as e,o as a,c as s,d as n}from"./app.4d248835.js";const t={},i=n(`<h1 id="base64" tabindex="-1"><a class="header-anchor" href="#base64" aria-hidden="true">#</a> base64</h1><div class="custom-container tip"><p class="custom-container-title">TIP</p><p>Encode and decode using Base64 representation.</p></div><h2 id="encode-to-base64" tabindex="-1"><a class="header-anchor" href="#encode-to-base64" aria-hidden="true">#</a> Encode to base64</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token punctuation">[</span>arthas@70070<span class="token punctuation">]</span>$ <span class="token builtin class-name">echo</span> <span class="token string">'abc'</span> <span class="token operator">></span> /tmp/test.txt
|
||||
<span class="token punctuation">[</span>arthas@70070<span class="token punctuation">]</span>$ <span class="token function">cat</span> /tmp/test.txt
|
||||
abc
|
||||
|
||||
<span class="token punctuation">[</span>arthas@70070<span class="token punctuation">]</span>$ base64 /tmp/test.txt
|
||||
<span class="token assign-left variable">YWJjCg</span><span class="token operator">==</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></div><h2 id="encode-to-base64-and-save-output-to-file" tabindex="-1"><a class="header-anchor" href="#encode-to-base64-and-save-output-to-file" aria-hidden="true">#</a> Encode to base64 and save output to file</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ base64 <span class="token parameter variable">--input</span> /tmp/test.txt <span class="token parameter variable">--output</span> /tmp/result.txt
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="decode-from-base64" tabindex="-1"><a class="header-anchor" href="#decode-from-base64" aria-hidden="true">#</a> Decode from base64</h2><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ base64 -d /tmp/result.txt
|
||||
abc
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="decode-from-base64-and-save-output-to-file" tabindex="-1"><a class="header-anchor" href="#decode-from-base64-and-save-output-to-file" aria-hidden="true">#</a> Decode from base64 and save output to file</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ base64 <span class="token parameter variable">-d</span> /tmp/result.txt <span class="token parameter variable">--output</span> /tmp/bbb.txt
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,10),d=[i];function c(o,r){return a(),s("div",null,d)}const p=e(t,[["render",c],["__file","base64.html.vue"]]);export{p as default};
|
@ -0,0 +1,11 @@
|
||||
import{_ as a,o as e,c as s,d as n}from"./app.4d248835.js";const t={},i=n(`<h1 id="base64" tabindex="-1"><a class="header-anchor" href="#base64" aria-hidden="true">#</a> base64</h1><div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>base64 \u7F16\u7801\u8F6C\u6362\uFF0C\u548C linux \u91CC\u7684 base64 \u547D\u4EE4\u7C7B\u4F3C\u3002</p></div><h2 id="\u5BF9\u6587\u4EF6\u8FDB\u884C-base64-\u7F16\u7801" tabindex="-1"><a class="header-anchor" href="#\u5BF9\u6587\u4EF6\u8FDB\u884C-base64-\u7F16\u7801" aria-hidden="true">#</a> \u5BF9\u6587\u4EF6\u8FDB\u884C base64 \u7F16\u7801</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token punctuation">[</span>arthas@70070<span class="token punctuation">]</span>$ <span class="token builtin class-name">echo</span> <span class="token string">'abc'</span> <span class="token operator">></span> /tmp/test.txt
|
||||
<span class="token punctuation">[</span>arthas@70070<span class="token punctuation">]</span>$ <span class="token function">cat</span> /tmp/test.txt
|
||||
abc
|
||||
|
||||
<span class="token punctuation">[</span>arthas@70070<span class="token punctuation">]</span>$ base64 /tmp/test.txt
|
||||
<span class="token assign-left variable">YWJjCg</span><span class="token operator">==</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></div><h2 id="\u5BF9\u6587\u4EF6\u8FDB\u884C-base64-\u7F16\u7801\u5E76\u628A\u7ED3\u679C\u4FDD\u5B58\u5230\u6587\u4EF6\u91CC" tabindex="-1"><a class="header-anchor" href="#\u5BF9\u6587\u4EF6\u8FDB\u884C-base64-\u7F16\u7801\u5E76\u628A\u7ED3\u679C\u4FDD\u5B58\u5230\u6587\u4EF6\u91CC" aria-hidden="true">#</a> \u5BF9\u6587\u4EF6\u8FDB\u884C base64 \u7F16\u7801\u5E76\u628A\u7ED3\u679C\u4FDD\u5B58\u5230\u6587\u4EF6\u91CC</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ base64 <span class="token parameter variable">--input</span> /tmp/test.txt <span class="token parameter variable">--output</span> /tmp/result.txt
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="\u7528-base64-\u89E3\u7801\u6587\u4EF6" tabindex="-1"><a class="header-anchor" href="#\u7528-base64-\u89E3\u7801\u6587\u4EF6" aria-hidden="true">#</a> \u7528 base64 \u89E3\u7801\u6587\u4EF6</h2><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ base64 -d /tmp/result.txt
|
||||
abc
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="\u7528-base64-\u89E3\u7801\u6587\u4EF6\u5E76\u4FDD\u5B58\u7ED3\u679C\u5230\u6587\u4EF6\u91CC" tabindex="-1"><a class="header-anchor" href="#\u7528-base64-\u89E3\u7801\u6587\u4EF6\u5E76\u4FDD\u5B58\u7ED3\u679C\u5230\u6587\u4EF6\u91CC" aria-hidden="true">#</a> \u7528 base64 \u89E3\u7801\u6587\u4EF6\u5E76\u4FDD\u5B58\u7ED3\u679C\u5230\u6587\u4EF6\u91CC</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ base64 <span class="token parameter variable">-d</span> /tmp/result.txt <span class="token parameter variable">--output</span> /tmp/bbb.txt
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,10),r=[i];function d(l,c){return e(),s("div",null,r)}const o=a(t,[["render",d],["__file","base64.html.vue"]]);export{o as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-d17b7034","path":"/en/doc/base64.html","title":"base64","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Encode to base64","slug":"encode-to-base64","link":"#encode-to-base64","children":[]},{"level":2,"title":"Encode to base64 and save output to file","slug":"encode-to-base64-and-save-output-to-file","link":"#encode-to-base64-and-save-output-to-file","children":[]},{"level":2,"title":"Decode from base64","slug":"decode-from-base64","link":"#decode-from-base64","children":[]},{"level":2,"title":"Decode from base64 and save output to file","slug":"decode-from-base64-and-save-output-to-file","link":"#decode-from-base64-and-save-output-to-file","children":[]}],"git":{"updatedTime":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/base64.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-3157067a","path":"/doc/base64.html","title":"base64","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u5BF9\u6587\u4EF6\u8FDB\u884C base64 \u7F16\u7801","slug":"\u5BF9\u6587\u4EF6\u8FDB\u884C-base64-\u7F16\u7801","link":"#\u5BF9\u6587\u4EF6\u8FDB\u884C-base64-\u7F16\u7801","children":[]},{"level":2,"title":"\u5BF9\u6587\u4EF6\u8FDB\u884C base64 \u7F16\u7801\u5E76\u628A\u7ED3\u679C\u4FDD\u5B58\u5230\u6587\u4EF6\u91CC","slug":"\u5BF9\u6587\u4EF6\u8FDB\u884C-base64-\u7F16\u7801\u5E76\u628A\u7ED3\u679C\u4FDD\u5B58\u5230\u6587\u4EF6\u91CC","link":"#\u5BF9\u6587\u4EF6\u8FDB\u884C-base64-\u7F16\u7801\u5E76\u628A\u7ED3\u679C\u4FDD\u5B58\u5230\u6587\u4EF6\u91CC","children":[]},{"level":2,"title":"\u7528 base64 \u89E3\u7801\u6587\u4EF6","slug":"\u7528-base64-\u89E3\u7801\u6587\u4EF6","link":"#\u7528-base64-\u89E3\u7801\u6587\u4EF6","children":[]},{"level":2,"title":"\u7528 base64 \u89E3\u7801\u6587\u4EF6\u5E76\u4FDD\u5B58\u7ED3\u679C\u5230\u6587\u4EF6\u91CC","slug":"\u7528-base64-\u89E3\u7801\u6587\u4EF6\u5E76\u4FDD\u5B58\u7ED3\u679C\u5230\u6587\u4EF6\u91CC","link":"#\u7528-base64-\u89E3\u7801\u6587\u4EF6\u5E76\u4FDD\u5B58\u7ED3\u679C\u5230\u6587\u4EF6\u91CC","children":[]}],"git":{"updatedTime":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/base64.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,10 @@
|
||||
import{_ as n,o as c,c as o,a as e,b as i,w as d,d as a,e as s,r}from"./app.4d248835.js";const l={},h=a(`<h1 id="batch-processing" tabindex="-1"><a class="header-anchor" href="#batch-processing" aria-hidden="true">#</a> Batch Processing</h1><p>With the help of Batch Processing, you can run multiple commands in batch and get the final result at the end. The process name can be specified using the \u201C\u2013select\u201D parameter.</p><h2 id="usage" tabindex="-1"><a class="header-anchor" href="#usage" aria-hidden="true">#</a> Usage</h2><h3 id="step-1-create-the-script" tabindex="-1"><a class="header-anchor" href="#step-1-create-the-script" aria-hidden="true">#</a> Step 1: Create the script</h3><p>Create a <code>test.as</code> script suffixed with <code>as</code>. Here <code>as</code> is suggested for the suffix of the filename, but in fact any suffix is acceptable.</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>\u279C arthas git:<span class="token punctuation">(</span>develop<span class="token punctuation">)</span> <span class="token function">cat</span> /var/tmp/test.as
|
||||
<span class="token builtin class-name">help</span>
|
||||
dashboard <span class="token parameter variable">-n</span> <span class="token number">1</span>
|
||||
session
|
||||
thread
|
||||
sc <span class="token parameter variable">-d</span> org.apache.commons.lang.StringUtils
|
||||
</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><p>Note:</p>`,7),p=a("<li>Each command takes one line.</li><li>Batch mode execution times (via <code>-n</code>) must be explicitly specified for <code>dashboard</code>, otherwise batch script cannot terminate.</li><li>Commands such as <code>watch</code>/<code>tt</code>/<code>trace</code>/<code>monitor</code>/<code>stack</code> should include <code>-n</code> option to ensure the script can be able to quit.</li>",3),u=s("Also consider to use "),m=e("code",null,"async",-1),b=s(" (for example: "),v=e("code",null,"watch c.t.X test returnObj > &",-1),f=s(") to put commands run at background and get the output from the log file, see more from "),g=s("asynchronous job"),_=a(`<h3 id="step-2-run-the-script" tabindex="-1"><a class="header-anchor" href="#step-2-run-the-script" aria-hidden="true">#</a> Step 2: Run the script</h3><p>Use <code>-f</code> to specify the script file. By default the result will be output to the standard output, but you can redirect the output to the file like this:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>./as3.sh <span class="token parameter variable">-f</span> /var/tmp/test.as <span class="token number">56328</span> <span class="token operator">></span> test.out
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>Use <code>-c</code> also can specify the commands, like this:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>./as3.sh <span class="token parameter variable">-c</span> <span class="token string">'sysprop; thread'</span> <span class="token number">56328</span> <span class="token operator">></span> test.out
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="step-3-check-the-output" tabindex="-1"><a class="header-anchor" href="#step-3-check-the-output" aria-hidden="true">#</a> Step 3: Check the output</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">cat</span> test.out
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,7);function k(x,y){const t=r("RouterLink");return c(),o("div",null,[h,e("ul",null,[p,e("li",null,[u,m,b,v,f,i(t,{to:"/en/doc/async.html"},{default:d(()=>[g]),_:1})])]),_])}const B=n(l,[["render",k],["__file","batch-support.html.vue"]]);export{B as default};
|
@ -0,0 +1,10 @@
|
||||
import{_ as t,o as d,c as i,a as e,b as o,w as c,d as a,e as s,r}from"./app.4d248835.js";const l={},p=a('<h1 id="\u6279\u5904\u7406\u529F\u80FD" tabindex="-1"><a class="header-anchor" href="#\u6279\u5904\u7406\u529F\u80FD" aria-hidden="true">#</a> \u6279\u5904\u7406\u529F\u80FD</h1><div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>\u901A\u8FC7\u6279\u5904\u7406\u529F\u80FD\uFF0Carthas \u652F\u6301\u4E00\u6B21\u6027\u6279\u91CF\u8FD0\u884C\u591A\u4E2A\u547D\u4EE4\uFF0C\u5E76\u53D6\u5F97\u547D\u4EE4\u6267\u884C\u7684\u7ED3\u679C\u3002\u53EF\u7ED3\u5408 <code>--select</code> \u53C2\u6570\u53EF\u4EE5\u6307\u5B9A\u8FDB\u7A0B\u540D\u5B57\u4E00\u8D77\u4F7F\u7528\u3002</p></div><h2 id="\u4F7F\u7528\u65B9\u6CD5" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528\u65B9\u6CD5" aria-hidden="true">#</a> \u4F7F\u7528\u65B9\u6CD5</h2><h3 id="\u7B2C\u4E00\u6B65-\u521B\u5EFA\u4F60\u7684\u6279\u5904\u7406\u811A\u672C" tabindex="-1"><a class="header-anchor" href="#\u7B2C\u4E00\u6B65-\u521B\u5EFA\u4F60\u7684\u6279\u5904\u7406\u811A\u672C" aria-hidden="true">#</a> \u7B2C\u4E00\u6B65\uFF1A\u521B\u5EFA\u4F60\u7684\u6279\u5904\u7406\u811A\u672C</h3><p>\u8FD9\u91CC\u6211\u4EEC\u65B0\u5EFA\u4E86\u4E00\u4E2A<code>test.as</code>\u811A\u672C\uFF0C\u4E3A\u4E86\u89C4\u8303\uFF0C\u6211\u4EEC\u91C7\u7528\u4E86.as \u540E\u7F00\u540D\uFF0C\u4F46\u4E8B\u5B9E\u4E0A\u4EFB\u610F\u7684\u6587\u672C\u6587\u4EF6\u90FD ok\u3002</p>',5),h={class:"custom-container tip"},u=e("p",{class:"custom-container-title"},"\u63D0\u793A",-1),m=e("li",null,"\u76EE\u524D\u9700\u8981\u6BCF\u4E2A\u547D\u4EE4\u5360\u4E00\u884C",-1),v=e("li",null,[s("dashboard \u52A1\u5FC5\u6307\u5B9A\u6267\u884C\u6B21\u6570 ("),e("code",null,"-n"),s(")\uFF0C\u5426\u5219\u4F1A\u5BFC\u81F4\u6279\u5904\u7406\u811A\u672C\u65E0\u6CD5\u7EC8\u6B62")],-1),_=e("li",null,[s("watch/tt/trace/monitor/stack \u7B49\u547D\u4EE4\u52A1\u5FC5\u6307\u5B9A\u6267\u884C\u6B21\u6570 ("),e("code",null,"-n"),s(")\uFF0C\u5426\u5219\u4F1A\u5BFC\u81F4\u6279\u5904\u7406\u811A\u672C\u65E0\u6CD5\u7EC8\u6B62")],-1),b=s("\u53EF\u4EE5\u4F7F\u7528\u5F02\u6B65\u540E\u53F0\u4EFB\u52A1\uFF0C\u5982 "),g=e("code",null,"watch c.t.X test returnObj > &",-1),k=s("\uFF0C\u8BA9\u547D\u4EE4\u4E00\u76F4\u5728\u540E\u53F0\u8FD0\u884C\uFF0C\u901A\u8FC7\u65E5\u5FD7\u83B7\u53D6\u7ED3\u679C\uFF0C"),x=s("\u83B7\u53D6\u66F4\u591A\u5F02\u6B65\u4EFB\u52A1\u7684\u4FE1\u606F"),f=a(`<div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>\u279C arthas git:(develop) cat /var/tmp/test.as
|
||||
help
|
||||
dashboard -n 1
|
||||
session
|
||||
thread
|
||||
sc -d org.apache.commons.lang.StringUtils
|
||||
</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><h3 id="\u7B2C\u4E8C\u6B65-\u8FD0\u884C\u4F60\u7684\u6279\u5904\u7406\u811A\u672C" tabindex="-1"><a class="header-anchor" href="#\u7B2C\u4E8C\u6B65-\u8FD0\u884C\u4F60\u7684\u6279\u5904\u7406\u811A\u672C" aria-hidden="true">#</a> \u7B2C\u4E8C\u6B65\uFF1A\u8FD0\u884C\u4F60\u7684\u6279\u5904\u7406\u811A\u672C</h3><p>\u901A\u8FC7<code>-f</code>\u6267\u884C\u811A\u672C\u6587\u4EF6\uFF0C\u6279\u5904\u7406\u811A\u672C\u9ED8\u8BA4\u4F1A\u8F93\u51FA\u5230\u6807\u51C6\u8F93\u51FA\u4E2D\uFF0C\u53EF\u4EE5\u5C06\u7ED3\u679C\u91CD\u5B9A\u5411\u5230\u6587\u4EF6\u4E2D\u3002</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>./as3.sh <span class="token parameter variable">-f</span> /var/tmp/test.as <span class="token operator"><</span>pid<span class="token operator">></span> <span class="token operator">></span> test.out <span class="token comment"># pid \u53EF\u4EE5\u901A\u8FC7 jps \u547D\u4EE4\u67E5\u770B</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u4E5F\u53EF\u4EE5\u901A\u8FC7 <code>-c</code> \u6765\u6307\u5B9A\u6307\u884C\u7684\u547D\u4EE4\uFF0C\u6BD4\u5982</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>./as3.sh <span class="token parameter variable">-c</span> <span class="token string">'sysprop; thread'</span> <span class="token operator"><</span>pid<span class="token operator">></span> <span class="token operator">></span> test.out <span class="token comment"># pid \u53EF\u4EE5\u901A\u8FC7 jps \u547D\u4EE4\u67E5\u770B</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="\u7B2C\u4E09\u6B65-\u67E5\u770B\u8FD0\u884C\u7ED3\u679C" tabindex="-1"><a class="header-anchor" href="#\u7B2C\u4E09\u6B65-\u67E5\u770B\u8FD0\u884C\u7ED3\u679C" aria-hidden="true">#</a> \u7B2C\u4E09\u6B65\uFF1A\u67E5\u770B\u8FD0\u884C\u7ED3\u679C</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">cat</span> test.out
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,8);function w(N,V){const n=r("RouterLink");return d(),i("div",null,[p,e("div",h,[u,e("ul",null,[m,v,_,e("li",null,[b,g,k,o(n,{to:"/doc/async.html"},{default:c(()=>[x]),_:1})])])]),f])}const B=t(l,[["render",w],["__file","batch-support.html.vue"]]);export{B as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-765e30be","path":"/en/doc/batch-support.html","title":"Batch Processing","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"Step 1: Create the script","slug":"step-1-create-the-script","link":"#step-1-create-the-script","children":[]},{"level":3,"title":"Step 2: Run the script","slug":"step-2-run-the-script","link":"#step-2-run-the-script","children":[]},{"level":3,"title":"Step 3: Check the output","slug":"step-3-check-the-output","link":"#step-3-check-the-output","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":2},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/batch-support.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-cc8f4ae6","path":"/doc/batch-support.html","title":"\u6279\u5904\u7406\u529F\u80FD","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u65B9\u6CD5","slug":"\u4F7F\u7528\u65B9\u6CD5","link":"#\u4F7F\u7528\u65B9\u6CD5","children":[{"level":3,"title":"\u7B2C\u4E00\u6B65\uFF1A\u521B\u5EFA\u4F60\u7684\u6279\u5904\u7406\u811A\u672C","slug":"\u7B2C\u4E00\u6B65-\u521B\u5EFA\u4F60\u7684\u6279\u5904\u7406\u811A\u672C","link":"#\u7B2C\u4E00\u6B65-\u521B\u5EFA\u4F60\u7684\u6279\u5904\u7406\u811A\u672C","children":[]},{"level":3,"title":"\u7B2C\u4E8C\u6B65\uFF1A\u8FD0\u884C\u4F60\u7684\u6279\u5904\u7406\u811A\u672C","slug":"\u7B2C\u4E8C\u6B65-\u8FD0\u884C\u4F60\u7684\u6279\u5904\u7406\u811A\u672C","link":"#\u7B2C\u4E8C\u6B65-\u8FD0\u884C\u4F60\u7684\u6279\u5904\u7406\u811A\u672C","children":[]},{"level":3,"title":"\u7B2C\u4E09\u6B65\uFF1A\u67E5\u770B\u8FD0\u884C\u7ED3\u679C","slug":"\u7B2C\u4E09\u6B65-\u67E5\u770B\u8FD0\u884C\u7ED3\u679C","link":"#\u7B2C\u4E09\u6B65-\u67E5\u770B\u8FD0\u884C\u7ED3\u679C","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":2},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/batch-support.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,2 @@
|
||||
import{_ as n,o as c,c as s,a as e,b as o,e as a,d as r,r as i}from"./app.4d248835.js";const d={},l=e("h1",{id:"cat",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cat","aria-hidden":"true"},"#"),a(" cat")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-cat",target:"_blank",rel:"noopener noreferrer"},_=e("code",null,"cat",-1),u=a("\u5728\u7EBF\u6559\u7A0B"),m=r(`<div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>\u6253\u5370\u6587\u4EF6\u5185\u5BB9\uFF0C\u548C linux \u91CC\u7684 cat \u547D\u4EE4\u7C7B\u4F3C\u3002</p></div><h2 id="\u4F7F\u7528\u53C2\u8003" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528\u53C2\u8003" aria-hidden="true">#</a> \u4F7F\u7528\u53C2\u8003</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">cat</span> /tmp/a.txt
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,3);function p(f,x){const t=i("ExternalLinkIcon");return c(),s("div",null,[l,e("p",null,[e("a",h,[_,u,o(t)])]),m])}const b=n(d,[["render",p],["__file","cat.html.vue"]]);export{b as default};
|
@ -0,0 +1 @@
|
||||
const a=JSON.parse('{"key":"v-6542b733","path":"/doc/cat.html","title":"cat","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/cat.md","version":"3.7.3"}');export{a as data};
|
@ -0,0 +1,2 @@
|
||||
import{_ as n,o as s,c,a as e,b as o,e as a,d as r,r as i}from"./app.4d248835.js";const d={},l=e("h1",{id:"cat",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cat","aria-hidden":"true"},"#"),a(" cat")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-cat",target:"_blank",rel:"noopener noreferrer"},_=e("code",null,"cat",-1),u=a(" online tutorial"),p=r(`<div class="custom-container tip"><p class="custom-container-title">TIP</p><p>Concatenate and print files</p></div><h2 id="usage" tabindex="-1"><a class="header-anchor" href="#usage" aria-hidden="true">#</a> Usage</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">cat</span> /tmp/a.txt
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,3);function m(f,v){const t=i("ExternalLinkIcon");return s(),c("div",null,[l,e("p",null,[e("a",h,[_,u,o(t)])]),p])}const g=n(d,[["render",m],["__file","cat.html.vue"]]);export{g as default};
|
@ -0,0 +1 @@
|
||||
const a=JSON.parse('{"key":"v-64a0cd47","path":"/en/doc/cat.html","title":"cat","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/cat.md","version":"3.7.3"}');export{a as data};
|
@ -0,0 +1,87 @@
|
||||
import{_ as n,o as l,c as i,a,b as r,e as s,d,r as t}from"./app.4d248835.js";const c={},o=a("h1",{id:"classloader",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#classloader","aria-hidden":"true"},"#"),s(" classloader")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=cn&id=command-classloader",target:"_blank",rel:"noopener noreferrer"},p=a("code",null,"classloader",-1),v=s("\u5728\u7EBF\u6559\u7A0B"),m=d(`<div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>\u67E5\u770B classloader \u7684\u7EE7\u627F\u6811\uFF0Curls\uFF0C\u7C7B\u52A0\u8F7D\u4FE1\u606F</p></div><p><code>classloader</code> \u547D\u4EE4\u5C06 JVM \u4E2D\u6240\u6709\u7684 classloader \u7684\u4FE1\u606F\u7EDF\u8BA1\u51FA\u6765\uFF0C\u5E76\u53EF\u4EE5\u5C55\u793A\u7EE7\u627F\u6811\uFF0Curls \u7B49\u3002</p><p>\u53EF\u4EE5\u8BA9\u6307\u5B9A\u7684 classloader \u53BB getResources\uFF0C\u6253\u5370\u51FA\u6240\u6709\u67E5\u627E\u5230\u7684 resources \u7684 url\u3002\u5BF9\u4E8E<code>ResourceNotFoundException</code>\u6BD4\u8F83\u6709\u7528\u3002</p><h2 id="\u53C2\u6570\u8BF4\u660E" tabindex="-1"><a class="header-anchor" href="#\u53C2\u6570\u8BF4\u660E" aria-hidden="true">#</a> \u53C2\u6570\u8BF4\u660E</h2><table><thead><tr><th style="text-align:right;">\u53C2\u6570\u540D\u79F0</th><th style="text-align:left;">\u53C2\u6570\u8BF4\u660E</th></tr></thead><tbody><tr><td style="text-align:right;">[l]</td><td style="text-align:left;">\u6309\u7C7B\u52A0\u8F7D\u5B9E\u4F8B\u8FDB\u884C\u7EDF\u8BA1</td></tr><tr><td style="text-align:right;">[t]</td><td style="text-align:left;">\u6253\u5370\u6240\u6709 ClassLoader \u7684\u7EE7\u627F\u6811</td></tr><tr><td style="text-align:right;">[a]</td><td style="text-align:left;">\u5217\u51FA\u6240\u6709 ClassLoader \u52A0\u8F7D\u7684\u7C7B\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528</td></tr><tr><td style="text-align:right;"><code>[c:]</code></td><td style="text-align:left;">ClassLoader \u7684 hashcode</td></tr><tr><td style="text-align:right;"><code>[classLoaderClass:]</code></td><td style="text-align:left;">\u6307\u5B9A\u6267\u884C\u8868\u8FBE\u5F0F\u7684 ClassLoader \u7684 class name</td></tr><tr><td style="text-align:right;"><code>[c: r:]</code></td><td style="text-align:left;">\u7528 ClassLoader \u53BB\u67E5\u627E resource</td></tr><tr><td style="text-align:right;"><code>[c: load:]</code></td><td style="text-align:left;">\u7528 ClassLoader \u53BB\u52A0\u8F7D\u6307\u5B9A\u7684\u7C7B</td></tr></tbody></table><h2 id="\u4F7F\u7528\u53C2\u8003" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528\u53C2\u8003" aria-hidden="true">#</a> \u4F7F\u7528\u53C2\u8003</h2><h3 id="\u6309\u7C7B\u52A0\u8F7D\u7C7B\u578B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F" tabindex="-1"><a class="header-anchor" href="#\u6309\u7C7B\u52A0\u8F7D\u7C7B\u578B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F" aria-hidden="true">#</a> \u6309\u7C7B\u52A0\u8F7D\u7C7B\u578B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader
|
||||
name numberOfInstances loadedCountTotal
|
||||
com.taobao.arthas.agent.ArthasClassloader <span class="token number">1</span> <span class="token number">2115</span>
|
||||
BootstrapClassLoader <span class="token number">1</span> <span class="token number">1861</span>
|
||||
sun.reflect.DelegatingClassLoader <span class="token number">5</span> <span class="token number">5</span>
|
||||
sun.misc.Launcher<span class="token variable">$AppClassLoader</span> <span class="token number">1</span> <span class="token number">4</span>
|
||||
sun.misc.Launcher<span class="token variable">$ExtClassLoader</span> <span class="token number">1</span> <span class="token number">1</span>
|
||||
Affect<span class="token punctuation">(</span>row-cnt:5<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">3</span> ms.
|
||||
</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></div><h3 id="\u6309\u7C7B\u52A0\u8F7D\u5B9E\u4F8B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F" tabindex="-1"><a class="header-anchor" href="#\u6309\u7C7B\u52A0\u8F7D\u5B9E\u4F8B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F" aria-hidden="true">#</a> \u6309\u7C7B\u52A0\u8F7D\u5B9E\u4F8B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-l</span>
|
||||
name loadedCount <span class="token builtin class-name">hash</span> parent
|
||||
BootstrapClassLoader <span class="token number">1861</span> null null
|
||||
com.taobao.arthas.agent.ArthasClassloader@68b31f0a <span class="token number">2115</span> 68b31f0a sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
sun.misc.Launcher<span class="token variable">$AppClassLoader</span>@3d4eac69 <span class="token number">4</span> 3d4eac69 sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69 <span class="token number">1</span> 66350f69 null
|
||||
Affect<span class="token punctuation">(</span>row-cnt:4<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">2</span> ms.
|
||||
</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></div><h3 id="\u67E5\u770B-classloader-\u7684\u7EE7\u627F\u6811" tabindex="-1"><a class="header-anchor" href="#\u67E5\u770B-classloader-\u7684\u7EE7\u627F\u6811" aria-hidden="true">#</a> \u67E5\u770B ClassLoader \u7684\u7EE7\u627F\u6811</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-t</span>
|
||||
+-BootstrapClassLoader
|
||||
+-sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
+-com.taobao.arthas.agent.ArthasClassloader@68b31f0a
|
||||
+-sun.misc.Launcher<span class="token variable">$AppClassLoader</span>@3d4eac69
|
||||
Affect<span class="token punctuation">(</span>row-cnt:4<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">3</span> ms.
|
||||
</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><h3 id="\u67E5\u770B-urlclassloader-\u5B9E\u9645\u7684-urls" tabindex="-1"><a class="header-anchor" href="#\u67E5\u770B-urlclassloader-\u5B9E\u9645\u7684-urls" aria-hidden="true">#</a> \u67E5\u770B URLClassLoader \u5B9E\u9645\u7684 urls</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-c</span> 3d4eac69
|
||||
file:/private/tmp/math-game.jar
|
||||
file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
|
||||
|
||||
Affect<span class="token punctuation">(</span>row-cnt:9<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">3</span> ms.
|
||||
</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></div><p><em>\u6CE8\u610F</em> hashcode \u662F\u53D8\u5316\u7684\uFF0C\u9700\u8981\u5148\u67E5\u770B\u5F53\u524D\u7684 ClassLoader \u4FE1\u606F\uFF0C\u63D0\u53D6\u5BF9\u5E94 ClassLoader \u7684 hashcode\u3002</p><p>\u5BF9\u4E8E\u53EA\u6709\u552F\u4E00\u5B9E\u4F8B\u7684 ClassLoader \u53EF\u4EE5\u901A\u8FC7 class name \u6307\u5B9A\uFF0C\u4F7F\u7528\u8D77\u6765\u66F4\u52A0\u65B9\u4FBF\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">--classLoaderClass</span> sun.misc.Launcher<span class="token variable">$AppClassLoader</span>
|
||||
file:/private/tmp/math-game.jar
|
||||
file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
|
||||
|
||||
Affect<span class="token punctuation">(</span>row-cnt:9<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">3</span> ms.
|
||||
</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></div><h3 id="\u4F7F\u7528-classloader-\u53BB\u67E5\u627E-resource" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528-classloader-\u53BB\u67E5\u627E-resource" aria-hidden="true">#</a> \u4F7F\u7528 ClassLoader \u53BB\u67E5\u627E resource</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-c</span> 3d4eac69 <span class="token parameter variable">-r</span> META-INF/MANIFEST.MF
|
||||
jar:file:/System/Library/Java/Extensions/MRJToolkit.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF
|
||||
jar:file:/private/tmp/math-game.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF
|
||||
jar:file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF
|
||||
</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>\u4E5F\u53EF\u4EE5\u5C1D\u8BD5\u67E5\u627E\u7C7B\u7684 class \u6587\u4EF6\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-c</span> 1b6d3586 <span class="token parameter variable">-r</span> java/lang/String.class
|
||||
jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/rt.jar<span class="token operator">!</span>/java/lang/String.class
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="\u4F7F\u7528-classloader-\u53BB\u52A0\u8F7D\u7C7B" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528-classloader-\u53BB\u52A0\u8F7D\u7C7B" aria-hidden="true">#</a> \u4F7F\u7528 ClassLoader \u53BB\u52A0\u8F7D\u7C7B</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-c</span> 3d4eac69 <span class="token parameter variable">--load</span> demo.MathGame
|
||||
load class success.
|
||||
class-info demo.MathGame
|
||||
code-source /private/tmp/math-game.jar
|
||||
name demo.MathGame
|
||||
isInterface <span class="token boolean">false</span>
|
||||
isAnnotation <span class="token boolean">false</span>
|
||||
isEnum <span class="token boolean">false</span>
|
||||
isAnonymousClass <span class="token boolean">false</span>
|
||||
isArray <span class="token boolean">false</span>
|
||||
isLocalClass <span class="token boolean">false</span>
|
||||
isMemberClass <span class="token boolean">false</span>
|
||||
isPrimitive <span class="token boolean">false</span>
|
||||
isSynthetic <span class="token boolean">false</span>
|
||||
simple-name MathGame
|
||||
modifier public
|
||||
annotation
|
||||
interfaces
|
||||
super-class +-java.lang.Object
|
||||
class-loader +-sun.misc.Launcher<span class="token variable">$AppClassLoader</span>@3d4eac69
|
||||
+-sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
classLoaderHash 3d4eac69
|
||||
</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></div><h3 id="\u7EDF\u8BA1-classloader-\u5B9E\u9645\u4F7F\u7528-url-\u548C\u672A\u4F7F\u7528\u7684-url" tabindex="-1"><a class="header-anchor" href="#\u7EDF\u8BA1-classloader-\u5B9E\u9645\u4F7F\u7528-url-\u548C\u672A\u4F7F\u7528\u7684-url" aria-hidden="true">#</a> \u7EDF\u8BA1 ClassLoader \u5B9E\u9645\u4F7F\u7528 URL \u548C\u672A\u4F7F\u7528\u7684 URL</h3><div class="custom-container warning"><p class="custom-container-title">\u6CE8\u610F</p><p>\u6CE8\u610F\uFF0C\u57FA\u4E8E JVM \u76EE\u524D\u5DF2\u52A0\u8F7D\u7684\u6240\u6709\u7C7B\u7EDF\u8BA1\uFF0C\u4E0D\u4EE3\u8868<code>Unused URLs</code>\u53EF\u4EE5\u4ECE\u5E94\u7528\u4E2D\u5220\u6389\u3002\u56E0\u4E3A\u53EF\u80FD\u5C06\u6765\u9700\u8981\u4ECE<code>Unused URLs</code>\u91CC\u52A0\u8F7D\u7C7B\uFF0C\u6216\u8005\u9700\u8981\u52A0\u8F7D<code>resources</code>\u3002</p></div><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ classloader --url-stat
|
||||
com.taobao.arthas.agent.ArthasClassloader@3c41660, hash:3c41660
|
||||
Used URLs:
|
||||
file:/Users/admin/.arthas/lib/3.5.6/arthas/arthas-core.jar
|
||||
Unused URLs:
|
||||
|
||||
sun.misc.Launcher$AppClassLoader@75b84c92, hash:75b84c92
|
||||
Used URLs:
|
||||
file:/Users/admin/code/java/arthas/math-game/target/math-game.jar
|
||||
file:/Users/admin/.arthas/lib/3.5.6/arthas/arthas-agent.jar
|
||||
Unused URLs:
|
||||
|
||||
sun.misc.Launcher$ExtClassLoader@7f31245a, hash:7f31245a
|
||||
Used URLs:
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/sunec.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/sunjce_provider.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/localedata.jar
|
||||
Unused URLs:
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/nashorn.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/cldrdata.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/legacy8ujsse.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/jfxrt.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/dnsns.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/openjsse.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/sunpkcs11.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/jaccess.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/zipfs.jar
|
||||
</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></div>`,26);function b(h,k){const e=t("ExternalLinkIcon");return l(),i("div",null,[o,a("p",null,[a("a",u,[p,v,r(e)])]),m])}const f=n(c,[["render",b],["__file","classloader.html.vue"]]);export{f as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-fc1b9a9c","path":"/en/doc/classloader.html","title":"classloader","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Options","slug":"options","link":"#options","children":[]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"View statistics categorized by class type","slug":"view-statistics-categorized-by-class-type","link":"#view-statistics-categorized-by-class-type","children":[]},{"level":3,"title":"View statistics categorized by loaded classes number","slug":"view-statistics-categorized-by-loaded-classes-number","link":"#view-statistics-categorized-by-loaded-classes-number","children":[]},{"level":3,"title":"View class-loaders hierarchy","slug":"view-class-loaders-hierarchy","link":"#view-class-loaders-hierarchy","children":[]},{"level":3,"title":"Show the URLs of the URLClassLoader","slug":"show-the-urls-of-the-urlclassloader","link":"#show-the-urls-of-the-urlclassloader","children":[]},{"level":3,"title":"Use the classloader to load resource","slug":"use-the-classloader-to-load-resource","link":"#use-the-classloader-to-load-resource","children":[]},{"level":3,"title":"Use the classloader to load class","slug":"use-the-classloader-to-load-class","link":"#use-the-classloader-to-load-class","children":[]},{"level":3,"title":"Statistics ClassLoader actually used URLs and unused URLs","slug":"statistics-classloader-actually-used-urls-and-unused-urls","link":"#statistics-classloader-actually-used-urls-and-unused-urls","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/classloader.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const l=JSON.parse('{"key":"v-49b1709e","path":"/doc/classloader.html","title":"classloader","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u53C2\u6570\u8BF4\u660E","slug":"\u53C2\u6570\u8BF4\u660E","link":"#\u53C2\u6570\u8BF4\u660E","children":[]},{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[{"level":3,"title":"\u6309\u7C7B\u52A0\u8F7D\u7C7B\u578B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F","slug":"\u6309\u7C7B\u52A0\u8F7D\u7C7B\u578B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F","link":"#\u6309\u7C7B\u52A0\u8F7D\u7C7B\u578B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F","children":[]},{"level":3,"title":"\u6309\u7C7B\u52A0\u8F7D\u5B9E\u4F8B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F","slug":"\u6309\u7C7B\u52A0\u8F7D\u5B9E\u4F8B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F","link":"#\u6309\u7C7B\u52A0\u8F7D\u5B9E\u4F8B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F","children":[]},{"level":3,"title":"\u67E5\u770B ClassLoader \u7684\u7EE7\u627F\u6811","slug":"\u67E5\u770B-classloader-\u7684\u7EE7\u627F\u6811","link":"#\u67E5\u770B-classloader-\u7684\u7EE7\u627F\u6811","children":[]},{"level":3,"title":"\u67E5\u770B URLClassLoader \u5B9E\u9645\u7684 urls","slug":"\u67E5\u770B-urlclassloader-\u5B9E\u9645\u7684-urls","link":"#\u67E5\u770B-urlclassloader-\u5B9E\u9645\u7684-urls","children":[]},{"level":3,"title":"\u4F7F\u7528 ClassLoader \u53BB\u67E5\u627E resource","slug":"\u4F7F\u7528-classloader-\u53BB\u67E5\u627E-resource","link":"#\u4F7F\u7528-classloader-\u53BB\u67E5\u627E-resource","children":[]},{"level":3,"title":"\u4F7F\u7528 ClassLoader \u53BB\u52A0\u8F7D\u7C7B","slug":"\u4F7F\u7528-classloader-\u53BB\u52A0\u8F7D\u7C7B","link":"#\u4F7F\u7528-classloader-\u53BB\u52A0\u8F7D\u7C7B","children":[]},{"level":3,"title":"\u7EDF\u8BA1 ClassLoader \u5B9E\u9645\u4F7F\u7528 URL \u548C\u672A\u4F7F\u7528\u7684 URL","slug":"\u7EDF\u8BA1-classloader-\u5B9E\u9645\u4F7F\u7528-url-\u548C\u672A\u4F7F\u7528\u7684-url","link":"#\u7EDF\u8BA1-classloader-\u5B9E\u9645\u4F7F\u7528-url-\u548C\u672A\u4F7F\u7528\u7684-url","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/classloader.md","version":"3.7.3"}');export{l as data};
|
@ -0,0 +1,87 @@
|
||||
import{_ as n,o as l,c as i,a,b as t,e as s,d as r,r as d}from"./app.4d248835.js";const c={},o=a("h1",{id:"classloader",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#classloader","aria-hidden":"true"},"#"),s(" classloader")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=en&id=command-classloader",target:"_blank",rel:"noopener noreferrer"},p=a("code",null,"classloader",-1),m=s(" online tutorial"),v=r(`<div class="custom-container tip"><p class="custom-container-title">TIP</p><p>View hierarchy, urls and classes-loading info for the class-loaders.</p></div><p><code>classloader</code> can search and print out the URLs for a specified resource from one particular classloader. It is quite handy when analyzing <code>ResourceNotFoundException</code>.</p><h2 id="options" tabindex="-1"><a class="header-anchor" href="#options" aria-hidden="true">#</a> Options</h2><table><thead><tr><th style="text-align:right;">Name</th><th style="text-align:left;">Specification</th></tr></thead><tbody><tr><td style="text-align:right;">[l]</td><td style="text-align:left;">list all classloader instances</td></tr><tr><td style="text-align:right;">[t]</td><td style="text-align:left;">print classloader's hierarchy</td></tr><tr><td style="text-align:right;">[a]</td><td style="text-align:left;">list all the classes loaded by all the classloaders (use it with great caution since the output can be huge)</td></tr><tr><td style="text-align:right;">[c:]</td><td style="text-align:left;">print classloader's hashcode</td></tr><tr><td style="text-align:right;"><code>[classLoaderClass:]</code></td><td style="text-align:left;">The class name of the ClassLoader that executes the expression.</td></tr><tr><td style="text-align:right;"><code>[c: r:]</code></td><td style="text-align:left;">using ClassLoader to search resource</td></tr><tr><td style="text-align:right;"><code>[c: load:]</code></td><td style="text-align:left;">using ClassLoader to load class</td></tr></tbody></table><h2 id="usage" tabindex="-1"><a class="header-anchor" href="#usage" aria-hidden="true">#</a> Usage</h2><h3 id="view-statistics-categorized-by-class-type" tabindex="-1"><a class="header-anchor" href="#view-statistics-categorized-by-class-type" aria-hidden="true">#</a> View statistics categorized by class type</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader
|
||||
name numberOfInstances loadedCountTotal
|
||||
com.taobao.arthas.agent.ArthasClassloader <span class="token number">1</span> <span class="token number">2115</span>
|
||||
BootstrapClassLoader <span class="token number">1</span> <span class="token number">1861</span>
|
||||
sun.reflect.DelegatingClassLoader <span class="token number">5</span> <span class="token number">5</span>
|
||||
sun.misc.Launcher<span class="token variable">$AppClassLoader</span> <span class="token number">1</span> <span class="token number">4</span>
|
||||
sun.misc.Launcher<span class="token variable">$ExtClassLoader</span> <span class="token number">1</span> <span class="token number">1</span>
|
||||
Affect<span class="token punctuation">(</span>row-cnt:5<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">3</span> ms.
|
||||
</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></div><h3 id="view-statistics-categorized-by-loaded-classes-number" tabindex="-1"><a class="header-anchor" href="#view-statistics-categorized-by-loaded-classes-number" aria-hidden="true">#</a> View statistics categorized by loaded classes number</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-l</span>
|
||||
name loadedCount <span class="token builtin class-name">hash</span> parent
|
||||
BootstrapClassLoader <span class="token number">1861</span> null null
|
||||
com.taobao.arthas.agent.ArthasClassloader@68b31f0a <span class="token number">2115</span> 68b31f0a sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
sun.misc.Launcher<span class="token variable">$AppClassLoader</span>@3d4eac69 <span class="token number">4</span> 3d4eac69 sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69 <span class="token number">1</span> 66350f69 null
|
||||
Affect<span class="token punctuation">(</span>row-cnt:4<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">2</span> ms.
|
||||
</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></div><h3 id="view-class-loaders-hierarchy" tabindex="-1"><a class="header-anchor" href="#view-class-loaders-hierarchy" aria-hidden="true">#</a> View class-loaders hierarchy</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-t</span>
|
||||
+-BootstrapClassLoader
|
||||
+-sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
+-com.taobao.arthas.agent.ArthasClassloader@68b31f0a
|
||||
+-sun.misc.Launcher<span class="token variable">$AppClassLoader</span>@3d4eac69
|
||||
Affect<span class="token punctuation">(</span>row-cnt:4<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">3</span> ms.
|
||||
</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><h3 id="show-the-urls-of-the-urlclassloader" tabindex="-1"><a class="header-anchor" href="#show-the-urls-of-the-urlclassloader" aria-hidden="true">#</a> Show the URLs of the URLClassLoader</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-c</span> 3d4eac69
|
||||
file:/private/tmp/math-game.jar
|
||||
file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
|
||||
|
||||
Affect<span class="token punctuation">(</span>row-cnt:9<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">3</span> ms.
|
||||
</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></div><p>Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader.</p><p>For ClassLoader with only unique instance, it can be specified by class name, which is more convenient to use:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">--classLoaderClass</span> sun.misc.Launcher<span class="token variable">$AppClassLoader</span>
|
||||
file:/private/tmp/math-game.jar
|
||||
file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
|
||||
|
||||
Affect<span class="token punctuation">(</span>row-cnt:9<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">3</span> ms.
|
||||
</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></div><h3 id="use-the-classloader-to-load-resource" tabindex="-1"><a class="header-anchor" href="#use-the-classloader-to-load-resource" aria-hidden="true">#</a> Use the classloader to load resource</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-c</span> 3d4eac69 <span class="token parameter variable">-r</span> META-INF/MANIFEST.MF
|
||||
jar:file:/System/Library/Java/Extensions/MRJToolkit.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF
|
||||
jar:file:/private/tmp/math-game.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF
|
||||
jar:file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar<span class="token operator">!</span>/META-INF/MANIFEST.MF
|
||||
</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>Use the classloader to load <code>.class</code> resource</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-c</span> 1b6d3586 <span class="token parameter variable">-r</span> java/lang/String.class
|
||||
jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/rt.jar<span class="token operator">!</span>/java/lang/String.class
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="use-the-classloader-to-load-class" tabindex="-1"><a class="header-anchor" href="#use-the-classloader-to-load-class" aria-hidden="true">#</a> Use the classloader to load class</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ classloader <span class="token parameter variable">-c</span> 3d4eac69 <span class="token parameter variable">--load</span> demo.MathGame
|
||||
load class success.
|
||||
class-info demo.MathGame
|
||||
code-source /private/tmp/math-game.jar
|
||||
name demo.MathGame
|
||||
isInterface <span class="token boolean">false</span>
|
||||
isAnnotation <span class="token boolean">false</span>
|
||||
isEnum <span class="token boolean">false</span>
|
||||
isAnonymousClass <span class="token boolean">false</span>
|
||||
isArray <span class="token boolean">false</span>
|
||||
isLocalClass <span class="token boolean">false</span>
|
||||
isMemberClass <span class="token boolean">false</span>
|
||||
isPrimitive <span class="token boolean">false</span>
|
||||
isSynthetic <span class="token boolean">false</span>
|
||||
simple-name MathGame
|
||||
modifier public
|
||||
annotation
|
||||
interfaces
|
||||
super-class +-java.lang.Object
|
||||
class-loader +-sun.misc.Launcher<span class="token variable">$AppClassLoader</span>@3d4eac69
|
||||
+-sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
classLoaderHash 3d4eac69
|
||||
</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></div><h3 id="statistics-classloader-actually-used-urls-and-unused-urls" tabindex="-1"><a class="header-anchor" href="#statistics-classloader-actually-used-urls-and-unused-urls" aria-hidden="true">#</a> Statistics ClassLoader actually used URLs and unused URLs</h3><div class="custom-container warning"><p class="custom-container-title">WARNING</p><p>Note that statistics are based on all classes currently loaded by the JVM. Does not mean that <code>Unused URLs</code> can be removed from the application. Because it may be necessary to load classes from <code>Unused URLs</code> in the future, or to load <code>resources</code>.</p></div><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ classloader --url-stat
|
||||
com.taobao.arthas.agent.ArthasClassloader@3c41660, hash:3c41660
|
||||
Used URLs:
|
||||
file:/Users/admin/.arthas/lib/3.5.6/arthas/arthas-core.jar
|
||||
Unused URLs:
|
||||
|
||||
sun.misc.Launcher$AppClassLoader@75b84c92, hash:75b84c92
|
||||
Used URLs:
|
||||
file:/Users/admin/code/java/arthas/math-game/target/math-game.jar
|
||||
file:/Users/admin/.arthas/lib/3.5.6/arthas/arthas-agent.jar
|
||||
Unused URLs:
|
||||
|
||||
sun.misc.Launcher$ExtClassLoader@7f31245a, hash:7f31245a
|
||||
Used URLs:
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/sunec.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/sunjce_provider.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/localedata.jar
|
||||
Unused URLs:
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/nashorn.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/cldrdata.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/legacy8ujsse.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/jfxrt.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/dnsns.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/openjsse.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/sunpkcs11.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/jaccess.jar
|
||||
file:/tmp/jdk1.8/Contents/Home/jre/lib/ext/zipfs.jar
|
||||
</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></div>`,25);function h(b,g){const e=d("ExternalLinkIcon");return l(),i("div",null,[o,a("p",null,[a("a",u,[p,m,t(e)])]),v])}const k=n(c,[["render",h],["__file","classloader.html.vue"]]);export{k as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-ae5eff1a","path":"/en/doc/cls.html","title":"cls","lang":"en-US","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/cls.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-ad1b2b42","path":"/doc/cls.html","title":"cls","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/cls.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
import{_ as e,o as t,c,a as s,e as o}from"./app.4d248835.js";const n={},a=s("h1",{id:"cls",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#cls","aria-hidden":"true"},"#"),o(" cls")],-1),l=s("p",null,"\u6E05\u7A7A\u5F53\u524D\u5C4F\u5E55\u533A\u57DF\u3002",-1),r=s("div",{class:"custom-container tip"},[s("p",{class:"custom-container-title"},"\u63D0\u793A"),s("p",null,`\u975E\u7EC8\u7AEF\u6A21\u5F0F\u4E0B\u4F7F\u7528 cls \u6307\u4EE4\uFF0C\u4F1A\u63D0\u793A"Command 'cls' is only support tty session."\u3002`)],-1),i=[a,l,r];function _(d,h){return t(),c("div",null,i)}const m=e(n,[["render",_],["__file","cls.html.vue"]]);export{m as default};
|
@ -0,0 +1 @@
|
||||
import{_ as t,o as s,c,a as e,e as o}from"./app.4d248835.js";const n={},a=e("h1",{id:"cls",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cls","aria-hidden":"true"},"#"),o(" cls")],-1),l=e("p",null,"clear current console.",-1),r=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"TIP"),e("p",null,`if not in tty mode,it will warn "Command 'cls' is only support tty session.".`)],-1),i=[a,l,r];function _(d,h){return s(),c("div",null,i)}const m=t(n,[["render",_],["__file","cls.html.vue"]]);export{m as default};
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
const l=JSON.parse('{"key":"v-5ed4d0e1","path":"/doc/commands.html","title":"\u547D\u4EE4\u5217\u8868","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"jvm \u76F8\u5173","slug":"jvm-\u76F8\u5173","link":"#jvm-\u76F8\u5173","children":[]},{"level":2,"title":"class/classloader \u76F8\u5173","slug":"class-classloader-\u76F8\u5173","link":"#class-classloader-\u76F8\u5173","children":[]},{"level":2,"title":"monitor/watch/trace \u76F8\u5173","slug":"monitor-watch-trace-\u76F8\u5173","link":"#monitor-watch-trace-\u76F8\u5173","children":[]},{"level":2,"title":"profiler/\u706B\u7130\u56FE","slug":"profiler-\u706B\u7130\u56FE","link":"#profiler-\u706B\u7130\u56FE","children":[]},{"level":2,"title":"\u9274\u6743","slug":"\u9274\u6743","link":"#\u9274\u6743","children":[]},{"level":2,"title":"options","slug":"options","link":"#options","children":[]},{"level":2,"title":"\u7BA1\u9053","slug":"\u7BA1\u9053","link":"#\u7BA1\u9053","children":[]},{"level":2,"title":"\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1","slug":"\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1","link":"#\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1","children":[]},{"level":2,"title":"\u57FA\u7840\u547D\u4EE4","slug":"\u57FA\u7840\u547D\u4EE4","link":"#\u57FA\u7840\u547D\u4EE4","children":[]}],"git":{"updatedTime":1661412829000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1},{"name":"longxu0509","email":"108991596+longxu0509@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/commands.md","version":"3.7.3"}');export{l as data};
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-12153166","path":"/en/doc/commands.html","title":"All Commands","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"jvm - related","slug":"jvm-related","link":"#jvm-related","children":[]},{"level":2,"title":"class/classloader - related","slug":"class-classloader-related","link":"#class-classloader-related","children":[]},{"level":2,"title":"monitor/watch/trace - related","slug":"monitor-watch-trace-related","link":"#monitor-watch-trace-related","children":[]},{"level":2,"title":"profiler/flame graph","slug":"profiler-flame-graph","link":"#profiler-flame-graph","children":[]},{"level":2,"title":"authentication","slug":"authentication","link":"#authentication","children":[]},{"level":2,"title":"options","slug":"options","link":"#options","children":[]},{"level":2,"title":"pipe","slug":"pipe","link":"#pipe","children":[]},{"level":2,"title":"async jobs","slug":"async-jobs","link":"#async-jobs","children":[]},{"level":2,"title":"Basic Arthas Commands","slug":"basic-arthas-commands","link":"#basic-arthas-commands","children":[]}],"git":{"updatedTime":1661412829000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":2},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1},{"name":"longxu0509","email":"108991596+longxu0509@users.noreply.github.com","commits":1}]},"filePathRelative":"en/doc/commands.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
import{_ as r,a as t,b as i,c,d as u}from"./qqgroup3_qr.f82e3fd0.js";import{_ as d,o as p,c as h,a as s,b as n,e as o,d as a,r as l}from"./app.4d248835.js";const _="/3.x/images/dingding_group_search.png",g={},m=s("h1",{id:"contact-us",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#contact-us","aria-hidden":"true"},"#"),o(" Contact Us")],-1),f=s("h3",{id:"issues",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#issues","aria-hidden":"true"},"#"),o(" Issues")],-1),b=o("Questions about how to use Arthas and opinions can be directly raised in issues\uFF1A "),k={href:"https://github.com/alibaba/arthas/issues",target:"_blank",rel:"noopener noreferrer"},x=o("https://github.com/alibaba/arthas/issues"),Q=a('<h3 id="dingding-group" tabindex="-1"><a class="header-anchor" href="#dingding-group" aria-hidden="true">#</a> DingDing Group</h3><ul><li>Arthas open source discussion Group\uFF1A 21965291 \uFF0CYou can join by searching for group number\u3002</li></ul><p><img src="'+r+'" alt=""></p><ul><li>Arthas open source discussion Group 2\uFF1A 30707824 \uFF0CYou can join by searching for group number\u3002</li></ul><p><img src="'+t+'" alt=""></p><ul><li>Arthas open source discussion Group 3\uFF1A 17605006847 , You can join by searching for group number\u3002</li></ul><p><img src="'+i+'" alt=""></p><h3 id="instructions-for-installing-dingtalk" tabindex="-1"><a class="header-anchor" href="#instructions-for-installing-dingtalk" aria-hidden="true">#</a> Instructions for Installing DingTalk</h3>',8),w=o("DingTalk can be downloaded from: "),A={href:"https://page.dingtalk.com/wow/dingtalk/act/en-download",target:"_blank",rel:"noopener noreferrer"},y=o("https://www.dingtalk.com/en"),G=a('<p>After installing you can search for group number and join it.</p><p><img src="'+_+'" alt=""></p><h3 id="qq-group" tabindex="-1"><a class="header-anchor" href="#qq-group" aria-hidden="true">#</a> QQ Group</h3><p>Arthas open source discussion QQ group\uFF1A916328269</p><p><img src="'+c+'" alt=""></p><p>Arthas open source discussion QQ group2\uFF1A854625984</p><p>Arthas open source discussion QQ group 3\uFF1A 672077388</p><p><img src="'+u+'" alt=""></p>',8);function I(j,q){const e=l("ExternalLinkIcon");return p(),h("div",null,[m,f,s("p",null,[b,s("a",k,[x,n(e)])]),Q,s("p",null,[w,s("a",A,[y,n(e)])]),G])}const V=d(g,[["render",I],["__file","contact-us.html.vue"]]);export{V as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-3992adde","path":"/doc/contact-us.html","title":"\u8054\u7CFB\u6211\u4EEC","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"\u62DB\u8058","slug":"\u62DB\u8058","link":"#\u62DB\u8058","children":[]},{"level":3,"title":"Issues","slug":"issues","link":"#issues","children":[]},{"level":3,"title":"\u5FAE\u4FE1\u516C\u4F17\u53F7","slug":"\u5FAE\u4FE1\u516C\u4F17\u53F7","link":"#\u5FAE\u4FE1\u516C\u4F17\u53F7","children":[]},{"level":3,"title":"\u9489\u9489\u7FA4","slug":"\u9489\u9489\u7FA4","link":"#\u9489\u9489\u7FA4","children":[]},{"level":3,"title":"QQ \u7FA4","slug":"qq-\u7FA4","link":"#qq-\u7FA4","children":[]}],"git":{"updatedTime":1669871708000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":3},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":2},{"name":"Fatpandac","email":"i@fatpandac.com","commits":1}]},"filePathRelative":"doc/contact-us.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const n=JSON.parse('{"key":"v-4be7594a","path":"/en/doc/contact-us.html","title":"Contact Us","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"Issues","slug":"issues","link":"#issues","children":[]},{"level":3,"title":"DingDing Group","slug":"dingding-group","link":"#dingding-group","children":[]},{"level":3,"title":"Instructions for Installing DingTalk","slug":"instructions-for-installing-dingtalk","link":"#instructions-for-installing-dingtalk","children":[]},{"level":3,"title":"QQ Group","slug":"qq-group","link":"#qq-group","children":[]}],"git":{"updatedTime":1669871708000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":3},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1}]},"filePathRelative":"en/doc/contact-us.md","version":"3.7.3"}');export{n as data};
|
@ -0,0 +1 @@
|
||||
import{_ as r,a as i,b as o,c as n,d as h}from"./qqgroup3_qr.f82e3fd0.js";import{_ as c,o as l,c as _,a as e,b as t,e as a,d,r as p}from"./app.4d248835.js";const u="/3.x/images/qrcode_gongzhonghao.jpg",m="/3.x/images/qqgroup2_qr.jpg",g={},f=e("h1",{id:"\u8054\u7CFB\u6211\u4EEC",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u8054\u7CFB\u6211\u4EEC","aria-hidden":"true"},"#"),a(" \u8054\u7CFB\u6211\u4EEC")],-1),b=e("h3",{id:"\u62DB\u8058",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u62DB\u8058","aria-hidden":"true"},"#"),a(" \u62DB\u8058")],-1),x={href:"https://mp.weixin.qq.com/s/XQv8GnqGT3pzceVwzeiy-A",target:"_blank",rel:"noopener noreferrer"},q=a("\u671F\u5F85\u4F60\u7684\u52A0\u5165"),Q=e("h3",{id:"issues",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#issues","aria-hidden":"true"},"#"),a(" Issues")],-1),A=a("\u4F7F\u7528\u7591\u95EE\uFF0C\u610F\u89C1\u53EF\u4EE5\u76F4\u63A5\u5728 Issues \u91CC\u63D0\u51FA\uFF1A "),k={href:"https://github.com/alibaba/arthas/issues",target:"_blank",rel:"noopener noreferrer"},V=a("https://github.com/alibaba/arthas/issues"),v=d('<h3 id="\u5FAE\u4FE1\u516C\u4F17\u53F7" tabindex="-1"><a class="header-anchor" href="#\u5FAE\u4FE1\u516C\u4F17\u53F7" aria-hidden="true">#</a> \u5FAE\u4FE1\u516C\u4F17\u53F7</h3><p>\u6B22\u8FCE\u5173\u6CE8\u516C\u4F17\u53F7\uFF0C\u83B7\u53D6 Arthas \u9879\u76EE\u7684\u4FE1\u606F\u3001\u6E90\u7801\u5206\u6790\u3001\u6848\u4F8B\u5B9E\u8DF5\u3002</p><p><img src="'+u+'" alt=""></p><h3 id="\u9489\u9489\u7FA4" tabindex="-1"><a class="header-anchor" href="#\u9489\u9489\u7FA4" aria-hidden="true">#</a> \u9489\u9489\u7FA4</h3><ul><li>Arthas \u5F00\u6E90\u4EA4\u6D41\u9489\u9489\u7FA4\uFF1A 21965291 \uFF0C\u641C\u7D22\u7FA4\u53F7\u5373\u53EF\u52A0\u5165\u3002\uFF08\u5982\u679C\u6EE1\u4E86\u65E0\u6CD5\u52A0\u5165\uFF0C\u8BF7\u52A0 3 \u7FA4\uFF09</li></ul><p><img src="'+r+'" alt=""></p><ul><li>Arthas \u5F00\u6E90\u4EA4\u6D41\u9489\u9489\u7FA4 2\uFF1A 30707824 \uFF0C\u641C\u7D22\u7FA4\u53F7\u5373\u53EF\u52A0\u5165\u3002\uFF08\u5982\u679C\u6EE1\u4E86\u65E0\u6CD5\u52A0\u5165\uFF0C\u8BF7\u52A0 3 \u7FA4\uFF09</li></ul><p><img src="'+i+'" alt=""></p><ul><li>Arthas \u5F00\u6E90\u4EA4\u6D41\u9489\u9489\u7FA4 3\uFF1A 17605006847 \uFF0C\u641C\u7D22\u7FA4\u53F7\u5373\u53EF\u52A0\u5165\u3002</li></ul><p><img src="'+o+'" alt=""></p><h3 id="qq-\u7FA4" tabindex="-1"><a class="header-anchor" href="#qq-\u7FA4" aria-hidden="true">#</a> QQ \u7FA4</h3><p>Arthas \u5F00\u6E90\u4EA4\u6D41 QQ \u7FA4\uFF1A 916328269 \uFF08\u5982\u679C\u6EE1\u4E86\u65E0\u6CD5\u52A0\u5165\uFF0C\u8BF7\u52A0 3 \u7FA4\uFF09</p><p><img src="'+n+'" alt=""></p><p>Arthas \u5F00\u6E90\u4EA4\u6D41 QQ \u7FA4 2\uFF1A 854625984</p><p><img src="'+m+'" alt=""></p><p>Arthas \u5F00\u6E90\u4EA4\u6D41 QQ \u7FA4 3\uFF1A 672077388</p><p><img src="'+h+'" alt=""></p>',17);function I(N,z){const s=p("ExternalLinkIcon");return l(),_("div",null,[f,b,e("ul",null,[e("li",null,[e("a",x,[q,t(s)])])]),Q,e("p",null,[A,e("a",k,[V,t(s)])]),v])}const j=c(g,[["render",I],["__file","contact-us.html.vue"]]);export{j as default};
|
@ -0,0 +1 @@
|
||||
const s="/3.x/images/dashboard.png";export{s as _};
|
@ -0,0 +1,33 @@
|
||||
import{_ as n}from"./dashboard.eb1e1fee.js";import{_ as s,o as r,c as d,a as e,b as i,e as a,d as l,r as o}from"./app.4d248835.js";const c={},h=e("h1",{id:"dashboard",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#dashboard","aria-hidden":"true"},"#"),a(" dashboard")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-dashboard",target:"_blank",rel:"noopener noreferrer"},m=e("code",null,"dashboard",-1),v=a(" online tutorial"),p=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"TIP"),e("p",null,[a("This is the real time statistics dashboard for the current system, press "),e("code",null,"Ctrl+C"),a(" to exit.")])],-1),b=a("When running in Apache Tomcat Alibaba edition, the dashboard will also present the real time statistics of the tomcat, including "),f={href:"https://en.wikipedia.org/wiki/Queries_per_second",target:"_blank",rel:"noopener noreferrer"},g=a("QPS"),_=a(", RT, error counts, and thread pool, etc."),T=l(`<h2 id="options" tabindex="-1"><a class="header-anchor" href="#options" aria-hidden="true">#</a> Options</h2><table><thead><tr><th style="text-align:right;">Name</th><th style="text-align:left;">Specification</th></tr></thead><tbody><tr><td style="text-align:right;">[i:]</td><td style="text-align:left;">The interval (in ms) between two executions, default is 5000 ms.</td></tr><tr><td style="text-align:right;">[n:]</td><td style="text-align:left;">The number of times this command will be executed.</td></tr></tbody></table><h2 id="usage" tabindex="-1"><a class="header-anchor" href="#usage" aria-hidden="true">#</a> Usage</h2><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ dashboard
|
||||
ID NAME GROUP PRIORITY STATE %CPU DELTA_TIME TIME INTERRUPTE DAEMON
|
||||
-1 C2 CompilerThread0 - -1 - 1.55 0.077 0:8.684 false true
|
||||
53 Timer-for-arthas-dashboard-07b system 5 RUNNABLE 0.08 0.004 0:0.004 false true
|
||||
22 scheduling-1 main 5 TIMED_WAI 0.06 0.003 0:0.287 false false
|
||||
-1 C1 CompilerThread0 - -1 - 0.06 0.003 0:2.171 false true
|
||||
-1 VM Periodic Task Thread - -1 - 0.03 0.001 0:0.092 false true
|
||||
49 arthas-NettyHttpTelnetBootstra system 5 RUNNABLE 0.02 0.001 0:0.156 false true
|
||||
16 Catalina-utility-1 main 1 TIMED_WAI 0.0 0.000 0:0.029 false false
|
||||
-1 G1 Young RemSet Sampling - -1 - 0.0 0.000 0:0.019 false true
|
||||
17 Catalina-utility-2 main 1 WAITING 0.0 0.000 0:0.025 false false
|
||||
34 http-nio-8080-ClientPoller main 5 RUNNABLE 0.0 0.000 0:0.016 false true
|
||||
23 http-nio-8080-BlockPoller main 5 RUNNABLE 0.0 0.000 0:0.011 false true
|
||||
-1 VM Thread - -1 - 0.0 0.000 0:0.032 false true
|
||||
-1 Service Thread - -1 - 0.0 0.000 0:0.006 false true
|
||||
-1 GC Thread#5 - -1 - 0.0 0.000 0:0.043 false true
|
||||
Memory used total max usage GC
|
||||
heap 36M 70M 4096M 0.90% gc.g1_young_generation.count 12
|
||||
g1_eden_space 6M 18M -1 33.33% 86
|
||||
g1_old_gen 30M 50M 4096M 0.74% gc.g1_old_generation.count 0
|
||||
g1_survivor_space 491K 2048K -1 24.01% gc.g1_old_generation.time(ms) 0
|
||||
nonheap 66M 69M -1 96.56%
|
||||
codeheap_'non-nmethods' 1M 2M 5M 22.39%
|
||||
metaspace 46M 47M -1 98.01%
|
||||
Runtime
|
||||
os.name Mac OS X
|
||||
os.version 10.15.4
|
||||
java.version 15
|
||||
java.home /Library/Java/JavaVirtualMachines/jdk-15.jdk/Contents/Home
|
||||
systemload.average 10.68
|
||||
processors 8
|
||||
uptime 272s
|
||||
</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></div><h2 id="notes-on-column-headers" tabindex="-1"><a class="header-anchor" href="#notes-on-column-headers" aria-hidden="true">#</a> Notes on column headers</h2><ul><li>ID: JVM thread ID, pls. note this ID is different from the nativeID in jstack</li><li>NAME: thread name</li><li>GROUP: thread group name</li><li>PRIORITY: thread priority, ranged from 1 to 10. The greater number, the higher priority</li><li>STATE: thread state</li><li>CPU%: the ratio of CPU usage for the thread. For example, the sampling interval is 1000ms, and the incremental cpu time of a thread is 100ms, then the cpu usage rate=100/1000=10%</li><li>DELTA_TIME: incremental CPU time of thread running after the last sampling in <code>second</code> format</li><li>TIME: total CPU time of the thread in <code>minute:second</code> format</li><li>INTERRUPTED: the thread interruption state</li><li>DAEMON: daemon thread or not</li></ul><h3 id="jvm-internal-threads" tabindex="-1"><a class="header-anchor" href="#jvm-internal-threads" aria-hidden="true">#</a> JVM internal threads</h3><p>After Java 8, it is supported to obtain the CPU time of JVM internal threads. These threads only have the name and CPU time, without ID and status information (display ID is -1).</p><p>JVM activities can be observed through internal threads, such as GC, JIT compilation, etc., to perceive the overall status of JVM.</p><ul><li>When the JVM heap/metaspace space is insufficient or OOM, it can be seen that the CPU usage of the GC threads is significantly higher than other threads.</li><li>After executing commands such as <code>trace/watch/tt/redefine</code>, you can see that JIT threads activities become more frequent. Because the JIT compilation data related to this class is cleared when the JVM hot update the class bytecode, it needs to be recompiled.</li></ul><p>JVM internal threads include the following:</p><ul><li>JIT compilation thread: such as <code>C1 CompilerThread0</code>, <code>C2 CompilerThread0</code></li><li>GC thread: such as <code>GC Thread0</code>, <code>G1 Young RemSet Sampling</code></li><li>Other internal threads: such as<code>VM Periodic Task Thread</code>, <code>VM Thread</code>, <code>Service Thread</code></li></ul><h2 id="screenshot" tabindex="-1"><a class="header-anchor" href="#screenshot" aria-hidden="true">#</a> Screenshot</h2><p><img src="`+n+'" alt="" title="dashboard"></p>',14);function M(I,x){const t=o("ExternalLinkIcon");return r(),d("div",null,[h,e("p",null,[e("a",u,[m,v,i(t)])]),p,e("p",null,[b,e("a",f,[g,i(t)]),_]),T])}const E=s(c,[["render",M],["__file","dashboard.html.vue"]]);export{E as default};
|
@ -0,0 +1,33 @@
|
||||
import{_ as n}from"./dashboard.eb1e1fee.js";import{_ as d,o as l,c as s,a as e,b as t,e as a,d as r,r as c}from"./app.4d248835.js";const o={},h=e("h1",{id:"dashboard",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#dashboard","aria-hidden":"true"},"#"),a(" dashboard")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-dashboard",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"dashboard",-1),v=a("\u5728\u7EBF\u6559\u7A0B"),b=r(`<div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>\u5F53\u524D\u7CFB\u7EDF\u7684\u5B9E\u65F6\u6570\u636E\u9762\u677F\uFF0C\u6309 ctrl+c \u9000\u51FA\u3002</p></div><p>\u5F53\u8FD0\u884C\u5728 Ali-tomcat \u65F6\uFF0C\u4F1A\u663E\u793A\u5F53\u524D tomcat \u7684\u5B9E\u65F6\u4FE1\u606F\uFF0C\u5982 HTTP \u8BF7\u6C42\u7684 qps, rt, \u9519\u8BEF\u6570, \u7EBF\u7A0B\u6C60\u4FE1\u606F\u7B49\u7B49\u3002</p><h2 id="\u53C2\u6570\u8BF4\u660E" tabindex="-1"><a class="header-anchor" href="#\u53C2\u6570\u8BF4\u660E" aria-hidden="true">#</a> \u53C2\u6570\u8BF4\u660E</h2><table><thead><tr><th style="text-align:right;">\u53C2\u6570\u540D\u79F0</th><th style="text-align:left;">\u53C2\u6570\u8BF4\u660E</th></tr></thead><tbody><tr><td style="text-align:right;">[i:]</td><td style="text-align:left;">\u5237\u65B0\u5B9E\u65F6\u6570\u636E\u7684\u65F6\u95F4\u95F4\u9694 (ms)\uFF0C\u9ED8\u8BA4 5000ms</td></tr><tr><td style="text-align:right;">[n:]</td><td style="text-align:left;">\u5237\u65B0\u5B9E\u65F6\u6570\u636E\u7684\u6B21\u6570</td></tr></tbody></table><h2 id="\u4F7F\u7528\u53C2\u8003" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528\u53C2\u8003" aria-hidden="true">#</a> \u4F7F\u7528\u53C2\u8003</h2><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ dashboard
|
||||
ID NAME GROUP PRIORITY STATE %CPU DELTA_TIME TIME INTERRUPTE DAEMON
|
||||
-1 C2 CompilerThread0 - -1 - 1.55 0.077 0:8.684 false true
|
||||
53 Timer-for-arthas-dashboard-07b system 5 RUNNABLE 0.08 0.004 0:0.004 false true
|
||||
22 scheduling-1 main 5 TIMED_WAI 0.06 0.003 0:0.287 false false
|
||||
-1 C1 CompilerThread0 - -1 - 0.06 0.003 0:2.171 false true
|
||||
-1 VM Periodic Task Thread - -1 - 0.03 0.001 0:0.092 false true
|
||||
49 arthas-NettyHttpTelnetBootstra system 5 RUNNABLE 0.02 0.001 0:0.156 false true
|
||||
16 Catalina-utility-1 main 1 TIMED_WAI 0.0 0.000 0:0.029 false false
|
||||
-1 G1 Young RemSet Sampling - -1 - 0.0 0.000 0:0.019 false true
|
||||
17 Catalina-utility-2 main 1 WAITING 0.0 0.000 0:0.025 false false
|
||||
34 http-nio-8080-ClientPoller main 5 RUNNABLE 0.0 0.000 0:0.016 false true
|
||||
23 http-nio-8080-BlockPoller main 5 RUNNABLE 0.0 0.000 0:0.011 false true
|
||||
-1 VM Thread - -1 - 0.0 0.000 0:0.032 false true
|
||||
-1 Service Thread - -1 - 0.0 0.000 0:0.006 false true
|
||||
-1 GC Thread#5 - -1 - 0.0 0.000 0:0.043 false true
|
||||
Memory used total max usage GC
|
||||
heap 36M 70M 4096M 0.90% gc.g1_young_generation.count 12
|
||||
g1_eden_space 6M 18M -1 33.33% 86
|
||||
g1_old_gen 30M 50M 4096M 0.74% gc.g1_old_generation.count 0
|
||||
g1_survivor_space 491K 2048K -1 24.01% gc.g1_old_generation.time(ms) 0
|
||||
nonheap 66M 69M -1 96.56%
|
||||
codeheap_'non-nmethods' 1M 2M 5M 22.39%
|
||||
metaspace 46M 47M -1 98.01%
|
||||
Runtime
|
||||
os.name Mac OS X
|
||||
os.version 10.15.4
|
||||
java.version 15
|
||||
java.home /Library/Java/JavaVirtualMachines/jdk-15.jdk/Contents/Home
|
||||
systemload.average 10.68
|
||||
processors 8
|
||||
uptime 272s
|
||||
</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></div><h2 id="\u6570\u636E\u8BF4\u660E" tabindex="-1"><a class="header-anchor" href="#\u6570\u636E\u8BF4\u660E" aria-hidden="true">#</a> \u6570\u636E\u8BF4\u660E</h2><ul><li>ID: Java \u7EA7\u522B\u7684\u7EBF\u7A0B ID\uFF0C\u6CE8\u610F\u8FD9\u4E2A ID \u4E0D\u80FD\u8DDF jstack \u4E2D\u7684 nativeID \u4E00\u4E00\u5BF9\u5E94\u3002</li><li>NAME: \u7EBF\u7A0B\u540D</li><li>GROUP: \u7EBF\u7A0B\u7EC4\u540D</li><li>PRIORITY: \u7EBF\u7A0B\u4F18\u5148\u7EA7, 1~10 \u4E4B\u95F4\u7684\u6570\u5B57\uFF0C\u8D8A\u5927\u8868\u793A\u4F18\u5148\u7EA7\u8D8A\u9AD8</li><li>STATE: \u7EBF\u7A0B\u7684\u72B6\u6001</li><li>CPU%: \u7EBF\u7A0B\u7684 cpu \u4F7F\u7528\u7387\u3002\u6BD4\u5982\u91C7\u6837\u95F4\u9694 1000ms\uFF0C\u67D0\u4E2A\u7EBF\u7A0B\u7684\u589E\u91CF cpu \u65F6\u95F4\u4E3A 100ms\uFF0C\u5219 cpu \u4F7F\u7528\u7387=100/1000=10%</li><li>DELTA_TIME: \u4E0A\u6B21\u91C7\u6837\u4E4B\u540E\u7EBF\u7A0B\u8FD0\u884C\u589E\u91CF CPU \u65F6\u95F4\uFF0C\u6570\u636E\u683C\u5F0F\u4E3A<code>\u79D2</code></li><li>TIME: \u7EBF\u7A0B\u8FD0\u884C\u603B CPU \u65F6\u95F4\uFF0C\u6570\u636E\u683C\u5F0F\u4E3A<code>\u5206:\u79D2</code></li><li>INTERRUPTED: \u7EBF\u7A0B\u5F53\u524D\u7684\u4E2D\u65AD\u4F4D\u72B6\u6001</li><li>DAEMON: \u662F\u5426\u662F daemon \u7EBF\u7A0B</li></ul><h3 id="jvm-\u5185\u90E8\u7EBF\u7A0B" tabindex="-1"><a class="header-anchor" href="#jvm-\u5185\u90E8\u7EBF\u7A0B" aria-hidden="true">#</a> JVM \u5185\u90E8\u7EBF\u7A0B</h3><p>Java 8 \u4E4B\u540E\u652F\u6301\u83B7\u53D6 JVM \u5185\u90E8\u7EBF\u7A0B CPU \u65F6\u95F4\uFF0C\u8FD9\u4E9B\u7EBF\u7A0B\u53EA\u6709\u540D\u79F0\u548C CPU \u65F6\u95F4\uFF0C\u6CA1\u6709 ID \u53CA\u72B6\u6001\u7B49\u4FE1\u606F\uFF08\u663E\u793A ID \u4E3A-1\uFF09\u3002 \u901A\u8FC7\u5185\u90E8\u7EBF\u7A0B\u53EF\u4EE5\u89C2\u6D4B\u5230 JVM \u6D3B\u52A8\uFF0C\u5982 GC\u3001JIT \u7F16\u8BD1\u7B49\u5360\u7528 CPU \u60C5\u51B5\uFF0C\u65B9\u4FBF\u4E86\u89E3 JVM \u6574\u4F53\u8FD0\u884C\u72B6\u51B5\u3002</p><ul><li>\u5F53 JVM \u5806(heap)/\u5143\u6570\u636E(metaspace)\u7A7A\u95F4\u4E0D\u8DB3\u6216 OOM \u65F6\uFF0C\u53EF\u4EE5\u770B\u5230 GC \u7EBF\u7A0B\u7684 CPU \u5360\u7528\u7387\u660E\u663E\u9AD8\u4E8E\u5176\u4ED6\u7684\u7EBF\u7A0B\u3002</li><li>\u5F53\u6267\u884C<code>trace/watch/tt/redefine</code>\u7B49\u547D\u4EE4\u540E\uFF0C\u53EF\u4EE5\u770B\u5230 JIT \u7EBF\u7A0B\u6D3B\u52A8\u53D8\u5F97\u66F4\u9891\u7E41\u3002\u56E0\u4E3A JVM \u70ED\u66F4\u65B0 class \u5B57\u8282\u7801\u65F6\u6E05\u9664\u4E86\u6B64 class \u76F8\u5173\u7684 JIT \u7F16\u8BD1\u7ED3\u679C\uFF0C\u9700\u8981\u91CD\u65B0\u7F16\u8BD1\u3002</li></ul><p>JVM \u5185\u90E8\u7EBF\u7A0B\u5305\u62EC\u4E0B\u9762\u51E0\u79CD\uFF1A</p><ul><li>JIT \u7F16\u8BD1\u7EBF\u7A0B: \u5982 <code>C1 CompilerThread0</code>, <code>C2 CompilerThread0</code></li><li>GC \u7EBF\u7A0B: \u5982<code>GC Thread0</code>, <code>G1 Young RemSet Sampling</code></li><li>\u5176\u5B83\u5185\u90E8\u7EBF\u7A0B: \u5982<code>VM Periodic Task Thread</code>, <code>VM Thread</code>, <code>Service Thread</code></li></ul><h2 id="\u622A\u56FE\u5C55\u793A" tabindex="-1"><a class="header-anchor" href="#\u622A\u56FE\u5C55\u793A" aria-hidden="true">#</a> \u622A\u56FE\u5C55\u793A</h2><p><img src="`+n+'" alt="" title="dashboard"></p>',15);function p(_,T){const i=c("ExternalLinkIcon");return l(),s("div",null,[h,e("p",null,[e("a",m,[u,v,t(i)])]),b])}const g=d(o,[["render",p],["__file","dashboard.html.vue"]]);export{g as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-0d1e3f35","path":"/doc/dashboard.html","title":"dashboard","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u53C2\u6570\u8BF4\u660E","slug":"\u53C2\u6570\u8BF4\u660E","link":"#\u53C2\u6570\u8BF4\u660E","children":[]},{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[]},{"level":2,"title":"\u6570\u636E\u8BF4\u660E","slug":"\u6570\u636E\u8BF4\u660E","link":"#\u6570\u636E\u8BF4\u660E","children":[{"level":3,"title":"JVM \u5185\u90E8\u7EBF\u7A0B","slug":"jvm-\u5185\u90E8\u7EBF\u7A0B","link":"#jvm-\u5185\u90E8\u7EBF\u7A0B","children":[]}]},{"level":2,"title":"\u622A\u56FE\u5C55\u793A","slug":"\u622A\u56FE\u5C55\u793A","link":"#\u622A\u56FE\u5C55\u793A","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/dashboard.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-79107649","path":"/en/doc/dashboard.html","title":"dashboard","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Options","slug":"options","link":"#options","children":[]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]},{"level":2,"title":"Notes on column headers","slug":"notes-on-column-headers","link":"#notes-on-column-headers","children":[{"level":3,"title":"JVM internal threads","slug":"jvm-internal-threads","link":"#jvm-internal-threads","children":[]}]},{"level":2,"title":"Screenshot","slug":"screenshot","link":"#screenshot","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/dashboard.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-02361049","path":"/doc/docker.html","title":"Docker","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u5728 Docker \u91CC\u4F7F\u7528 JDK","slug":"\u5728-docker-\u91CC\u4F7F\u7528-jdk","link":"#\u5728-docker-\u91CC\u4F7F\u7528-jdk","children":[{"level":3,"title":"\u4F7F\u7528\u516C\u5F00\u7684 JDK \u955C\u50CF","slug":"\u4F7F\u7528\u516C\u5F00\u7684-jdk-\u955C\u50CF","link":"#\u4F7F\u7528\u516C\u5F00\u7684-jdk-\u955C\u50CF","children":[]},{"level":3,"title":"\u901A\u8FC7\u5305\u7BA1\u7406\u8F6F\u4EF6\u6765\u5B89\u88C5","slug":"\u901A\u8FC7\u5305\u7BA1\u7406\u8F6F\u4EF6\u6765\u5B89\u88C5","link":"#\u901A\u8FC7\u5305\u7BA1\u7406\u8F6F\u4EF6\u6765\u5B89\u88C5","children":[]}]},{"level":2,"title":"\u901A\u8FC7 Docker \u5FEB\u901F\u5165\u95E8","slug":"\u901A\u8FC7-docker-\u5FEB\u901F\u5165\u95E8","link":"#\u901A\u8FC7-docker-\u5FEB\u901F\u5165\u95E8","children":[]},{"level":2,"title":"\u8BCA\u65AD Docker \u91CC\u7684 Java \u8FDB\u7A0B","slug":"\u8BCA\u65AD-docker-\u91CC\u7684-java-\u8FDB\u7A0B","link":"#\u8BCA\u65AD-docker-\u91CC\u7684-java-\u8FDB\u7A0B","children":[]},{"level":2,"title":"\u8BCA\u65AD k8s \u91CC\u5BB9\u5668\u91CC\u7684 Java \u8FDB\u7A0B","slug":"\u8BCA\u65AD-k8s-\u91CC\u5BB9\u5668\u91CC\u7684-java-\u8FDB\u7A0B","link":"#\u8BCA\u65AD-k8s-\u91CC\u5BB9\u5668\u91CC\u7684-java-\u8FDB\u7A0B","children":[]},{"level":2,"title":"\u628A Arthas \u5B89\u88C5\u5230\u57FA\u7840\u955C\u50CF\u91CC","slug":"\u628A-arthas-\u5B89\u88C5\u5230\u57FA\u7840\u955C\u50CF\u91CC","link":"#\u628A-arthas-\u5B89\u88C5\u5230\u57FA\u7840\u955C\u50CF\u91CC","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/docker.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,50 @@
|
||||
import{_ as n,o as e,c as t,a,b as i,d as o,e as p,r as l}from"./app.4d248835.js";const r={},c=o(`<h1 id="docker" tabindex="-1"><a class="header-anchor" href="#docker" aria-hidden="true">#</a> Docker</h1><h2 id="use-jdk-in-docker" tabindex="-1"><a class="header-anchor" href="#use-jdk-in-docker" aria-hidden="true">#</a> Use JDK in Docker</h2><p>Many times, the problem that arthas can't work with the application in docker is because the docker does not install JDK, but installs JRE. If only JRE is installed, many JAVA command line tools and class libraries will be missing, and Arthas will not work properly. Here are two common ways to use JDK in Docker.</p><h3 id="use-public-jdk-image" tabindex="-1"><a class="header-anchor" href="#use-public-jdk-image" aria-hidden="true">#</a> Use public JDK image</h3><ul><li>https://hub.docker.com/_/openjdk/</li></ul><p>such as:</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>FROM openjdk:8-jdk
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>or:</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>FROM openjdk:8-jdk-alpine
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="install-via-package-management-software" tabindex="-1"><a class="header-anchor" href="#install-via-package-management-software" aria-hidden="true">#</a> Install via package management software</h3><p>such as:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token comment"># Install OpenJDK-8</span>
|
||||
RUN <span class="token function">apt-get</span> update <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
<span class="token function">apt-get</span> <span class="token function">install</span> <span class="token parameter variable">-y</span> openjdk-8-jdk <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
<span class="token function">apt-get</span> <span class="token function">install</span> <span class="token parameter variable">-y</span> ant <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
<span class="token function">apt-get</span> clean<span class="token punctuation">;</span>
|
||||
|
||||
<span class="token comment"># Fix certificate issues</span>
|
||||
RUN <span class="token function">apt-get</span> update <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
<span class="token function">apt-get</span> <span class="token function">install</span> ca-certificates-java <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
<span class="token function">apt-get</span> clean <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
update-ca-certificates -f<span class="token punctuation">;</span>
|
||||
|
||||
<span class="token comment"># Setup JAVA_HOME - useful for docker commandline</span>
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
|
||||
RUN <span class="token builtin class-name">export</span> JAVA_HOME
|
||||
</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></div><p>or:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>RUN yum <span class="token function">install</span> <span class="token parameter variable">-y</span> <span class="token punctuation">\\</span>
|
||||
java-1.8.0-openjdk <span class="token punctuation">\\</span>
|
||||
java-1.8.0-openjdk-devel
|
||||
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk/
|
||||
RUN <span class="token builtin class-name">export</span> JAVA_HOME
|
||||
</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><h2 id="quick-start-with-docker" tabindex="-1"><a class="header-anchor" href="#quick-start-with-docker" aria-hidden="true">#</a> Quick start with Docker</h2><ol><li><p>Delete the existing <code>math-game</code> docker container (not necessary)</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">docker</span> stop math-game <span class="token operator">||</span> <span class="token boolean">true</span> <span class="token operator">&&</span> <span class="token function">docker</span> <span class="token function">rm</span> math-game <span class="token operator">||</span> <span class="token boolean">true</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li><li><p>Start <code>math-game</code></p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">docker</span> run <span class="token parameter variable">--name</span> math-game <span class="token parameter variable">-it</span> hengyunabc/arthas:latest /bin/sh <span class="token parameter variable">-c</span> <span class="token string">"java -jar /opt/arthas/math-game.jar"</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li><li><p>Start <code>arthas-boot3</code> for diagnosis</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">docker</span> <span class="token builtin class-name">exec</span> <span class="token parameter variable">-it</span> math-game /bin/sh <span class="token parameter variable">-c</span> <span class="token string">"java -jar /opt/arthas/arthas-boot3.jar"</span>
|
||||
* <span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span>: <span class="token number">9</span> jar
|
||||
|
||||
<span class="token punctuation">[</span>INFO<span class="token punctuation">]</span> arthas home: /opt/arthas
|
||||
<span class="token punctuation">[</span>INFO<span class="token punctuation">]</span> Try to attach process <span class="token number">9</span>
|
||||
<span class="token punctuation">[</span>INFO<span class="token punctuation">]</span> Attach process <span class="token number">9</span> success.
|
||||
<span class="token punctuation">[</span>INFO<span class="token punctuation">]</span> arthas-client connect <span class="token number">127.0</span>.0.1 <span class="token number">3658</span>
|
||||
,---. ,------. ,--------.,--. ,--. ,---. ,---.
|
||||
/ O <span class="token punctuation">\\</span> <span class="token operator">|</span> .--. <span class="token string">''</span>--. .--<span class="token string">'| '</span>--<span class="token string">' | / O \\ '</span> .-<span class="token string">'
|
||||
| .-. || '</span>--<span class="token string">'.'</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> .--. <span class="token operator">||</span> .-. <span class="token operator">|</span><span class="token variable"><span class="token variable">\`</span><span class="token builtin class-name">.</span> <span class="token variable">\`</span></span>-.
|
||||
<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">||</span> <span class="token operator">|</span><span class="token punctuation">\\</span> <span class="token punctuation">\\</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">||</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>.-<span class="token string">' |
|
||||
\`--'</span> <span class="token variable"><span class="token variable">\`</span>--'<span class="token variable">\`</span></span>--<span class="token string">' '</span>--<span class="token string">' \`--'</span> <span class="token variable"><span class="token variable">\`</span>--' <span class="token variable">\`</span></span>--<span class="token string">'\`--'</span> <span class="token variable"><span class="token variable">\`</span>--'<span class="token variable">\`</span></span>-----'
|
||||
|
||||
|
||||
wiki: https://arthas.aliyun.com/3.x/doc
|
||||
version: <span class="token number">3.0</span>.5
|
||||
pid: <span class="token number">9</span>
|
||||
time: <span class="token number">2018</span>-12-18 <span class="token number">11</span>:30:36
|
||||
</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></div></li></ol><h2 id="diagnose-the-java-process-in-docker" tabindex="-1"><a class="header-anchor" href="#diagnose-the-java-process-in-docker" aria-hidden="true">#</a> Diagnose the Java process in Docker</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">docker</span> <span class="token builtin class-name">exec</span> <span class="token parameter variable">-it</span> <span class="token variable">\${containerId}</span> /bin/bash <span class="token parameter variable">-c</span> <span class="token string">"wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="diagnose-the-java-process-in-the-container-in-k8s" tabindex="-1"><a class="header-anchor" href="#diagnose-the-java-process-in-the-container-in-k8s" aria-hidden="true">#</a> Diagnose the Java process in the container in k8s</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>kubectl <span class="token builtin class-name">exec</span> <span class="token parameter variable">-it</span> <span class="token variable">\${pod}</span> <span class="token parameter variable">--container</span> <span class="token variable">\${containerId}</span> -- /bin/bash <span class="token parameter variable">-c</span> <span class="token string">"wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="install-arthas-into-the-base-docker-image" tabindex="-1"><a class="header-anchor" href="#install-arthas-into-the-base-docker-image" aria-hidden="true">#</a> Install Arthas into the base Docker image</h2><p>It's easy to install Arthas into your Docker image.</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>FROM openjdk:8-jdk-alpine
|
||||
|
||||
# copy arthas
|
||||
COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas
|
||||
</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>If you want to specify a version, you can view all the tags:</p>`,24),d={href:"https://hub.docker.com/r/hengyunabc/arthas/tags",target:"_blank",rel:"noopener noreferrer"},u=p("https://hub.docker.com/r/hengyunabc/arthas/tags");function k(v,m){const s=l("ExternalLinkIcon");return e(),t("div",null,[c,a("p",null,[a("a",d,[u,i(s)])])])}const h=n(r,[["render",k],["__file","docker.html.vue"]]);export{h as default};
|
@ -0,0 +1,50 @@
|
||||
import{_ as n,o as e,c as t,a,b as p,d as i,e as l,r as o}from"./app.4d248835.js";const r={},c=i(`<h1 id="docker" tabindex="-1"><a class="header-anchor" href="#docker" aria-hidden="true">#</a> Docker</h1><h2 id="\u5728-docker-\u91CC\u4F7F\u7528-jdk" tabindex="-1"><a class="header-anchor" href="#\u5728-docker-\u91CC\u4F7F\u7528-jdk" aria-hidden="true">#</a> \u5728 Docker \u91CC\u4F7F\u7528 JDK</h2><p>\u5F88\u591A\u65F6\u5019\uFF0C\u5E94\u7528\u5728 docker \u91CC\u51FA\u73B0 arthas \u65E0\u6CD5\u5DE5\u4F5C\u7684\u95EE\u9898\uFF0C\u662F\u56E0\u4E3A\u5E94\u7528\u6CA1\u6709\u5B89\u88C5 JDK \uFF0C\u800C\u662F\u5B89\u88C5\u4E86 JRE \u3002\u5982\u679C\u53EA\u5B89\u88C5\u4E86 JRE\uFF0C\u5219\u4F1A\u7F3A\u5C11\u5F88\u591A JAVA \u7684\u547D\u4EE4\u884C\u5DE5\u5177\u548C\u7C7B\u5E93\uFF0CArthas \u4E5F\u6CA1\u529E\u6CD5\u6B63\u5E38\u5DE5\u4F5C\u3002\u4E0B\u9762\u4ECB\u7ECD\u4E24\u79CD\u5E38\u89C1\u7684\u5728 Docker \u91CC\u4F7F\u7528 JDK \u7684\u65B9\u5F0F\u3002</p><h3 id="\u4F7F\u7528\u516C\u5F00\u7684-jdk-\u955C\u50CF" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528\u516C\u5F00\u7684-jdk-\u955C\u50CF" aria-hidden="true">#</a> \u4F7F\u7528\u516C\u5F00\u7684 JDK \u955C\u50CF</h3><ul><li>https://hub.docker.com/_/openjdk/</li></ul><p>\u6BD4\u5982\uFF1A</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>FROM openjdk:8-jdk
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u6216\u8005\uFF1A</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>FROM openjdk:8-jdk-alpine
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="\u901A\u8FC7\u5305\u7BA1\u7406\u8F6F\u4EF6\u6765\u5B89\u88C5" tabindex="-1"><a class="header-anchor" href="#\u901A\u8FC7\u5305\u7BA1\u7406\u8F6F\u4EF6\u6765\u5B89\u88C5" aria-hidden="true">#</a> \u901A\u8FC7\u5305\u7BA1\u7406\u8F6F\u4EF6\u6765\u5B89\u88C5</h3><p>\u6BD4\u5982\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token comment"># Install OpenJDK-8</span>
|
||||
RUN <span class="token function">apt-get</span> update <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
<span class="token function">apt-get</span> <span class="token function">install</span> <span class="token parameter variable">-y</span> openjdk-8-jdk <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
<span class="token function">apt-get</span> <span class="token function">install</span> <span class="token parameter variable">-y</span> ant <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
<span class="token function">apt-get</span> clean<span class="token punctuation">;</span>
|
||||
|
||||
<span class="token comment"># Fix certificate issues</span>
|
||||
RUN <span class="token function">apt-get</span> update <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
<span class="token function">apt-get</span> <span class="token function">install</span> ca-certificates-java <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
<span class="token function">apt-get</span> clean <span class="token operator">&&</span> <span class="token punctuation">\\</span>
|
||||
update-ca-certificates -f<span class="token punctuation">;</span>
|
||||
|
||||
<span class="token comment"># Setup JAVA_HOME -- useful for docker commandline</span>
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
|
||||
RUN <span class="token builtin class-name">export</span> JAVA_HOME
|
||||
</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></div><p>\u6216\u8005\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>RUN yum <span class="token function">install</span> <span class="token parameter variable">-y</span> <span class="token punctuation">\\</span>
|
||||
java-1.8.0-openjdk <span class="token punctuation">\\</span>
|
||||
java-1.8.0-openjdk-devel
|
||||
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk/
|
||||
RUN <span class="token builtin class-name">export</span> JAVA_HOME
|
||||
</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><h2 id="\u901A\u8FC7-docker-\u5FEB\u901F\u5165\u95E8" tabindex="-1"><a class="header-anchor" href="#\u901A\u8FC7-docker-\u5FEB\u901F\u5165\u95E8" aria-hidden="true">#</a> \u901A\u8FC7 Docker \u5FEB\u901F\u5165\u95E8</h2><ol><li><p>\u5220\u9664\u672C\u5730\u5DF2\u6709\u7684<code>math-game</code> docker container\uFF08\u975E\u5FC5\u8981\uFF09</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">docker</span> stop math-game <span class="token operator">||</span> <span class="token boolean">true</span> <span class="token operator">&&</span> <span class="token function">docker</span> <span class="token function">rm</span> math-game <span class="token operator">||</span> <span class="token boolean">true</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li><li><p>\u542F\u52A8<code>math-game</code></p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">docker</span> run <span class="token parameter variable">--name</span> math-game <span class="token parameter variable">-it</span> hengyunabc/arthas:latest /bin/sh <span class="token parameter variable">-c</span> <span class="token string">"java -jar /opt/arthas/math-game.jar"</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li><li><p>\u542F\u52A8<code>arthas-boot3</code>\u6765\u8FDB\u884C\u8BCA\u65AD</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">docker</span> <span class="token builtin class-name">exec</span> <span class="token parameter variable">-it</span> math-game /bin/sh <span class="token parameter variable">-c</span> <span class="token string">"java -jar /opt/arthas/arthas-boot3.jar"</span>
|
||||
* <span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span>: <span class="token number">9</span> jar
|
||||
|
||||
<span class="token punctuation">[</span>INFO<span class="token punctuation">]</span> arthas home: /opt/arthas
|
||||
<span class="token punctuation">[</span>INFO<span class="token punctuation">]</span> Try to attach process <span class="token number">9</span>
|
||||
<span class="token punctuation">[</span>INFO<span class="token punctuation">]</span> Attach process <span class="token number">9</span> success.
|
||||
<span class="token punctuation">[</span>INFO<span class="token punctuation">]</span> arthas-client connect <span class="token number">127.0</span>.0.1 <span class="token number">3658</span>
|
||||
,---. ,------. ,--------.,--. ,--. ,---. ,---.
|
||||
/ O <span class="token punctuation">\\</span> <span class="token operator">|</span> .--. <span class="token string">''</span>--. .--<span class="token string">'| '</span>--<span class="token string">' | / O \\ '</span> .-<span class="token string">'
|
||||
| .-. || '</span>--<span class="token string">'.'</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> .--. <span class="token operator">||</span> .-. <span class="token operator">|</span><span class="token variable"><span class="token variable">\`</span><span class="token builtin class-name">.</span> <span class="token variable">\`</span></span>-.
|
||||
<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">||</span> <span class="token operator">|</span><span class="token punctuation">\\</span> <span class="token punctuation">\\</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">||</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>.-<span class="token string">' |
|
||||
\`--'</span> <span class="token variable"><span class="token variable">\`</span>--'<span class="token variable">\`</span></span>--<span class="token string">' '</span>--<span class="token string">' \`--'</span> <span class="token variable"><span class="token variable">\`</span>--' <span class="token variable">\`</span></span>--<span class="token string">'\`--'</span> <span class="token variable"><span class="token variable">\`</span>--'<span class="token variable">\`</span></span>-----'
|
||||
|
||||
|
||||
wiki: https://arthas.aliyun.com/3.x/doc
|
||||
version: <span class="token number">3.0</span>.5
|
||||
pid: <span class="token number">9</span>
|
||||
time: <span class="token number">2018</span>-12-18 <span class="token number">11</span>:30:36
|
||||
</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></div></li></ol><h2 id="\u8BCA\u65AD-docker-\u91CC\u7684-java-\u8FDB\u7A0B" tabindex="-1"><a class="header-anchor" href="#\u8BCA\u65AD-docker-\u91CC\u7684-java-\u8FDB\u7A0B" aria-hidden="true">#</a> \u8BCA\u65AD Docker \u91CC\u7684 Java \u8FDB\u7A0B</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">docker</span> <span class="token builtin class-name">exec</span> <span class="token parameter variable">-it</span> <span class="token variable">\${containerId}</span> /bin/bash <span class="token parameter variable">-c</span> <span class="token string">"wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="\u8BCA\u65AD-k8s-\u91CC\u5BB9\u5668\u91CC\u7684-java-\u8FDB\u7A0B" tabindex="-1"><a class="header-anchor" href="#\u8BCA\u65AD-k8s-\u91CC\u5BB9\u5668\u91CC\u7684-java-\u8FDB\u7A0B" aria-hidden="true">#</a> \u8BCA\u65AD k8s \u91CC\u5BB9\u5668\u91CC\u7684 Java \u8FDB\u7A0B</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>kubectl <span class="token builtin class-name">exec</span> <span class="token parameter variable">-it</span> <span class="token variable">\${pod}</span> <span class="token parameter variable">--container</span> <span class="token variable">\${containerId}</span> -- /bin/bash <span class="token parameter variable">-c</span> <span class="token string">"wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="\u628A-arthas-\u5B89\u88C5\u5230\u57FA\u7840\u955C\u50CF\u91CC" tabindex="-1"><a class="header-anchor" href="#\u628A-arthas-\u5B89\u88C5\u5230\u57FA\u7840\u955C\u50CF\u91CC" aria-hidden="true">#</a> \u628A Arthas \u5B89\u88C5\u5230\u57FA\u7840\u955C\u50CF\u91CC</h2><p>\u53EF\u4EE5\u5F88\u7B80\u5355\u628A Arthas \u5B89\u88C5\u5230\u4F60\u7684 Docker \u955C\u50CF\u91CC\u3002</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>FROM openjdk:8-jdk-alpine
|
||||
|
||||
# copy arthas
|
||||
COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas
|
||||
</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>\u5982\u679C\u60F3\u6307\u5B9A\u7248\u672C\uFF0C\u53EF\u4EE5\u67E5\u770B\u5177\u4F53\u7684 tags\uFF1A</p>`,24),d={href:"https://hub.docker.com/r/hengyunabc/arthas/tags",target:"_blank",rel:"noopener noreferrer"},u=l("https://hub.docker.com/r/hengyunabc/arthas/tags");function v(k,m){const s=o("ExternalLinkIcon");return e(),t("div",null,[c,a("p",null,[a("a",d,[u,p(s)])])])}const h=n(r,[["render",v],["__file","docker.html.vue"]]);export{h as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-682151b5","path":"/en/doc/docker.html","title":"Docker","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Use JDK in Docker","slug":"use-jdk-in-docker","link":"#use-jdk-in-docker","children":[{"level":3,"title":"Use public JDK image","slug":"use-public-jdk-image","link":"#use-public-jdk-image","children":[]},{"level":3,"title":"Install via package management software","slug":"install-via-package-management-software","link":"#install-via-package-management-software","children":[]}]},{"level":2,"title":"Quick start with Docker","slug":"quick-start-with-docker","link":"#quick-start-with-docker","children":[]},{"level":2,"title":"Diagnose the Java process in Docker","slug":"diagnose-the-java-process-in-docker","link":"#diagnose-the-java-process-in-docker","children":[]},{"level":2,"title":"Diagnose the Java process in the container in k8s","slug":"diagnose-the-java-process-in-the-container-in-k8s","link":"#diagnose-the-java-process-in-the-container-in-k8s","children":[]},{"level":2,"title":"Install Arthas into the base Docker image","slug":"install-arthas-into-the-base-docker-image","link":"#install-arthas-into-the-base-docker-image","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/docker.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,5 @@
|
||||
import{_ as n,o as r,c as d,a,b as o,d as e,e as i,r as t}from"./app.4d248835.js";const l={},c=e('<h1 id="download" tabindex="-1"><a class="header-anchor" href="#download" aria-hidden="true">#</a> Download</h1><h2 id="download-full-package" tabindex="-1"><a class="header-anchor" href="#download-full-package" aria-hidden="true">#</a> Download full package</h2><h3 id="download-from-github-releases" tabindex="-1"><a class="header-anchor" href="#download-from-github-releases" aria-hidden="true">#</a> Download from Github Releases</h3>',3),h={href:"https://github.com/alibaba/arthas/releases",target:"_blank",rel:"noopener noreferrer"},u=i("https://github.com/alibaba/arthas/releases"),b=e(`<h3 id="use-as3-sh" tabindex="-1"><a class="header-anchor" href="#use-as3-sh" aria-hidden="true">#</a> Use as3.sh</h3><p>Download and unzip, find <code>as3.sh</code> in the directory. Start it in bash:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>./as3.sh
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>Print usage:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>./as3.sh <span class="token parameter variable">-h</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="use-arthas-boot3-jar" tabindex="-1"><a class="header-anchor" href="#use-arthas-boot3-jar" aria-hidden="true">#</a> Use arthas-boot3.jar</h3><p>Download and unzip, find <code>arthas-boot3.jar</code> in the directory. Start with <code>java</code> command:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">java</span> <span class="token parameter variable">-jar</span> arthas-boot3.jar
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>Print usage:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">java</span> <span class="token parameter variable">-jar</span> arthas-boot3.jar <span class="token parameter variable">-h</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,10);function p(m,v){const s=t("ExternalLinkIcon");return r(),d("div",null,[c,a("p",null,[a("a",h,[u,o(s)])]),b])}const f=n(l,[["render",p],["__file","download.html.vue"]]);export{f as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-8d912d66","path":"/en/doc/download.html","title":"Download","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Download full package","slug":"download-full-package","link":"#download-full-package","children":[{"level":3,"title":"Download from Github Releases","slug":"download-from-github-releases","link":"#download-from-github-releases","children":[]},{"level":3,"title":"Use as3.sh","slug":"use-as3-sh","link":"#use-as3-sh","children":[]},{"level":3,"title":"Use arthas-boot3.jar","slug":"use-arthas-boot3-jar","link":"#use-arthas-boot3-jar","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/download.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,5 @@
|
||||
import{_ as n,o as r,c as d,a,b as i,d as e,e as t,r as o}from"./app.4d248835.js";const c={},h=e('<h1 id="\u4E0B\u8F7D" tabindex="-1"><a class="header-anchor" href="#\u4E0B\u8F7D" aria-hidden="true">#</a> \u4E0B\u8F7D</h1><h2 id="\u4E0B\u8F7D\u5168\u91CF\u5305" tabindex="-1"><a class="header-anchor" href="#\u4E0B\u8F7D\u5168\u91CF\u5305" aria-hidden="true">#</a> \u4E0B\u8F7D\u5168\u91CF\u5305</h2><h3 id="\u4ECE-github-releases-\u9875\u4E0B\u8F7D" tabindex="-1"><a class="header-anchor" href="#\u4ECE-github-releases-\u9875\u4E0B\u8F7D" aria-hidden="true">#</a> \u4ECE Github Releases \u9875\u4E0B\u8F7D</h3>',3),l={href:"https://github.com/alibaba/arthas/releases",target:"_blank",rel:"noopener noreferrer"},b=t("https://github.com/alibaba/arthas/releases"),p=e(`<h3 id="\u7528-as3-sh-\u542F\u52A8" tabindex="-1"><a class="header-anchor" href="#\u7528-as3-sh-\u542F\u52A8" aria-hidden="true">#</a> \u7528 as3.sh \u542F\u52A8</h3><p>\u89E3\u538B\u540E\uFF0C\u5728\u6587\u4EF6\u5939\u91CC\u6709<code>as3.sh</code>\uFF0C\u76F4\u63A5\u7528<code>./as3.sh</code>\u7684\u65B9\u5F0F\u542F\u52A8\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>./as3.sh
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u6253\u5370\u5E2E\u52A9\u4FE1\u606F\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>./as3.sh <span class="token parameter variable">-h</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="\u7528-arthas-boot3-\u542F\u52A8" tabindex="-1"><a class="header-anchor" href="#\u7528-arthas-boot3-\u542F\u52A8" aria-hidden="true">#</a> \u7528 arthas-boot3 \u542F\u52A8</h3><p>\u6216\u8005\u5728\u89E3\u538B\u540E\uFF0C\u5728\u6587\u4EF6\u5939\u91CC\u6709<code>arthas-boot3.jar</code>\uFF0C\u76F4\u63A5\u7528<code>java -jar</code>\u7684\u65B9\u5F0F\u542F\u52A8\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">java</span> <span class="token parameter variable">-jar</span> arthas-boot3.jar
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u6253\u5370\u5E2E\u52A9\u4FE1\u606F\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">java</span> <span class="token parameter variable">-jar</span> arthas-boot3.jar <span class="token parameter variable">-h</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,10);function u(v,m){const s=o("ExternalLinkIcon");return r(),d("div",null,[h,a("p",null,[a("a",l,[b,i(s)])]),p])}const g=n(c,[["render",u],["__file","download.html.vue"]]);export{g as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-2116d2e1","path":"/doc/download.html","title":"\u4E0B\u8F7D","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4E0B\u8F7D\u5168\u91CF\u5305","slug":"\u4E0B\u8F7D\u5168\u91CF\u5305","link":"#\u4E0B\u8F7D\u5168\u91CF\u5305","children":[{"level":3,"title":"\u4ECE Github Releases \u9875\u4E0B\u8F7D","slug":"\u4ECE-github-releases-\u9875\u4E0B\u8F7D","link":"#\u4ECE-github-releases-\u9875\u4E0B\u8F7D","children":[]},{"level":3,"title":"\u7528 as3.sh \u542F\u52A8","slug":"\u7528-as3-sh-\u542F\u52A8","link":"#\u7528-as3-sh-\u542F\u52A8","children":[]},{"level":3,"title":"\u7528 arthas-boot3 \u542F\u52A8","slug":"\u7528-arthas-boot3-\u542F\u52A8","link":"#\u7528-arthas-boot3-\u542F\u52A8","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/download.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-471b4d3e","path":"/en/doc/dump.html","title":"dump","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Options","slug":"options","link":"#options","children":[]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":3},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/dump.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-1fe4a616","path":"/doc/dump.html","title":"dump","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u53C2\u6570\u8BF4\u660E","slug":"\u53C2\u6570\u8BF4\u660E","link":"#\u53C2\u6570\u8BF4\u660E","children":[]},{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":3},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/dump.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,20 @@
|
||||
import{_ as c,o,c as d,a as e,b as a,w as t,e as s,d as r,r as l}from"./app.4d248835.js";const u={},p=e("h1",{id:"dump",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#dump","aria-hidden":"true"},"#"),s(" dump")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=en&id=command-dump",target:"_blank",rel:"noopener noreferrer"},m=e("code",null,"dump",-1),v=s(" online tutorial"),b=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"TIP"),e("p",null,"Dump the bytecode for the particular classes to the specified directory.")],-1),g=s("The dump command is used to dump the bytecode of classes actually running in the JVM to a specified directory. It is suitable for bulk downloading the bytecode of classes in a specific package directory. If you need to decompile a single class or view class information in real-time, you can refer to "),_=s("jad"),f=s("."),k=e("h2",{id:"options",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#options","aria-hidden":"true"},"#"),s(" Options")],-1),L=e("thead",null,[e("tr",null,[e("th",{style:{"text-align":"right"}},"Name"),e("th",{style:{"text-align":"left"}},"Specification")])],-1),y=e("tr",null,[e("td",{style:{"text-align":"right"}},[e("em",null,"class-pattern")]),e("td",{style:{"text-align":"left"}},"class name pattern")],-1),x=e("td",{style:{"text-align":"right"}},[e("code",null,"[c:]")],-1),C={style:{"text-align":"left"}},A=s("hashcode of the "),S=s("class loader"),w=s(" that loaded the target class"),O=e("tr",null,[e("td",{style:{"text-align":"right"}},[e("code",null,"[classLoaderClass:]")]),e("td",{style:{"text-align":"left"}},"The class name of the ClassLoader that executes the expression.")],-1),E=e("tr",null,[e("td",{style:{"text-align":"right"}},[e("code",null,"[d:]")]),e("td",{style:{"text-align":"left"}},"set the destination directory for class files")],-1),$=e("tr",null,[e("td",{style:{"text-align":"right"}},[e("code",null,"[E]")]),e("td",{style:{"text-align":"left"}},"turn on regex match, the default behavior is wild card match")],-1),j=r(`<h2 id="usage" tabindex="-1"><a class="header-anchor" href="#usage" aria-hidden="true">#</a> Usage</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ dump java.lang.String
|
||||
HASHCODE CLASSLOADER LOCATION
|
||||
null /Users/admin/logs/arthas/classdump/java/lang/String.class
|
||||
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">119</span> ms.
|
||||
</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>$ dump demo.*
|
||||
HASHCODE CLASSLOADER LOCATION
|
||||
3d4eac69 +-sun.misc.Launcher<span class="token variable">$AppClassLoader</span>@3d4eac69 /Users/admin/logs/arthas/classdump/sun.misc.Launcher<span class="token variable">$AppClassLoader</span>-3d4eac69/demo/MathGame.class
|
||||
+-sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">39</span> ms.
|
||||
</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></div><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ dump <span class="token parameter variable">-d</span> /tmp/output java.lang.String
|
||||
HASHCODE CLASSLOADER LOCATION
|
||||
null /tmp/output/java/lang/String.class
|
||||
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">138</span> ms.
|
||||
</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><ul><li>Specify classLoader</li></ul><p>Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader.</p><p>if you use<code>-c</code>, you have to manually type hashcode by <code>-c <hashcode></code>.</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ dump <span class="token parameter variable">-c</span> 3d4eac69 demo.*
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>For classloader with only one instance, it can be specified by <code>--classLoaderClass</code> using class name, which is more convenient to use.</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ dump <span class="token parameter variable">--classLoaderClass</span> sun.misc.Launcher<span class="token variable">$AppClassLoader</span> demo.*
|
||||
HASHCODE CLASSLOADER LOCATION
|
||||
3d4eac69 +-sun.misc.Launcher<span class="token variable">$AppClassLoader</span>@3d4eac69 /Users/admin/logs/arthas/classdump/sun.misc.Launcher<span class="token variable">$AppClassLoader</span>-3d4eac69/demo/MathGame.class
|
||||
+-sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">39</span> ms.
|
||||
</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></div><ul><li>PS: Here the classLoaderClass in java 8 is sun.misc.Launcher$AppClassLoader, while in java 11 it's jdk.internal.loader.ClassLoaders$AppClassLoader. Currently killercoda using java 11.</li></ul><p>The value of <code>--classloaderclass</code> is the class name of classloader. It can only work when it matches a unique classloader instance. The purpose is to facilitate the input of general commands. However, <code>-c <hashcode></code> is dynamic.</p>`,12);function H(I,N){const i=l("ExternalLinkIcon"),n=l("RouterLink");return o(),d("div",null,[p,e("p",null,[e("a",h,[m,v,a(i)])]),b,e("p",null,[g,a(n,{to:"/en/doc/jad.html"},{default:t(()=>[_]),_:1}),f]),k,e("table",null,[L,e("tbody",null,[y,e("tr",null,[x,e("td",C,[A,a(n,{to:"/en/doc/classloader.html"},{default:t(()=>[S]),_:1}),w])]),O,E,$])]),j])}const D=c(u,[["render",H],["__file","dump.html.vue"]]);export{D as default};
|
@ -0,0 +1,20 @@
|
||||
import{_ as d,o as c,c as i,a,b as e,w as r,e as s,d as o,r as n}from"./app.4d248835.js";const p={},u=a("h1",{id:"dump",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#dump","aria-hidden":"true"},"#"),s(" dump")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=cn&id=command-dump",target:"_blank",rel:"noopener noreferrer"},h=a("code",null,"dump",-1),v=s("\u5728\u7EBF\u6559\u7A0B"),b=a("div",{class:"custom-container tip"},[a("p",{class:"custom-container-title"},"\u63D0\u793A"),a("p",null,"dump \u5DF2\u52A0\u8F7D\u7C7B\u7684 bytecode \u5230\u7279\u5B9A\u76EE\u5F55")],-1),g=s("dump \u547D\u4EE4\u5C06 JVM \u4E2D\u5B9E\u9645\u8FD0\u884C\u7684 class \u7684 byte code dump \u5230\u6307\u5B9A\u76EE\u5F55\uFF0C\u9002\u7528\u573A\u666F\u6279\u91CF\u4E0B\u8F7D\u6307\u5B9A\u5305\u76EE\u5F55\u7684 class \u5B57\u8282\u7801\uFF1B\u5982\u9700\u53CD\u7F16\u8BD1\u5355\u4E00\u7C7B\u3001\u5B9E\u65F6\u67E5\u770B\u7C7B\u4FE1\u606F\uFF0C\u53EF\u53C2\u8003 "),L=s("jad"),k=s("\u3002"),C=o(`<h2 id="\u53C2\u6570\u8BF4\u660E" tabindex="-1"><a class="header-anchor" href="#\u53C2\u6570\u8BF4\u660E" aria-hidden="true">#</a> \u53C2\u6570\u8BF4\u660E</h2><table><thead><tr><th style="text-align:right;">\u53C2\u6570\u540D\u79F0</th><th style="text-align:left;">\u53C2\u6570\u8BF4\u660E</th></tr></thead><tbody><tr><td style="text-align:right;"><em>class-pattern</em></td><td style="text-align:left;">\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D</td></tr><tr><td style="text-align:right;"><code>[c:]</code></td><td style="text-align:left;">\u7C7B\u6240\u5C5E ClassLoader \u7684 hashcode</td></tr><tr><td style="text-align:right;"><code>[classLoaderClass:]</code></td><td style="text-align:left;">\u6307\u5B9A\u6267\u884C\u8868\u8FBE\u5F0F\u7684 ClassLoader \u7684 class name</td></tr><tr><td style="text-align:right;"><code>[d:]</code></td><td style="text-align:left;">\u8BBE\u7F6E\u7C7B\u6587\u4EF6\u7684\u76EE\u6807\u76EE\u5F55</td></tr><tr><td style="text-align:right;">[E]</td><td style="text-align:left;">\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D</td></tr></tbody></table><h2 id="\u4F7F\u7528\u53C2\u8003" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528\u53C2\u8003" aria-hidden="true">#</a> \u4F7F\u7528\u53C2\u8003</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ dump java.lang.String
|
||||
HASHCODE CLASSLOADER LOCATION
|
||||
null /Users/admin/logs/arthas/classdump/java/lang/String.class
|
||||
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">119</span> ms.
|
||||
</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>$ dump demo.*
|
||||
HASHCODE CLASSLOADER LOCATION
|
||||
3d4eac69 +-sun.misc.Launcher<span class="token variable">$AppClassLoader</span>@3d4eac69 /Users/admin/logs/arthas/classdump/sun.misc.Launcher<span class="token variable">$AppClassLoader</span>-3d4eac69/demo/MathGame.class
|
||||
+-sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">39</span> ms.
|
||||
</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></div><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ dump <span class="token parameter variable">-d</span> /tmp/output java.lang.String
|
||||
HASHCODE CLASSLOADER LOCATION
|
||||
null /tmp/output/java/lang/String.class
|
||||
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">138</span> ms.
|
||||
</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><ul><li>\u6307\u5B9A classLoader</li></ul><p>\u6CE8\u610F hashcode \u662F\u53D8\u5316\u7684\uFF0C\u9700\u8981\u5148\u67E5\u770B\u5F53\u524D\u7684 ClassLoader \u4FE1\u606F\uFF0C\u63D0\u53D6\u5BF9\u5E94 ClassLoader \u7684 hashcode\u3002</p><p>\u5982\u679C\u4F60\u4F7F\u7528<code>-c</code>\uFF0C\u4F60\u9700\u8981\u624B\u52A8\u8F93\u5165 hashcode\uFF1A<code>-c <hashcode></code></p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ dump <span class="token parameter variable">-c</span> 3d4eac69 demo.*
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u5BF9\u4E8E\u53EA\u6709\u552F\u4E00\u5B9E\u4F8B\u7684 ClassLoader \u53EF\u4EE5\u901A\u8FC7<code>--classLoaderClass</code>\u6307\u5B9A class name\uFF0C\u4F7F\u7528\u8D77\u6765\u66F4\u52A0\u65B9\u4FBF\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ dump <span class="token parameter variable">--classLoaderClass</span> sun.misc.Launcher<span class="token variable">$AppClassLoader</span> demo.*
|
||||
HASHCODE CLASSLOADER LOCATION
|
||||
3d4eac69 +-sun.misc.Launcher<span class="token variable">$AppClassLoader</span>@3d4eac69 /Users/admin/logs/arthas/classdump/sun.misc.Launcher<span class="token variable">$AppClassLoader</span>-3d4eac69/demo/MathGame.class
|
||||
+-sun.misc.Launcher<span class="token variable">$ExtClassLoader</span>@66350f69
|
||||
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">39</span> ms.
|
||||
</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></div><ul><li>\u6CE8\uFF1A\u8FD9\u91CC classLoaderClass \u5728 java 8 \u662F sun.misc.Launcher$AppClassLoader\uFF0C\u800C java 11 \u7684 classloader \u662F jdk.internal.loader.ClassLoaders$AppClassLoader\uFF0Ckillercoda \u76EE\u524D\u73AF\u5883\u662F java11\u3002</li></ul><p><code>--classLoaderClass</code> \u7684\u503C\u662F ClassLoader \u7684\u7C7B\u540D\uFF0C\u53EA\u6709\u5339\u914D\u5230\u552F\u4E00\u7684 ClassLoader \u5B9E\u4F8B\u65F6\u624D\u80FD\u5DE5\u4F5C\uFF0C\u76EE\u7684\u662F\u65B9\u4FBF\u8F93\u5165\u901A\u7528\u547D\u4EE4\uFF0C\u800C<code>-c <hashcode></code>\u662F\u52A8\u6001\u53D8\u5316\u7684\u3002</p>`,14);function _(x,f){const t=n("ExternalLinkIcon"),l=n("RouterLink");return c(),i("div",null,[u,a("p",null,[a("a",m,[h,v,e(t)])]),b,a("p",null,[g,e(l,{to:"/doc/jad.html"},{default:r(()=>[L]),_:1}),k]),C])}const y=d(p,[["render",_],["__file","dump.html.vue"]]);export{y as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-2c48f364","path":"/doc/echo.html","title":"echo","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/echo.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-18ad9fd0","path":"/en/doc/echo.html","title":"echo","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/echo.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,2 @@
|
||||
import{_ as s,o as t,c as o,a as e,b as c,e as a,d as r,r as i}from"./app.4d248835.js";const l={},d=e("h1",{id:"echo",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#echo","aria-hidden":"true"},"#"),a(" echo")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-echo",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"echo",-1),_=a(" online tutorial"),p=r(`<div class="custom-container tip"><p class="custom-container-title">TIP</p><p>write arguments to the standard output.</p></div><h2 id="usage" tabindex="-1"><a class="header-anchor" href="#usage" aria-hidden="true">#</a> Usage</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token builtin class-name">echo</span> <span class="token string">'hello'</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,3);function m(g,f){const n=i("ExternalLinkIcon");return t(),o("div",null,[d,e("p",null,[e("a",h,[u,_,c(n)])]),p])}const b=s(l,[["render",m],["__file","echo.html.vue"]]);export{b as default};
|
@ -0,0 +1,2 @@
|
||||
import{_ as s,o,c as t,a as e,b as c,e as a,d as r,r as i}from"./app.4d248835.js";const l={},d=e("h1",{id:"echo",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#echo","aria-hidden":"true"},"#"),a(" echo")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-echo",target:"_blank",rel:"noopener noreferrer"},_=e("code",null,"echo",-1),u=a("\u5728\u7EBF\u6559\u7A0B"),p=r(`<div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>\u6253\u5370\u53C2\u6570\uFF0C\u548C linux \u91CC\u7684 echo \u547D\u4EE4\u7C7B\u4F3C\u3002</p></div><h2 id="\u4F7F\u7528\u53C2\u8003" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528\u53C2\u8003" aria-hidden="true">#</a> \u4F7F\u7528\u53C2\u8003</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ <span class="token builtin class-name">echo</span> <span class="token string">'hello'</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,3);function m(f,v){const n=i("ExternalLinkIcon");return o(),t("div",null,[d,e("p",null,[e("a",h,[_,u,c(n)])]),p])}const b=s(l,[["render",m],["__file","echo.html.vue"]]);export{b as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-d1b46bf2","path":"/en/doc/faq.html","title":"FAQ","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"Where is the log file?","slug":"where-is-the-log-file","link":"#where-is-the-log-file","children":[]},{"level":3,"title":"How much impact does Arthas attach have on the performance of the original process?","slug":"how-much-impact-does-arthas-attach-have-on-the-performance-of-the-original-process","link":"#how-much-impact-does-arthas-attach-have-on-the-performance-of-the-original-process","children":[]},{"level":3,"title":"target process not responding or HotSpot VM not loaded","slug":"target-process-not-responding-or-hotspot-vm-not-loaded","link":"#target-process-not-responding-or-hotspot-vm-not-loaded","children":[]},{"level":3,"title":"Can commands such as trace/watch enhance the classes in jdk?","slug":"can-commands-such-as-trace-watch-enhance-the-classes-in-jdk","link":"#can-commands-such-as-trace-watch-enhance-the-classes-in-jdk","children":[]},{"level":3,"title":"How to view the result in json format","slug":"how-to-view-the-result-in-json-format","link":"#how-to-view-the-result-in-json-format","children":[]},{"level":3,"title":"Can arthas trace native methods","slug":"can-arthas-trace-native-methods","link":"#can-arthas-trace-native-methods","children":[]},{"level":3,"title":"Can arthas view the value of a variable in memory?","slug":"can-arthas-view-the-value-of-a-variable-in-memory","link":"#can-arthas-view-the-value-of-a-variable-in-memory","children":[]},{"level":3,"title":"How to filter method with the same name?","slug":"how-to-filter-method-with-the-same-name","link":"#how-to-filter-method-with-the-same-name","children":[]},{"level":3,"title":"How to watch or trace constructor?","slug":"how-to-watch-or-trace-constructor","link":"#how-to-watch-or-trace-constructor","children":[]},{"level":3,"title":"How to watch or trace inner classes?","slug":"how-to-watch-or-trace-inner-classes","link":"#how-to-watch-or-trace-inner-classes","children":[]},{"level":3,"title":"Enter Unicode characters","slug":"enter-unicode-characters","link":"#enter-unicode-characters","children":[]},{"level":3,"title":"java.lang.ClassFormatError: null, skywalking arthas compatible use","slug":"java-lang-classformaterror-null-skywalking-arthas-compatible-use","link":"#java-lang-classformaterror-null-skywalking-arthas-compatible-use","children":[]},{"level":3,"title":"Can I use arthas offline?","slug":"can-i-use-arthas-offline","link":"#can-i-use-arthas-offline","children":[]},{"level":3,"title":"Attach the process with pid 1 in docker/k8s failed","slug":"attach-the-process-with-pid-1-in-docker-k8s-failed","link":"#attach-the-process-with-pid-1-in-docker-k8s-failed","children":[]},{"level":3,"title":"Why is the new version of Arthas downloaded, but the old version is connected?","slug":"why-is-the-new-version-of-arthas-downloaded-but-the-old-version-is-connected","link":"#why-is-the-new-version-of-arthas-downloaded-but-the-old-version-is-connected","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/faq.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,7 @@
|
||||
import{_ as h,o as c,c as d,a as e,b as a,w as n,e as t,d as r,r as i}from"./app.4d248835.js";const l={},u=e("h1",{id:"faq",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#faq","aria-hidden":"true"},"#"),t(" FAQ")],-1),p={class:"custom-container tip"},m=e("p",{class:"custom-container-title"},"TIP",-1),_=t("For questions that are not in this list, please search in issues. "),b={href:"https://github.com/alibaba/arthas/issues",target:"_blank",rel:"noopener noreferrer"},f=t("https://github.com/alibaba/arthas/issues"),g=e("h3",{id:"where-is-the-log-file",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#where-is-the-log-file","aria-hidden":"true"},"#"),t(" Where is the log file?")],-1),v=e("p",null,[t("Log file path: "),e("code",null,"~/logs/arthas/arthas.log")],-1),w=e("h3",{id:"how-much-impact-does-arthas-attach-have-on-the-performance-of-the-original-process",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-much-impact-does-arthas-attach-have-on-the-performance-of-the-original-process","aria-hidden":"true"},"#"),t(" How much impact does Arthas attach have on the performance of the original process?")],-1),k={href:"https://github.com/alibaba/arthas/issues/44",target:"_blank",rel:"noopener noreferrer"},x=t("https://github.com/alibaba/arthas/issues/44"),y=e("h3",{id:"target-process-not-responding-or-hotspot-vm-not-loaded",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#target-process-not-responding-or-hotspot-vm-not-loaded","aria-hidden":"true"},"#"),t(" target process not responding or HotSpot VM not loaded")],-1),j=e("p",null,"com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded",-1),C=e("li",null,"Check whether the current user and the target java process are consistent. If they are inconsistent, switch to the same user. JVM can only attach java processes under the same user.",-1),I=e("li",null,[t("Try to use "),e("code",null,"jstack -l $pid"),t(". If the process does not respond, it means that the process may freeze and fail to respond to the JVM attach signal. So Arthas based on the attach mechanism cannot work. Try to use "),e("code",null,"jmap"),t(" heapdump to analyze.")],-1),V=t("Try to attach math-game in "),q=t("quick-start"),E=t("."),F=t("For more information: "),L={href:"https://github.com/alibaba/arthas/issues/347",target:"_blank",rel:"noopener noreferrer"},S=t("https://github.com/alibaba/arthas/issues/347"),H=r(`<h3 id="can-commands-such-as-trace-watch-enhance-the-classes-in-jdk" tabindex="-1"><a class="header-anchor" href="#can-commands-such-as-trace-watch-enhance-the-classes-in-jdk" aria-hidden="true">#</a> Can commands such as trace/watch enhance the classes in jdk?</h3><p>By default, classes beginning with <code>java.</code> or the classes loaded by the <code>Bootstrap ClassLoader</code> are filtered out, but they can be turned on:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>options unsafe <span class="token boolean">true</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,3),T=t("See more at "),A=t("options"),M=r(`<div class="custom-container tip"><p class="custom-container-title">TIP</p><p>To support the jars appended by java.lang.instrument.Instrumentation#appendToBootstrapClassLoaderSearch need to enable unsafe.</p></div><h3 id="how-to-view-the-result-in-json-format" tabindex="-1"><a class="header-anchor" href="#how-to-view-the-result-in-json-format" aria-hidden="true">#</a> How to view the result in <code>json</code> format</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>options json-format <span class="token boolean">true</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,3),B=t("See more at "),N=t("options"),O=e("h3",{id:"can-arthas-trace-native-methods",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#can-arthas-trace-native-methods","aria-hidden":"true"},"#"),t(" Can arthas trace native methods")],-1),Y=e("p",null,"No.",-1),z=e("h3",{id:"can-arthas-view-the-value-of-a-variable-in-memory",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#can-arthas-view-the-value-of-a-variable-in-memory","aria-hidden":"true"},"#"),t(" Can arthas view the value of a variable in memory?")],-1),J=t("You can use "),R=e("code",null,"vmtool",-1),U=t(" command."),W=t("You can use some tricks to intercept the object with the "),$=e("code",null,"tt",-1),G=t(" command, or fetch it from a static method."),P=e("h3",{id:"how-to-filter-method-with-the-same-name",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-to-filter-method-with-the-same-name","aria-hidden":"true"},"#"),t(" How to filter method with the same name?")],-1),Q=t("You can used all variables in "),D=t("fundamental fields in expressions"),K=t(" for the condition express to filter method with the same name, you can use the number of parameters "),X=e("code",null,"params.length ==1",-1),Z=t(",parameter type "),ee=e("code",null,"params[0] instanceof java.lang.Integer",-1),te=t(",return value type "),ae=e("code",null,"returnObj instanceof java.util.List",-1),se=t(" and so on in one or more combinations as condition express."),oe=t("You can use "),ne=e("code",null,"-v",-1),re=t(" to view the condition express result "),ie={href:"https://github.com/alibaba/arthas/issues/1348",target:"_blank",rel:"noopener noreferrer"},he=t("https://github.com/alibaba/arthas/issues/1348"),ce=t("example "),de=t("math-game"),le=r(`<div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">watch</span> demo.MathGame primeFactors <span class="token string">'{params,returnObj,throwExp}'</span> <span class="token string">'params.length >0 && returnObj instanceof java.util.List'</span> <span class="token parameter variable">-v</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="how-to-watch-or-trace-constructor" tabindex="-1"><a class="header-anchor" href="#how-to-watch-or-trace-constructor" aria-hidden="true">#</a> How to watch or trace constructor?</h3><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">watch</span> demo.MathGame <span class="token operator"><</span>init<span class="token operator">></span> <span class="token string">'{params,returnObj,throwExp}'</span> <span class="token parameter variable">-v</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="how-to-watch-or-trace-inner-classes" tabindex="-1"><a class="header-anchor" href="#how-to-watch-or-trace-inner-classes" aria-hidden="true">#</a> How to watch or trace inner classes?</h3><p>In the JVM specification the name of inner classes is <code>OuterClass$InnerClass</code>.</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">watch</span> OuterClass<span class="token variable">$InnerClass</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="enter-unicode-characters" tabindex="-1"><a class="header-anchor" href="#enter-unicode-characters" aria-hidden="true">#</a> Enter Unicode characters</h3><p>Convert Unicode characters to <code>\\u</code> representation:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>ognl <span class="token string">'@java.lang.System@out.println("Hello \\u4e2d\\u6587")'</span>
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="java-lang-classformaterror-null-skywalking-arthas-compatible-use" tabindex="-1"><a class="header-anchor" href="#java-lang-classformaterror-null-skywalking-arthas-compatible-use" aria-hidden="true">#</a> java.lang.ClassFormatError: null, skywalking arthas compatible use</h3><p>When error log appear <code>java.lang.ClassFormatError: null</code>, it is usually modified by other bytecode tools that are not compatible with arthas modified bytecode.</p>`,11),ue=t("For example: use skywalking V8.1.0 below "),pe={href:"https://github.com/alibaba/arthas/issues/1141",target:"_blank",rel:"noopener noreferrer"},me=t("cannot trace, watch classes enhanced by skywalking agent"),_e=t(", V8.1.0 or above is compatible, refer to skywalking configuration for more details. "),be={href:"https://github.com/apache/skywalking/blob/master/docs/en/FAQ/Compatible-with-other-javaagent-bytecode-processing.md#",target:"_blank",rel:"noopener noreferrer"},fe=t("skywalking compatible with other javaagent bytecode processing"),ge=t("."),ve=e("h4",{id:"class-redefinition-failed-attempted-to-change-the-schema-add-remove-fields",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#class-redefinition-failed-attempted-to-change-the-schema-add-remove-fields","aria-hidden":"true"},"#"),t(" class redefinition failed: attempted to change the schema (add/remove fields)")],-1),we=t("Reference: "),ke={href:"https://github.com/alibaba/arthas/issues/2165",target:"_blank",rel:"noopener noreferrer"},xe=t("https://github.com/alibaba/arthas/issues/2165"),ye=e("h3",{id:"can-i-use-arthas-offline",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#can-i-use-arthas-offline","aria-hidden":"true"},"#"),t(" Can I use arthas offline?")],-1),je=t("Yes. Just download the full size package and unzip it, refer to: "),Ce=t("Download"),Ie=t("."),Ve=e("h3",{id:"attach-the-process-with-pid-1-in-docker-k8s-failed",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#attach-the-process-with-pid-1-in-docker-k8s-failed","aria-hidden":"true"},"#"),t(" Attach the process with pid 1 in docker/k8s failed")],-1),qe=t("Reference: "),Ee={href:"https://github.com/alibaba/arthas/issues/362#issuecomment-448185416",target:"_blank",rel:"noopener noreferrer"},Fe=t("https://github.com/alibaba/arthas/issues/362#issuecomment-448185416"),Le=e("h3",{id:"why-is-the-new-version-of-arthas-downloaded-but-the-old-version-is-connected",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#why-is-the-new-version-of-arthas-downloaded-but-the-old-version-is-connected","aria-hidden":"true"},"#"),t(" Why is the new version of Arthas downloaded, but the old version is connected?")],-1),Se=e("p",null,[t("For example, the started version of "),e("code",null,"as3.sh/arthas-boot3.jar"),t(" is 3.5."),e("em",null,", but after connecting, the printed arthas version is 3.4."),t(".")],-1),He=e("p",null,[t("It may be that the target process has been diagnosed with the old version of arthas before. You can execute "),e("code",null,"stop"),t(" to stop the old version of arthas, and then reuse the new version to attach.")],-1);function Te(Ae,Me){const s=i("ExternalLinkIcon"),o=i("RouterLink");return c(),d("div",null,[u,e("div",p,[m,e("p",null,[_,e("a",b,[f,a(s)])])]),g,v,w,e("p",null,[e("a",k,[x,a(s)])]),y,j,e("ol",null,[C,I,e("li",null,[V,a(o,{to:"/en/doc/quick-start.html"},{default:n(()=>[q]),_:1}),E]),e("li",null,[F,e("a",L,[S,a(s)])])]),H,e("p",null,[T,a(o,{to:"/en/doc/options.html"},{default:n(()=>[A]),_:1})]),M,e("p",null,[B,a(o,{to:"/en/doc/options.html"},{default:n(()=>[N]),_:1})]),O,Y,z,e("ol",null,[e("li",null,[J,a(o,{to:"/en/doc/vmtool.html"},{default:n(()=>[R]),_:1}),U]),e("li",null,[W,a(o,{to:"/en/doc/tt.html"},{default:n(()=>[$]),_:1}),G])]),P,e("p",null,[Q,a(o,{to:"/en/doc/advice-class.html"},{default:n(()=>[D]),_:1}),K,X,Z,ee,te,ae,se]),e("p",null,[oe,ne,re,e("a",ie,[he,a(s)])]),e("p",null,[ce,a(o,{to:"/en/doc/quick-start.html"},{default:n(()=>[de]),_:1})]),le,e("p",null,[ue,e("a",pe,[me,a(s)]),_e,e("a",be,[fe,a(s)]),ge]),ve,e("p",null,[we,e("a",ke,[xe,a(s)])]),ye,e("p",null,[je,a(o,{to:"/en/doc/download.html"},{default:n(()=>[Ce]),_:1}),Ie]),Ve,e("p",null,[qe,e("a",Ee,[Fe,a(s)])]),Le,Se,He])}const Ne=h(l,[["render",Te],["__file","faq.html.vue"]]);export{Ne as default};
|
@ -0,0 +1 @@
|
||||
const t=JSON.parse('{"key":"v-d070981a","path":"/doc/faq.html","title":"FAQ","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"\u65E5\u5FD7\u6587\u4EF6\u5728\u54EA\u91CC\uFF1F","slug":"\u65E5\u5FD7\u6587\u4EF6\u5728\u54EA\u91CC","link":"#\u65E5\u5FD7\u6587\u4EF6\u5728\u54EA\u91CC","children":[]},{"level":3,"title":"Arthas attach \u4E4B\u540E\u5BF9\u539F\u8FDB\u7A0B\u6027\u80FD\u6709\u591A\u5927\u7684\u5F71\u54CD","slug":"arthas-attach-\u4E4B\u540E\u5BF9\u539F\u8FDB\u7A0B\u6027\u80FD\u6709\u591A\u5927\u7684\u5F71\u54CD","link":"#arthas-attach-\u4E4B\u540E\u5BF9\u539F\u8FDB\u7A0B\u6027\u80FD\u6709\u591A\u5927\u7684\u5F71\u54CD","children":[]},{"level":3,"title":"target process not responding or HotSpot VM not loaded","slug":"target-process-not-responding-or-hotspot-vm-not-loaded","link":"#target-process-not-responding-or-hotspot-vm-not-loaded","children":[]},{"level":3,"title":"trace/watch \u7B49\u547D\u4EE4\u80FD\u5426\u589E\u5F3A jdk \u91CC\u7684\u7C7B\uFF1F","slug":"trace-watch-\u7B49\u547D\u4EE4\u80FD\u5426\u589E\u5F3A-jdk-\u91CC\u7684\u7C7B","link":"#trace-watch-\u7B49\u547D\u4EE4\u80FD\u5426\u589E\u5F3A-jdk-\u91CC\u7684\u7C7B","children":[]},{"level":3,"title":"\u600E\u4E48\u4EE5json\u683C\u5F0F\u67E5\u770B\u7ED3\u679C","slug":"\u600E\u4E48\u4EE5json\u683C\u5F0F\u67E5\u770B\u7ED3\u679C","link":"#\u600E\u4E48\u4EE5json\u683C\u5F0F\u67E5\u770B\u7ED3\u679C","children":[]},{"level":3,"title":"Arthas \u80FD\u5426\u8DDF\u8E2A native \u51FD\u6570","slug":"arthas-\u80FD\u5426\u8DDF\u8E2A-native-\u51FD\u6570","link":"#arthas-\u80FD\u5426\u8DDF\u8E2A-native-\u51FD\u6570","children":[]},{"level":3,"title":"\u80FD\u4E0D\u80FD\u67E5\u770B\u5185\u5B58\u91CC\u67D0\u4E2A\u53D8\u91CF\u7684\u503C","slug":"\u80FD\u4E0D\u80FD\u67E5\u770B\u5185\u5B58\u91CC\u67D0\u4E2A\u53D8\u91CF\u7684\u503C","link":"#\u80FD\u4E0D\u80FD\u67E5\u770B\u5185\u5B58\u91CC\u67D0\u4E2A\u53D8\u91CF\u7684\u503C","children":[]},{"level":3,"title":"\u65B9\u6CD5\u540C\u540D\u8FC7\u6EE4","slug":"\u65B9\u6CD5\u540C\u540D\u8FC7\u6EE4","link":"#\u65B9\u6CD5\u540C\u540D\u8FC7\u6EE4","children":[]},{"level":3,"title":"\u600E\u4E48 watch\u3001trace \u6784\u9020\u51FD\u6570 \uFF1F","slug":"\u600E\u4E48-watch\u3001trace-\u6784\u9020\u51FD\u6570","link":"#\u600E\u4E48-watch\u3001trace-\u6784\u9020\u51FD\u6570","children":[]},{"level":3,"title":"\u600E\u6837 watch\u3001trace \u5185\u90E8\u7C7B\uFF1F","slug":"\u600E\u6837-watch\u3001trace-\u5185\u90E8\u7C7B","link":"#\u600E\u6837-watch\u3001trace-\u5185\u90E8\u7C7B","children":[]},{"level":3,"title":"\u8F93\u5165\u4E2D\u6587/Unicode \u5B57\u7B26","slug":"\u8F93\u5165\u4E2D\u6587-unicode-\u5B57\u7B26","link":"#\u8F93\u5165\u4E2D\u6587-unicode-\u5B57\u7B26","children":[]},{"level":3,"title":"java.lang.ClassFormatError: null\u3001skywalking arthas \u517C\u5BB9\u4F7F\u7528","slug":"java-lang-classformaterror-null\u3001skywalking-arthas-\u517C\u5BB9\u4F7F\u7528","link":"#java-lang-classformaterror-null\u3001skywalking-arthas-\u517C\u5BB9\u4F7F\u7528","children":[]},{"level":3,"title":"Arthas \u80FD\u4E0D\u80FD\u79BB\u7EBF\u4F7F\u7528","slug":"arthas-\u80FD\u4E0D\u80FD\u79BB\u7EBF\u4F7F\u7528","link":"#arthas-\u80FD\u4E0D\u80FD\u79BB\u7EBF\u4F7F\u7528","children":[]},{"level":3,"title":"Attach docker/k8s \u91CC\u7684 pid \u4E3A 1 \u7684\u8FDB\u7A0B\u5931\u8D25","slug":"attach-docker-k8s-\u91CC\u7684-pid-\u4E3A-1-\u7684\u8FDB\u7A0B\u5931\u8D25","link":"#attach-docker-k8s-\u91CC\u7684-pid-\u4E3A-1-\u7684\u8FDB\u7A0B\u5931\u8D25","children":[]},{"level":3,"title":"\u4E3A\u4EC0\u4E48\u4E0B\u8F7D\u4E86\u65B0\u7248\u672C\u7684 Arthas\uFF0C\u8FDE\u63A5\u7684\u5374\u662F\u65E7\u7248\u672C\uFF1F","slug":"\u4E3A\u4EC0\u4E48\u4E0B\u8F7D\u4E86\u65B0\u7248\u672C\u7684-arthas-\u8FDE\u63A5\u7684\u5374\u662F\u65E7\u7248\u672C","link":"#\u4E3A\u4EC0\u4E48\u4E0B\u8F7D\u4E86\u65B0\u7248\u672C\u7684-arthas-\u8FDE\u63A5\u7684\u5374\u662F\u65E7\u7248\u672C","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/faq.md","version":"3.7.3"}');export{t as data};
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,34 @@
|
||||
import{_ as i,o as c,c as p,a as s,b as n,w as r,e as a,d as o,r as t}from"./app.4d248835.js";const d={},u=s("h1",{id:"getstatic",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#getstatic","aria-hidden":"true"},"#"),a(" getstatic")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-getstatic",target:"_blank",rel:"noopener noreferrer"},v=s("code",null,"getstatic",-1),b=a("\u5728\u7EBF\u6559\u7A0B"),k=s("h3",{id:"\u4F7F\u7528\u53C2\u8003",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u4F7F\u7528\u53C2\u8003","aria-hidden":"true"},"#"),a(" \u4F7F\u7528\u53C2\u8003")],-1),h=a("\u63A8\u8350\u76F4\u63A5\u4F7F\u7528"),g=a("ognl"),_=a("\u547D\u4EE4\uFF0C\u66F4\u52A0\u7075\u6D3B\u3002"),f=o(`<p>\u901A\u8FC7 getstatic \u547D\u4EE4\u53EF\u4EE5\u65B9\u4FBF\u7684\u67E5\u770B\u7C7B\u7684\u9759\u6001\u5C5E\u6027\u3002\u4F7F\u7528\u65B9\u6CD5\u4E3A<code>getstatic class_name field_name</code></p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ getstatic demo.MathGame random
|
||||
field: random
|
||||
@Random<span class="token punctuation">[</span>
|
||||
<span class="token assign-left variable">serialVersionUID</span><span class="token operator">=</span>@Long<span class="token punctuation">[</span><span class="token number">3905348978240129619</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">seed</span><span class="token operator">=</span>@AtomicLong<span class="token punctuation">[</span><span class="token number">120955813885284</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">multiplier</span><span class="token operator">=</span>@Long<span class="token punctuation">[</span><span class="token number">25214903917</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">addend</span><span class="token operator">=</span>@Long<span class="token punctuation">[</span><span class="token number">11</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">mask</span><span class="token operator">=</span>@Long<span class="token punctuation">[</span><span class="token number">281474976710655</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">DOUBLE_UNIT</span><span class="token operator">=</span>@Double<span class="token punctuation">[</span><span class="token number">1</span>.1102230246251565E-16<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">BadBound</span><span class="token operator">=</span>@String<span class="token punctuation">[</span>bound must be positive<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">BadRange</span><span class="token operator">=</span>@String<span class="token punctuation">[</span>bound must be greater than origin<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">BadSize</span><span class="token operator">=</span>@String<span class="token punctuation">[</span>size must be non-negative<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">seedUniquifier</span><span class="token operator">=</span>@AtomicLong<span class="token punctuation">[</span>-3282039941672302964<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">nextNextGaussian</span><span class="token operator">=</span>@Double<span class="token punctuation">[</span><span class="token number">0.0</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">haveNextNextGaussian</span><span class="token operator">=</span>@Boolean<span class="token punctuation">[</span>false<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">serialPersistentFields</span><span class="token operator">=</span>@ObjectStreamField<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">[</span>isEmpty<span class="token operator">=</span>false<span class="token punctuation">;</span><span class="token assign-left variable">size</span><span class="token operator">=</span><span class="token number">3</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">unsafe</span><span class="token operator">=</span>@Unsafe<span class="token punctuation">[</span>sun.misc.Unsafe@2eaa1027<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">seedOffset</span><span class="token operator">=</span>@Long<span class="token punctuation">[</span><span class="token number">24</span><span class="token punctuation">]</span>,
|
||||
<span class="token punctuation">]</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></div><ul><li>\u6307\u5B9A classLoader</li></ul><p>\u6CE8\u610F hashcode \u662F\u53D8\u5316\u7684\uFF0C\u9700\u8981\u5148\u67E5\u770B\u5F53\u524D\u7684 ClassLoader \u4FE1\u606F\uFF0C\u4F7F\u7528<code>sc -d <ClassName></code>\u63D0\u53D6\u5BF9\u5E94 ClassLoader \u7684 hashcode\u3002</p><p>\u5982\u679C\u4F60\u4F7F\u7528<code>-c</code>\uFF0C\u4F60\u9700\u8981\u624B\u52A8\u8F93\u5165 hashcode\uFF1A<code>-c <hashcode></code></p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ getstatic <span class="token parameter variable">-c</span> 3d4eac69 demo.MathGame random
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u5BF9\u4E8E\u53EA\u6709\u552F\u4E00\u5B9E\u4F8B\u7684 ClassLoader \u53EF\u4EE5\u901A\u8FC7<code>--classLoaderClass</code>\u6307\u5B9A class name\uFF0C\u4F7F\u7528\u8D77\u6765\u66F4\u52A0\u65B9\u4FBF\uFF1A</p><p><code>getstatic --classLoaderClass sun.misc.Launcher$AppClassLoader demo.MathGame random</code></p><ul><li>\u6CE8: \u8FD9\u91CC classLoaderClass \u5728 java 8 \u662F sun.misc.Launcher$AppClassLoader\uFF0C\u800Cjava 11\u7684classloader\u662Fjdk.internal.loader.ClassLoaders$AppClassLoader\uFF0Ckillercoda \u76EE\u524D\u73AF\u5883\u662F java11\u3002</li></ul><p><code>--classLoaderClass</code> \u7684\u503C\u662F ClassLoader \u7684\u7C7B\u540D\uFF0C\u53EA\u6709\u5339\u914D\u5230\u552F\u4E00\u7684 ClassLoader \u5B9E\u4F8B\u65F6\u624D\u80FD\u5DE5\u4F5C\uFF0C\u76EE\u7684\u662F\u65B9\u4FBF\u8F93\u5165\u901A\u7528\u547D\u4EE4\uFF0C\u800C<code>-c <hashcode></code>\u662F\u52A8\u6001\u53D8\u5316\u7684\u3002</p><p>\u5982\u679C\u8BE5\u9759\u6001\u5C5E\u6027\u662F\u4E00\u4E2A\u590D\u6742\u5BF9\u8C61\uFF0C\u8FD8\u53EF\u4EE5\u652F\u6301\u5728\u8BE5\u5C5E\u6027\u4E0A\u901A\u8FC7 ognl \u8868\u793A\u8FDB\u884C\u904D\u5386\uFF0C\u8FC7\u6EE4\uFF0C\u8BBF\u95EE\u5BF9\u8C61\u7684\u5185\u90E8\u5C5E\u6027\u7B49\u64CD\u4F5C\u3002</p>`,11),L=a("OGNL \u7279\u6B8A\u7528\u6CD5\u8BF7\u53C2\u8003\uFF1A"),x={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},C=a("https://github.com/alibaba/arthas/issues/71"),N=a("OGNL \u8868\u8FBE\u5F0F\u5B98\u65B9\u6307\u5357\uFF1A"),y={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},S=a("https://commons.apache.org/proper/commons-ognl/language-guide.html"),B=o(`<p>\u4F8B\u5982\uFF0C\u5047\u8BBE n \u662F\u4E00\u4E2A Map\uFF0CMap \u7684 Key \u662F\u4E00\u4E2A Enum\uFF0C\u6211\u4EEC\u60F3\u8FC7\u6EE4\u51FA Map \u4E2D Key \u4E3A\u67D0\u4E2A Enum \u7684\u503C\uFF0C\u53EF\u4EE5\u5199\u5982\u4E0B\u547D\u4EE4</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ getstatic com.alibaba.arthas.Test n 'entrySet().iterator.{? #this.key.name()=="STOP"}'
|
||||
field: n
|
||||
@ArrayList[
|
||||
@Node[STOP=bbb],
|
||||
]
|
||||
Affect(row-cnt:1) cost in 68 ms.
|
||||
|
||||
|
||||
$ getstatic com.alibaba.arthas.Test m 'entrySet().iterator.{? #this.key=="a"}'
|
||||
field: m
|
||||
@ArrayList[
|
||||
@Node[a=aaa],
|
||||
]
|
||||
</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></div>`,2);function A(E,G){const e=t("ExternalLinkIcon"),l=t("RouterLink");return c(),p("div",null,[u,s("p",null,[s("a",m,[v,b,n(e)])]),k,s("ul",null,[s("li",null,[h,n(l,{to:"/doc/ognl.html"},{default:r(()=>[g]),_:1}),_])]),f,s("ul",null,[s("li",null,[L,s("a",x,[C,n(e)])]),s("li",null,[N,s("a",y,[S,n(e)])])]),B])}const $=i(d,[["render",A],["__file","getstatic.html.vue"]]);export{$ as default};
|
@ -0,0 +1 @@
|
||||
const t=JSON.parse('{"key":"v-78c35af6","path":"/doc/getstatic.html","title":"getstatic","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":2},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/getstatic.md","version":"3.7.3"}');export{t as data};
|
@ -0,0 +1,34 @@
|
||||
import{_ as o,o as i,c as l,a as s,b as e,e as a,d as t,r as c}from"./app.4d248835.js";const p={},r=s("h1",{id:"getstatic",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#getstatic","aria-hidden":"true"},"#"),a(" getstatic")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-getstatic",target:"_blank",rel:"noopener noreferrer"},d=s("code",null,"getstatic",-1),m=a(" online tutorial"),k=t(`<h2 id="usage" tabindex="-1"><a class="header-anchor" href="#usage" aria-hidden="true">#</a> Usage</h2><ul><li>It is recommended to use the [OGNL] (ognl.md) command, which will be more flexible.</li></ul><p>Check the static fields of classes conveniently, the usage is <code>getstatic class_name field_name</code>.</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ getstatic demo.MathGame random
|
||||
field: random
|
||||
@Random<span class="token punctuation">[</span>
|
||||
<span class="token assign-left variable">serialVersionUID</span><span class="token operator">=</span>@Long<span class="token punctuation">[</span><span class="token number">3905348978240129619</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">seed</span><span class="token operator">=</span>@AtomicLong<span class="token punctuation">[</span><span class="token number">120955813885284</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">multiplier</span><span class="token operator">=</span>@Long<span class="token punctuation">[</span><span class="token number">25214903917</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">addend</span><span class="token operator">=</span>@Long<span class="token punctuation">[</span><span class="token number">11</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">mask</span><span class="token operator">=</span>@Long<span class="token punctuation">[</span><span class="token number">281474976710655</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">DOUBLE_UNIT</span><span class="token operator">=</span>@Double<span class="token punctuation">[</span><span class="token number">1</span>.1102230246251565E-16<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">BadBound</span><span class="token operator">=</span>@String<span class="token punctuation">[</span>bound must be positive<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">BadRange</span><span class="token operator">=</span>@String<span class="token punctuation">[</span>bound must be greater than origin<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">BadSize</span><span class="token operator">=</span>@String<span class="token punctuation">[</span>size must be non-negative<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">seedUniquifier</span><span class="token operator">=</span>@AtomicLong<span class="token punctuation">[</span>-3282039941672302964<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">nextNextGaussian</span><span class="token operator">=</span>@Double<span class="token punctuation">[</span><span class="token number">0.0</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">haveNextNextGaussian</span><span class="token operator">=</span>@Boolean<span class="token punctuation">[</span>false<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">serialPersistentFields</span><span class="token operator">=</span>@ObjectStreamField<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">[</span>isEmpty<span class="token operator">=</span>false<span class="token punctuation">;</span><span class="token assign-left variable">size</span><span class="token operator">=</span><span class="token number">3</span><span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">unsafe</span><span class="token operator">=</span>@Unsafe<span class="token punctuation">[</span>sun.misc.Unsafe@2eaa1027<span class="token punctuation">]</span>,
|
||||
<span class="token assign-left variable">seedOffset</span><span class="token operator">=</span>@Long<span class="token punctuation">[</span><span class="token number">24</span><span class="token punctuation">]</span>,
|
||||
<span class="token punctuation">]</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></div><ul><li>Specify classLoader</li></ul><p>Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader using <code>sc -d <ClassName></code>.</p><p>if you use<code>-c</code>, you have to manually type hashcode by <code>-c <hashcode></code>.</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ getstatic <span class="token parameter variable">-c</span> 3d4eac69 demo.MathGame random
|
||||
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>For classloader with only one instance, it can be specified by <code>--classLoaderClass</code> using class name, which is more convenient to use.</p><p><code>getstatic --classLoaderClass demo.MathGame random</code></p><ul><li>PS: Here the classLoaderClass in java 8 is sun.misc.Launcher$AppClassLoader, while in java 11 it's jdk.internal.loader.ClassLoaders$AppClassLoader. Currently killercoda using java 11.</li></ul><p>The value of <code>--classloaderclass</code> is the class name of classloader. It can only work when it matches a unique classloader instance. The purpose is to facilitate the input of general commands. However, <code>-c <hashcode></code> is dynamic.</p>`,12),v=a("Tip: if the static field is a complex class, you can even use "),h={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},b=s("code",null,"OGNL",-1),g=a(" to traverse, filter and access the inner properties of this class."),f={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},_=a("OGNL official guide"),y={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},L=a("Special usages"),x=t(`<p>E.g. suppose <code>n</code> is a <code>Map</code> and its key is a <code>Enum</code>, then you can achieve this if you want to pick the key with a specific <code>Enum</code> value:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ getstatic com.alibaba.arthas.Test n <span class="token string">'entrySet().iterator.{? #this.key.name()=="STOP"}'</span>
|
||||
field: n
|
||||
@ArrayList<span class="token punctuation">[</span>
|
||||
@Node<span class="token punctuation">[</span>STOP<span class="token operator">=</span>bbb<span class="token punctuation">]</span>,
|
||||
<span class="token punctuation">]</span>
|
||||
Affect<span class="token punctuation">(</span>row-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">68</span> ms.
|
||||
|
||||
|
||||
$ getstatic com.alibaba.arthas.Test m <span class="token string">'entrySet().iterator.{? #this.key=="a"}'</span>
|
||||
field: m
|
||||
@ArrayList<span class="token punctuation">[</span>
|
||||
@Node<span class="token punctuation">[</span>a<span class="token operator">=</span>aaa<span class="token punctuation">]</span>,
|
||||
<span class="token punctuation">]</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></div>`,2);function N(S,w){const n=c("ExternalLinkIcon");return i(),l("div",null,[r,s("p",null,[s("a",u,[d,m,e(n)])]),k,s("p",null,[v,s("a",h,[b,e(n)]),g]),s("ul",null,[s("li",null,[s("a",f,[_,e(n)])]),s("li",null,[s("a",y,[L,e(n)])])]),x])}const B=o(p,[["render",N],["__file","getstatic.html.vue"]]);export{B as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-2f908999","path":"/en/doc/getstatic.html","title":"getstatic","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":2},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/getstatic.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,30 @@
|
||||
import{_ as s,o as t,c as a,a as e,b as l,e as n,d as r,r as d}from"./app.4d248835.js";const c={},o=e("h1",{id:"grep",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#grep","aria-hidden":"true"},"#"),n(" grep")],-1),v={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-grep",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"grep",-1),m=n(" online tutorial"),p=r(`<div class="custom-container tip"><p class="custom-container-title">TIP</p><p>Similar to the traditional <code>grep</code> command.</p></div><h2 id="usage" tabindex="-1"><a class="header-anchor" href="#usage" aria-hidden="true">#</a> Usage</h2><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code> USAGE:
|
||||
grep [-A <value>] [-B <value>] [-C <value>] [-h] [-i] [-v] [-n] [-m <value>] [-e] [--trim-end] pattern
|
||||
|
||||
SUMMARY:
|
||||
grep command for pipes.
|
||||
|
||||
EXAMPLES:
|
||||
sysprop | grep java
|
||||
sysprop | grep java -n
|
||||
sysenv | grep -v JAVA
|
||||
sysenv | grep -e "(?i)(JAVA|sun)" -m 3 -C 2
|
||||
sysenv | grep JAVA -A2 -B3
|
||||
thread | grep -m 10 -e "TIMED_WAITING|WAITING"
|
||||
|
||||
WIKI:
|
||||
https://arthas.aliyun.com/3.x/doc/grep
|
||||
|
||||
OPTIONS:
|
||||
-A, --after-context <value> Print NUM lines of trailing context)
|
||||
-B, --before-context <value> Print NUM lines of leading context)
|
||||
-C, --context <value> Print NUM lines of output context)
|
||||
-h, --help this help
|
||||
-i, --ignore-case Perform case insensitive matching. By default, grep is case sensitive.
|
||||
-v, --invert-match Select non-matching lines
|
||||
-n, --line-number Print line number with output lines
|
||||
-m, --max-count <value> stop after NUM selected lines)
|
||||
-e, --regex Enable regular expression to match
|
||||
--trim-end Remove whitespaces at the end of the line
|
||||
<pattern> Pattern
|
||||
</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></div>`,3);function g(h,b){const i=d("ExternalLinkIcon");return t(),a("div",null,[o,e("p",null,[e("a",v,[u,m,l(i)])]),p])}const x=s(c,[["render",g],["__file","grep.html.vue"]]);export{x as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-63f4cd5a","path":"/doc/grep.html","title":"grep","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/grep.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-8b2b7482","path":"/en/doc/grep.html","title":"grep","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/grep.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,30 @@
|
||||
import{_ as s,o as t,c as a,a as e,b as l,e as n,d as r,r as d}from"./app.4d248835.js";const c={},v=e("h1",{id:"grep",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#grep","aria-hidden":"true"},"#"),n(" grep")],-1),o={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-grep",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"grep",-1),m=n("\u5728\u7EBF\u6559\u7A0B"),p=r(`<div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>\u7C7B\u4F3C\u4F20\u7EDF\u7684<code>grep</code>\u547D\u4EE4\u3002</p></div><h2 id="\u4F7F\u7528\u53C2\u8003" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528\u53C2\u8003" aria-hidden="true">#</a> \u4F7F\u7528\u53C2\u8003</h2><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code> USAGE:
|
||||
grep [-A <value>] [-B <value>] [-C <value>] [-h] [-i] [-v] [-n] [-m <value>] [-e] [--trim-end] pattern
|
||||
|
||||
SUMMARY:
|
||||
grep command for pipes.
|
||||
|
||||
EXAMPLES:
|
||||
sysprop | grep java
|
||||
sysprop | grep java -n
|
||||
sysenv | grep -v JAVA
|
||||
sysenv | grep -e "(?i)(JAVA|sun)" -m 3 -C 2
|
||||
sysenv | grep JAVA -A2 -B3
|
||||
thread | grep -m 10 -e "TIMED_WAITING|WAITING"
|
||||
|
||||
WIKI:
|
||||
https://arthas.aliyun.com/3.x/doc/grep
|
||||
|
||||
OPTIONS:
|
||||
-A, --after-context <value> Print NUM lines of trailing context)
|
||||
-B, --before-context <value> Print NUM lines of leading context)
|
||||
-C, --context <value> Print NUM lines of output context)
|
||||
-h, --help this help
|
||||
-i, --ignore-case Perform case insensitive matching. By default, grep is case sensitive.
|
||||
-v, --invert-match Select non-matching lines
|
||||
-n, --line-number Print line number with output lines
|
||||
-m, --max-count <value> stop after NUM selected lines)
|
||||
-e, --regex Enable regular expression to match
|
||||
--trim-end Remove whitespaces at the end of the line
|
||||
<pattern> Pattern
|
||||
</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></div>`,3);function g(h,b){const i=d("ExternalLinkIcon");return t(),a("div",null,[v,e("p",null,[e("a",o,[u,m,l(i)])]),p])}const x=s(c,[["render",g],["__file","grep.html.vue"]]);export{x as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-809381ca","path":"/doc/groovy.html","title":"groovy","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"\u9650\u5236\u5185\u5BB9","slug":"\u9650\u5236\u5185\u5BB9","link":"#\u9650\u5236\u5185\u5BB9","children":[]},{"level":3,"title":"\u53C2\u6570\u8BF4\u660E","slug":"\u53C2\u6570\u8BF4\u660E","link":"#\u53C2\u6570\u8BF4\u660E","children":[]},{"level":3,"title":"\u4E94\u4E2A\u5173\u952E\u51FD\u6570\u58F0\u660E","slug":"\u4E94\u4E2A\u5173\u952E\u51FD\u6570\u58F0\u660E","link":"#\u4E94\u4E2A\u5173\u952E\u51FD\u6570\u58F0\u660E","children":[]},{"level":3,"title":"\u53C2\u6570 Advice \u8BF4\u660E","slug":"\u53C2\u6570-advice-\u8BF4\u660E","link":"#\u53C2\u6570-advice-\u8BF4\u660E","children":[]},{"level":3,"title":"\u53C2\u6570 Output \u8BF4\u660E","slug":"\u53C2\u6570-output-\u8BF4\u660E","link":"#\u53C2\u6570-output-\u8BF4\u660E","children":[]},{"level":3,"title":"\u4E00\u4E2A\u8F93\u51FA\u65E5\u5FD7\u7684 groovy \u811A\u672C\u793A\u4F8B","slug":"\u4E00\u4E2A\u8F93\u51FA\u65E5\u5FD7\u7684-groovy-\u811A\u672C\u793A\u4F8B","link":"#\u4E00\u4E2A\u8F93\u51FA\u65E5\u5FD7\u7684-groovy-\u811A\u672C\u793A\u4F8B","children":[]}],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/groovy.md","version":"3.7.3"}');export{e as data};
|
@ -0,0 +1,124 @@
|
||||
import{_ as e,o as p,c,a as s,b as i,w as o,d as a,e as n,r as l}from"./app.4d248835.js";const u={},d=a(`<h1 id="groovy" tabindex="-1"><a class="header-anchor" href="#groovy" aria-hidden="true">#</a> groovy</h1><div class="custom-container tip"><p class="custom-container-title">\u63D0\u793A</p><p>Arthas \u652F\u6301 groovy \u811A\u672C\u589E\u5F3A\uFF0C\u5141\u8BB8\u50CF BTrace \u4E00\u6837\u7F16\u5199\u811A\u672C\u6765\u89E3\u51B3\u95EE\u9898\uFF0C\u53EF\u4EE5\u5728 groovy \u811A\u672C\u4E2D\u8FDB\u884C if/for/switch/while \u7B49\u63A7\u5236\u8BED\u53E5\uFF0C\u4E0D\u53D7\u9650\u5236\uFF0C\u4F46\u76F8\u6BD4 BTrace \u800C\u8A00\u62E5\u6709\u66F4\u591A\u7684\u9650\u5236\u8303\u56F4\u3002</p></div><h3 id="\u9650\u5236\u5185\u5BB9" tabindex="-1"><a class="header-anchor" href="#\u9650\u5236\u5185\u5BB9" aria-hidden="true">#</a> \u9650\u5236\u5185\u5BB9</h3><ol><li>\u7981\u6B62\u6539\u53D8\u539F\u6709\u903B\u8F91\uFF0C\u4E0E watch \u7B49\u547D\u4EE4\u4E00\u6837\uFF0C\u91CD\u70B9\u4FDD\u8BC1\u7684\u662F\u76D1\u542C\u548C\u89C2\u5BDF\u3002</li><li>\u53EA\u5141\u8BB8\u5728\u65B9\u6CD5\u7684 before/success/exception/finish \u56DB\u4E2A\u73AF\u8282\u8FDB\u884C\u76D1\u542C\u3002</li></ol><h3 id="\u53C2\u6570\u8BF4\u660E" tabindex="-1"><a class="header-anchor" href="#\u53C2\u6570\u8BF4\u660E" aria-hidden="true">#</a> \u53C2\u6570\u8BF4\u660E</h3><table><thead><tr><th style="text-align:right;">\u53C2\u6570\u540D\u79F0</th><th style="text-align:left;">\u53C2\u6570\u8BF4\u660E</th></tr></thead><tbody><tr><td style="text-align:right;"><em>class-pattern</em></td><td style="text-align:left;">\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D</td></tr><tr><td style="text-align:right;"><em>method-pattern</em></td><td style="text-align:left;">\u65B9\u6CD5\u540D\u8868\u8FBE\u5F0F\u5339\u914D</td></tr><tr><td style="text-align:right;"><em>script-filepath</em></td><td style="text-align:left;">groovy \u811A\u672C\u7684\u7EDD\u5BF9\u8DEF\u5F84</td></tr><tr><td style="text-align:right;">[S]</td><td style="text-align:left;">\u5339\u914D\u6240\u6709\u7684\u5B50\u7C7B</td></tr><tr><td style="text-align:right;">[E]</td><td style="text-align:left;">\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D</td></tr></tbody></table><p>\u9700\u8981\u8BF4\u660E\u7684\u662F\uFF0C\u7B2C\u4E09\u4E2A\u8F93\u5165\u53C2\u6570\u662F\u811A\u672C\u7684\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u6BD4\u5982 <code>/tmp/test.groovy</code>\uFF0C\u4E0D\u5EFA\u8BAE\u8F93\u5165\u76F8\u5BF9\u8DEF\u5F84\uFF0C\u6BD4\u5982 <code>./test.groovy</code></p><h3 id="\u4E94\u4E2A\u5173\u952E\u51FD\u6570\u58F0\u660E" tabindex="-1"><a class="header-anchor" href="#\u4E94\u4E2A\u5173\u952E\u51FD\u6570\u58F0\u660E" aria-hidden="true">#</a> \u4E94\u4E2A\u5173\u952E\u51FD\u6570\u58F0\u660E</h3><div class="language-java ext-java line-numbers-mode"><pre class="language-java"><code><span class="token doc-comment comment">/**
|
||||
* \u589E\u5F3A\u811A\u672C\u76D1\u542C\u5668
|
||||
*/</span>
|
||||
<span class="token keyword">interface</span> <span class="token class-name">ScriptListener</span> <span class="token punctuation">{</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* \u811A\u672C\u521B\u5EFA
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">output</span> \u8F93\u51FA\u5668
|
||||
*/</span>
|
||||
<span class="token keyword">void</span> <span class="token function">create</span><span class="token punctuation">(</span><span class="token class-name">Output</span> output<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* \u811A\u672C\u9500\u6BC1
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">output</span> \u8F93\u51FA\u5668
|
||||
*/</span>
|
||||
<span class="token keyword">void</span> <span class="token function">destroy</span><span class="token punctuation">(</span><span class="token class-name">Output</span> output<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* \u65B9\u6CD5\u6267\u884C\u524D
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">output</span> \u8F93\u51FA\u5668
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">advice</span> \u901A\u77E5\u70B9
|
||||
*/</span>
|
||||
<span class="token keyword">void</span> <span class="token function">before</span><span class="token punctuation">(</span><span class="token class-name">Output</span> output<span class="token punctuation">,</span> <span class="token class-name">Advice</span> advice<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* \u65B9\u6CD5\u6B63\u5E38\u8FD4\u56DE
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">output</span> \u8F93\u51FA\u5668
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">advice</span> \u901A\u77E5\u70B9
|
||||
*/</span>
|
||||
<span class="token keyword">void</span> <span class="token function">afterReturning</span><span class="token punctuation">(</span><span class="token class-name">Output</span> output<span class="token punctuation">,</span> <span class="token class-name">Advice</span> advice<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* \u65B9\u6CD5\u5F02\u5E38\u8FD4\u56DE
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">output</span> \u8F93\u51FA\u5668
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">advice</span> \u901A\u77E5\u70B9
|
||||
*/</span>
|
||||
<span class="token keyword">void</span> <span class="token function">afterThrowing</span><span class="token punctuation">(</span><span class="token class-name">Output</span> output<span class="token punctuation">,</span> <span class="token class-name">Advice</span> advice<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token punctuation">}</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 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><h3 id="\u53C2\u6570-advice-\u8BF4\u660E" tabindex="-1"><a class="header-anchor" href="#\u53C2\u6570-advice-\u8BF4\u660E" aria-hidden="true">#</a> \u53C2\u6570 <code>Advice</code> \u8BF4\u660E</h3>`,10),r=s("code",null,"Advice",-1),v=n(" \u53C2\u6570\u6700\u4E3B\u8981\u662F\u5C01\u88C5\u4E86\u901A\u77E5\u8282\u70B9\u7684\u6240\u6709\u4FE1\u606F\u3002\u53C2\u8003"),k=n("\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF"),m=n("\u4E2D\u5173\u4E8E\u8BE5\u8282\u70B9\u7684\u63CF\u8FF0\u3002"),b=a(`<h3 id="\u53C2\u6570-output-\u8BF4\u660E" tabindex="-1"><a class="header-anchor" href="#\u53C2\u6570-output-\u8BF4\u660E" aria-hidden="true">#</a> \u53C2\u6570 <code>Output</code> \u8BF4\u660E</h3><p><code>Output</code> \u53C2\u6570\u53EA\u62E5\u6709\u4E09\u4E2A\u65B9\u6CD5\uFF0C\u4E3B\u8981\u7684\u5DE5\u4F5C\u8FD8\u662F\u8F93\u51FA\u5BF9\u5E94\u7684\u6587\u672C\u4FE1\u606F</p><div class="language-java ext-java line-numbers-mode"><pre class="language-java"><code><span class="token doc-comment comment">/**
|
||||
* \u8F93\u51FA\u5668
|
||||
*/</span>
|
||||
<span class="token keyword">interface</span> <span class="token class-name">Output</span> <span class="token punctuation">{</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* \u8F93\u51FA\u5B57\u7B26\u4E32(\u4E0D\u6362\u884C)
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">string</span> \u5F85\u8F93\u51FA\u5B57\u7B26\u4E32
|
||||
* <span class="token keyword">@return</span> this
|
||||
*/</span>
|
||||
<span class="token class-name">Output</span> <span class="token function">print</span><span class="token punctuation">(</span><span class="token class-name">String</span> string<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* \u8F93\u51FA\u5B57\u7B26\u4E32(\u6362\u884C)
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">string</span> \u5F85\u8F93\u51FA\u5B57\u7B26\u4E32
|
||||
* <span class="token keyword">@return</span> this
|
||||
*/</span>
|
||||
<span class="token class-name">Output</span> <span class="token function">println</span><span class="token punctuation">(</span><span class="token class-name">String</span> string<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* \u7ED3\u675F\u5F53\u524D\u811A\u672C
|
||||
*
|
||||
* <span class="token keyword">@return</span> this
|
||||
*/</span>
|
||||
<span class="token class-name">Output</span> <span class="token function">finish</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token punctuation">}</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></div><h3 id="\u4E00\u4E2A\u8F93\u51FA\u65E5\u5FD7\u7684-groovy-\u811A\u672C\u793A\u4F8B" tabindex="-1"><a class="header-anchor" href="#\u4E00\u4E2A\u8F93\u51FA\u65E5\u5FD7\u7684-groovy-\u811A\u672C\u793A\u4F8B" aria-hidden="true">#</a> \u4E00\u4E2A\u8F93\u51FA\u65E5\u5FD7\u7684 groovy \u811A\u672C\u793A\u4F8B</h3><div class="language-groovy ext-groovy line-numbers-mode"><pre class="language-groovy"><code><span class="token keyword">import</span> com<span class="token punctuation">.</span>taobao<span class="token punctuation">.</span>arthas<span class="token punctuation">.</span>core<span class="token punctuation">.</span>command<span class="token punctuation">.</span>ScriptSupportCommand
|
||||
<span class="token keyword">import</span> com<span class="token punctuation">.</span>taobao<span class="token punctuation">.</span>arthas<span class="token punctuation">.</span>core<span class="token punctuation">.</span>util<span class="token punctuation">.</span>Advice
|
||||
|
||||
<span class="token keyword">import</span> <span class="token keyword">static</span> java<span class="token punctuation">.</span>lang<span class="token punctuation">.</span>String<span class="token punctuation">.</span>format
|
||||
|
||||
<span class="token comment">/**
|
||||
* \u8F93\u51FA\u65B9\u6CD5\u65E5\u5FD7
|
||||
*/</span>
|
||||
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">Logger</span> <span class="token keyword">implements</span> <span class="token class-name">ScriptSupportCommand<span class="token punctuation">.</span>ScriptListener</span> <span class="token punctuation">{</span>
|
||||
|
||||
<span class="token annotation punctuation">@Override</span>
|
||||
<span class="token keyword">void</span> <span class="token function">create</span><span class="token punctuation">(</span>ScriptSupportCommand<span class="token punctuation">.</span>Output output<span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
output<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">"script create."</span></span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
<span class="token punctuation">}</span>
|
||||
|
||||
<span class="token annotation punctuation">@Override</span>
|
||||
<span class="token keyword">void</span> <span class="token function">destroy</span><span class="token punctuation">(</span>ScriptSupportCommand<span class="token punctuation">.</span>Output output<span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
output<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">"script destroy."</span></span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
<span class="token punctuation">}</span>
|
||||
|
||||
<span class="token annotation punctuation">@Override</span>
|
||||
<span class="token keyword">void</span> <span class="token function">before</span><span class="token punctuation">(</span>ScriptSupportCommand<span class="token punctuation">.</span>Output output<span class="token punctuation">,</span> Advice advice<span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
output<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token function">format</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">"before:class=%s;method=%s;paramslen=%d;%s;"</span></span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getClazz</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getSimpleName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getMethod</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getParams</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span>length<span class="token punctuation">,</span> advice<span class="token punctuation">.</span><span class="token function">getParams</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
|
||||
<span class="token punctuation">}</span>
|
||||
|
||||
<span class="token annotation punctuation">@Override</span>
|
||||
<span class="token keyword">void</span> <span class="token function">afterReturning</span><span class="token punctuation">(</span>ScriptSupportCommand<span class="token punctuation">.</span>Output output<span class="token punctuation">,</span> Advice advice<span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
output<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token function">format</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">"returning:class=%s;method=%s;"</span></span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getClazz</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getSimpleName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getMethod</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
|
||||
<span class="token punctuation">}</span>
|
||||
|
||||
<span class="token annotation punctuation">@Override</span>
|
||||
<span class="token keyword">void</span> <span class="token function">afterThrowing</span><span class="token punctuation">(</span>ScriptSupportCommand<span class="token punctuation">.</span>Output output<span class="token punctuation">,</span> Advice advice<span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
output<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token function">format</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">"throwing:class=%s;method=%s;"</span></span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getClazz</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getSimpleName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getMethod</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
|
||||
<span class="token punctuation">}</span>
|
||||
<span class="token punctuation">}</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 class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>\u4F7F\u7528\u793A\u4F8B\uFF1A</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ groovy com.alibaba.sample.petstore.dal.dao.ProductDao getProductById /Users/zhuyong/middleware/arthas/scripts/Logger.groovy -S
|
||||
script create.
|
||||
Press Ctrl+C to abort.
|
||||
Affect(class-cnt:1 , method-cnt:1) cost in 102 ms.
|
||||
before:class=IbatisProductDao;method=getProductById;paramslen=1;[Ljava.lang.Object;@45df64fc;
|
||||
returning:class=IbatisProductDao;method=getProductById;
|
||||
before:class=IbatisProductDao;method=getProductById;paramslen=1;[Ljava.lang.Object;@5b0e2d00;
|
||||
returning:class=IbatisProductDao;method=getProductById;
|
||||
</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></div>`,7);function g(h,f){const t=l("RouterLink");return p(),c("div",null,[d,s("p",null,[r,v,i(t,{to:"/doc/advice-class.html"},{default:o(()=>[k]),_:1}),m]),b])}const w=e(u,[["render",g],["__file","groovy.html.vue"]]);export{w as default};
|
@ -0,0 +1,124 @@
|
||||
import{_ as e,o as p,c as o,a as s,b as i,w as c,d as a,e as n,r as l}from"./app.4d248835.js";const u={},r=a(`<h1 id="groovy" tabindex="-1"><a class="header-anchor" href="#groovy" aria-hidden="true">#</a> groovy</h1><div class="custom-container tip"><p class="custom-container-title">TIP</p><p>Arthas support groovy scripting to allow user to use script like BTrace. It is possible to use if/for/switch/while in groovy scripting, but has more limitations compared to BTrace.</p></div><h3 id="limitations" tabindex="-1"><a class="header-anchor" href="#limitations" aria-hidden="true">#</a> Limitations</h3><ol><li>Prohibit from alternating the original logic. Like <code>watch</code> command, The major purpose of scripting is monitoring and observing.</li><li>Only allow to monitor at the stages of before/success/exception/finish on one method.</li></ol><h3 id="parameters" tabindex="-1"><a class="header-anchor" href="#parameters" aria-hidden="true">#</a> Parameters</h3><table><thead><tr><th style="text-align:right;">Parameter</th><th style="text-align:left;">Explanation</th></tr></thead><tbody><tr><td style="text-align:right;"><em>class-pattern</em></td><td style="text-align:left;">class name pattern</td></tr><tr><td style="text-align:right;"><em>method-pattern</em></td><td style="text-align:left;">method name pattern</td></tr><tr><td style="text-align:right;"><em>script-filepath</em></td><td style="text-align:left;">the absolute path of the groovy script</td></tr><tr><td style="text-align:right;">[S]</td><td style="text-align:left;">match all sub classes</td></tr><tr><td style="text-align:right;">[E]</td><td style="text-align:left;">enable regex match, the default is wildcard match</td></tr></tbody></table><p>Note: the third parameter <code>script-filepath</code> must be the absolute path of the groovy script, for example <code>/tmp/test.groovy</code>. It is not recommended to use relative path, e.g. <code>./test.groovy</code>.</p><h3 id="explanation-on-the-important-callbacks" tabindex="-1"><a class="header-anchor" href="#explanation-on-the-important-callbacks" aria-hidden="true">#</a> Explanation on the important callbacks</h3><div class="language-java ext-java line-numbers-mode"><pre class="language-java"><code><span class="token doc-comment comment">/**
|
||||
* Listeners for script to enhance the class
|
||||
*/</span>
|
||||
<span class="token keyword">interface</span> <span class="token class-name">ScriptListener</span> <span class="token punctuation">{</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* When the script is created
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">output</span> Output
|
||||
*/</span>
|
||||
<span class="token keyword">void</span> <span class="token function">create</span><span class="token punctuation">(</span><span class="token class-name">Output</span> output<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* When the script is destroyed
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">output</span> Output
|
||||
*/</span>
|
||||
<span class="token keyword">void</span> <span class="token function">destroy</span><span class="token punctuation">(</span><span class="token class-name">Output</span> output<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* Before the method executes
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">output</span> Output
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">advice</span> Advice
|
||||
*/</span>
|
||||
<span class="token keyword">void</span> <span class="token function">before</span><span class="token punctuation">(</span><span class="token class-name">Output</span> output<span class="token punctuation">,</span> <span class="token class-name">Advice</span> advice<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* After the method returns
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">output</span> Output
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">advice</span> Advice
|
||||
*/</span>
|
||||
<span class="token keyword">void</span> <span class="token function">afterReturning</span><span class="token punctuation">(</span><span class="token class-name">Output</span> output<span class="token punctuation">,</span> <span class="token class-name">Advice</span> advice<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* After the method throws exceptions
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">output</span> Output
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">advice</span> Advice
|
||||
*/</span>
|
||||
<span class="token keyword">void</span> <span class="token function">afterThrowing</span><span class="token punctuation">(</span><span class="token class-name">Output</span> output<span class="token punctuation">,</span> <span class="token class-name">Advice</span> advice<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token punctuation">}</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 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><h3 id="advice-parameter" tabindex="-1"><a class="header-anchor" href="#advice-parameter" aria-hidden="true">#</a> <code>Advice</code> parameter</h3>`,10),d=s("code",null,"Advice",-1),k=n(" contains all information necessary for notification. Refer to "),v=n("expression core parameters"),m=n(" for more details."),b=a(`<h3 id="output-parameter" tabindex="-1"><a class="header-anchor" href="#output-parameter" aria-hidden="true">#</a> <code>Output</code> parameter</h3><p>There are three methods in <code>Output</code>, used for outputting the corresponding text.</p><div class="language-java ext-java line-numbers-mode"><pre class="language-java"><code><span class="token doc-comment comment">/**
|
||||
* Output
|
||||
*/</span>
|
||||
<span class="token keyword">interface</span> <span class="token class-name">Output</span> <span class="token punctuation">{</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* Output text without line break
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">string</span> Text to output
|
||||
* <span class="token keyword">@return</span> this
|
||||
*/</span>
|
||||
<span class="token class-name">Output</span> <span class="token function">print</span><span class="token punctuation">(</span><span class="token class-name">String</span> string<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* Output text with line break
|
||||
*
|
||||
* <span class="token keyword">@param</span> <span class="token parameter">string</span> Text to output
|
||||
* <span class="token keyword">@return</span> this
|
||||
*/</span>
|
||||
<span class="token class-name">Output</span> <span class="token function">println</span><span class="token punctuation">(</span><span class="token class-name">String</span> string<span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token doc-comment comment">/**
|
||||
* Finish outputting from the script
|
||||
*
|
||||
* <span class="token keyword">@return</span> this
|
||||
*/</span>
|
||||
<span class="token class-name">Output</span> <span class="token function">finish</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
|
||||
<span class="token punctuation">}</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></div><h3 id="a-groovy-sample-script-to-output-logs" tabindex="-1"><a class="header-anchor" href="#a-groovy-sample-script-to-output-logs" aria-hidden="true">#</a> A groovy sample script to output logs</h3><div class="language-groovy ext-groovy line-numbers-mode"><pre class="language-groovy"><code><span class="token keyword">import</span> com<span class="token punctuation">.</span>taobao<span class="token punctuation">.</span>arthas<span class="token punctuation">.</span>core<span class="token punctuation">.</span>command<span class="token punctuation">.</span>ScriptSupportCommand
|
||||
<span class="token keyword">import</span> com<span class="token punctuation">.</span>taobao<span class="token punctuation">.</span>arthas<span class="token punctuation">.</span>core<span class="token punctuation">.</span>util<span class="token punctuation">.</span>Advice
|
||||
|
||||
<span class="token keyword">import</span> <span class="token keyword">static</span> java<span class="token punctuation">.</span>lang<span class="token punctuation">.</span>String<span class="token punctuation">.</span>format
|
||||
|
||||
<span class="token comment">/**
|
||||
* Output method logs
|
||||
*/</span>
|
||||
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">Logger</span> <span class="token keyword">implements</span> <span class="token class-name">ScriptSupportCommand<span class="token punctuation">.</span>ScriptListener</span> <span class="token punctuation">{</span>
|
||||
|
||||
<span class="token annotation punctuation">@Override</span>
|
||||
<span class="token keyword">void</span> <span class="token function">create</span><span class="token punctuation">(</span>ScriptSupportCommand<span class="token punctuation">.</span>Output output<span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
output<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">"script create."</span></span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
<span class="token punctuation">}</span>
|
||||
|
||||
<span class="token annotation punctuation">@Override</span>
|
||||
<span class="token keyword">void</span> <span class="token function">destroy</span><span class="token punctuation">(</span>ScriptSupportCommand<span class="token punctuation">.</span>Output output<span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
output<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">"script destroy."</span></span><span class="token punctuation">)</span><span class="token punctuation">;</span>
|
||||
<span class="token punctuation">}</span>
|
||||
|
||||
<span class="token annotation punctuation">@Override</span>
|
||||
<span class="token keyword">void</span> <span class="token function">before</span><span class="token punctuation">(</span>ScriptSupportCommand<span class="token punctuation">.</span>Output output<span class="token punctuation">,</span> Advice advice<span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
output<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token function">format</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">"before:class=%s;method=%s;paramslen=%d;%s;"</span></span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getClazz</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getSimpleName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getMethod</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getParams</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span>length<span class="token punctuation">,</span> advice<span class="token punctuation">.</span><span class="token function">getParams</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
|
||||
<span class="token punctuation">}</span>
|
||||
|
||||
<span class="token annotation punctuation">@Override</span>
|
||||
<span class="token keyword">void</span> <span class="token function">afterReturning</span><span class="token punctuation">(</span>ScriptSupportCommand<span class="token punctuation">.</span>Output output<span class="token punctuation">,</span> Advice advice<span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
output<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token function">format</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">"returning:class=%s;method=%s;"</span></span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getClazz</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getSimpleName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getMethod</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
|
||||
<span class="token punctuation">}</span>
|
||||
|
||||
<span class="token annotation punctuation">@Override</span>
|
||||
<span class="token keyword">void</span> <span class="token function">afterThrowing</span><span class="token punctuation">(</span>ScriptSupportCommand<span class="token punctuation">.</span>Output output<span class="token punctuation">,</span> Advice advice<span class="token punctuation">)</span> <span class="token punctuation">{</span>
|
||||
output<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token function">format</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">"throwing:class=%s;method=%s;"</span></span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getClazz</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getSimpleName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
|
||||
advice<span class="token punctuation">.</span><span class="token function">getMethod</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
|
||||
<span class="token punctuation">}</span>
|
||||
<span class="token punctuation">}</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 class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Run the script like this:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ groovy com.alibaba.sample.petstore.dal.dao.ProductDao getProductById /Users/zhuyong/middleware/arthas/scripts/Logger.groovy <span class="token parameter variable">-S</span>
|
||||
script create.
|
||||
Press Ctrl+C to abort.
|
||||
Affect<span class="token punctuation">(</span>class-cnt:1 , method-cnt:1<span class="token punctuation">)</span> cost <span class="token keyword">in</span> <span class="token number">102</span> ms.
|
||||
before:class<span class="token operator">=</span>IbatisProductDao<span class="token punctuation">;</span><span class="token assign-left variable">method</span><span class="token operator">=</span>getProductById<span class="token punctuation">;</span><span class="token assign-left variable">paramslen</span><span class="token operator">=</span><span class="token number">1</span><span class="token punctuation">;</span><span class="token punctuation">[</span>Ljava.lang.Object<span class="token punctuation">;</span>@45df64fc<span class="token punctuation">;</span>
|
||||
returning:class<span class="token operator">=</span>IbatisProductDao<span class="token punctuation">;</span><span class="token assign-left variable">method</span><span class="token operator">=</span>getProductById<span class="token punctuation">;</span>
|
||||
before:class<span class="token operator">=</span>IbatisProductDao<span class="token punctuation">;</span><span class="token assign-left variable">method</span><span class="token operator">=</span>getProductById<span class="token punctuation">;</span><span class="token assign-left variable">paramslen</span><span class="token operator">=</span><span class="token number">1</span><span class="token punctuation">;</span><span class="token punctuation">[</span>Ljava.lang.Object<span class="token punctuation">;</span>@5b0e2d00<span class="token punctuation">;</span>
|
||||
returning:class<span class="token operator">=</span>IbatisProductDao<span class="token punctuation">;</span><span class="token assign-left variable">method</span><span class="token operator">=</span>getProductById<span class="token punctuation">;</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></div>`,7);function h(g,f){const t=l("RouterLink");return p(),o("div",null,[r,s("p",null,[d,k,i(t,{to:"/en/doc/advice-class.html"},{default:c(()=>[v]),_:1}),m]),b])}const w=e(u,[["render",h],["__file","groovy.html.vue"]]);export{w as default};
|
@ -0,0 +1 @@
|
||||
const e=JSON.parse('{"key":"v-25a18087","path":"/en/doc/groovy.html","title":"groovy","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"Limitations","slug":"limitations","link":"#limitations","children":[]},{"level":3,"title":"Parameters","slug":"parameters","link":"#parameters","children":[]},{"level":3,"title":"Explanation on the important callbacks","slug":"explanation-on-the-important-callbacks","link":"#explanation-on-the-important-callbacks","children":[]},{"level":3,"title":"Advice parameter","slug":"advice-parameter","link":"#advice-parameter","children":[]},{"level":3,"title":"Output parameter","slug":"output-parameter","link":"#output-parameter","children":[]},{"level":3,"title":"A groovy sample script to output logs","slug":"a-groovy-sample-script-to-output-logs","link":"#a-groovy-sample-script-to-output-logs","children":[]}],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/groovy.md","version":"3.7.3"}');export{e as data};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue