diff --git a/3.x/404.html b/3.x/404.html new file mode 100644 index 00000000000..c2bd7ef42c0 --- /dev/null +++ b/3.x/404.html @@ -0,0 +1,41 @@ + + + + + + + + + arthas + + + + +

404

这是一个 404 页面
回到首页
+ + + diff --git a/3.x/assets/404.html.2154acec.js b/3.x/assets/404.html.2154acec.js new file mode 100644 index 00000000000..7c41f9f0f29 --- /dev/null +++ b/3.x/assets/404.html.2154acec.js @@ -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}; diff --git a/3.x/assets/404.html.d0402927.js b/3.x/assets/404.html.d0402927.js new file mode 100644 index 00000000000..af2aa3138d7 --- /dev/null +++ b/3.x/assets/404.html.d0402927.js @@ -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}; diff --git a/3.x/assets/advanced-use.html.2f295a56.js b/3.x/assets/advanced-use.html.2f295a56.js new file mode 100644 index 00000000000..748a1b43013 --- /dev/null +++ b/3.x/assets/advanced-use.html.2f295a56.js @@ -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}; diff --git a/3.x/assets/advanced-use.html.94d49710.js b/3.x/assets/advanced-use.html.94d49710.js new file mode 100644 index 00000000000..493a0d8c4a6 --- /dev/null +++ b/3.x/assets/advanced-use.html.94d49710.js @@ -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}; diff --git a/3.x/assets/advanced-use.html.9554def2.js b/3.x/assets/advanced-use.html.9554def2.js new file mode 100644 index 00000000000..80782e01100 --- /dev/null +++ b/3.x/assets/advanced-use.html.9554def2.js @@ -0,0 +1,30 @@ +import{_ as r,o as i,c,a,b as n,w as t,e as s,d,r as o}from"./app.4d248835.js";const p={},h=a("h1",{id:"\u5176\u4ED6\u7279\u6027",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u5176\u4ED6\u7279\u6027","aria-hidden":"true"},"#"),s(" \u5176\u4ED6\u7279\u6027")],-1),u=a("h2",{id:"arthas-\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#arthas-\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1","aria-hidden":"true"},"#"),s(" Arthas \u540E\u53F0\u5F02\u6B65\u4EFB\u52A1")],-1),_=a("p",null,"\u5F53\u9700\u8981\u6392\u67E5\u4E00\u4E2A\u95EE\u9898\uFF0C\u4F46\u662F\u8FD9\u4E2A\u95EE\u9898\u7684\u51FA\u73B0\u65F6\u95F4\u4E0D\u80FD\u786E\u5B9A\uFF0C\u90A3\u6211\u4EEC\u5C31\u53EF\u4EE5\u628A\u68C0\u6D4B\u547D\u4EE4\u6302\u5728\u540E\u53F0\u8FD0\u884C\uFF0C\u5E76\u5C06\u4FDD\u5B58\u5230\u8F93\u51FA\u65E5\u5FD7\u3002",-1),b=s("Arthas \u540E\u53F0\u5F02\u6B65\u4EFB\u52A1"),v=a("h2",{id:"\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7","aria-hidden":"true"},"#"),s(" \u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7")],-1),m=a("p",null,"\u6240\u6709\u6267\u884C\u8BB0\u5F55\u7684\u7ED3\u679C\u5B8C\u6574\u4FDD\u5B58\u5728\u65E5\u5FD7\u6587\u4EF6\u4E2D\uFF0C\u4FBF\u4E8E\u540E\u7EED\u8FDB\u884C\u5206\u6790\u3002",-1),k=s("\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7"),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 \u5728 docker \u5BB9\u5668\u4E2D\u4F7F\u7528\u914D\u7F6E\u53C2\u8003\u3002",-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),j=a("p",null,"\u901A\u8FC7 websocket \u8FDE\u63A5 Arthas\u3002",-1),I=s("Web Console"),P=a("h2",{id:"arthas-tunnel",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#arthas-tunnel","aria-hidden":"true"},"#"),s(" Arthas Tunnel")],-1),C=a("p",null,"\u901A\u8FC7 Arthas Tunnel Server/Client \u6765\u8FDC\u7A0B\u7BA1\u7406/\u8FDE\u63A5\u591A\u4E2A\u670D\u52A1\u5668\u4E0B\u7684Java\u670D\u52A1\u3002",-1),T=s("Arthas Tunnel"),w=a("h2",{id:"ognl-\u8868\u8FBE\u5F0F\u7528\u6CD5",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#ognl-\u8868\u8FBE\u5F0F\u7528\u6CD5","aria-hidden":"true"},"#"),s(" ognl \u8868\u8FBE\u5F0F\u7528\u6CD5")],-1),E={href:"https://github.com/alibaba/arthas/issues/11",target:"_blank",rel:"noopener noreferrer"},S=s("ognl \u8868\u8FBE\u5F0F\u7684\u7528\u6CD5\u8BF4\u660E"),D={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},y=s("\u4E00\u4E9B ognl \u7279\u6B8A\u7528\u6CD5"),B=a("h2",{id:"idea-plugin",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#idea-plugin","aria-hidden":"true"},"#"),s(" IDEA Plugin")],-1),N=a("p",null,"IntelliJ IDEA \u7F16\u8BD1\u5668\u4E2D\u66F4\u52A0\u5FEB\u6377\u6784\u5EFA arhtas \u547D\u4EE4\u3002",-1),V=s("IDEA Plugin"),H=a("h2",{id:"arthas-properties",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#arthas-properties","aria-hidden":"true"},"#"),s(" Arthas Properties")],-1),J=a("p",null,"Arthas \u652F\u6301\u914D\u7F6E\u9879\u53C2\u8003\u3002",-1),L=s("Arthas Properties"),O=a("h2",{id:"\u4EE5-java-agent-\u65B9\u5F0F\u542F\u52A8",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u4EE5-java-agent-\u65B9\u5F0F\u542F\u52A8","aria-hidden":"true"},"#"),s(" \u4EE5 java agent \u65B9\u5F0F\u542F\u52A8")],-1),U=s("\u4EE5 java agent \u65B9\u5F0F\u542F\u52A8"),R=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),W=a("p",null,"\u968F\u5E94\u7528\u4E00\u8D77\u542F\u52A8\u3002",-1),$=s("Arthas Spring Boot Starter"),z=a("h2",{id:"http-api",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#http-api","aria-hidden":"true"},"#"),s(" HTTP API")],-1),F=a("p",null,"Http API \u63D0\u4F9B\u7ED3\u6784\u5316\u7684\u6570\u636E\uFF0C\u652F\u6301\u66F4\u590D\u6742\u7684\u4EA4\u4E92\u529F\u80FD\uFF0C\u65B9\u4FBF\u81EA\u5B9A\u4E49\u754C\u9762\u96C6\u6210 arthas\u3002",-1),M=s("HTTP API"),q=a("h2",{id:"\u6279\u5904\u7406\u529F\u80FD",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u6279\u5904\u7406\u529F\u80FD","aria-hidden":"true"},"#"),s(" \u6279\u5904\u7406\u529F\u80FD")],-1),G=a("p",null,[s("\u65B9\u4FBF\u81EA\u5B9A\u4E49\u811A\u672C\u4E00\u6B21\u6027\u6279\u91CF\u8FD0\u884C\u591A\u4E2A\u547D\u4EE4\uFF0C\u53EF\u7ED3\u5408 "),a("code",null,"--select"),s(" \u53C2\u6570\u53EF\u4EE5\u6307\u5B9A\u8FDB\u7A0B\u540D\u5B57\u4E00\u8D77\u4F7F\u7528\u3002")],-1),K=s("\u6279\u5904\u7406\u529F\u80FD"),Q=d(`

as3.sh \u548C arthas-boot3 \u6280\u5DE7

\u6B63\u5E38\u60C5\u51B5\u4E0B\uFF0C\u6BCF\u6B21\u6267\u884Cas3.sh/arthas-boot3.jar\u9700\u8981\u9009\u62E9\uFF0C\u6216\u8005\u6307\u5B9A PID\u3002\u8FD9\u6837\u4F1A\u6BD4\u8F83\u9EBB\u70E6\uFF0C\u56E0\u4E3A\u6BCF\u6B21\u542F\u52A8\u5E94\u7528\uFF0C\u5B83\u7684 PID \u4F1A\u53D8\u5316\u3002

\u6BD4\u5982\uFF0C\u5DF2\u7ECF\u542F\u52A8\u4E86math-game.jar\uFF0C\u4F7F\u7528jps\u547D\u4EE4\u67E5\u770B\uFF1A

$ jps
+58883 math-game.jar
+58884 Jps
+

\u901A\u8FC7select\u53C2\u6570\u53EF\u4EE5\u6307\u5B9A\u8FDB\u7A0B\u540D\u5B57\uFF0C\u975E\u5E38\u65B9\u4FBF\u3002

$ ./as3.sh --select math-game
+Arthas script version: 3.3.6
+[INFO] JAVA_HOME: /tmp/java/8.0.222-zulu
+Arthas home: /Users/admin/.arthas/lib/3.3.6/arthas
+Calculating attach execution time...
+Attaching to 59161 using version /Users/admin/.arthas/lib/3.3.6/arthas...
+
+real	0m0.572s
+user	0m0.281s
+sys	0m0.039s
+Attach success.
+telnet connecting to arthas server... current timestamp is 1594280799
+Trying 127.0.0.1...
+Connected to localhost.
+Escape character is '^]'.
+  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
+ /  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
+|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
+|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
+\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
+
+
+wiki      https://arthas.aliyun.com/3.x/doc
+tutorials https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
+version   3.3.6
+pid       58883
+

\u7528\u6237\u6570\u636E\u56DE\u62A5

\u57283.1.4\u7248\u672C\u540E\uFF0C\u589E\u52A0\u4E86\u7528\u6237\u6570\u636E\u56DE\u62A5\u529F\u80FD\uFF0C\u65B9\u4FBF\u7EDF\u4E00\u505A\u5B89\u5168\u6216\u8005\u5386\u53F2\u6570\u636E\u7EDF\u8BA1\u3002

\u5728\u542F\u52A8\u65F6\uFF0C\u6307\u5B9Astat-url\uFF0C\u5C31\u4F1A\u56DE\u62A5\u6267\u884C\u7684\u6BCF\u4E00\u884C\u547D\u4EE4\uFF0C\u6BD4\u5982\uFF1A ./as3.sh --stat-url 'http://192.168.10.11:8080/api/stat'

\u5728 tunnel server \u91CC\u6709\u4E00\u4E2A\u793A\u4F8B\u7684\u56DE\u62A5\u4EE3\u7801\uFF0C\u7528\u6237\u53EF\u4EE5\u81EA\u5DF1\u5728\u670D\u52A1\u5668\u4E0A\u5B9E\u73B0\u3002

`,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 e=o("RouterLink"),l=o("ExternalLinkIcon");return i(),c("div",null,[h,u,_,a("ul",null,[a("li",null,[n(e,{to:"/doc/async.html"},{default:t(()=>[b]),_:1})])]),v,m,a("ul",null,[a("li",null,[n(e,{to:"/doc/save-log.html"},{default:t(()=>[k]),_:1})])]),g,f,a("ul",null,[a("li",null,[n(e,{to:"/doc/docker.html"},{default:t(()=>[x]),_:1})])]),A,j,a("ul",null,[a("li",null,[n(e,{to:"/doc/web-console.html"},{default:t(()=>[I]),_:1})])]),P,C,a("ul",null,[a("li",null,[n(e,{to:"/doc/tunnel.html"},{default:t(()=>[T]),_:1})])]),w,a("ul",null,[a("li",null,[a("a",E,[S,n(l)])]),a("li",null,[a("a",D,[y,n(l)])])]),B,N,a("ul",null,[a("li",null,[n(e,{to:"/doc/idea-plugin.html"},{default:t(()=>[V]),_:1})])]),H,J,a("ul",null,[a("li",null,[n(e,{to:"/doc/arthas-properties.html"},{default:t(()=>[L]),_:1})])]),O,a("ul",null,[a("li",null,[n(e,{to:"/doc/agent.html"},{default:t(()=>[U]),_:1})])]),R,W,a("ul",null,[a("li",null,[n(e,{to:"/doc/spring-boot-starter.html"},{default:t(()=>[$]),_:1})])]),z,F,a("ul",null,[a("li",null,[n(e,{to:"/doc/http-api.html"},{default:t(()=>[M]),_:1})])]),q,G,a("ul",null,[a("li",null,[n(e,{to:"/doc/batch-support.html"},{default:t(()=>[K]),_:1})])]),Q,a("p",null,[a("a",X,[Y,n(l)])])])}const ea=r(p,[["render",Z],["__file","advanced-use.html.vue"]]);export{ea as default}; diff --git a/3.x/assets/advanced-use.html.b6fb70e9.js b/3.x/assets/advanced-use.html.b6fb70e9.js new file mode 100644 index 00000000000..f7b50fcb2e6 --- /dev/null +++ b/3.x/assets/advanced-use.html.b6fb70e9.js @@ -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(`

as3.sh and arthas-boot3 tips

Normally, as3.sh/arthas-boot3.jar needs to a pid, bacause the pid will change.

For example, with math-game.jar already started, use the jps command to see.

$ jps
+58883 math-game.jar
+58884 Jps
+

The select option allows you to specify a process name, which is very convenient.

$ ./as3.sh --select math-game
+Arthas script version: 3.3.6
+[INFO] JAVA_HOME: /tmp/java/8.0.222-zulu
+Arthas home: /Users/admin/.arthas/lib/3.3.6/arthas
+Calculating attach execution time...
+Attaching to 59161 using version /Users/admin/.arthas/lib/3.3.6/arthas...
+
+real	0m0.572s
+user	0m0.281s
+sys	0m0.039s
+Attach success.
+telnet connecting to arthas server... current timestamp is 1594280799
+Trying 127.0.0.1...
+Connected to localhost.
+Escape character is '^]'.
+  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
+ /  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
+|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
+|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
+\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
+
+
+wiki      https://arthas.aliyun.com/3.x/doc
+tutorials https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
+version   3.3.6
+pid       58883
+

User data report

After the 3.1.4 version, arthas support user data report.

At startup, use the stat-url option, such as: ./as3.sh --stat-url 'http://192.168.10.11:8080/api/stat'

There is a sample data report in the tunnel server that users can implement on their own.

`,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}; diff --git a/3.x/assets/advice-class.html.0e371faa.js b/3.x/assets/advice-class.html.0e371faa.js new file mode 100644 index 00000000000..aca10e429c7 --- /dev/null +++ b/3.x/assets/advice-class.html.0e371faa.js @@ -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}; diff --git a/3.x/assets/advice-class.html.21f2ea38.js b/3.x/assets/advice-class.html.21f2ea38.js new file mode 100644 index 00000000000..83e454d311b --- /dev/null +++ b/3.x/assets/advice-class.html.21f2ea38.js @@ -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}; diff --git a/3.x/assets/advice-class.html.913cd28f.js b/3.x/assets/advice-class.html.913cd28f.js new file mode 100644 index 00000000000..1061ef21288 --- /dev/null +++ b/3.x/assets/advice-class.html.913cd28f.js @@ -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(`

Fundamental Fields in Expressions

There is a very fundamental class Advice for the expressions used in filtering, tracing or monitoring and other aspects in commands.

public class Advice {
+
+    private final ClassLoader loader;
+    private final Class<?> clazz;
+    private final ArthasMethod method;
+    private final Object target;
+    private final Object[] params;
+    private final Object returnObj;
+    private final Throwable throwExp;
+    private final boolean isBefore;
+    private final boolean isThrow;
+    private final boolean isReturn;
+
+    // getter/setter
+}
+

Description for the variables in the class Advice:

NameSpecification
loaderthe class loader for the current called class
clazzthe reference to the current called class
methodthe reference to the current called method
targetthe instance of the current called class
paramsthe parameters for the current call, which is an array (when there's no parameter, it will be an empty array)
returnObjthe return value from the current call - only available when the method call returns normally (isReturn==true), and null is for void return value
throwExpthe exceptions thrown from the current call - only available when the method call throws exception (isThrow==true)
isBeforeflag to indicate the method is about to execute. isBefore==true but isThrow==false and isReturn==false since it's no way to know how the method call will end
isThrowflag to indicate the method call ends with exception thrown
isReturnflag to indicate the method call ends normally without exception thrown
`,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}; diff --git a/3.x/assets/advice-class.html.b56b5ad0.js b/3.x/assets/advice-class.html.b56b5ad0.js new file mode 100644 index 00000000000..0b4c27e8577 --- /dev/null +++ b/3.x/assets/advice-class.html.b56b5ad0.js @@ -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(`

\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF

\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 Advice \u8FDB\u884C\u3002

\u5B83\u7684\u7B80\u7565\u4EE3\u7801\u7ED3\u6784\u5982\u4E0B

public class Advice {
+
+    private final ClassLoader loader;
+    private final Class<?> clazz;
+    private final ArthasMethod method;
+    private final Object target;
+    private final Object[] params;
+    private final Object returnObj;
+    private final Throwable throwExp;
+    private final boolean isBefore;
+    private final boolean isThrow;
+    private final boolean isReturn;
+
+    // getter/setter
+}
+

\u8FD9\u91CC\u5217\u4E00\u4E2A\u8868\u683C\u6765\u8BF4\u660E\u4E0D\u540C\u53D8\u91CF\u7684\u542B\u4E49

\u53D8\u91CF\u540D\u53D8\u91CF\u89E3\u91CA
loader\u672C\u6B21\u8C03\u7528\u7C7B\u6240\u5728\u7684 ClassLoader
clazz\u672C\u6B21\u8C03\u7528\u7C7B\u7684 Class \u5F15\u7528
method\u672C\u6B21\u8C03\u7528\u65B9\u6CD5\u53CD\u5C04\u5F15\u7528
target\u672C\u6B21\u8C03\u7528\u7C7B\u7684\u5B9E\u4F8B
params\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
returnObj\u672C\u6B21\u8C03\u7528\u8FD4\u56DE\u7684\u5BF9\u8C61\u3002\u5F53\u4E14\u4EC5\u5F53 isReturn==true \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 void\uFF0C\u5219\u503C\u4E3A null
throwExp\u672C\u6B21\u8C03\u7528\u629B\u51FA\u7684\u5F02\u5E38\u3002\u5F53\u4E14\u4EC5\u5F53 isThrow==true \u6210\u7ACB\u65F6\u6709\u6548\uFF0C\u8868\u660E\u65B9\u6CD5\u8C03\u7528\u662F\u4EE5\u629B\u51FA\u5F02\u5E38\u7684\u65B9\u5F0F\u7ED3\u675F\u3002
isBefore\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 isBefore==true \u6210\u7ACB\uFF0C\u540C\u65F6 isThrow==false \u548C isReturn==false\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
isThrow\u8F85\u52A9\u5224\u65AD\u6807\u8BB0\uFF0C\u5F53\u524D\u7684\u65B9\u6CD5\u8C03\u7528\u4EE5\u629B\u5F02\u5E38\u7684\u5F62\u5F0F\u7ED3\u675F\u3002
isReturn\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

\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\u6761\u4EF6\u8868\u8FBE\u5F0F\u6216\u89C2\u5BDF\u8868\u8FBE\u5F0F

`,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}; diff --git a/3.x/assets/agent.html.2c661add.js b/3.x/assets/agent.html.2c661add.js new file mode 100644 index 00000000000..5712ef77eed --- /dev/null +++ b/3.x/assets/agent.html.2c661add.js @@ -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}; diff --git a/3.x/assets/agent.html.5d625533.js b/3.x/assets/agent.html.5d625533.js new file mode 100644 index 00000000000..192f7eb46db --- /dev/null +++ b/3.x/assets/agent.html.5d625533.js @@ -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(`

Start as a Java Agent

Usually Arthas dynamic attach the applications on the fly, but from version 3.2.0 onwards, Arthas supports starting directly as a java agent.

For example, download the full arthas zip package, decompress it and start it by specifying arthas-agent.jar with the parameter -javaagent.

java -javaagent:/tmp/test/arthas-agent.jar -jar math-game.jar
+
`,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}; diff --git a/3.x/assets/agent.html.a8d22dff.js b/3.x/assets/agent.html.a8d22dff.js new file mode 100644 index 00000000000..bb4f485ff56 --- /dev/null +++ b/3.x/assets/agent.html.a8d22dff.js @@ -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(`

\u4EE5 Java Agent \u7684\u65B9\u5F0F\u542F\u52A8

\u901A\u5E38 Arthas \u662F\u4EE5\u52A8\u6001 attach \u7684\u65B9\u5F0F\u6765\u8BCA\u65AD\u5E94\u7528\uFF0C\u4F46\u4ECE3.2.0\u7248\u672C\u8D77\uFF0CArthas \u652F\u6301\u76F4\u63A5\u4EE5 java agent \u7684\u65B9\u5F0F\u542F\u52A8\u3002

\u6BD4\u5982\u4E0B\u8F7D\u5168\u91CF\u7684 arthas zip \u5305\uFF0C\u89E3\u538B\u4E4B\u540E\u4EE5 -javaagent \u7684\u53C2\u6570\u6307\u5B9Aarthas-agent.jar\u6765\u542F\u52A8\uFF1A

java -javaagent:/tmp/test/arthas-agent.jar -jar math-game.jar
+
`,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}; diff --git a/3.x/assets/agent.html.ad1674bc.js b/3.x/assets/agent.html.ad1674bc.js new file mode 100644 index 00000000000..f304a5755c8 --- /dev/null +++ b/3.x/assets/agent.html.ad1674bc.js @@ -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}; diff --git a/3.x/assets/app.4d248835.js b/3.x/assets/app.4d248835.js new file mode 100644 index 00000000000..60a66ded3e7 --- /dev/null +++ b/3.x/assets/app.4d248835.js @@ -0,0 +1,38 @@ +const Om="modulepreload",Pm=function(e){return"/3.x/"+e},Oi={},h=function(t,n,o){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=Pm(r),r in Oi)return;Oi[r]=!0;const a=r.endsWith(".css"),i=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${i}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":Om,a||(c.as="script",c.crossOrigin=""),c.href=r,document.head.appendChild(c),a)return new Promise((s,l)=>{c.addEventListener("load",s),c.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())},Sm={"v-8daa1a0e":()=>h(()=>import("./index.html.6c4675e2.js"),[]).then(({data:e})=>e),"v-7445f070":()=>h(()=>import("./index.html.636fad3d.js"),[]).then(({data:e})=>e),"v-0d09f68d":()=>h(()=>import("./advanced-use.html.94d49710.js"),[]).then(({data:e})=>e),"v-46e53834":()=>h(()=>import("./advice-class.html.0e371faa.js"),[]).then(({data:e})=>e),"v-37178538":()=>h(()=>import("./agent.html.2c661add.js"),[]).then(({data:e})=>e),"v-5c517900":()=>h(()=>import("./arthas-properties.html.c6a378d8.js"),[]).then(({data:e})=>e),"v-02eb6d0d":()=>h(()=>import("./arthas3.html.f5096367.js"),[]).then(({data:e})=>e),"v-4f82df66":()=>h(()=>import("./async.html.08408f7f.js"),[]).then(({data:e})=>e),"v-d0358c7e":()=>h(()=>import("./auth.html.0cae929d.js"),[]).then(({data:e})=>e),"v-3157067a":()=>h(()=>import("./base64.html.e5a32bd6.js"),[]).then(({data:e})=>e),"v-cc8f4ae6":()=>h(()=>import("./batch-support.html.acbd1eb9.js"),[]).then(({data:e})=>e),"v-6542b733":()=>h(()=>import("./cat.html.79af7693.js"),[]).then(({data:e})=>e),"v-49b1709e":()=>h(()=>import("./classloader.html.5b255ef1.js"),[]).then(({data:e})=>e),"v-ad1b2b42":()=>h(()=>import("./cls.html.9332bbdf.js"),[]).then(({data:e})=>e),"v-5ed4d0e1":()=>h(()=>import("./commands.html.e2567b24.js"),[]).then(({data:e})=>e),"v-3992adde":()=>h(()=>import("./contact-us.html.6d0fe4e6.js"),[]).then(({data:e})=>e),"v-0d1e3f35":()=>h(()=>import("./dashboard.html.c7a97553.js"),[]).then(({data:e})=>e),"v-02361049":()=>h(()=>import("./docker.html.030cca04.js"),[]).then(({data:e})=>e),"v-2116d2e1":()=>h(()=>import("./download.html.b853bfd7.js"),[]).then(({data:e})=>e),"v-1fe4a616":()=>h(()=>import("./dump.html.3f441711.js"),[]).then(({data:e})=>e),"v-2c48f364":()=>h(()=>import("./echo.html.239528da.js"),[]).then(({data:e})=>e),"v-d070981a":()=>h(()=>import("./faq.html.abd28b1f.js"),[]).then(({data:e})=>e),"v-78c35af6":()=>h(()=>import("./getstatic.html.2229049b.js"),[]).then(({data:e})=>e),"v-63f4cd5a":()=>h(()=>import("./grep.html.4aa91236.js"),[]).then(({data:e})=>e),"v-809381ca":()=>h(()=>import("./groovy.html.21de60b6.js"),[]).then(({data:e})=>e),"v-07868089":()=>h(()=>import("./heapdump.html.3fe356b2.js"),[]).then(({data:e})=>e),"v-e3b34070":()=>h(()=>import("./help.html.7ba26453.js"),[]).then(({data:e})=>e),"v-26f43d96":()=>h(()=>import("./history.html.5c8da1d4.js"),[]).then(({data:e})=>e),"v-225de034":()=>h(()=>import("./http-api.html.f5e81364.js"),[]).then(({data:e})=>e),"v-7c670020":()=>h(()=>import("./idea-plugin.html.d7acd139.js"),[]).then(({data:e})=>e),"v-0cb398f4":()=>h(()=>import("./install-detail.html.0c410a89.js"),[]).then(({data:e})=>e),"v-211d675c":()=>h(()=>import("./jad.html.d639a8bb.js"),[]).then(({data:e})=>e),"v-41806853":()=>h(()=>import("./jfr.html.e858c4d3.js"),[]).then(({data:e})=>e),"v-f1483d70":()=>h(()=>import("./jvm.html.a00151a5.js"),[]).then(({data:e})=>e),"v-4039cdec":()=>h(()=>import("./keymap.html.e3647cfd.js"),[]).then(({data:e})=>e),"v-5ae8aed9":()=>h(()=>import("./logger.html.7a983455.js"),[]).then(({data:e})=>e),"v-6a31cc55":()=>h(()=>import("./manual-install.html.09d3b86a.js"),[]).then(({data:e})=>e),"v-8ebd6c68":()=>h(()=>import("./mbean.html.555cb2c7.js"),[]).then(({data:e})=>e),"v-3b401ada":()=>h(()=>import("./mc.html.70645c5e.js"),[]).then(({data:e})=>e),"v-4d9433f0":()=>h(()=>import("./memory.html.078c4658.js"),[]).then(({data:e})=>e),"v-6e88d7a2":()=>h(()=>import("./monitor.html.d6717549.js"),[]).then(({data:e})=>e),"v-627e52da":()=>h(()=>import("./ognl.html.a04123af.js"),[]).then(({data:e})=>e),"v-27b6152a":()=>h(()=>import("./options.html.76f0ad11.js"),[]).then(({data:e})=>e),"v-2f05b636":()=>h(()=>import("./perfcounter.html.a2008d46.js"),[]).then(({data:e})=>e),"v-13eae420":()=>h(()=>import("./profiler.html.2fe5463f.js"),[]).then(({data:e})=>e),"v-1c2d8c2c":()=>h(()=>import("./pwd.html.b8813280.js"),[]).then(({data:e})=>e),"v-5afc3a07":()=>h(()=>import("./quick-start.html.463266ab.js"),[]).then(({data:e})=>e),"v-aa7c750c":()=>h(()=>import("./quit.html.052c6b91.js"),[]).then(({data:e})=>e),"v-0446ad7b":()=>h(()=>import("./redefine.html.a2b54a14.js"),[]).then(({data:e})=>e),"v-648880ae":()=>h(()=>import("./release-notes.html.bd30f66e.js"),[]).then(({data:e})=>e),"v-71f77d4c":()=>h(()=>import("./reset.html.d6cfba7b.js"),[]).then(({data:e})=>e),"v-54cde250":()=>h(()=>import("./retransform.html.8eba17c2.js"),[]).then(({data:e})=>e),"v-8e632816":()=>h(()=>import("./save-log.html.1848baa1.js"),[]).then(({data:e})=>e),"v-1fc55619":()=>h(()=>import("./sc.html.74c76d3a.js"),[]).then(({data:e})=>e),"v-3891b473":()=>h(()=>import("./session.html.5c4eabed.js"),[]).then(({data:e})=>e),"v-30d5cc4f":()=>h(()=>import("./sm.html.e7e61e0b.js"),[]).then(({data:e})=>e),"v-07cf9d55":()=>h(()=>import("./spring-boot-starter.html.f437e222.js"),[]).then(({data:e})=>e),"v-b75a107e":()=>h(()=>import("./stack.html.6561e199.js"),[]).then(({data:e})=>e),"v-a9c412f2":()=>h(()=>import("./start-arthas.html.11758ed5.js"),[]).then(({data:e})=>e),"v-bc0910b2":()=>h(()=>import("./stop.html.29be75c6.js"),[]).then(({data:e})=>e),"v-0333612e":()=>h(()=>import("./sysenv.html.2f968356.js"),[]).then(({data:e})=>e),"v-7012b8ce":()=>h(()=>import("./sysprop.html.36bf4069.js"),[]).then(({data:e})=>e),"v-0536edb5":()=>h(()=>import("./tee.html.f88833bc.js"),[]).then(({data:e})=>e),"v-10845ac2":()=>h(()=>import("./thread.html.036b2896.js"),[]).then(({data:e})=>e),"v-65d67724":()=>h(()=>import("./trace.html.0dc105ca.js"),[]).then(({data:e})=>e),"v-71adf3e9":()=>h(()=>import("./tt.html.1800bc01.js"),[]).then(({data:e})=>e),"v-d2ddc9fe":()=>h(()=>import("./tunnel.html.5346db5d.js"),[]).then(({data:e})=>e),"v-5b5d3371":()=>h(()=>import("./version.html.85cfef6a.js"),[]).then(({data:e})=>e),"v-40db67fd":()=>h(()=>import("./vmoption.html.58b16737.js"),[]).then(({data:e})=>e),"v-10890efa":()=>h(()=>import("./vmtool.html.3a06f08b.js"),[]).then(({data:e})=>e),"v-24fc49da":()=>h(()=>import("./watch.html.3663bb24.js"),[]).then(({data:e})=>e),"v-a5f6e7aa":()=>h(()=>import("./web-console.html.8f3242b3.js"),[]).then(({data:e})=>e),"v-2d0a870d":()=>h(()=>import("./index.html.72b89313.js"),[]).then(({data:e})=>e),"v-07555a84":()=>h(()=>import("./index.html.da04bb04.js"),[]).then(({data:e})=>e),"v-463d120e":()=>h(()=>import("./advanced-use.html.2f295a56.js"),[]).then(({data:e})=>e),"v-a736375c":()=>h(()=>import("./advice-class.html.21f2ea38.js"),[]).then(({data:e})=>e),"v-f6b5c310":()=>h(()=>import("./agent.html.ad1674bc.js"),[]).then(({data:e})=>e),"v-74fb2694":()=>h(()=>import("./arthas-properties.html.1fb20763.js"),[]).then(({data:e})=>e),"v-786f7161":()=>h(()=>import("./async.html.0990e2e8.js"),[]).then(({data:e})=>e),"v-f76c33a6":()=>h(()=>import("./auth.html.3fe3d5ca.js"),[]).then(({data:e})=>e),"v-d17b7034":()=>h(()=>import("./base64.html.d9951e03.js"),[]).then(({data:e})=>e),"v-765e30be":()=>h(()=>import("./batch-support.html.a2012b98.js"),[]).then(({data:e})=>e),"v-64a0cd47":()=>h(()=>import("./cat.html.c8a558a6.js"),[]).then(({data:e})=>e),"v-fc1b9a9c":()=>h(()=>import("./classloader.html.50846686.js"),[]).then(({data:e})=>e),"v-ae5eff1a":()=>h(()=>import("./cls.html.92ac93b9.js"),[]).then(({data:e})=>e),"v-12153166":()=>h(()=>import("./commands.html.ea43666c.js"),[]).then(({data:e})=>e),"v-4be7594a":()=>h(()=>import("./contact-us.html.77c0699c.js"),[]).then(({data:e})=>e),"v-79107649":()=>h(()=>import("./dashboard.html.f56e6c96.js"),[]).then(({data:e})=>e),"v-682151b5":()=>h(()=>import("./docker.html.a7fd435f.js"),[]).then(({data:e})=>e),"v-8d912d66":()=>h(()=>import("./download.html.127d6cde.js"),[]).then(({data:e})=>e),"v-471b4d3e":()=>h(()=>import("./dump.html.148d41dc.js"),[]).then(({data:e})=>e),"v-18ad9fd0":()=>h(()=>import("./echo.html.8619670c.js"),[]).then(({data:e})=>e),"v-d1b46bf2":()=>h(()=>import("./faq.html.18da055d.js"),[]).then(({data:e})=>e),"v-2f908999":()=>h(()=>import("./getstatic.html.e01bd744.js"),[]).then(({data:e})=>e),"v-8b2b7482":()=>h(()=>import("./grep.html.8e0aee31.js"),[]).then(({data:e})=>e),"v-25a18087":()=>h(()=>import("./groovy.html.92f5e844.js"),[]).then(({data:e})=>e),"v-c0b1d216":()=>h(()=>import("./heapdump.html.19f5486f.js"),[]).then(({data:e})=>e),"v-7a8b0c34":()=>h(()=>import("./help.html.3d260e86.js"),[]).then(({data:e})=>e),"v-4402cd49":()=>h(()=>import("./history.html.006cedb1.js"),[]).then(({data:e})=>e),"v-8b0312c0":()=>h(()=>import("./http-api.html.a19a0b64.js"),[]).then(({data:e})=>e),"v-96b07b98":()=>h(()=>import("./idea-plugin.html.32b2309e.js"),[]).then(({data:e})=>e),"v-319f48f2":()=>h(()=>import("./install-detail.html.0208e8d8.js"),[]).then(({data:e})=>e),"v-207b7d70":()=>h(()=>import("./jad.html.e520a68e.js"),[]).then(({data:e})=>e),"v-40de7e67":()=>h(()=>import("./jfr.html.57a326e6.js"),[]).then(({data:e})=>e),"v-f28c1148":()=>h(()=>import("./jvm.html.4efee18b.js"),[]).then(({data:e})=>e),"v-b3b5e150":()=>h(()=>import("./keymap.html.e94a5d53.js"),[]).then(({data:e})=>e),"v-7e581f76":()=>h(()=>import("./logger.html.3230d5ce.js"),[]).then(({data:e})=>e),"v-bbaa3c7e":()=>h(()=>import("./manual-install.html.42509750.js"),[]).then(({data:e})=>e),"v-58d22ae0":()=>h(()=>import("./mbean.html.405141c1.js"),[]).then(({data:e})=>e),"v-2ac66c02":()=>h(()=>import("./mc.html.89ccac82.js"),[]).then(({data:e})=>e),"v-3f212774":()=>h(()=>import("./memory.html.e3c4914e.js"),[]).then(({data:e})=>e),"v-20388043":()=>h(()=>import("./monitor.html.30828325.js"),[]).then(({data:e})=>e),"v-89b4fa02":()=>h(()=>import("./ognl.html.a2f5b795.js"),[]).then(({data:e})=>e),"v-43a1e17f":()=>h(()=>import("./options.html.39ae73d3.js"),[]).then(({data:e})=>e),"v-6746784a":()=>h(()=>import("./perfcounter.html.04486209.js"),[]).then(({data:e})=>e),"v-a7e90ae8":()=>h(()=>import("./profiler.html.ecb6c417.js"),[]).then(({data:e})=>e),"v-1b8ba240":()=>h(()=>import("./pwd.html.5c70637d.js"),[]).then(({data:e})=>e),"v-d98607ca":()=>h(()=>import("./quick-start.html.2afac43e.js"),[]).then(({data:e})=>e),"v-d1b31c34":()=>h(()=>import("./quit.html.125451fe.js"),[]).then(({data:e})=>e),"v-c7317832":()=>h(()=>import("./redefine.html.ee728e3e.js"),[]).then(({data:e})=>e),"v-e0bde47c":()=>h(()=>import("./release-notes.html.5e40eac1.js"),[]).then(({data:e})=>e),"v-6735226e":()=>h(()=>import("./reset.html.6542e356.js"),[]).then(({data:e})=>e),"v-e5e2b738":()=>h(()=>import("./retransform.html.c9177e92.js"),[]).then(({data:e})=>e),"v-50ef0261":()=>h(()=>import("./save-log.html.59e37d28.js"),[]).then(({data:e})=>e),"v-28022d85":()=>h(()=>import("./sc.html.7e6d0647.js"),[]).then(({data:e})=>e),"v-dfe2bef2":()=>h(()=>import("./session.html.c643c273.js"),[]).then(({data:e})=>e),"v-3912a3bb":()=>h(()=>import("./sm.html.961479d6.js"),[]).then(({data:e})=>e),"v-71870b69":()=>h(()=>import("./spring-boot-starter.html.304b29da.js"),[]).then(({data:e})=>e),"v-4483d8d5":()=>h(()=>import("./stack.html.bbfa304b.js"),[]).then(({data:e})=>e),"v-7af576f3":()=>h(()=>import("./start-arthas.html.ddd2298e.js"),[]).then(({data:e})=>e),"v-e33fb7da":()=>h(()=>import("./stop.html.8c6a9664.js"),[]).then(({data:e})=>e),"v-645190d5":()=>h(()=>import("./sysenv.html.d4a09599.js"),[]).then(({data:e})=>e),"v-1f738fad":()=>h(()=>import("./sysprop.html.024045c5.js"),[]).then(({data:e})=>e),"v-049503c9":()=>h(()=>import("./tee.html.2c90d1cb.js"),[]).then(({data:e})=>e),"v-5da9140b":()=>h(()=>import("./thread.html.e4dd07a8.js"),[]).then(({data:e})=>e),"v-06075838":()=>h(()=>import("./trace.html.987171f7.js"),[]).then(({data:e})=>e),"v-79eacb55":()=>h(()=>import("./tt.html.fd7438d0.js"),[]).then(({data:e})=>e),"v-07074726":()=>h(()=>import("./tunnel.html.203ccf1d.js"),[]).then(({data:e})=>e),"v-9a4bc0f6":()=>h(()=>import("./version.html.2ce43555.js"),[]).then(({data:e})=>e),"v-4e08032e":()=>h(()=>import("./vmoption.html.c8c7e7fc.js"),[]).then(({data:e})=>e),"v-76745066":()=>h(()=>import("./vmtool.html.ab0c1d24.js"),[]).then(({data:e})=>e),"v-75a5aa24":()=>h(()=>import("./watch.html.8b8293d0.js"),[]).then(({data:e})=>e),"v-35756382":()=>h(()=>import("./web-console.html.cea17e0f.js"),[]).then(({data:e})=>e),"v-3706649a":()=>h(()=>import("./404.html.d0402927.js"),[]).then(({data:e})=>e)};function Ha(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r!!n[r.toLowerCase()]:r=>!!n[r]}const Am="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Tm=Ha(Am);function Qs(e){return!!e||e===""}function bo(e){if(ce(e)){const t={};for(let n=0;n{if(n){const o=n.split(Lm);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Ue(e){let t="";if(Le(e))t=e;else if(ce(e))for(let n=0;nLe(e)?e:e==null?"":ce(e)||Ve(e)&&(e.toString===el||!he(e.toString))?JSON.stringify(e,Gs,2):String(e),Gs=(e,t)=>t&&t.__v_isRef?Gs(e,t.value):In(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r])=>(n[`${o} =>`]=r,n),{})}:Zs(t)?{[`Set(${t.size})`]:[...t.values()]}:Ve(t)&&!ce(t)&&!tl(t)?String(t):t,Ce={},Tn=[],_t=()=>{},Rm=()=>!1,km=/^on[^a-z]/,yo=e=>km.test(e),$a=e=>e.startsWith("onUpdate:"),Ye=Object.assign,qa=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},xm=Object.prototype.hasOwnProperty,ye=(e,t)=>xm.call(e,t),ce=Array.isArray,In=e=>Er(e)==="[object Map]",Zs=e=>Er(e)==="[object Set]",he=e=>typeof e=="function",Le=e=>typeof e=="string",Va=e=>typeof e=="symbol",Ve=e=>e!==null&&typeof e=="object",Xs=e=>Ve(e)&&he(e.then)&&he(e.catch),el=Object.prototype.toString,Er=e=>el.call(e),Cm=e=>Er(e).slice(8,-1),tl=e=>Er(e)==="[object Object]",Na=e=>Le(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,eo=Ha(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),wr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Mm=/-(\w)/g,Tt=wr(e=>e.replace(Mm,(t,n)=>n?n.toUpperCase():"")),jm=/\B([A-Z])/g,_n=wr(e=>e.replace(jm,"-$1").toLowerCase()),Or=wr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Hr=wr(e=>e?`on${Or(e)}`:""),so=(e,t)=>!Object.is(e,t),$r=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},nl=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Pi;const Hm=()=>Pi||(Pi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let at;class $m{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&at&&(this.parent=at,this.index=(at.scopes||(at.scopes=[])).push(this)-1)}run(t){if(this.active){const n=at;try{return at=this,t()}finally{at=n}}}on(){at=this}off(){at=this.parent}stop(t){if(this.active){let n,o;for(n=0,o=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},ol=e=>(e.w&Qt)>0,rl=e=>(e.n&Qt)>0,Fm=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o{(l==="length"||l>=o)&&c.push(s)});else switch(n!==void 0&&c.push(i.get(n)),t){case"add":ce(e)?Na(n)&&c.push(i.get("length")):(c.push(i.get(fn)),In(e)&&c.push(i.get(ca)));break;case"delete":ce(e)||(c.push(i.get(fn)),In(e)&&c.push(i.get(ca)));break;case"set":In(e)&&c.push(i.get(fn));break}if(c.length===1)c[0]&&sa(c[0]);else{const s=[];for(const l of c)l&&s.push(...l);sa(Fa(s))}}function sa(e,t){const n=ce(e)?e:[...e];for(const o of n)o.computed&&Ai(o);for(const o of n)o.computed||Ai(o)}function Ai(e,t){(e!==ht||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const zm=Ha("__proto__,__v_isRef,__isVue"),cl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Va)),Um=za(),Wm=za(!1,!0),Km=za(!0),Ti=Ym();function Ym(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const o=Oe(this);for(let a=0,i=this.length;a{e[t]=function(...n){$n();const o=Oe(this)[t].apply(this,n);return qn(),o}}),e}function za(e=!1,t=!1){return function(o,r,a){if(r==="__v_isReactive")return!e;if(r==="__v_isReadonly")return e;if(r==="__v_isShallow")return t;if(r==="__v_raw"&&a===(e?t?ud:dl:t?ml:ul).get(o))return o;const i=ce(o);if(!e&&i&&ye(Ti,r))return Reflect.get(Ti,r,a);const c=Reflect.get(o,r,a);return(Va(r)?cl.has(r):zm(r))||(e||ct(o,"get",r),t)?c:ze(c)?i&&Na(r)?c:c.value:Ve(c)?e?Ka(c):Vn(c):c}}const Jm=sl(),Qm=sl(!0);function sl(e=!1){return function(n,o,r,a){let i=n[o];if(xn(i)&&ze(i)&&!ze(r))return!1;if(!e&&(!Xo(r)&&!xn(r)&&(i=Oe(i),r=Oe(r)),!ce(n)&&ze(i)&&!ze(r)))return i.value=r,!0;const c=ce(n)&&Na(o)?Number(o)e,Pr=e=>Reflect.getPrototypeOf(e);function To(e,t,n=!1,o=!1){e=e.__v_raw;const r=Oe(e),a=Oe(t);n||(t!==a&&ct(r,"get",t),ct(r,"get",a));const{has:i}=Pr(r),c=o?Ua:n?Ja:lo;if(i.call(r,t))return c(e.get(t));if(i.call(r,a))return c(e.get(a));e!==r&&e.get(t)}function Io(e,t=!1){const n=this.__v_raw,o=Oe(n),r=Oe(e);return t||(e!==r&&ct(o,"has",e),ct(o,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Lo(e,t=!1){return e=e.__v_raw,!t&&ct(Oe(e),"iterate",fn),Reflect.get(e,"size",e)}function Ii(e){e=Oe(e);const t=Oe(this);return Pr(t).has.call(t,e)||(t.add(e),qt(t,"add",e,e)),this}function Li(e,t){t=Oe(t);const n=Oe(this),{has:o,get:r}=Pr(n);let a=o.call(n,e);a||(e=Oe(e),a=o.call(n,e));const i=r.call(n,e);return n.set(e,t),a?so(t,i)&&qt(n,"set",e,t):qt(n,"add",e,t),this}function Di(e){const t=Oe(this),{has:n,get:o}=Pr(t);let r=n.call(t,e);r||(e=Oe(e),r=n.call(t,e)),o&&o.call(t,e);const a=t.delete(e);return r&&qt(t,"delete",e,void 0),a}function Ri(){const e=Oe(this),t=e.size!==0,n=e.clear();return t&&qt(e,"clear",void 0,void 0),n}function Do(e,t){return function(o,r){const a=this,i=a.__v_raw,c=Oe(i),s=t?Ua:e?Ja:lo;return!e&&ct(c,"iterate",fn),i.forEach((l,u)=>o.call(r,s(l),s(u),a))}}function Ro(e,t,n){return function(...o){const r=this.__v_raw,a=Oe(r),i=In(a),c=e==="entries"||e===Symbol.iterator&&i,s=e==="keys"&&i,l=r[e](...o),u=n?Ua:t?Ja:lo;return!t&&ct(a,"iterate",s?ca:fn),{next(){const{value:m,done:d}=l.next();return d?{value:m,done:d}:{value:c?[u(m[0]),u(m[1])]:u(m),done:d}},[Symbol.iterator](){return this}}}}function Nt(e){return function(...t){return e==="delete"?!1:this}}function nd(){const e={get(a){return To(this,a)},get size(){return Lo(this)},has:Io,add:Ii,set:Li,delete:Di,clear:Ri,forEach:Do(!1,!1)},t={get(a){return To(this,a,!1,!0)},get size(){return Lo(this)},has:Io,add:Ii,set:Li,delete:Di,clear:Ri,forEach:Do(!1,!0)},n={get(a){return To(this,a,!0)},get size(){return Lo(this,!0)},has(a){return Io.call(this,a,!0)},add:Nt("add"),set:Nt("set"),delete:Nt("delete"),clear:Nt("clear"),forEach:Do(!0,!1)},o={get(a){return To(this,a,!0,!0)},get size(){return Lo(this,!0)},has(a){return Io.call(this,a,!0)},add:Nt("add"),set:Nt("set"),delete:Nt("delete"),clear:Nt("clear"),forEach:Do(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{e[a]=Ro(a,!1,!1),n[a]=Ro(a,!0,!1),t[a]=Ro(a,!1,!0),o[a]=Ro(a,!0,!0)}),[e,n,t,o]}const[od,rd,ad,id]=nd();function Wa(e,t){const n=t?e?id:ad:e?rd:od;return(o,r,a)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(ye(n,r)&&r in o?n:o,r,a)}const cd={get:Wa(!1,!1)},sd={get:Wa(!1,!0)},ld={get:Wa(!0,!1)},ul=new WeakMap,ml=new WeakMap,dl=new WeakMap,ud=new WeakMap;function md(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function dd(e){return e.__v_skip||!Object.isExtensible(e)?0:md(Cm(e))}function Vn(e){return xn(e)?e:Ya(e,!1,ll,cd,ul)}function fd(e){return Ya(e,!1,td,sd,ml)}function Ka(e){return Ya(e,!0,ed,ld,dl)}function Ya(e,t,n,o,r){if(!Ve(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=r.get(e);if(a)return a;const i=dd(e);if(i===0)return e;const c=new Proxy(e,i===2?o:n);return r.set(e,c),c}function Ln(e){return xn(e)?Ln(e.__v_raw):!!(e&&e.__v_isReactive)}function xn(e){return!!(e&&e.__v_isReadonly)}function Xo(e){return!!(e&&e.__v_isShallow)}function fl(e){return Ln(e)||xn(e)}function Oe(e){const t=e&&e.__v_raw;return t?Oe(t):e}function hl(e){return Zo(e,"__v_skip",!0),e}const lo=e=>Ve(e)?Vn(e):e,Ja=e=>Ve(e)?Ka(e):e;function pl(e){Yt&&ht&&(e=Oe(e),il(e.dep||(e.dep=Fa())))}function _l(e,t){e=Oe(e),e.dep&&sa(e.dep)}function ze(e){return!!(e&&e.__v_isRef===!0)}function De(e){return gl(e,!1)}function vl(e){return gl(e,!0)}function gl(e,t){return ze(e)?e:new hd(e,t)}class hd{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Oe(t),this._value=n?t:lo(t)}get value(){return pl(this),this._value}set value(t){const n=this.__v_isShallow||Xo(t)||xn(t);t=n?t:Oe(t),so(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:lo(t),_l(this))}}function F(e){return ze(e)?e.value:e}const pd={get:(e,t,n)=>F(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return ze(r)&&!ze(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function bl(e){return Ln(e)?e:new Proxy(e,pd)}function Qa(e){const t=ce(e)?new Array(e.length):{};for(const n in e)t[n]=vd(e,n);return t}class _d{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}}function vd(e,t,n){const o=e[t];return ze(o)?o:new _d(e,t,n)}var yl;class gd{constructor(t,n,o,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[yl]=!1,this._dirty=!0,this.effect=new Ba(t,()=>{this._dirty||(this._dirty=!0,_l(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=o}get value(){const t=Oe(this);return pl(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}yl="__v_isReadonly";function bd(e,t,n=!1){let o,r;const a=he(e);return a?(o=e,r=_t):(o=e.get,r=e.set),new gd(o,r,a||!r,n)}function Jt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(a){Eo(a,t,n)}return r}function ut(e,t,n,o){if(he(e)){const a=Jt(e,t,n,o);return a&&Xs(a)&&a.catch(i=>{Eo(i,t,n)}),a}const r=[];for(let a=0;a>>1;uo(Qe[o])Ot&&Qe.splice(t,1)}function Od(e){ce(e)?Dn.push(...e):(!xt||!xt.includes(e,e.allowRecurse?ln+1:ln))&&Dn.push(e),wl()}function ki(e,t=Ot){for(;tuo(n)-uo(o)),ln=0;lne.id==null?1/0:e.id,Pd=(e,t)=>{const n=uo(e)-uo(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Ol(e){la=!1,er=!0,Qe.sort(Pd);const t=_t;try{for(Ot=0;Otf.trim())),m&&(r=n.map(nl))}let c,s=o[c=Hr(t)]||o[c=Hr(Tt(t))];!s&&a&&(s=o[c=Hr(_n(t))]),s&&ut(s,e,6,r);const l=o[c+"Once"];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,ut(l,e,6,r)}}function Pl(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(r!==void 0)return r;const a=e.emits;let i={},c=!1;if(!he(e)){const s=l=>{const u=Pl(l,t,!0);u&&(c=!0,Ye(i,u))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!a&&!c?(Ve(e)&&o.set(e,null),null):(ce(a)?a.forEach(s=>i[s]=null):Ye(i,a),Ve(e)&&o.set(e,i),i)}function Ar(e,t){return!e||!yo(t)?!1:(t=t.slice(2).replace(/Once$/,""),ye(e,t[0].toLowerCase()+t.slice(1))||ye(e,_n(t))||ye(e,t))}let Ge=null,Sl=null;function nr(e){const t=Ge;return Ge=e,Sl=e&&e.type.__scopeId||null,t}function Ke(e,t=Ge,n){if(!t||e._n)return e;const o=(...r)=>{o._d&&Bi(-1);const a=nr(t),i=e(...r);return nr(a),o._d&&Bi(1),i};return o._n=!0,o._c=!0,o._d=!0,o}function qr(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:a,propsOptions:[i],slots:c,attrs:s,emit:l,render:u,renderCache:m,data:d,setupState:f,ctx:v,inheritAttrs:g}=e;let b,_;const y=nr(e);try{if(n.shapeFlag&4){const A=r||o;b=ft(u.call(A,A,m,a,f,d,v)),_=s}else{const A=t;b=ft(A.length>1?A(a,{attrs:s,slots:c,emit:l}):A(a,null)),_=t.props?s:Ad(s)}}catch(A){no.length=0,Eo(A,e,1),b=ie(it)}let S=b;if(_&&g!==!1){const A=Object.keys(_),{shapeFlag:D}=S;A.length&&D&7&&(i&&A.some($a)&&(_=Td(_,i)),S=Gt(S,_))}return n.dirs&&(S=Gt(S),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&(S.transition=n.transition),b=S,nr(y),b}const Ad=e=>{let t;for(const n in e)(n==="class"||n==="style"||yo(n))&&((t||(t={}))[n]=e[n]);return t},Td=(e,t)=>{const n={};for(const o in e)(!$a(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Id(e,t,n){const{props:o,children:r,component:a}=e,{props:i,children:c,patchFlag:s}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&s>=0){if(s&1024)return!0;if(s&16)return o?xi(o,i,l):!!i;if(s&8){const u=t.dynamicProps;for(let m=0;me.__isSuspense;function Al(e,t){t&&t.pendingBranch?ce(e)?t.effects.push(...e):t.effects.push(e):Od(e)}function hn(e,t){if(Be){let n=Be.provides;const o=Be.parent&&Be.parent.provides;o===n&&(n=Be.provides=Object.create(o)),n[e]=t}}function We(e,t,n=!1){const o=Be||Ge;if(o){const r=o.parent==null?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&he(t)?t.call(o.proxy):t}}const Ci={};function ot(e,t,n){return Tl(e,t,n)}function Tl(e,t,{immediate:n,deep:o,flush:r,onTrack:a,onTrigger:i}=Ce){const c=Be;let s,l=!1,u=!1;if(ze(e)?(s=()=>e.value,l=Xo(e)):Ln(e)?(s=()=>e,o=!0):ce(e)?(u=!0,l=e.some(_=>Ln(_)||Xo(_)),s=()=>e.map(_=>{if(ze(_))return _.value;if(Ln(_))return dn(_);if(he(_))return Jt(_,c,2)})):he(e)?t?s=()=>Jt(e,c,2):s=()=>{if(!(c&&c.isUnmounted))return m&&m(),ut(e,c,3,[d])}:s=_t,t&&o){const _=s;s=()=>dn(_())}let m,d=_=>{m=b.onStop=()=>{Jt(_,c,4)}};if(Mn)return d=_t,t?n&&ut(t,c,3,[s(),u?[]:void 0,d]):s(),_t;let f=u?[]:Ci;const v=()=>{if(!!b.active)if(t){const _=b.run();(o||l||(u?_.some((y,S)=>so(y,f[S])):so(_,f)))&&(m&&m(),ut(t,c,3,[_,f===Ci?void 0:f,d]),f=_)}else b.run()};v.allowRecurse=!!t;let g;r==="sync"?g=v:r==="post"?g=()=>tt(v,c&&c.suspense):(v.pre=!0,c&&(v.id=c.uid),g=()=>Sr(v));const b=new Ba(s,g);return t?n?v():f=b.run():r==="post"?tt(b.run.bind(b),c&&c.suspense):b.run(),()=>{b.stop(),c&&c.scope&&qa(c.scope.effects,b)}}function Rd(e,t,n){const o=this.proxy,r=Le(e)?e.includes(".")?Il(o,e):()=>o[e]:e.bind(o,o);let a;he(t)?a=t:(a=t.handler,n=t);const i=Be;Cn(this);const c=Tl(r,a.bind(o),n);return i?Cn(i):pn(),c}function Il(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;r{dn(n,t)});else if(tl(e))for(const n in e)dn(e[n],t);return e}function kd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return et(()=>{e.isMounted=!0}),Ir(()=>{e.isUnmounting=!0}),e}const st=[Function,Array],xd={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:st,onEnter:st,onAfterEnter:st,onEnterCancelled:st,onBeforeLeave:st,onLeave:st,onAfterLeave:st,onLeaveCancelled:st,onBeforeAppear:st,onAppear:st,onAfterAppear:st,onAppearCancelled:st},setup(e,{slots:t}){const n=ni(),o=kd();let r;return()=>{const a=t.default&&Rl(t.default(),!0);if(!a||!a.length)return;let i=a[0];if(a.length>1){for(const g of a)if(g.type!==it){i=g;break}}const c=Oe(e),{mode:s}=c;if(o.isLeaving)return Vr(i);const l=Mi(i);if(!l)return Vr(i);const u=ua(l,c,o,n);ma(l,u);const m=n.subTree,d=m&&Mi(m);let f=!1;const{getTransitionKey:v}=l.type;if(v){const g=v();r===void 0?r=g:g!==r&&(r=g,f=!0)}if(d&&d.type!==it&&(!un(l,d)||f)){const g=ua(d,c,o,n);if(ma(d,g),s==="out-in")return o.isLeaving=!0,g.afterLeave=()=>{o.isLeaving=!1,n.update()},Vr(i);s==="in-out"&&l.type!==it&&(g.delayLeave=(b,_,y)=>{const S=Dl(o,d);S[String(d.key)]=d,b._leaveCb=()=>{_(),b._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=y})}return i}}},Ll=xd;function Dl(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function ua(e,t,n,o){const{appear:r,mode:a,persisted:i=!1,onBeforeEnter:c,onEnter:s,onAfterEnter:l,onEnterCancelled:u,onBeforeLeave:m,onLeave:d,onAfterLeave:f,onLeaveCancelled:v,onBeforeAppear:g,onAppear:b,onAfterAppear:_,onAppearCancelled:y}=t,S=String(e.key),A=Dl(n,e),D=(E,U)=>{E&&ut(E,o,9,U)},K=(E,U)=>{const Y=U[1];D(E,U),ce(E)?E.every(H=>H.length<=1)&&Y():E.length<=1&&Y()},R={mode:a,persisted:i,beforeEnter(E){let U=c;if(!n.isMounted)if(r)U=g||c;else return;E._leaveCb&&E._leaveCb(!0);const Y=A[S];Y&&un(e,Y)&&Y.el._leaveCb&&Y.el._leaveCb(),D(U,[E])},enter(E){let U=s,Y=l,H=u;if(!n.isMounted)if(r)U=b||s,Y=_||l,H=y||u;else return;let P=!1;const T=E._enterCb=k=>{P||(P=!0,k?D(H,[E]):D(Y,[E]),R.delayedLeave&&R.delayedLeave(),E._enterCb=void 0)};U?K(U,[E,T]):T()},leave(E,U){const Y=String(e.key);if(E._enterCb&&E._enterCb(!0),n.isUnmounting)return U();D(m,[E]);let H=!1;const P=E._leaveCb=T=>{H||(H=!0,U(),T?D(v,[E]):D(f,[E]),E._leaveCb=void 0,A[Y]===e&&delete A[Y])};A[Y]=e,d?K(d,[E,P]):P()},clone(E){return ua(E,t,n,o)}};return R}function Vr(e){if(Oo(e))return e=Gt(e),e.children=null,e}function Mi(e){return Oo(e)?e.children?e.children[0]:void 0:e}function ma(e,t){e.shapeFlag&6&&e.component?ma(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Rl(e,t=!1,n){let o=[],r=0;for(let a=0;a1)for(let a=0;a!!e.type.__asyncLoader;function L(e){he(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:a,suspensible:i=!0,onError:c}=e;let s=null,l,u=0;const m=()=>(u++,s=null,d()),d=()=>{let f;return s||(f=s=t().catch(v=>{if(v=v instanceof Error?v:new Error(String(v)),c)return new Promise((g,b)=>{c(v,()=>g(m()),()=>b(v),u+1)});throw v}).then(v=>f!==s&&s?s:(v&&(v.__esModule||v[Symbol.toStringTag]==="Module")&&(v=v.default),l=v,v)))};return je({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return l},setup(){const f=Be;if(l)return()=>Nr(l,f);const v=y=>{s=null,Eo(y,f,13,!o)};if(i&&f.suspense||Mn)return d().then(y=>()=>Nr(y,f)).catch(y=>(v(y),()=>o?ie(o,{error:y}):null));const g=De(!1),b=De(),_=De(!!r);return r&&setTimeout(()=>{_.value=!1},r),a!=null&&setTimeout(()=>{if(!g.value&&!b.value){const y=new Error(`Async component timed out after ${a}ms.`);v(y),b.value=y}},a),d().then(()=>{g.value=!0,f.parent&&Oo(f.parent.vnode)&&Sr(f.parent.update)}).catch(y=>{v(y),b.value=y}),()=>{if(g.value&&l)return Nr(l,f);if(b.value&&o)return ie(o,{error:b.value});if(n&&!_.value)return ie(n)}}})}function Nr(e,{vnode:{ref:t,props:n,children:o,shapeFlag:r},parent:a}){const i=ie(e,n,o);return i.ref=t,i}const Oo=e=>e.type.__isKeepAlive;function Cd(e,t){kl(e,"a",t)}function Md(e,t){kl(e,"da",t)}function kl(e,t,n=Be){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Tr(t,o,n),n){let r=n.parent;for(;r&&r.parent;)Oo(r.parent.vnode)&&jd(o,t,n,r),r=r.parent}}function jd(e,t,n,o){const r=Tr(t,e,o,!0);Lr(()=>{qa(o[t],r)},n)}function Tr(e,t,n=Be,o=!1){if(n){const r=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;$n(),Cn(n);const c=ut(t,n,e,i);return pn(),qn(),c});return o?r.unshift(a):r.push(a),a}}const Vt=e=>(t,n=Be)=>(!Mn||e==="sp")&&Tr(e,t,n),Za=Vt("bm"),et=Vt("m"),Hd=Vt("bu"),$d=Vt("u"),Ir=Vt("bum"),Lr=Vt("um"),qd=Vt("sp"),Vd=Vt("rtg"),Nd=Vt("rtc");function Fd(e,t=Be){Tr("ec",e,t)}function or(e,t){const n=Ge;if(n===null)return e;const o=Rr(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let a=0;at(i,c,void 0,a&&a[c]));else{const i=Object.keys(e);r=new Array(i.length);for(let c=0,s=i.length;ccr(t)?!(t.type===it||t.type===Ae&&!Ml(t.children)):!0)?e:null}const da=e=>e?Kl(e)?Rr(e)||e.proxy:da(e.parent):null,rr=Ye(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>da(e.parent),$root:e=>da(e.root),$emit:e=>e.emit,$options:e=>Hl(e),$forceUpdate:e=>e.f||(e.f=()=>Sr(e.update)),$nextTick:e=>e.n||(e.n=wo.bind(e.proxy)),$watch:e=>Rd.bind(e)}),zd={get({_:e},t){const{ctx:n,setupState:o,data:r,props:a,accessCache:i,type:c,appContext:s}=e;let l;if(t[0]!=="$"){const f=i[t];if(f!==void 0)switch(f){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return a[t]}else{if(o!==Ce&&ye(o,t))return i[t]=1,o[t];if(r!==Ce&&ye(r,t))return i[t]=2,r[t];if((l=e.propsOptions[0])&&ye(l,t))return i[t]=3,a[t];if(n!==Ce&&ye(n,t))return i[t]=4,n[t];fa&&(i[t]=0)}}const u=rr[t];let m,d;if(u)return t==="$attrs"&&ct(e,"get",t),u(e);if((m=c.__cssModules)&&(m=m[t]))return m;if(n!==Ce&&ye(n,t))return i[t]=4,n[t];if(d=s.config.globalProperties,ye(d,t))return d[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:a}=e;return r!==Ce&&ye(r,t)?(r[t]=n,!0):o!==Ce&&ye(o,t)?(o[t]=n,!0):ye(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:a}},i){let c;return!!n[i]||e!==Ce&&ye(e,i)||t!==Ce&&ye(t,i)||(c=a[0])&&ye(c,i)||ye(o,i)||ye(rr,i)||ye(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ye(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let fa=!0;function Ud(e){const t=Hl(e),n=e.proxy,o=e.ctx;fa=!1,t.beforeCreate&&Hi(t.beforeCreate,e,"bc");const{data:r,computed:a,methods:i,watch:c,provide:s,inject:l,created:u,beforeMount:m,mounted:d,beforeUpdate:f,updated:v,activated:g,deactivated:b,beforeDestroy:_,beforeUnmount:y,destroyed:S,unmounted:A,render:D,renderTracked:K,renderTriggered:R,errorCaptured:E,serverPrefetch:U,expose:Y,inheritAttrs:H,components:P,directives:T,filters:k}=t;if(l&&Wd(l,o,null,e.appContext.config.unwrapInjectedRef),i)for(const W in i){const ee=i[W];he(ee)&&(o[W]=ee.bind(n))}if(r){const W=r.call(n,n);Ve(W)&&(e.data=Vn(W))}if(fa=!0,a)for(const W in a){const ee=a[W],me=he(ee)?ee.bind(n,n):he(ee.get)?ee.get.bind(n,n):_t,de=!he(ee)&&he(ee.set)?ee.set.bind(n):_t,ve=te({get:me,set:de});Object.defineProperty(o,W,{enumerable:!0,configurable:!0,get:()=>ve.value,set:Se=>ve.value=Se})}if(c)for(const W in c)jl(c[W],o,n,W);if(s){const W=he(s)?s.call(n):s;Reflect.ownKeys(W).forEach(ee=>{hn(ee,W[ee])})}u&&Hi(u,e,"c");function j(W,ee){ce(ee)?ee.forEach(me=>W(me.bind(n))):ee&&W(ee.bind(n))}if(j(Za,m),j(et,d),j(Hd,f),j($d,v),j(Cd,g),j(Md,b),j(Fd,E),j(Nd,K),j(Vd,R),j(Ir,y),j(Lr,A),j(qd,U),ce(Y))if(Y.length){const W=e.exposed||(e.exposed={});Y.forEach(ee=>{Object.defineProperty(W,ee,{get:()=>n[ee],set:me=>n[ee]=me})})}else e.exposed||(e.exposed={});D&&e.render===_t&&(e.render=D),H!=null&&(e.inheritAttrs=H),P&&(e.components=P),T&&(e.directives=T)}function Wd(e,t,n=_t,o=!1){ce(e)&&(e=ha(e));for(const r in e){const a=e[r];let i;Ve(a)?"default"in a?i=We(a.from||r,a.default,!0):i=We(a.from||r):i=We(a),ze(i)&&o?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:c=>i.value=c}):t[r]=i}}function Hi(e,t,n){ut(ce(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function jl(e,t,n,o){const r=o.includes(".")?Il(n,o):()=>n[o];if(Le(e)){const a=t[e];he(a)&&ot(r,a)}else if(he(e))ot(r,e.bind(n));else if(Ve(e))if(ce(e))e.forEach(a=>jl(a,t,n,o));else{const a=he(e.handler)?e.handler.bind(n):t[e.handler];he(a)&&ot(r,a,e)}}function Hl(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:a,config:{optionMergeStrategies:i}}=e.appContext,c=a.get(t);let s;return c?s=c:!r.length&&!n&&!o?s=t:(s={},r.length&&r.forEach(l=>ar(s,l,i,!0)),ar(s,t,i)),Ve(t)&&a.set(t,s),s}function ar(e,t,n,o=!1){const{mixins:r,extends:a}=t;a&&ar(e,a,n,!0),r&&r.forEach(i=>ar(e,i,n,!0));for(const i in t)if(!(o&&i==="expose")){const c=Kd[i]||n&&n[i];e[i]=c?c(e[i],t[i]):t[i]}return e}const Kd={data:$i,props:an,emits:an,methods:an,computed:an,beforeCreate:Ze,created:Ze,beforeMount:Ze,mounted:Ze,beforeUpdate:Ze,updated:Ze,beforeDestroy:Ze,beforeUnmount:Ze,destroyed:Ze,unmounted:Ze,activated:Ze,deactivated:Ze,errorCaptured:Ze,serverPrefetch:Ze,components:an,directives:an,watch:Jd,provide:$i,inject:Yd};function $i(e,t){return t?e?function(){return Ye(he(e)?e.call(this,this):e,he(t)?t.call(this,this):t)}:t:e}function Yd(e,t){return an(ha(e),ha(t))}function ha(e){if(ce(e)){const t={};for(let n=0;n0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let m=0;m{s=!0;const[d,f]=ql(m,t,!0);Ye(i,d),f&&c.push(...f)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!a&&!s)return Ve(e)&&o.set(e,Tn),Tn;if(ce(a))for(let u=0;u-1,f[1]=g<0||v-1||ye(f,"default"))&&c.push(m)}}}const l=[i,c];return Ve(e)&&o.set(e,l),l}function qi(e){return e[0]!=="$"}function Vi(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function Ni(e,t){return Vi(e)===Vi(t)}function Fi(e,t){return ce(t)?t.findIndex(n=>Ni(n,e)):he(t)&&Ni(t,e)?0:-1}const Vl=e=>e[0]==="_"||e==="$stable",ei=e=>ce(e)?e.map(ft):[ft(e)],Zd=(e,t,n)=>{if(t._n)return t;const o=Ke((...r)=>ei(t(...r)),n);return o._c=!1,o},Nl=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Vl(r))continue;const a=e[r];if(he(a))t[r]=Zd(r,a,o);else if(a!=null){const i=ei(a);t[r]=()=>i}}},Fl=(e,t)=>{const n=ei(t);e.slots.default=()=>n},Xd=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Oe(t),Zo(t,"_",n)):Nl(t,e.slots={})}else e.slots={},t&&Fl(e,t);Zo(e.slots,Dr,1)},ef=(e,t,n)=>{const{vnode:o,slots:r}=e;let a=!0,i=Ce;if(o.shapeFlag&32){const c=t._;c?n&&c===1?a=!1:(Ye(r,t),!n&&c===1&&delete r._):(a=!t.$stable,Nl(t,r)),i=t}else t&&(Fl(e,t),i={default:1});if(a)for(const c in r)!Vl(c)&&!(c in i)&&delete r[c]};function Bl(){return{app:null,config:{isNativeTag:Rm,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let tf=0;function nf(e,t){return function(o,r=null){he(o)||(o=Object.assign({},o)),r!=null&&!Ve(r)&&(r=null);const a=Bl(),i=new Set;let c=!1;const s=a.app={_uid:tf++,_component:o,_props:r,_container:null,_context:a,_instance:null,version:wf,get config(){return a.config},set config(l){},use(l,...u){return i.has(l)||(l&&he(l.install)?(i.add(l),l.install(s,...u)):he(l)&&(i.add(l),l(s,...u))),s},mixin(l){return a.mixins.includes(l)||a.mixins.push(l),s},component(l,u){return u?(a.components[l]=u,s):a.components[l]},directive(l,u){return u?(a.directives[l]=u,s):a.directives[l]},mount(l,u,m){if(!c){const d=ie(o,r);return d.appContext=a,u&&t?t(d,l):e(d,l,m),c=!0,s._container=l,l.__vue_app__=s,Rr(d.component)||d.component.proxy}},unmount(){c&&(e(null,s._container),delete s._container.__vue_app__)},provide(l,u){return a.provides[l]=u,s}};return s}}function ir(e,t,n,o,r=!1){if(ce(e)){e.forEach((d,f)=>ir(d,t&&(ce(t)?t[f]:t),n,o,r));return}if(Rn(o)&&!r)return;const a=o.shapeFlag&4?Rr(o.component)||o.component.proxy:o.el,i=r?null:a,{i:c,r:s}=e,l=t&&t.r,u=c.refs===Ce?c.refs={}:c.refs,m=c.setupState;if(l!=null&&l!==s&&(Le(l)?(u[l]=null,ye(m,l)&&(m[l]=null)):ze(l)&&(l.value=null)),he(s))Jt(s,c,12,[i,u]);else{const d=Le(s),f=ze(s);if(d||f){const v=()=>{if(e.f){const g=d?u[s]:s.value;r?ce(g)&&qa(g,a):ce(g)?g.includes(a)||g.push(a):d?(u[s]=[a],ye(m,s)&&(m[s]=u[s])):(s.value=[a],e.k&&(u[e.k]=s.value))}else d?(u[s]=i,ye(m,s)&&(m[s]=i)):f&&(s.value=i,e.k&&(u[e.k]=i))};i?(v.id=-1,tt(v,n)):v()}}}let Ft=!1;const ko=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",xo=e=>e.nodeType===8;function of(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:a,parentNode:i,remove:c,insert:s,createComment:l}}=e,u=(_,y)=>{if(!y.hasChildNodes()){n(null,_,y),tr(),y._vnode=_;return}Ft=!1,m(y.firstChild,_,null,null,null),tr(),y._vnode=_,Ft&&console.error("Hydration completed but contains mismatches.")},m=(_,y,S,A,D,K=!1)=>{const R=xo(_)&&_.data==="[",E=()=>g(_,y,S,A,D,R),{type:U,ref:Y,shapeFlag:H,patchFlag:P}=y,T=_.nodeType;y.el=_,P===-2&&(K=!1,y.dynamicChildren=null);let k=null;switch(U){case mo:T!==3?y.children===""?(s(y.el=r(""),i(_),_),k=_):k=E():(_.data!==y.children&&(Ft=!0,_.data=y.children),k=a(_));break;case it:T!==8||R?k=E():k=a(_);break;case to:if(T!==1&&T!==3)k=E();else{k=_;const M=!y.children.length;for(let j=0;j{K=K||!!y.dynamicChildren;const{type:R,props:E,patchFlag:U,shapeFlag:Y,dirs:H}=y,P=R==="input"&&H||R==="option";if(P||U!==-1){if(H&&yt(y,null,S,"created"),E)if(P||!K||U&48)for(const k in E)(P&&k.endsWith("value")||yo(k)&&!eo(k))&&o(_,k,null,E[k],!1,void 0,S);else E.onClick&&o(_,"onClick",null,E.onClick,!1,void 0,S);let T;if((T=E&&E.onVnodeBeforeMount)&<(T,S,y),H&&yt(y,null,S,"beforeMount"),((T=E&&E.onVnodeMounted)||H)&&Al(()=>{T&<(T,S,y),H&&yt(y,null,S,"mounted")},A),Y&16&&!(E&&(E.innerHTML||E.textContent))){let k=f(_.firstChild,y,_,S,A,D,K);for(;k;){Ft=!0;const M=k;k=k.nextSibling,c(M)}}else Y&8&&_.textContent!==y.children&&(Ft=!0,_.textContent=y.children)}return _.nextSibling},f=(_,y,S,A,D,K,R)=>{R=R||!!y.dynamicChildren;const E=y.children,U=E.length;for(let Y=0;Y{const{slotScopeIds:R}=y;R&&(D=D?D.concat(R):R);const E=i(_),U=f(a(_),y,E,S,A,D,K);return U&&xo(U)&&U.data==="]"?a(y.anchor=U):(Ft=!0,s(y.anchor=l("]"),E,U),U)},g=(_,y,S,A,D,K)=>{if(Ft=!0,y.el=null,K){const U=b(_);for(;;){const Y=a(_);if(Y&&Y!==U)c(Y);else break}}const R=a(_),E=i(_);return c(_),n(null,y,E,R,S,A,ko(E),D),R},b=_=>{let y=0;for(;_;)if(_=a(_),_&&xo(_)&&(_.data==="["&&y++,_.data==="]")){if(y===0)return a(_);y--}return _};return[u,m]}const tt=Al;function rf(e){return af(e,of)}function af(e,t){const n=Hm();n.__VUE__=!0;const{insert:o,remove:r,patchProp:a,createElement:i,createText:c,createComment:s,setText:l,setElementText:u,parentNode:m,nextSibling:d,setScopeId:f=_t,cloneNode:v,insertStaticContent:g}=e,b=(p,w,I,C=null,$=null,q=null,J=!1,z=null,Q=!!w.dynamicChildren)=>{if(p===w)return;p&&!un(p,w)&&(C=G(p),Re(p,$,q,!0),p=null),w.patchFlag===-2&&(Q=!1,w.dynamicChildren=null);const{type:B,ref:re,shapeFlag:oe}=w;switch(B){case mo:_(p,w,I,C);break;case it:y(p,w,I,C);break;case to:p==null&&S(w,I,C,J);break;case Ae:T(p,w,I,C,$,q,J,z,Q);break;default:oe&1?K(p,w,I,C,$,q,J,z,Q):oe&6?k(p,w,I,C,$,q,J,z,Q):(oe&64||oe&128)&&B.process(p,w,I,C,$,q,J,z,Q,be)}re!=null&&$&&ir(re,p&&p.ref,q,w||p,!w)},_=(p,w,I,C)=>{if(p==null)o(w.el=c(w.children),I,C);else{const $=w.el=p.el;w.children!==p.children&&l($,w.children)}},y=(p,w,I,C)=>{p==null?o(w.el=s(w.children||""),I,C):w.el=p.el},S=(p,w,I,C)=>{[p.el,p.anchor]=g(p.children,w,I,C,p.el,p.anchor)},A=({el:p,anchor:w},I,C)=>{let $;for(;p&&p!==w;)$=d(p),o(p,I,C),p=$;o(w,I,C)},D=({el:p,anchor:w})=>{let I;for(;p&&p!==w;)I=d(p),r(p),p=I;r(w)},K=(p,w,I,C,$,q,J,z,Q)=>{J=J||w.type==="svg",p==null?R(w,I,C,$,q,J,z,Q):Y(p,w,$,q,J,z,Q)},R=(p,w,I,C,$,q,J,z)=>{let Q,B;const{type:re,props:oe,shapeFlag:ne,transition:se,patchFlag:_e,dirs:ke}=p;if(p.el&&v!==void 0&&_e===-1)Q=p.el=v(p.el);else{if(Q=p.el=i(p.type,q,oe&&oe.is,oe),ne&8?u(Q,p.children):ne&16&&U(p.children,Q,null,C,$,q&&re!=="foreignObject",J,z),ke&&yt(p,null,C,"created"),oe){for(const qe in oe)qe!=="value"&&!eo(qe)&&a(Q,qe,null,oe[qe],q,p.children,C,$,N);"value"in oe&&a(Q,"value",null,oe.value),(B=oe.onVnodeBeforeMount)&<(B,C,p)}E(Q,p,p.scopeId,J,C)}ke&&yt(p,null,C,"beforeMount");const xe=(!$||$&&!$.pendingBranch)&&se&&!se.persisted;xe&&se.beforeEnter(Q),o(Q,w,I),((B=oe&&oe.onVnodeMounted)||xe||ke)&&tt(()=>{B&<(B,C,p),xe&&se.enter(Q),ke&&yt(p,null,C,"mounted")},$)},E=(p,w,I,C,$)=>{if(I&&f(p,I),C)for(let q=0;q{for(let B=Q;B{const z=w.el=p.el;let{patchFlag:Q,dynamicChildren:B,dirs:re}=w;Q|=p.patchFlag&16;const oe=p.props||Ce,ne=w.props||Ce;let se;I&&en(I,!1),(se=ne.onVnodeBeforeUpdate)&<(se,I,w,p),re&&yt(w,p,I,"beforeUpdate"),I&&en(I,!0);const _e=$&&w.type!=="foreignObject";if(B?H(p.dynamicChildren,B,z,I,C,_e,q):J||me(p,w,z,null,I,C,_e,q,!1),Q>0){if(Q&16)P(z,w,oe,ne,I,C,$);else if(Q&2&&oe.class!==ne.class&&a(z,"class",null,ne.class,$),Q&4&&a(z,"style",oe.style,ne.style,$),Q&8){const ke=w.dynamicProps;for(let xe=0;xe{se&<(se,I,w,p),re&&yt(w,p,I,"updated")},C)},H=(p,w,I,C,$,q,J)=>{for(let z=0;z{if(I!==C){for(const z in C){if(eo(z))continue;const Q=C[z],B=I[z];Q!==B&&z!=="value"&&a(p,z,B,Q,J,w.children,$,q,N)}if(I!==Ce)for(const z in I)!eo(z)&&!(z in C)&&a(p,z,I[z],null,J,w.children,$,q,N);"value"in C&&a(p,"value",I.value,C.value)}},T=(p,w,I,C,$,q,J,z,Q)=>{const B=w.el=p?p.el:c(""),re=w.anchor=p?p.anchor:c("");let{patchFlag:oe,dynamicChildren:ne,slotScopeIds:se}=w;se&&(z=z?z.concat(se):se),p==null?(o(B,I,C),o(re,I,C),U(w.children,I,re,$,q,J,z,Q)):oe>0&&oe&64&&ne&&p.dynamicChildren?(H(p.dynamicChildren,ne,I,$,q,J,z),(w.key!=null||$&&w===$.subTree)&&zl(p,w,!0)):me(p,w,I,re,$,q,J,z,Q)},k=(p,w,I,C,$,q,J,z,Q)=>{w.slotScopeIds=z,p==null?w.shapeFlag&512?$.ctx.activate(w,I,C,J,Q):M(w,I,C,$,q,J,Q):j(p,w,Q)},M=(p,w,I,C,$,q,J)=>{const z=p.component=pf(p,C,$);if(Oo(p)&&(z.ctx.renderer=be),_f(z),z.asyncDep){if($&&$.registerDep(z,W),!p.el){const Q=z.subTree=ie(it);y(null,Q,w,I)}return}W(z,p,w,I,$,q,J)},j=(p,w,I)=>{const C=w.component=p.component;if(Id(p,w,I))if(C.asyncDep&&!C.asyncResolved){ee(C,w,I);return}else C.next=w,wd(C.update),C.update();else w.el=p.el,C.vnode=w},W=(p,w,I,C,$,q,J)=>{const z=()=>{if(p.isMounted){let{next:re,bu:oe,u:ne,parent:se,vnode:_e}=p,ke=re,xe;en(p,!1),re?(re.el=_e.el,ee(p,re,J)):re=_e,oe&&$r(oe),(xe=re.props&&re.props.onVnodeBeforeUpdate)&<(xe,se,re,_e),en(p,!0);const qe=qr(p),dt=p.subTree;p.subTree=qe,b(dt,qe,m(dt.el),G(dt),p,$,q),re.el=qe.el,ke===null&&Ld(p,qe.el),ne&&tt(ne,$),(xe=re.props&&re.props.onVnodeUpdated)&&tt(()=>lt(xe,se,re,_e),$)}else{let re;const{el:oe,props:ne}=w,{bm:se,m:_e,parent:ke}=p,xe=Rn(w);if(en(p,!1),se&&$r(se),!xe&&(re=ne&&ne.onVnodeBeforeMount)&<(re,ke,w),en(p,!0),oe&&le){const qe=()=>{p.subTree=qr(p),le(oe,p.subTree,p,$,null)};xe?w.type.__asyncLoader().then(()=>!p.isUnmounted&&qe()):qe()}else{const qe=p.subTree=qr(p);b(null,qe,I,C,p,$,q),w.el=qe.el}if(_e&&tt(_e,$),!xe&&(re=ne&&ne.onVnodeMounted)){const qe=w;tt(()=>lt(re,ke,qe),$)}(w.shapeFlag&256||ke&&Rn(ke.vnode)&&ke.vnode.shapeFlag&256)&&p.a&&tt(p.a,$),p.isMounted=!0,w=I=C=null}},Q=p.effect=new Ba(z,()=>Sr(B),p.scope),B=p.update=()=>Q.run();B.id=p.uid,en(p,!0),B()},ee=(p,w,I)=>{w.component=p;const C=p.vnode.props;p.vnode=w,p.next=null,Gd(p,w.props,C,I),ef(p,w.children,I),$n(),ki(),qn()},me=(p,w,I,C,$,q,J,z,Q=!1)=>{const B=p&&p.children,re=p?p.shapeFlag:0,oe=w.children,{patchFlag:ne,shapeFlag:se}=w;if(ne>0){if(ne&128){ve(B,oe,I,C,$,q,J,z,Q);return}else if(ne&256){de(B,oe,I,C,$,q,J,z,Q);return}}se&8?(re&16&&N(B,$,q),oe!==B&&u(I,oe)):re&16?se&16?ve(B,oe,I,C,$,q,J,z,Q):N(B,$,q,!0):(re&8&&u(I,""),se&16&&U(oe,I,C,$,q,J,z,Q))},de=(p,w,I,C,$,q,J,z,Q)=>{p=p||Tn,w=w||Tn;const B=p.length,re=w.length,oe=Math.min(B,re);let ne;for(ne=0;nere?N(p,$,q,!0,!1,oe):U(w,I,C,$,q,J,z,Q,oe)},ve=(p,w,I,C,$,q,J,z,Q)=>{let B=0;const re=w.length;let oe=p.length-1,ne=re-1;for(;B<=oe&&B<=ne;){const se=p[B],_e=w[B]=Q?Ut(w[B]):ft(w[B]);if(un(se,_e))b(se,_e,I,null,$,q,J,z,Q);else break;B++}for(;B<=oe&&B<=ne;){const se=p[oe],_e=w[ne]=Q?Ut(w[ne]):ft(w[ne]);if(un(se,_e))b(se,_e,I,null,$,q,J,z,Q);else break;oe--,ne--}if(B>oe){if(B<=ne){const se=ne+1,_e=sene)for(;B<=oe;)Re(p[B],$,q,!0),B++;else{const se=B,_e=B,ke=new Map;for(B=_e;B<=ne;B++){const rt=w[B]=Q?Ut(w[B]):ft(w[B]);rt.key!=null&&ke.set(rt.key,B)}let xe,qe=0;const dt=ne-_e+1;let gn=!1,yi=0;const Bn=new Array(dt);for(B=0;B=dt){Re(rt,$,q,!0);continue}let bt;if(rt.key!=null)bt=ke.get(rt.key);else for(xe=_e;xe<=ne;xe++)if(Bn[xe-_e]===0&&un(rt,w[xe])){bt=xe;break}bt===void 0?Re(rt,$,q,!0):(Bn[bt-_e]=B+1,bt>=yi?yi=bt:gn=!0,b(rt,w[bt],I,null,$,q,J,z,Q),qe++)}const Ei=gn?cf(Bn):Tn;for(xe=Ei.length-1,B=dt-1;B>=0;B--){const rt=_e+B,bt=w[rt],wi=rt+1{const{el:q,type:J,transition:z,children:Q,shapeFlag:B}=p;if(B&6){Se(p.component.subTree,w,I,C);return}if(B&128){p.suspense.move(w,I,C);return}if(B&64){J.move(p,w,I,be);return}if(J===Ae){o(q,w,I);for(let oe=0;oez.enter(q),$);else{const{leave:oe,delayLeave:ne,afterLeave:se}=z,_e=()=>o(q,w,I),ke=()=>{oe(q,()=>{_e(),se&&se()})};ne?ne(q,_e,ke):ke()}else o(q,w,I)},Re=(p,w,I,C=!1,$=!1)=>{const{type:q,props:J,ref:z,children:Q,dynamicChildren:B,shapeFlag:re,patchFlag:oe,dirs:ne}=p;if(z!=null&&ir(z,null,I,p,!0),re&256){w.ctx.deactivate(p);return}const se=re&1&&ne,_e=!Rn(p);let ke;if(_e&&(ke=J&&J.onVnodeBeforeUnmount)&<(ke,w,p),re&6)Z(p.component,I,C);else{if(re&128){p.suspense.unmount(I,C);return}se&&yt(p,null,w,"beforeUnmount"),re&64?p.type.remove(p,w,I,$,be,C):B&&(q!==Ae||oe>0&&oe&64)?N(B,w,I,!1,!0):(q===Ae&&oe&384||!$&&re&16)&&N(Q,w,I),C&&Fe(p)}(_e&&(ke=J&&J.onVnodeUnmounted)||se)&&tt(()=>{ke&<(ke,w,p),se&&yt(p,null,w,"unmounted")},I)},Fe=p=>{const{type:w,el:I,anchor:C,transition:$}=p;if(w===Ae){x(I,C);return}if(w===to){D(p);return}const q=()=>{r(I),$&&!$.persisted&&$.afterLeave&&$.afterLeave()};if(p.shapeFlag&1&&$&&!$.persisted){const{leave:J,delayLeave:z}=$,Q=()=>J(I,q);z?z(p.el,q,Q):Q()}else q()},x=(p,w)=>{let I;for(;p!==w;)I=d(p),r(p),p=I;r(w)},Z=(p,w,I)=>{const{bum:C,scope:$,update:q,subTree:J,um:z}=p;C&&$r(C),$.stop(),q&&(q.active=!1,Re(J,p,w,I)),z&&tt(z,w),tt(()=>{p.isUnmounted=!0},w),w&&w.pendingBranch&&!w.isUnmounted&&p.asyncDep&&!p.asyncResolved&&p.suspenseId===w.pendingId&&(w.deps--,w.deps===0&&w.resolve())},N=(p,w,I,C=!1,$=!1,q=0)=>{for(let J=q;Jp.shapeFlag&6?G(p.component.subTree):p.shapeFlag&128?p.suspense.next():d(p.anchor||p.el),pe=(p,w,I)=>{p==null?w._vnode&&Re(w._vnode,null,null,!0):b(w._vnode||null,p,w,null,null,null,I),ki(),tr(),w._vnode=p},be={p:b,um:Re,m:Se,r:Fe,mt:M,mc:U,pc:me,pbc:H,n:G,o:e};let fe,le;return t&&([fe,le]=t(be)),{render:pe,hydrate:fe,createApp:nf(pe,fe)}}function en({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function zl(e,t,n=!1){const o=e.children,r=t.children;if(ce(o)&&ce(r))for(let a=0;a>1,e[n[c]]0&&(t[o]=n[a-1]),n[a]=o)}}for(a=n.length,i=n[a-1];a-- >0;)n[a]=i,i=t[i];return n}const sf=e=>e.__isTeleport,Ae=Symbol(void 0),mo=Symbol(void 0),it=Symbol(void 0),to=Symbol(void 0),no=[];let pt=null;function V(e=!1){no.push(pt=e?null:[])}function lf(){no.pop(),pt=no[no.length-1]||null}let fo=1;function Bi(e){fo+=e}function Ul(e){return e.dynamicChildren=fo>0?pt||Tn:null,lf(),fo>0&&pt&&pt.push(e),e}function X(e,t,n,o,r,a){return Ul(ue(e,t,n,o,r,a,!0))}function $e(e,t,n,o,r){return Ul(ie(e,t,n,o,r,!0))}function cr(e){return e?e.__v_isVNode===!0:!1}function un(e,t){return e.type===t.type&&e.key===t.key}const Dr="__vInternal",Wl=({key:e})=>e!=null?e:null,Uo=({ref:e,ref_key:t,ref_for:n})=>e!=null?Le(e)||ze(e)||he(e)?{i:Ge,r:e,k:t,f:!!n}:e:null;function ue(e,t=null,n=null,o=0,r=null,a=e===Ae?0:1,i=!1,c=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wl(t),ref:t&&Uo(t),scopeId:Sl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null};return c?(ti(s,n),a&128&&e.normalize(s)):n&&(s.shapeFlag|=Le(n)?8:16),fo>0&&!i&&pt&&(s.patchFlag>0||a&6)&&s.patchFlag!==32&&pt.push(s),s}const ie=uf;function uf(e,t=null,n=null,o=0,r=null,a=!1){if((!e||e===xl)&&(e=it),cr(e)){const c=Gt(e,t,!0);return n&&ti(c,n),fo>0&&!a&&pt&&(c.shapeFlag&6?pt[pt.indexOf(e)]=c:pt.push(c)),c.patchFlag|=-2,c}if(Ef(e)&&(e=e.__vccOpts),t){t=mf(t);let{class:c,style:s}=t;c&&!Le(c)&&(t.class=Ue(c)),Ve(s)&&(fl(s)&&!ce(s)&&(s=Ye({},s)),t.style=bo(s))}const i=Le(e)?1:Dd(e)?128:sf(e)?64:Ve(e)?4:he(e)?2:0;return ue(e,t,n,o,r,i,a,!0)}function mf(e){return e?fl(e)||Dr in e?Ye({},e):e:null}function Gt(e,t,n=!1){const{props:o,ref:r,patchFlag:a,children:i}=e,c=t?_a(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Wl(c),ref:t&&t.ref?n&&r?ce(r)?r.concat(Uo(t)):[r,Uo(t)]:Uo(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ae?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Gt(e.ssContent),ssFallback:e.ssFallback&&Gt(e.ssFallback),el:e.el,anchor:e.anchor}}function Xt(e=" ",t=0){return ie(mo,null,e,t)}function df(e,t){const n=ie(to,null,e);return n.staticCount=t,n}function Ne(e="",t=!1){return t?(V(),$e(it,null,e)):ie(it,null,e)}function ft(e){return e==null||typeof e=="boolean"?ie(it):ce(e)?ie(Ae,null,e.slice()):typeof e=="object"?Ut(e):ie(mo,null,String(e))}function Ut(e){return e.el===null||e.memo?e:Gt(e)}function ti(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(ce(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),ti(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(Dr in t)?t._ctx=Ge:r===3&&Ge&&(Ge.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else he(t)?(t={default:t,_ctx:Ge},n=32):(t=String(t),o&64?(n=16,t=[Xt(t)]):n=8);e.children=t,e.shapeFlag|=n}function _a(...e){const t={};for(let n=0;nBe||Ge,Cn=e=>{Be=e,e.scope.on()},pn=()=>{Be&&Be.scope.off(),Be=null};function Kl(e){return e.vnode.shapeFlag&4}let Mn=!1;function _f(e,t=!1){Mn=t;const{props:n,children:o}=e.vnode,r=Kl(e);Qd(e,n,r,t),Xd(e,o);const a=r?vf(e,t):void 0;return Mn=!1,a}function vf(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=hl(new Proxy(e.ctx,zd));const{setup:o}=n;if(o){const r=e.setupContext=o.length>1?bf(e):null;Cn(e),$n();const a=Jt(o,e,0,[e.props,r]);if(qn(),pn(),Xs(a)){if(a.then(pn,pn),t)return a.then(i=>{zi(e,i,t)}).catch(i=>{Eo(i,e,0)});e.asyncDep=a}else zi(e,a,t)}else Yl(e,t)}function zi(e,t,n){he(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ve(t)&&(e.setupState=bl(t)),Yl(e,n)}let Ui;function Yl(e,t,n){const o=e.type;if(!e.render){if(!t&&Ui&&!o.render){const r=o.template;if(r){const{isCustomElement:a,compilerOptions:i}=e.appContext.config,{delimiters:c,compilerOptions:s}=o,l=Ye(Ye({isCustomElement:a,delimiters:c},i),s);o.render=Ui(r,l)}}e.render=o.render||_t}Cn(e),$n(),Ud(e),qn(),pn()}function gf(e){return new Proxy(e.attrs,{get(t,n){return ct(e,"get","$attrs"),t[n]}})}function bf(e){const t=o=>{e.exposed=o||{}};let n;return{get attrs(){return n||(n=gf(e))},slots:e.slots,emit:e.emit,expose:t}}function Rr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(bl(hl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in rr)return rr[n](e)}}))}function yf(e,t=!0){return he(e)?e.displayName||e.name:e.name||t&&e.__name}function Ef(e){return he(e)&&"__vccOpts"in e}const te=(e,t)=>bd(e,t,Mn);function Te(e,t,n){const o=arguments.length;return o===2?Ve(t)&&!ce(t)?cr(t)?ie(e,null,[t]):ie(e,t):ie(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&cr(n)&&(n=[n]),ie(e,t,n))}const wf="3.2.38",Of="http://www.w3.org/2000/svg",mn=typeof document<"u"?document:null,Wi=mn&&mn.createElement("template"),Pf={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?mn.createElementNS(Of,e):mn.createElement(e,n?{is:n}:void 0);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>mn.createTextNode(e),createComment:e=>mn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>mn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o,r,a){const i=n?n.previousSibling:t.lastChild;if(r&&(r===a||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===a||!(r=r.nextSibling)););else{Wi.innerHTML=o?`${e}`:e;const c=Wi.content;if(o){const s=c.firstChild;for(;s.firstChild;)c.appendChild(s.firstChild);c.removeChild(s)}t.insertBefore(c,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Sf(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Af(e,t,n){const o=e.style,r=Le(n);if(n&&!r){for(const a in n)va(o,a,n[a]);if(t&&!Le(t))for(const a in t)n[a]==null&&va(o,a,"")}else{const a=o.display;r?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=a)}}const Ki=/\s*!important$/;function va(e,t,n){if(ce(n))n.forEach(o=>va(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=Tf(e,t);Ki.test(n)?e.setProperty(_n(o),n.replace(Ki,""),"important"):e[o]=n}}const Yi=["Webkit","Moz","ms"],Fr={};function Tf(e,t){const n=Fr[t];if(n)return n;let o=Tt(t);if(o!=="filter"&&o in e)return Fr[t]=o;o=Or(o);for(let r=0;r{let e=Date.now,t=!1;if(typeof window<"u"){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let ga=0;const Rf=Promise.resolve(),kf=()=>{ga=0},xf=()=>ga||(Rf.then(kf),ga=Jl());function Cf(e,t,n,o){e.addEventListener(t,n,o)}function Mf(e,t,n,o){e.removeEventListener(t,n,o)}function jf(e,t,n,o,r=null){const a=e._vei||(e._vei={}),i=a[t];if(o&&i)i.value=o;else{const[c,s]=Hf(t);if(o){const l=a[t]=$f(o,r);Cf(e,c,l,s)}else i&&(Mf(e,c,i,s),a[t]=void 0)}}const Qi=/(?:Once|Passive|Capture)$/;function Hf(e){let t;if(Qi.test(e)){t={};let o;for(;o=e.match(Qi);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):_n(e.slice(2)),t]}function $f(e,t){const n=o=>{const r=o.timeStamp||Jl();(Df||r>=n.attached-1)&&ut(qf(o,n.value),t,5,[o])};return n.value=e,n.attached=xf(),n}function qf(e,t){if(ce(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>r=>!r._stopped&&o&&o(r))}else return t}const Gi=/^on[a-z]/,Vf=(e,t,n,o,r=!1,a,i,c,s)=>{t==="class"?Sf(e,o,r):t==="style"?Af(e,n,o):yo(t)?$a(t)||jf(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Nf(e,t,o,r))?Lf(e,t,o,a,i,c,s):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),If(e,t,o,r))};function Nf(e,t,n,o){return o?!!(t==="innerHTML"||t==="textContent"||t in e&&Gi.test(t)&&he(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Gi.test(t)&&Le(n)?!1:t in e}const Bt="transition",zn="animation",Po=(e,{slots:t})=>Te(Ll,Ff(e),t);Po.displayName="Transition";const Ql={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Po.props=Ye({},Ll.props,Ql);const tn=(e,t=[])=>{ce(e)?e.forEach(n=>n(...t)):e&&e(...t)},Zi=e=>e?ce(e)?e.some(t=>t.length>1):e.length>1:!1;function Ff(e){const t={};for(const P in e)P in Ql||(t[P]=e[P]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:a=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:s=a,appearActiveClass:l=i,appearToClass:u=c,leaveFromClass:m=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,v=Bf(r),g=v&&v[0],b=v&&v[1],{onBeforeEnter:_,onEnter:y,onEnterCancelled:S,onLeave:A,onLeaveCancelled:D,onBeforeAppear:K=_,onAppear:R=y,onAppearCancelled:E=S}=t,U=(P,T,k)=>{nn(P,T?u:c),nn(P,T?l:i),k&&k()},Y=(P,T)=>{P._isLeaving=!1,nn(P,m),nn(P,f),nn(P,d),T&&T()},H=P=>(T,k)=>{const M=P?R:y,j=()=>U(T,P,k);tn(M,[T,j]),Xi(()=>{nn(T,P?s:a),zt(T,P?u:c),Zi(M)||ec(T,o,g,j)})};return Ye(t,{onBeforeEnter(P){tn(_,[P]),zt(P,a),zt(P,i)},onBeforeAppear(P){tn(K,[P]),zt(P,s),zt(P,l)},onEnter:H(!1),onAppear:H(!0),onLeave(P,T){P._isLeaving=!0;const k=()=>Y(P,T);zt(P,m),Wf(),zt(P,d),Xi(()=>{!P._isLeaving||(nn(P,m),zt(P,f),Zi(A)||ec(P,o,b,k))}),tn(A,[P,k])},onEnterCancelled(P){U(P,!1),tn(S,[P])},onAppearCancelled(P){U(P,!0),tn(E,[P])},onLeaveCancelled(P){Y(P),tn(D,[P])}})}function Bf(e){if(e==null)return null;if(Ve(e))return[Br(e.enter),Br(e.leave)];{const t=Br(e);return[t,t]}}function Br(e){return nl(e)}function zt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function nn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Xi(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let zf=0;function ec(e,t,n,o){const r=e._endId=++zf,a=()=>{r===e._endId&&o()};if(n)return setTimeout(a,n);const{type:i,timeout:c,propCount:s}=Uf(e,t);if(!i)return o();const l=i+"end";let u=0;const m=()=>{e.removeEventListener(l,d),a()},d=f=>{f.target===e&&++u>=s&&m()};setTimeout(()=>{u(n[v]||"").split(", "),r=o(Bt+"Delay"),a=o(Bt+"Duration"),i=tc(r,a),c=o(zn+"Delay"),s=o(zn+"Duration"),l=tc(c,s);let u=null,m=0,d=0;t===Bt?i>0&&(u=Bt,m=i,d=a.length):t===zn?l>0&&(u=zn,m=l,d=s.length):(m=Math.max(i,l),u=m>0?i>l?Bt:zn:null,d=u?u===Bt?a.length:s.length:0);const f=u===Bt&&/\b(transform|all)(,|$)/.test(n[Bt+"Property"]);return{type:u,timeout:m,propCount:d,hasTransform:f}}function tc(e,t){for(;e.lengthnc(n)+nc(e[o])))}function nc(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function Wf(){return document.body.offsetHeight}const Kf={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Yf=(e,t)=>n=>{if(!("key"in n))return;const o=_n(n.key);if(t.some(r=>r===o||Kf[r]===o))return e(n)},sr={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Un(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Un(e,!0),o.enter(e)):o.leave(e,()=>{Un(e,!1)}):Un(e,t))},beforeUnmount(e,{value:t}){Un(e,t)}};function Un(e,t){e.style.display=t?e._vod:"none"}const Jf=Ye({patchProp:Vf},Pf);let zr,oc=!1;function Qf(){return zr=oc?zr:rf(Jf),oc=!0,zr}const Gf=(...e)=>{const t=Qf().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=Zf(o);if(r)return n(r,!0,r instanceof SVGElement)},t};function Zf(e){return Le(e)?document.querySelector(e):e}const Xf=JSON.parse('{"base":"/3.x/","lang":"en-US","title":"arthas","description":"arthas user document","head":[["link",{"rel":"icon","href":"/images/favicon.ico"}],["meta",{"name":"viewport","content":"width=device-width, initial-scale=1.0"}],["meta",{"property":"og:title","content":"Arthas"}],["meta",{"property":"og:image:alt","content":"Alibaba Java Diagnostic Tool Arthas/Alibaba Java\u8BCA\u65AD\u5229\u5668Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java\u8BCA\u65AD\u5229\u5668Arthas"}],["meta",{"property":"og:image","content":"/images/arthas_mate_image.png"}],["meta",{"property":"og:description","content":"Alibaba Java Diagnostic Tool Arthas/Alibaba Java\u8BCA\u65AD\u5229\u5668Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java\u8BCA\u65AD\u5229\u5668Arthas"}],["meta",{"property":"og:image:width","content":"1200"}],["meta",{"property":"og:image:height","content":"600"}],["meta",{"property":"twitter:image:src","content":"/images/arthas_mate_image.png"}],["meta",{"property":"twitter:image:alt","content":"Alibaba Java Diagnostic Tool Arthas/Alibaba Java\u8BCA\u65AD\u5229\u5668Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java\u8BCA\u65AD\u5229\u5668Arthas"}],["meta",{"itemprop":"name","content":"Arthas"}],["meta",{"itemprop":"image","content":"/images/arthas_mate_image.png"}],["meta",{"itemprop":"description","content":"Alibaba Java Diagnostic Tool Arthas/Alibaba Java\u8BCA\u65AD\u5229\u5668Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java\u8BCA\u65AD\u5229\u5668Arthas"}],["script",{},"\\n var _hmt = _hmt || [];\\n (function() {\\n var hm = document.createElement(\\"script\\");\\n hm.src = \\"https://hm.baidu.com/hm.js?d5c5e25b100f0eb51a4c35c8a86ea9b4\\";\\n var s = document.getElementsByTagName(\\"script\\")[0]; \\n s.parentNode.insertBefore(hm, s);\\n })();\\n "],["meta",{"name":"aes-config","content":"pid=xux-opensource&user_type=101&uid=&username=&dim10=arthas"}],["script",{"src":"//g.alicdn.com/alilog/mlog/aplus_v2.js","id":"beacon-aplus","exparams":"clog=o&aplus&sidx=aplusSidx&ckx=aplusCkx"}],["script",{"src":"//g.alicdn.com/aes/??tracker/1.0.34/index.js,tracker-plugin-pv/2.4.5/index.js,tracker-plugin-event/1.2.5/index.js,tracker-plugin-jserror/1.0.13/index.js,tracker-plugin-api/1.1.14/index.js,tracker-plugin-perf/1.1.8/index.js,tracker-plugin-eventTiming/1.0.4/index.js"}]],"locales":{"/":{"lang":"zh-CN","title":"arthas","description":"arthas \u4F7F\u7528\u6587\u6863"},"/en/":{"lang":"en-US","title":"arthas","description":"arthas user document"}}}');var eh=([e,t,n])=>e==="meta"&&t.name?`${e}.${t.name}`:["title","base"].includes(e)?e:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,t,n]),th=e=>{const t=new Set,n=[];return e.forEach(o=>{const r=eh(o);t.has(r)||(t.add(r),n.push(o))}),n},So=e=>/^(https?:)?\/\//.test(e),nh=e=>/^mailto:/.test(e),oh=e=>/^tel:/.test(e),oi=e=>Object.prototype.toString.call(e)==="[object Object]",Gl=e=>e.replace(/\/$/,""),Zl=e=>e.replace(/^\//,""),Xl=(e,t)=>{const n=Object.keys(e).sort((o,r)=>{const a=r.split("/").length-o.split("/").length;return a!==0?a:r.length-o.length});for(const o of n)if(t.startsWith(o))return o;return"/"},rc=(e,t="/")=>e.replace(/^(https?:)?\/\/[^/]*/,"").replace(new RegExp(`^${t}`),"/");const eu={"v-8daa1a0e":L(()=>h(()=>import("./index.html.349dc4ce.js"),[])),"v-7445f070":L(()=>h(()=>import("./index.html.3951988f.js"),["assets/index.html.3951988f.js","assets/arthas.b23d3e5a.js"])),"v-0d09f68d":L(()=>h(()=>import("./advanced-use.html.9554def2.js"),[])),"v-46e53834":L(()=>h(()=>import("./advice-class.html.b56b5ad0.js"),[])),"v-37178538":L(()=>h(()=>import("./agent.html.a8d22dff.js"),[])),"v-5c517900":L(()=>h(()=>import("./arthas-properties.html.3164354d.js"),[])),"v-02eb6d0d":L(()=>h(()=>import("./arthas3.html.62e301e7.js"),[])),"v-4f82df66":L(()=>h(()=>import("./async.html.d8cce9ca.js"),[])),"v-d0358c7e":L(()=>h(()=>import("./auth.html.35f80b21.js"),[])),"v-3157067a":L(()=>h(()=>import("./base64.html.4feec68d.js"),[])),"v-cc8f4ae6":L(()=>h(()=>import("./batch-support.html.1959143d.js"),[])),"v-6542b733":L(()=>h(()=>import("./cat.html.77044202.js"),[])),"v-49b1709e":L(()=>h(()=>import("./classloader.html.2b5b952f.js"),[])),"v-ad1b2b42":L(()=>h(()=>import("./cls.html.a6a13162.js"),[])),"v-5ed4d0e1":L(()=>h(()=>import("./commands.html.e522310c.js"),[])),"v-3992adde":L(()=>h(()=>import("./contact-us.html.c4d19d8e.js"),["assets/contact-us.html.c4d19d8e.js","assets/qqgroup3_qr.f82e3fd0.js"])),"v-0d1e3f35":L(()=>h(()=>import("./dashboard.html.88ef26c5.js"),["assets/dashboard.html.88ef26c5.js","assets/dashboard.eb1e1fee.js"])),"v-02361049":L(()=>h(()=>import("./docker.html.8430667f.js"),[])),"v-2116d2e1":L(()=>h(()=>import("./download.html.5cdfc6bd.js"),[])),"v-1fe4a616":L(()=>h(()=>import("./dump.html.aa1d0523.js"),[])),"v-2c48f364":L(()=>h(()=>import("./echo.html.f45a06cc.js"),[])),"v-d070981a":L(()=>h(()=>import("./faq.html.b9626740.js"),[])),"v-78c35af6":L(()=>h(()=>import("./getstatic.html.194e97dd.js"),[])),"v-63f4cd5a":L(()=>h(()=>import("./grep.html.c753d37b.js"),[])),"v-809381ca":L(()=>h(()=>import("./groovy.html.292661c1.js"),[])),"v-07868089":L(()=>h(()=>import("./heapdump.html.2d73c547.js"),[])),"v-e3b34070":L(()=>h(()=>import("./help.html.5a1d36ec.js"),[])),"v-26f43d96":L(()=>h(()=>import("./history.html.3f90631d.js"),[])),"v-225de034":L(()=>h(()=>import("./http-api.html.5c8cd6bc.js"),["assets/http-api.html.5c8cd6bc.js","assets/arthas-web-ui.89f4fc6d.js"])),"v-7c670020":L(()=>h(()=>import("./idea-plugin.html.0961bb69.js"),[])),"v-0cb398f4":L(()=>h(()=>import("./install-detail.html.50cfaa59.js"),[])),"v-211d675c":L(()=>h(()=>import("./jad.html.67f11a53.js"),[])),"v-41806853":L(()=>h(()=>import("./jfr.html.bb7f02ab.js"),["assets/jfr.html.bb7f02ab.js","assets/arthas-output-recording.5e4ef7bc.js"])),"v-f1483d70":L(()=>h(()=>import("./jvm.html.b5bfa365.js"),[])),"v-4039cdec":L(()=>h(()=>import("./keymap.html.6e72672f.js"),[])),"v-5ae8aed9":L(()=>h(()=>import("./logger.html.cdea0f90.js"),[])),"v-6a31cc55":L(()=>h(()=>import("./manual-install.html.d729afcd.js"),[])),"v-8ebd6c68":L(()=>h(()=>import("./mbean.html.26631030.js"),[])),"v-3b401ada":L(()=>h(()=>import("./mc.html.19c82f53.js"),[])),"v-4d9433f0":L(()=>h(()=>import("./memory.html.9926de30.js"),[])),"v-6e88d7a2":L(()=>h(()=>import("./monitor.html.5f496a09.js"),[])),"v-627e52da":L(()=>h(()=>import("./ognl.html.59679ee9.js"),[])),"v-27b6152a":L(()=>h(()=>import("./options.html.b8b42168.js"),[])),"v-2f05b636":L(()=>h(()=>import("./perfcounter.html.3794d77f.js"),[])),"v-13eae420":L(()=>h(()=>import("./profiler.html.e7f88019.js"),["assets/profiler.html.e7f88019.js","assets/arthas-output-svg.30f64f53.js"])),"v-1c2d8c2c":L(()=>h(()=>import("./pwd.html.d34432c3.js"),[])),"v-5afc3a07":L(()=>h(()=>import("./quick-start.html.cbab3d30.js"),[])),"v-aa7c750c":L(()=>h(()=>import("./quit.html.64b41fb3.js"),[])),"v-0446ad7b":L(()=>h(()=>import("./redefine.html.2e16ab41.js"),[])),"v-648880ae":L(()=>h(()=>import("./release-notes.html.8810e03d.js"),[])),"v-71f77d4c":L(()=>h(()=>import("./reset.html.613ce22c.js"),[])),"v-54cde250":L(()=>h(()=>import("./retransform.html.509ca8a2.js"),[])),"v-8e632816":L(()=>h(()=>import("./save-log.html.6fa77f22.js"),[])),"v-1fc55619":L(()=>h(()=>import("./sc.html.09e2c24b.js"),[])),"v-3891b473":L(()=>h(()=>import("./session.html.61530ca8.js"),[])),"v-30d5cc4f":L(()=>h(()=>import("./sm.html.0d66961e.js"),[])),"v-07cf9d55":L(()=>h(()=>import("./spring-boot-starter.html.0ccae142.js"),[])),"v-b75a107e":L(()=>h(()=>import("./stack.html.db4b5700.js"),[])),"v-a9c412f2":L(()=>h(()=>import("./start-arthas.html.4886b6be.js"),[])),"v-bc0910b2":L(()=>h(()=>import("./stop.html.17210afa.js"),[])),"v-0333612e":L(()=>h(()=>import("./sysenv.html.ac969eec.js"),[])),"v-7012b8ce":L(()=>h(()=>import("./sysprop.html.aeb4ee87.js"),[])),"v-0536edb5":L(()=>h(()=>import("./tee.html.8aa74468.js"),[])),"v-10845ac2":L(()=>h(()=>import("./thread.html.c837e66a.js"),[])),"v-65d67724":L(()=>h(()=>import("./trace.html.861de4ab.js"),[])),"v-71adf3e9":L(()=>h(()=>import("./tt.html.980704e8.js"),[])),"v-d2ddc9fe":L(()=>h(()=>import("./tunnel.html.9c3dcb91.js"),["assets/tunnel.html.9c3dcb91.js","assets/tunnel-server-agents.03d5eafa.js"])),"v-5b5d3371":L(()=>h(()=>import("./version.html.48ec1551.js"),[])),"v-40db67fd":L(()=>h(()=>import("./vmoption.html.c32a5087.js"),[])),"v-10890efa":L(()=>h(()=>import("./vmtool.html.dc9e0833.js"),[])),"v-24fc49da":L(()=>h(()=>import("./watch.html.e73d5269.js"),[])),"v-a5f6e7aa":L(()=>h(()=>import("./web-console.html.ad1a9f26.js"),["assets/web-console.html.ad1a9f26.js","assets/web-console-local.156ba0ce.js"])),"v-2d0a870d":L(()=>h(()=>import("./index.html.27b99973.js"),[])),"v-07555a84":L(()=>h(()=>import("./index.html.88e6b040.js"),["assets/index.html.88e6b040.js","assets/arthas.b23d3e5a.js"])),"v-463d120e":L(()=>h(()=>import("./advanced-use.html.b6fb70e9.js"),[])),"v-a736375c":L(()=>h(()=>import("./advice-class.html.913cd28f.js"),[])),"v-f6b5c310":L(()=>h(()=>import("./agent.html.5d625533.js"),[])),"v-74fb2694":L(()=>h(()=>import("./arthas-properties.html.f3f99ef8.js"),[])),"v-786f7161":L(()=>h(()=>import("./async.html.0718d03c.js"),[])),"v-f76c33a6":L(()=>h(()=>import("./auth.html.d091b8de.js"),[])),"v-d17b7034":L(()=>h(()=>import("./base64.html.4fc99fea.js"),[])),"v-765e30be":L(()=>h(()=>import("./batch-support.html.09feead8.js"),[])),"v-64a0cd47":L(()=>h(()=>import("./cat.html.7e324ac6.js"),[])),"v-fc1b9a9c":L(()=>h(()=>import("./classloader.html.d971b2e3.js"),[])),"v-ae5eff1a":L(()=>h(()=>import("./cls.html.aef45d21.js"),[])),"v-12153166":L(()=>h(()=>import("./commands.html.b9c3ff85.js"),[])),"v-4be7594a":L(()=>h(()=>import("./contact-us.html.6b2c4bcc.js"),["assets/contact-us.html.6b2c4bcc.js","assets/qqgroup3_qr.f82e3fd0.js"])),"v-79107649":L(()=>h(()=>import("./dashboard.html.79bd7e0f.js"),["assets/dashboard.html.79bd7e0f.js","assets/dashboard.eb1e1fee.js"])),"v-682151b5":L(()=>h(()=>import("./docker.html.77dd787e.js"),[])),"v-8d912d66":L(()=>h(()=>import("./download.html.0aec292a.js"),[])),"v-471b4d3e":L(()=>h(()=>import("./dump.html.a9afcd2b.js"),[])),"v-18ad9fd0":L(()=>h(()=>import("./echo.html.c9564b4c.js"),[])),"v-d1b46bf2":L(()=>h(()=>import("./faq.html.39698152.js"),[])),"v-2f908999":L(()=>h(()=>import("./getstatic.html.d81e76f2.js"),[])),"v-8b2b7482":L(()=>h(()=>import("./grep.html.1c2ee274.js"),[])),"v-25a18087":L(()=>h(()=>import("./groovy.html.2ef01485.js"),[])),"v-c0b1d216":L(()=>h(()=>import("./heapdump.html.51c1271f.js"),[])),"v-7a8b0c34":L(()=>h(()=>import("./help.html.67ffadca.js"),[])),"v-4402cd49":L(()=>h(()=>import("./history.html.72971f6a.js"),[])),"v-8b0312c0":L(()=>h(()=>import("./http-api.html.1bd8ba57.js"),["assets/http-api.html.1bd8ba57.js","assets/arthas-web-ui.89f4fc6d.js"])),"v-96b07b98":L(()=>h(()=>import("./idea-plugin.html.5cd3ae1a.js"),[])),"v-319f48f2":L(()=>h(()=>import("./install-detail.html.cbd1e77a.js"),[])),"v-207b7d70":L(()=>h(()=>import("./jad.html.01fefda3.js"),[])),"v-40de7e67":L(()=>h(()=>import("./jfr.html.63d78e12.js"),["assets/jfr.html.63d78e12.js","assets/arthas-output-recording.5e4ef7bc.js"])),"v-f28c1148":L(()=>h(()=>import("./jvm.html.5fd9778c.js"),[])),"v-b3b5e150":L(()=>h(()=>import("./keymap.html.35ecd977.js"),[])),"v-7e581f76":L(()=>h(()=>import("./logger.html.7de7427f.js"),[])),"v-bbaa3c7e":L(()=>h(()=>import("./manual-install.html.aba050db.js"),[])),"v-58d22ae0":L(()=>h(()=>import("./mbean.html.7437cca3.js"),[])),"v-2ac66c02":L(()=>h(()=>import("./mc.html.ac459852.js"),[])),"v-3f212774":L(()=>h(()=>import("./memory.html.7bfef615.js"),[])),"v-20388043":L(()=>h(()=>import("./monitor.html.0b324722.js"),[])),"v-89b4fa02":L(()=>h(()=>import("./ognl.html.c5956d1f.js"),[])),"v-43a1e17f":L(()=>h(()=>import("./options.html.6ca60b92.js"),[])),"v-6746784a":L(()=>h(()=>import("./perfcounter.html.c8d6f07e.js"),[])),"v-a7e90ae8":L(()=>h(()=>import("./profiler.html.95a82517.js"),["assets/profiler.html.95a82517.js","assets/arthas-output-svg.30f64f53.js"])),"v-1b8ba240":L(()=>h(()=>import("./pwd.html.4f686509.js"),[])),"v-d98607ca":L(()=>h(()=>import("./quick-start.html.70301235.js"),[])),"v-d1b31c34":L(()=>h(()=>import("./quit.html.adcbca9c.js"),[])),"v-c7317832":L(()=>h(()=>import("./redefine.html.4f4236c3.js"),[])),"v-e0bde47c":L(()=>h(()=>import("./release-notes.html.79040020.js"),[])),"v-6735226e":L(()=>h(()=>import("./reset.html.b7ada98f.js"),[])),"v-e5e2b738":L(()=>h(()=>import("./retransform.html.590b7b85.js"),[])),"v-50ef0261":L(()=>h(()=>import("./save-log.html.aede14f6.js"),[])),"v-28022d85":L(()=>h(()=>import("./sc.html.4231ef3b.js"),[])),"v-dfe2bef2":L(()=>h(()=>import("./session.html.ebca9c60.js"),[])),"v-3912a3bb":L(()=>h(()=>import("./sm.html.981fdfec.js"),[])),"v-71870b69":L(()=>h(()=>import("./spring-boot-starter.html.60544b4f.js"),[])),"v-4483d8d5":L(()=>h(()=>import("./stack.html.dfb85a5e.js"),[])),"v-7af576f3":L(()=>h(()=>import("./start-arthas.html.aeeb9c4f.js"),[])),"v-e33fb7da":L(()=>h(()=>import("./stop.html.493e47db.js"),[])),"v-645190d5":L(()=>h(()=>import("./sysenv.html.ce9a0bce.js"),[])),"v-1f738fad":L(()=>h(()=>import("./sysprop.html.76aee09d.js"),[])),"v-049503c9":L(()=>h(()=>import("./tee.html.9daca569.js"),[])),"v-5da9140b":L(()=>h(()=>import("./thread.html.3171fcb1.js"),[])),"v-06075838":L(()=>h(()=>import("./trace.html.53ffd359.js"),[])),"v-79eacb55":L(()=>h(()=>import("./tt.html.51ba2266.js"),[])),"v-07074726":L(()=>h(()=>import("./tunnel.html.d20e61ab.js"),["assets/tunnel.html.d20e61ab.js","assets/tunnel-server-agents.03d5eafa.js"])),"v-9a4bc0f6":L(()=>h(()=>import("./version.html.18257b2f.js"),[])),"v-4e08032e":L(()=>h(()=>import("./vmoption.html.a450713f.js"),[])),"v-76745066":L(()=>h(()=>import("./vmtool.html.65118aec.js"),[])),"v-75a5aa24":L(()=>h(()=>import("./watch.html.30c91d3e.js"),[])),"v-35756382":L(()=>h(()=>import("./web-console.html.a124c728.js"),["assets/web-console.html.a124c728.js","assets/web-console-local.156ba0ce.js"])),"v-3706649a":L(()=>h(()=>import("./404.html.2154acec.js"),[]))};var Lt=(e={})=>e;function ri(e,t,n){var o,r,a;t===void 0&&(t=50),n===void 0&&(n={});var i=(o=n.isImmediate)!=null&&o,c=(r=n.callback)!=null&&r,s=n.maxWait,l=Date.now(),u=[];function m(){if(s!==void 0){var f=Date.now()-l;if(f+t>=s)return s-f}return t}var d=function(){var f=[].slice.call(arguments),v=this;return new Promise(function(g,b){var _=i&&a===void 0;if(a!==void 0&&clearTimeout(a),a=setTimeout(function(){if(a=void 0,l=Date.now(),!i){var S=e.apply(v,f);c&&c(S),u.forEach(function(A){return(0,A.resolve)(S)}),u=[]}},m()),_){var y=e.apply(v,f);return c&&c(y),g(y)}u.push({resolve:g,reject:b})})};return d.cancel=function(f){a!==void 0&&clearTimeout(a),u.forEach(function(v){return(0,v.reject)(f)}),u=[]},d}const ac=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,rh=()=>window.scrollTo({top:0,behavior:"smooth"});const ah=je({name:"BackToTop",setup(){const e=De(0),t=te(()=>e.value>300),n=ri(()=>{e.value=ac()},100);et(()=>{e.value=ac(),window.addEventListener("scroll",()=>n())});const o=Te("div",{class:"back-to-top",onClick:rh});return()=>Te(Po,{name:"back-to-top"},()=>t.value?o:null)}}),ih=Lt({rootComponents:[ah]});const ch=Te("svg",{class:"external-link-icon",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"},[Te("path",{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}),Te("polygon",{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"})]),sh=je({name:"ExternalLinkIcon",props:{locales:{type:Object,required:!1,default:()=>({})}},setup(e){const t=Fn(),n=te(()=>{var o;return(o=e.locales[t.value])!=null?o:{openInNewWindow:"open in new window"}});return()=>Te("span",[ch,Te("span",{class:"external-link-icon-sr-only"},n.value.openInNewWindow)])}}),lh={"/":{openInNewWindow:"\u5728\u65B0\u7A97\u53E3\u6253\u5F00"},"/en/":{openInNewWindow:"open in new window"}},uh=Lt({enhance({app:e}){e.component("ExternalLinkIcon",Te(sh,{locales:lh}))}});/*! medium-zoom 1.0.6 | MIT License | https://github.com/francoischalifour/medium-zoom */var cn=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},o=window.Promise||function(P){function T(){}P(T,T)},r=function(P){var T=P.target;if(T===U){v();return}S.indexOf(T)!==-1&&g({target:T})},a=function(){if(!(D||!E.original)){var P=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(K-P)>R.scrollOffset&&setTimeout(v,150)}},i=function(P){var T=P.key||P.keyCode;(T==="Escape"||T==="Esc"||T===27)&&v()},c=function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=P;if(P.background&&(U.style.background=P.background),P.container&&P.container instanceof Object&&(T.container=cn({},R.container,P.container)),P.template){var k=Wo(P.template)?P.template:document.querySelector(P.template);T.template=k}return R=cn({},R,T),S.forEach(function(M){M.dispatchEvent(bn("medium-zoom:update",{detail:{zoom:Y}}))}),Y},s=function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(cn({},R,P))},l=function(){for(var P=arguments.length,T=Array(P),k=0;k0?T.reduce(function(j,W){return[].concat(j,cc(W))},[]):S;return M.forEach(function(j){j.classList.remove("medium-zoom-image"),j.dispatchEvent(bn("medium-zoom:detach",{detail:{zoom:Y}}))}),S=S.filter(function(j){return M.indexOf(j)===-1}),Y},m=function(P,T){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return S.forEach(function(M){M.addEventListener("medium-zoom:"+P,T,k)}),A.push({type:"medium-zoom:"+P,listener:T,options:k}),Y},d=function(P,T){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return S.forEach(function(M){M.removeEventListener("medium-zoom:"+P,T,k)}),A=A.filter(function(M){return!(M.type==="medium-zoom:"+P&&M.listener.toString()===T.toString())}),Y},f=function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=P.target,k=function(){var j={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},W=void 0,ee=void 0;if(R.container)if(R.container instanceof Object)j=cn({},j,R.container),W=j.width-j.left-j.right-R.margin*2,ee=j.height-j.top-j.bottom-R.margin*2;else{var me=Wo(R.container)?R.container:document.querySelector(R.container),de=me.getBoundingClientRect(),ve=de.width,Se=de.height,Re=de.left,Fe=de.top;j=cn({},j,{width:ve,height:Se,left:Re,top:Fe})}W=W||j.width-R.margin*2,ee=ee||j.height-R.margin*2;var x=E.zoomedHd||E.original,Z=ic(x)?W:x.naturalWidth||W,N=ic(x)?ee:x.naturalHeight||ee,G=x.getBoundingClientRect(),pe=G.top,be=G.left,fe=G.width,le=G.height,p=Math.min(Z,W)/fe,w=Math.min(N,ee)/le,I=Math.min(p,w),C=(-be+(W-fe)/2+R.margin+j.left)/I,$=(-pe+(ee-le)/2+R.margin+j.top)/I,q="scale("+I+") translate3d("+C+"px, "+$+"px, 0)";E.zoomed.style.transform=q,E.zoomedHd&&(E.zoomedHd.style.transform=q)};return new o(function(M){if(T&&S.indexOf(T)===-1){M(Y);return}var j=function ve(){D=!1,E.zoomed.removeEventListener("transitionend",ve),E.original.dispatchEvent(bn("medium-zoom:opened",{detail:{zoom:Y}})),M(Y)};if(E.zoomed){M(Y);return}if(T)E.original=T;else if(S.length>0){var W=S;E.original=W[0]}else{M(Y);return}if(E.original.dispatchEvent(bn("medium-zoom:open",{detail:{zoom:Y}})),K=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,D=!0,E.zoomed=fh(E.original),document.body.appendChild(U),R.template){var ee=Wo(R.template)?R.template:document.querySelector(R.template);E.template=document.createElement("div"),E.template.appendChild(ee.content.cloneNode(!0)),document.body.appendChild(E.template)}if(document.body.appendChild(E.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),E.original.classList.add("medium-zoom-image--hidden"),E.zoomed.classList.add("medium-zoom-image--opened"),E.zoomed.addEventListener("click",v),E.zoomed.addEventListener("transitionend",j),E.original.getAttribute("data-zoom-src")){E.zoomedHd=E.zoomed.cloneNode(),E.zoomedHd.removeAttribute("srcset"),E.zoomedHd.removeAttribute("sizes"),E.zoomedHd.src=E.zoomed.getAttribute("data-zoom-src"),E.zoomedHd.onerror=function(){clearInterval(me),console.warn("Unable to reach the zoom image target "+E.zoomedHd.src),E.zoomedHd=null,k()};var me=setInterval(function(){E.zoomedHd.complete&&(clearInterval(me),E.zoomedHd.classList.add("medium-zoom-image--opened"),E.zoomedHd.addEventListener("click",v),document.body.appendChild(E.zoomedHd),k())},10)}else if(E.original.hasAttribute("srcset")){E.zoomedHd=E.zoomed.cloneNode(),E.zoomedHd.removeAttribute("sizes"),E.zoomedHd.removeAttribute("loading");var de=E.zoomedHd.addEventListener("load",function(){E.zoomedHd.removeEventListener("load",de),E.zoomedHd.classList.add("medium-zoom-image--opened"),E.zoomedHd.addEventListener("click",v),document.body.appendChild(E.zoomedHd),k()})}else k()})},v=function(){return new o(function(P){if(D||!E.original){P(Y);return}var T=function k(){E.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(E.zoomed),E.zoomedHd&&document.body.removeChild(E.zoomedHd),document.body.removeChild(U),E.zoomed.classList.remove("medium-zoom-image--opened"),E.template&&document.body.removeChild(E.template),D=!1,E.zoomed.removeEventListener("transitionend",k),E.original.dispatchEvent(bn("medium-zoom:closed",{detail:{zoom:Y}})),E.original=null,E.zoomed=null,E.zoomedHd=null,E.template=null,P(Y)};D=!0,document.body.classList.remove("medium-zoom--opened"),E.zoomed.style.transform="",E.zoomedHd&&(E.zoomedHd.style.transform=""),E.template&&(E.template.style.transition="opacity 150ms",E.template.style.opacity=0),E.original.dispatchEvent(bn("medium-zoom:close",{detail:{zoom:Y}})),E.zoomed.addEventListener("transitionend",T)})},g=function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=P.target;return E.original?v():f({target:T})},b=function(){return R},_=function(){return S},y=function(){return E.original},S=[],A=[],D=!1,K=0,R=n,E={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?R=t:(t||typeof t=="string")&&l(t),R=cn({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},R);var U=dh(R.background);document.addEventListener("click",r),document.addEventListener("keyup",i),document.addEventListener("scroll",a),window.addEventListener("resize",v);var Y={open:f,close:v,toggle:g,update:c,clone:s,attach:l,detach:u,on:m,off:d,getOptions:b,getImages:_,getZoomedImage:y};return Y};function ph(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n==="top"&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var _h=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";ph(_h);const vh=hh,gh=Symbol("mediumZoom");const bh=".theme-default-content > img, .theme-default-content :not(a) > img",yh={},Eh=300,wh=Lt({enhance({app:e,router:t}){const n=vh(yh);n.refresh=(o=bh)=>{n.detach(),n.attach(o)},e.provide(gh,n),t.afterEach(()=>{setTimeout(()=>n.refresh(),Eh)})}});/*! + * vue-router v4.1.5 + * (c) 2022 Eduardo San Martin Morote + * @license MIT + */const On=typeof window<"u";function Oh(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Ie=Object.assign;function Ur(e,t){const n={};for(const o in t){const r=t[o];n[o]=gt(r)?r.map(e):e(r)}return n}const oo=()=>{},gt=Array.isArray,Ph=/\/$/,Sh=e=>e.replace(Ph,"");function Wr(e,t,n="/"){let o,r={},a="",i="";const c=t.indexOf("#");let s=t.indexOf("?");return c=0&&(s=-1),s>-1&&(o=t.slice(0,s),a=t.slice(s+1,c>-1?c:t.length),r=e(a)),c>-1&&(o=o||t.slice(0,c),i=t.slice(c,t.length)),o=Lh(o!=null?o:t,n),{fullPath:o+(a&&"?")+a+i,path:o,query:r,hash:i}}function Ah(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function sc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Th(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&jn(t.matched[o],n.matched[r])&&tu(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function jn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function tu(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Ih(e[n],t[n]))return!1;return!0}function Ih(e,t){return gt(e)?lc(e,t):gt(t)?lc(t,e):e===t}function lc(e,t){return gt(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Lh(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/");let r=n.length-1,a,i;for(a=0;a1&&r--;else break;return n.slice(0,r).join("/")+"/"+o.slice(a-(a===o.length?1:0)).join("/")}var ho;(function(e){e.pop="pop",e.push="push"})(ho||(ho={}));var ro;(function(e){e.back="back",e.forward="forward",e.unknown=""})(ro||(ro={}));function Dh(e){if(!e)if(On){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Sh(e)}const Rh=/^[^#]+#/;function kh(e,t){return e.replace(Rh,"#")+t}function xh(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const kr=()=>({left:window.pageXOffset,top:window.pageYOffset});function Ch(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=xh(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function uc(e,t){return(history.state?history.state.position-t:-1)+e}const ba=new Map;function Mh(e,t){ba.set(e,t)}function jh(e){const t=ba.get(e);return ba.delete(e),t}let Hh=()=>location.protocol+"//"+location.host;function nu(e,t){const{pathname:n,search:o,hash:r}=t,a=e.indexOf("#");if(a>-1){let c=r.includes(e.slice(a))?e.slice(a).length:1,s=r.slice(c);return s[0]!=="/"&&(s="/"+s),sc(s,"")}return sc(n,e)+o+r}function $h(e,t,n,o){let r=[],a=[],i=null;const c=({state:d})=>{const f=nu(e,location),v=n.value,g=t.value;let b=0;if(d){if(n.value=f,t.value=d,i&&i===v){i=null;return}b=g?d.position-g.position:0}else o(f);r.forEach(_=>{_(n.value,v,{delta:b,type:ho.pop,direction:b?b>0?ro.forward:ro.back:ro.unknown})})};function s(){i=n.value}function l(d){r.push(d);const f=()=>{const v=r.indexOf(d);v>-1&&r.splice(v,1)};return a.push(f),f}function u(){const{history:d}=window;!d.state||d.replaceState(Ie({},d.state,{scroll:kr()}),"")}function m(){for(const d of a)d();a=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",u),{pauseListeners:s,listen:l,destroy:m}}function mc(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?kr():null}}function qh(e){const{history:t,location:n}=window,o={value:nu(e,n)},r={value:t.state};r.value||a(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(s,l,u){const m=e.indexOf("#"),d=m>-1?(n.host&&document.querySelector("base")?e:e.slice(m))+s:Hh()+e+s;try{t[u?"replaceState":"pushState"](l,"",d),r.value=l}catch(f){console.error(f),n[u?"replace":"assign"](d)}}function i(s,l){const u=Ie({},t.state,mc(r.value.back,s,r.value.forward,!0),l,{position:r.value.position});a(s,u,!0),o.value=s}function c(s,l){const u=Ie({},r.value,t.state,{forward:s,scroll:kr()});a(u.current,u,!0);const m=Ie({},mc(o.value,s,null),{position:u.position+1},l);a(s,m,!1),o.value=s}return{location:o,state:r,push:c,replace:i}}function Vh(e){e=Dh(e);const t=qh(e),n=$h(e,t.state,t.location,t.replace);function o(a,i=!0){i||n.pauseListeners(),history.go(a)}const r=Ie({location:"",base:e,go:o,createHref:kh.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Nh(e){return typeof e=="string"||e&&typeof e=="object"}function ou(e){return typeof e=="string"||typeof e=="symbol"}const kt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ru=Symbol("");var dc;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(dc||(dc={}));function Hn(e,t){return Ie(new Error,{type:e,[ru]:!0},t)}function Rt(e,t){return e instanceof Error&&ru in e&&(t==null||!!(e.type&t))}const fc="[^/]+?",Fh={sensitive:!1,strict:!1,start:!0,end:!0},Bh=/[.+*?^${}()[\]/\\]/g;function zh(e,t){const n=Ie({},Fh,t),o=[];let r=n.start?"^":"";const a=[];for(const l of e){const u=l.length?[]:[90];n.strict&&!l.length&&(r+="/");for(let m=0;mt.length?t.length===1&&t[0]===40+40?1:-1:0}function Wh(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Kh={type:0,value:""},Yh=/[a-zA-Z0-9_]/;function Jh(e){if(!e)return[[]];if(e==="/")return[[Kh]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${n})/"${l}": ${f}`)}let n=0,o=n;const r=[];let a;function i(){a&&r.push(a),a=[]}let c=0,s,l="",u="";function m(){!l||(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),l="")}function d(){l+=s}for(;c{i(y)}:oo}function i(u){if(ou(u)){const m=o.get(u);m&&(o.delete(u),n.splice(n.indexOf(m),1),m.children.forEach(i),m.alias.forEach(i))}else{const m=n.indexOf(u);m>-1&&(n.splice(m,1),u.record.name&&o.delete(u.record.name),u.children.forEach(i),u.alias.forEach(i))}}function c(){return n}function s(u){let m=0;for(;m=0&&(u.record.path!==n[m].record.path||!au(u,n[m]));)m++;n.splice(m,0,u),u.record.name&&!_c(u)&&o.set(u.record.name,u)}function l(u,m){let d,f={},v,g;if("name"in u&&u.name){if(d=o.get(u.name),!d)throw Hn(1,{location:u});g=d.record.name,f=Ie(pc(m.params,d.keys.filter(y=>!y.optional).map(y=>y.name)),u.params&&pc(u.params,d.keys.map(y=>y.name))),v=d.stringify(f)}else if("path"in u)v=u.path,d=n.find(y=>y.re.test(v)),d&&(f=d.parse(v),g=d.record.name);else{if(d=m.name?o.get(m.name):n.find(y=>y.re.test(m.path)),!d)throw Hn(1,{location:u,currentLocation:m});g=d.record.name,f=Ie({},m.params,u.params),v=d.stringify(f)}const b=[];let _=d;for(;_;)b.unshift(_.record),_=_.parent;return{name:g,path:v,params:f,matched:b,meta:ep(b)}}return e.forEach(u=>a(u)),{addRoute:a,resolve:l,removeRoute:i,getRoutes:c,getRecordMatcher:r}}function pc(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Zh(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Xh(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function Xh(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="boolean"?n:n[o];return t}function _c(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ep(e){return e.reduce((t,n)=>Ie(t,n.meta),{})}function vc(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function au(e,t){return t.children.some(n=>n===e||au(e,n))}const iu=/#/g,tp=/&/g,np=/\//g,op=/=/g,rp=/\?/g,cu=/\+/g,ap=/%5B/g,ip=/%5D/g,su=/%5E/g,cp=/%60/g,lu=/%7B/g,sp=/%7C/g,uu=/%7D/g,lp=/%20/g;function ai(e){return encodeURI(""+e).replace(sp,"|").replace(ap,"[").replace(ip,"]")}function up(e){return ai(e).replace(lu,"{").replace(uu,"}").replace(su,"^")}function ya(e){return ai(e).replace(cu,"%2B").replace(lp,"+").replace(iu,"%23").replace(tp,"%26").replace(cp,"`").replace(lu,"{").replace(uu,"}").replace(su,"^")}function mp(e){return ya(e).replace(op,"%3D")}function dp(e){return ai(e).replace(iu,"%23").replace(rp,"%3F")}function fp(e){return e==null?"":dp(e).replace(np,"%2F")}function lr(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function hp(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ra&&ya(a)):[o&&ya(o)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function pp(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=gt(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const _p=Symbol(""),bc=Symbol(""),xr=Symbol(""),ii=Symbol(""),Ea=Symbol("");function Wn(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function Wt(e,t,n,o,r){const a=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((i,c)=>{const s=m=>{m===!1?c(Hn(4,{from:n,to:t})):m instanceof Error?c(m):Nh(m)?c(Hn(2,{from:t,to:m})):(a&&o.enterCallbacks[r]===a&&typeof m=="function"&&a.push(m),i())},l=e.call(o&&o.instances[r],t,n,s);let u=Promise.resolve(l);e.length<3&&(u=u.then(s)),u.catch(m=>c(m))})}function Kr(e,t,n,o){const r=[];for(const a of e)for(const i in a.components){let c=a.components[i];if(!(t!=="beforeRouteEnter"&&!a.instances[i]))if(vp(c)){const l=(c.__vccOpts||c)[t];l&&r.push(Wt(l,n,o,a,i))}else{let s=c();r.push(()=>s.then(l=>{if(!l)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${a.path}"`));const u=Oh(l)?l.default:l;a.components[i]=u;const d=(u.__vccOpts||u)[t];return d&&Wt(d,n,o,a,i)()}))}}return r}function vp(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function yc(e){const t=We(xr),n=We(ii),o=te(()=>t.resolve(F(e.to))),r=te(()=>{const{matched:s}=o.value,{length:l}=s,u=s[l-1],m=n.matched;if(!u||!m.length)return-1;const d=m.findIndex(jn.bind(null,u));if(d>-1)return d;const f=Ec(s[l-2]);return l>1&&Ec(u)===f&&m[m.length-1].path!==f?m.findIndex(jn.bind(null,s[l-2])):d}),a=te(()=>r.value>-1&&Ep(n.params,o.value.params)),i=te(()=>r.value>-1&&r.value===n.matched.length-1&&tu(n.params,o.value.params));function c(s={}){return yp(s)?t[F(e.replace)?"replace":"push"](F(e.to)).catch(oo):Promise.resolve()}return{route:o,href:te(()=>o.value.href),isActive:a,isExactActive:i,navigate:c}}const gp=je({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:yc,setup(e,{slots:t}){const n=Vn(yc(e)),{options:o}=We(xr),r=te(()=>({[wc(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[wc(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&t.default(n);return e.custom?a:Te("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},a)}}}),bp=gp;function yp(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Ep(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!gt(r)||r.length!==o.length||o.some((a,i)=>a!==r[i]))return!1}return!0}function Ec(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const wc=(e,t,n)=>e!=null?e:t!=null?t:n,wp=je({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=We(Ea),r=te(()=>e.route||o.value),a=We(bc,0),i=te(()=>{let l=F(a);const{matched:u}=r.value;let m;for(;(m=u[l])&&!m.components;)l++;return l}),c=te(()=>r.value.matched[i.value]);hn(bc,te(()=>i.value+1)),hn(_p,c),hn(Ea,r);const s=De();return ot(()=>[s.value,c.value,e.name],([l,u,m],[d,f,v])=>{u&&(u.instances[m]=l,f&&f!==u&&l&&l===d&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),l&&u&&(!f||!jn(u,f)||!d)&&(u.enterCallbacks[m]||[]).forEach(g=>g(l))},{flush:"post"}),()=>{const l=r.value,u=e.name,m=c.value,d=m&&m.components[u];if(!d)return Oc(n.default,{Component:d,route:l});const f=m.props[u],v=f?f===!0?l.params:typeof f=="function"?f(l):f:null,b=Te(d,Ie({},v,t,{onVnodeUnmounted:_=>{_.component.isUnmounted&&(m.instances[u]=null)},ref:s}));return Oc(n.default,{Component:b,route:l})||b}}});function Oc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const mu=wp;function Op(e){const t=Gh(e.routes,e),n=e.parseQuery||hp,o=e.stringifyQuery||gc,r=e.history,a=Wn(),i=Wn(),c=Wn(),s=vl(kt);let l=kt;On&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ur.bind(null,x=>""+x),m=Ur.bind(null,fp),d=Ur.bind(null,lr);function f(x,Z){let N,G;return ou(x)?(N=t.getRecordMatcher(x),G=Z):G=x,t.addRoute(G,N)}function v(x){const Z=t.getRecordMatcher(x);Z&&t.removeRoute(Z)}function g(){return t.getRoutes().map(x=>x.record)}function b(x){return!!t.getRecordMatcher(x)}function _(x,Z){if(Z=Ie({},Z||s.value),typeof x=="string"){const le=Wr(n,x,Z.path),p=t.resolve({path:le.path},Z),w=r.createHref(le.fullPath);return Ie(le,p,{params:d(p.params),hash:lr(le.hash),redirectedFrom:void 0,href:w})}let N;if("path"in x)N=Ie({},x,{path:Wr(n,x.path,Z.path).path});else{const le=Ie({},x.params);for(const p in le)le[p]==null&&delete le[p];N=Ie({},x,{params:m(x.params)}),Z.params=m(Z.params)}const G=t.resolve(N,Z),pe=x.hash||"";G.params=u(d(G.params));const be=Ah(o,Ie({},x,{hash:up(pe),path:G.path})),fe=r.createHref(be);return Ie({fullPath:be,hash:pe,query:o===gc?pp(x.query):x.query||{}},G,{redirectedFrom:void 0,href:fe})}function y(x){return typeof x=="string"?Wr(n,x,s.value.path):Ie({},x)}function S(x,Z){if(l!==x)return Hn(8,{from:Z,to:x})}function A(x){return R(x)}function D(x){return A(Ie(y(x),{replace:!0}))}function K(x){const Z=x.matched[x.matched.length-1];if(Z&&Z.redirect){const{redirect:N}=Z;let G=typeof N=="function"?N(x):N;return typeof G=="string"&&(G=G.includes("?")||G.includes("#")?G=y(G):{path:G},G.params={}),Ie({query:x.query,hash:x.hash,params:"path"in G?{}:x.params},G)}}function R(x,Z){const N=l=_(x),G=s.value,pe=x.state,be=x.force,fe=x.replace===!0,le=K(N);if(le)return R(Ie(y(le),{state:typeof le=="object"?Ie({},pe,le.state):pe,force:be,replace:fe}),Z||N);const p=N;p.redirectedFrom=Z;let w;return!be&&Th(o,G,N)&&(w=Hn(16,{to:p,from:G}),de(G,G,!0,!1)),(w?Promise.resolve(w):U(p,G)).catch(I=>Rt(I)?Rt(I,2)?I:me(I):W(I,p,G)).then(I=>{if(I){if(Rt(I,2))return R(Ie({replace:fe},y(I.to),{state:typeof I.to=="object"?Ie({},pe,I.to.state):pe,force:be}),Z||p)}else I=H(p,G,!0,fe,pe);return Y(p,G,I),I})}function E(x,Z){const N=S(x,Z);return N?Promise.reject(N):Promise.resolve()}function U(x,Z){let N;const[G,pe,be]=Pp(x,Z);N=Kr(G.reverse(),"beforeRouteLeave",x,Z);for(const le of G)le.leaveGuards.forEach(p=>{N.push(Wt(p,x,Z))});const fe=E.bind(null,x,Z);return N.push(fe),yn(N).then(()=>{N=[];for(const le of a.list())N.push(Wt(le,x,Z));return N.push(fe),yn(N)}).then(()=>{N=Kr(pe,"beforeRouteUpdate",x,Z);for(const le of pe)le.updateGuards.forEach(p=>{N.push(Wt(p,x,Z))});return N.push(fe),yn(N)}).then(()=>{N=[];for(const le of x.matched)if(le.beforeEnter&&!Z.matched.includes(le))if(gt(le.beforeEnter))for(const p of le.beforeEnter)N.push(Wt(p,x,Z));else N.push(Wt(le.beforeEnter,x,Z));return N.push(fe),yn(N)}).then(()=>(x.matched.forEach(le=>le.enterCallbacks={}),N=Kr(be,"beforeRouteEnter",x,Z),N.push(fe),yn(N))).then(()=>{N=[];for(const le of i.list())N.push(Wt(le,x,Z));return N.push(fe),yn(N)}).catch(le=>Rt(le,8)?le:Promise.reject(le))}function Y(x,Z,N){for(const G of c.list())G(x,Z,N)}function H(x,Z,N,G,pe){const be=S(x,Z);if(be)return be;const fe=Z===kt,le=On?history.state:{};N&&(G||fe?r.replace(x.fullPath,Ie({scroll:fe&&le&&le.scroll},pe)):r.push(x.fullPath,pe)),s.value=x,de(x,Z,N,fe),me()}let P;function T(){P||(P=r.listen((x,Z,N)=>{if(!Fe.listening)return;const G=_(x),pe=K(G);if(pe){R(Ie(pe,{replace:!0}),G).catch(oo);return}l=G;const be=s.value;On&&Mh(uc(be.fullPath,N.delta),kr()),U(G,be).catch(fe=>Rt(fe,12)?fe:Rt(fe,2)?(R(fe.to,G).then(le=>{Rt(le,20)&&!N.delta&&N.type===ho.pop&&r.go(-1,!1)}).catch(oo),Promise.reject()):(N.delta&&r.go(-N.delta,!1),W(fe,G,be))).then(fe=>{fe=fe||H(G,be,!1),fe&&(N.delta&&!Rt(fe,8)?r.go(-N.delta,!1):N.type===ho.pop&&Rt(fe,20)&&r.go(-1,!1)),Y(G,be,fe)}).catch(oo)}))}let k=Wn(),M=Wn(),j;function W(x,Z,N){me(x);const G=M.list();return G.length?G.forEach(pe=>pe(x,Z,N)):console.error(x),Promise.reject(x)}function ee(){return j&&s.value!==kt?Promise.resolve():new Promise((x,Z)=>{k.add([x,Z])})}function me(x){return j||(j=!x,T(),k.list().forEach(([Z,N])=>x?N(x):Z()),k.reset()),x}function de(x,Z,N,G){const{scrollBehavior:pe}=e;if(!On||!pe)return Promise.resolve();const be=!N&&jh(uc(x.fullPath,0))||(G||!N)&&history.state&&history.state.scroll||null;return wo().then(()=>pe(x,Z,be)).then(fe=>fe&&Ch(fe)).catch(fe=>W(fe,x,Z))}const ve=x=>r.go(x);let Se;const Re=new Set,Fe={currentRoute:s,listening:!0,addRoute:f,removeRoute:v,hasRoute:b,getRoutes:g,resolve:_,options:e,push:A,replace:D,go:ve,back:()=>ve(-1),forward:()=>ve(1),beforeEach:a.add,beforeResolve:i.add,afterEach:c.add,onError:M.add,isReady:ee,install(x){const Z=this;x.component("RouterLink",bp),x.component("RouterView",mu),x.config.globalProperties.$router=Z,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>F(s)}),On&&!Se&&s.value===kt&&(Se=!0,A(r.location).catch(pe=>{}));const N={};for(const pe in kt)N[pe]=te(()=>s.value[pe]);x.provide(xr,Z),x.provide(ii,Vn(N)),x.provide(Ea,s);const G=x.unmount;Re.add(x),x.unmount=function(){Re.delete(x),Re.size<1&&(l=kt,P&&P(),P=null,s.value=kt,Se=!1,j=!1),G()}}};return Fe}function yn(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function Pp(e,t){const n=[],o=[],r=[],a=Math.max(t.matched.length,e.matched.length);for(let i=0;ijn(l,c))?o.push(c):n.push(c));const s=e.matched[i];s&&(t.matched.find(l=>jn(l,s))||r.push(s))}return[n,o,r]}function vn(){return We(xr)}function Dt(){return We(ii)}/** + * NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress + * @license MIT + */const Ee={settings:{minimum:.08,easing:"ease",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,barSelector:'[role="bar"]',parent:"body",template:'
'},status:null,set:e=>{const t=Ee.isStarted();e=Yr(e,Ee.settings.minimum,1),Ee.status=e===1?null:e;const n=Ee.render(!t),o=n.querySelector(Ee.settings.barSelector),r=Ee.settings.speed,a=Ee.settings.easing;return n.offsetWidth,Sp(i=>{Mo(o,{transform:"translate3d("+Pc(e)+"%,0,0)",transition:"all "+r+"ms "+a}),e===1?(Mo(n,{transition:"none",opacity:"1"}),n.offsetWidth,setTimeout(function(){Mo(n,{transition:"all "+r+"ms linear",opacity:"0"}),setTimeout(function(){Ee.remove(),i()},r)},r)):setTimeout(()=>i(),r)}),Ee},isStarted:()=>typeof Ee.status=="number",start:()=>{Ee.status||Ee.set(0);const e=()=>{setTimeout(()=>{!Ee.status||(Ee.trickle(),e())},Ee.settings.trickleSpeed)};return Ee.settings.trickle&&e(),Ee},done:e=>!e&&!Ee.status?Ee:Ee.inc(.3+.5*Math.random()).set(1),inc:e=>{let t=Ee.status;return t?(typeof e!="number"&&(e=(1-t)*Yr(Math.random()*t,.1,.95)),t=Yr(t+e,0,.994),Ee.set(t)):Ee.start()},trickle:()=>Ee.inc(Math.random()*Ee.settings.trickleRate),render:e=>{if(Ee.isRendered())return document.getElementById("nprogress");Sc(document.documentElement,"nprogress-busy");const t=document.createElement("div");t.id="nprogress",t.innerHTML=Ee.settings.template;const n=t.querySelector(Ee.settings.barSelector),o=e?"-100":Pc(Ee.status||0),r=document.querySelector(Ee.settings.parent);return Mo(n,{transition:"all 0 linear",transform:"translate3d("+o+"%,0,0)"}),r!==document.body&&Sc(r,"nprogress-custom-parent"),r==null||r.appendChild(t),t},remove:()=>{Ac(document.documentElement,"nprogress-busy"),Ac(document.querySelector(Ee.settings.parent),"nprogress-custom-parent");const e=document.getElementById("nprogress");e&&Ap(e)},isRendered:()=>!!document.getElementById("nprogress")},Yr=(e,t,n)=>en?n:e,Pc=e=>(-1+e)*100,Sp=function(){const e=[];function t(){const n=e.shift();n&&n(t)}return function(n){e.push(n),e.length===1&&t()}}(),Mo=function(){const e=["Webkit","O","Moz","ms"],t={};function n(i){return i.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(c,s){return s.toUpperCase()})}function o(i){const c=document.body.style;if(i in c)return i;let s=e.length;const l=i.charAt(0).toUpperCase()+i.slice(1);let u;for(;s--;)if(u=e[s]+l,u in c)return u;return i}function r(i){return i=n(i),t[i]||(t[i]=o(i))}function a(i,c,s){c=r(c),i.style[c]=s}return function(i,c){for(const s in c){const l=c[s];l!==void 0&&Object.prototype.hasOwnProperty.call(c,s)&&a(i,s,l)}}}(),du=(e,t)=>(typeof e=="string"?e:ci(e)).indexOf(" "+t+" ")>=0,Sc=(e,t)=>{const n=ci(e),o=n+t;du(n,t)||(e.className=o.substring(1))},Ac=(e,t)=>{const n=ci(e);if(!du(e,t))return;const o=n.replace(" "+t+" "," ");e.className=o.substring(1,o.length-1)},ci=e=>(" "+(e.className||"")+" ").replace(/\s+/gi," "),Ap=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)};const Tp=()=>{et(()=>{const e=vn(),t=new Set;t.add(e.currentRoute.value.path),e.beforeEach(n=>{t.has(n.path)||Ee.start()}),e.afterEach(n=>{t.add(n.path),Ee.done()})})},Ip=Lt({setup(){Tp()}}),Lp=JSON.parse(`{"logo":"/images/arthas_light.png","logoDark":"/images/arthas_dark.png","repo":"alibaba/arthas","docsDir":"site/docs","docsBranch":"master","locales":{"/":{"selectLanguageName":"\u7B80\u4F53\u4E2D\u6587","selectLanguageText":"Languages","editLinkText":"\u5728 GitHub \u4E0A\u7F16\u8F91\u6B64\u9875","lastUpdated":"\u4E0A\u6B21\u66F4\u65B0","contributorsText":"\u8D21\u732E\u8005","backToHome":"\u56DE\u5230\u9996\u9875","rightMenuText":"\u76EE\u5F55","warning":"\u6CE8\u610F","tip":"\u63D0\u793A","danger":"\u8B66\u544A","notFound":["\u8FD9\u91CC\u4EC0\u4E48\u90FD\u6CA1\u6709","\u6211\u4EEC\u600E\u4E48\u5230\u8FD9\u6765\u4E86\uFF1F","\u8FD9\u662F\u4E00\u4E2A 404 \u9875\u9762","\u770B\u8D77\u6765\u6211\u4EEC\u8FDB\u5165\u4E86\u9519\u8BEF\u7684\u94FE\u63A5"],"openInNewWindow":"\u5728\u65B0\u7A97\u53E3\u6253\u5F00","toggleColorMode":"\u5207\u6362\u989C\u8272\u6A21\u5F0F","toggleSidebar":"\u5207\u6362\u4FA7\u8FB9\u680F","navbar":[{"text":"\u9996\u9875","link":"/"},{"text":"\u5728\u7EBF\u6559\u7A0B","link":"/doc/arthas-tutorials.html?language=cn&id=arthas-basics","target":"_blank"},{"text":"\u6587\u6863","link":"/doc/"},{"text":"\u547D\u4EE4\u5217\u8868","link":"/doc/commands.md"},{"text":"\u4E0B\u8F7D","link":"/doc/download.md"},{"text":"\u7248\u672C","children":[{"text":"v4.x","link":"https://arthas.aliyun.com/"}]}],"sidebar":{"/doc/":[{"text":"\u6587\u6863","children":["/doc/README.md","/doc/quick-start.md","/doc/install-detail.md","/doc/download.md","/doc/advice-class.html",{"text":"\u547D\u4EE4\u5217\u8868","link":"/doc/commands.md","collapsible":true,"children":["/doc/auth.md","/doc/base64.md","/doc/cat.md","/doc/classloader.md","/doc/cls.md","/doc/dashboard.md","/doc/dump.md","/doc/echo.md","/doc/getstatic.md","/doc/grep.md","/doc/heapdump.md","/doc/help.md","/doc/history.md","/doc/jad.md","/doc/jfr.md","/doc/jvm.md","/doc/keymap.md","/doc/logger.md","/doc/mbean.md","/doc/mc.md","/doc/memory.md","/doc/monitor.md","/doc/ognl.md","/doc/options.md","/doc/perfcounter.md","/doc/profiler.md","/doc/pwd.md","/doc/quit.md","/doc/redefine.md","/doc/reset.md","/doc/retransform.md","/doc/sc.md","/doc/session.md","/doc/sm.md","/doc/stack.md","/doc/stop.md","/doc/sysenv.md","/doc/sysprop.md","/doc/tee.md","/doc/thread.md","/doc/trace.md","/doc/tt.md","/doc/version.md","/doc/vmoption.md","/doc/vmtool.md","/doc/watch.md"]},{"text":"\u5176\u4ED6\u7279\u6027","link":"/doc/advanced-use.md","collapsible":true,"children":["/doc/async.md","/doc/save-log.md","/doc/docker.md","/doc/web-console.md","/doc/tunnel.md","/doc/idea-plugin.md","/doc/arthas-properties.html","/doc/agent.html","/doc/spring-boot-starter.md","/doc/http-api.md","/doc/batch-support.md"]},"/doc/faq.md",{"text":"\u7528\u6237\u6848\u4F8B","link":"https://github.com/alibaba/arthas/issues?q=label%3Auser-case"},{"text":"Star me at github","link":"https://github.com/alibaba/arthas"},{"text":"\u7F16\u8BD1\u8C03\u8BD5/\u53C2\u4E0E\u8D21\u732E","link":"https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md"},{"text":"Release Notes","link":"https://github.com/alibaba/arthas/releases"},{"text":"QQ \u7FA4/\u9489\u9489\u7FA4","link":"/doc/contact-us.md"}]}]},"sidebarDepth":0},"/en/":{"selectLanguageName":"English","selectLanguageText":"Languages","editLinkText":"Edit this page on GitHub","navbar":[{"text":"HOME","link":"/en/"},{"text":"ONLINE TUTORIALS","link":"/doc/arthas-tutorials.html?language=en&id=arthas-basics","target":"_blank"},{"text":"DOCS","link":"/en/doc"},{"text":"COMMANDS","link":"/en/doc/commands.md"},{"text":"DOWNLOAD","link":"/en/doc/download.md"},{"text":"VERSIONS","children":[{"text":"v4.x","link":"https://arthas.aliyun.com/en/"}]}],"sidebar":{"/en/doc":[{"text":"DOCS","children":["/en/doc/README.md","/en/doc/quick-start.md","/en/doc/install-detail.md","/en/doc/download.md","/en/doc/advice-class.html",{"text":"All Commands","link":"/en/doc/commands.md","collapsible":true,"children":["/en/doc/auth.md","/en/doc/base64.md","/en/doc/cat.md","/en/doc/classloader.md","/en/doc/cls.md","/en/doc/dashboard.md","/en/doc/dump.md","/en/doc/echo.md","/en/doc/getstatic.md","/en/doc/grep.md","/en/doc/heapdump.md","/en/doc/help.md","/en/doc/history.md","/en/doc/jad.md","/en/doc/jfr.md","/en/doc/jvm.md","/en/doc/keymap.md","/en/doc/logger.md","/en/doc/mbean.md","/en/doc/mc.md","/en/doc/memory.md","/en/doc/monitor.md","/en/doc/ognl.md","/en/doc/options.md","/en/doc/perfcounter.md","/en/doc/profiler.md","/en/doc/pwd.md","/en/doc/quit.md","/en/doc/redefine.md","/en/doc/reset.md","/en/doc/retransform.md","/en/doc/sc.md","/en/doc/session.md","/en/doc/sm.md","/en/doc/stack.md","/en/doc/stop.md","/en/doc/sysenv.md","/en/doc/sysprop.md","/en/doc/tee.md","/en/doc/thread.md","/en/doc/trace.md","/en/doc/tt.md","/en/doc/version.md","/en/doc/vmoption.md","/en/doc/vmtool.md","/en/doc/watch.md"]},{"text":"Other features","link":"/en/doc/advanced-use.md","collapsible":true,"children":["/en/doc/async.md","/en/doc/save-log.md","/en/doc/docker.md","/en/doc/web-console.md","/en/doc/tunnel.md","/en/doc/idea-plugin.md","/en/doc/arthas-properties.html","/en/doc/agent.html","/en/doc/spring-boot-starter.md","/en/doc/http-api.md","/en/doc/batch-support.md"]},"/en/doc/faq.md",{"text":"User cases","link":"https://github.com/alibaba/arthas/issues?q=label%3Auser-case"},{"text":"Star me at github","link":"https://github.com/alibaba/arthas"},{"text":"Compile and debug/CONTRIBUTING","link":"https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md"},{"text":"Release Notes","link":"https://github.com/alibaba/arthas/releases"},{"text":"Contact us","link":"/en/doc/contact-us.md"}]}]},"sidebarDepth":0}},"colorMode":"auto","colorModeSwitch":true,"navbar":[],"selectLanguageText":"Languages","selectLanguageAriaLabel":"Select language","sidebar":"auto","sidebarDepth":2,"editLink":true,"editLinkText":"Edit this page","lastUpdated":true,"lastUpdatedText":"Last Updated","contributors":true,"contributorsText":"Contributors","notFound":["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],"backToHome":"Take me home","openInNewWindow":"open in new window","toggleColorMode":"toggle color mode","toggleSidebar":"toggle sidebar"}`),fu=De(Lp),Dp=()=>fu;import.meta.webpackHot&&(__VUE_HMR_RUNTIME__.updateThemeData=e=>{fu.value=e});const hu=Symbol(""),Cr=()=>{const e=We(hu);if(!e)throw new Error("useThemeLocaleData() is called without provider.");return e},Rp=(e,t)=>{var n;return{...e,...(n=e.locales)==null?void 0:n[t]}},kp=Lt({enhance({app:e}){const t=Dp(),n=e._context.provides[pi],o=te(()=>Rp(t.value,n.value));e.provide(hu,o),Object.defineProperties(e.config.globalProperties,{$theme:{get(){return t.value}},$themeLocale:{get(){return o.value}}})}}),xp=je({__name:"Badge",props:{type:{type:String,required:!1,default:"tip"},text:{type:String,required:!1,default:""},vertical:{type:String,required:!1,default:void 0}},setup(e){return(t,n)=>(V(),X("span",{class:Ue(["badge",e.type]),style:bo({verticalAlign:e.vertical})},[He(t.$slots,"default",{},()=>[Xt(Me(e.text),1)])],6))}}),we=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Cp=we(xp,[["__file","Badge.vue"]]),Mp=je({name:"CodeGroup",setup(e,{slots:t}){const n=De(-1),o=De([]),r=(c=n.value)=>{c{c>0?n.value=c-1:n.value=o.value.length-1,o.value[n.value].focus()},i=(c,s)=>{c.key===" "||c.key==="Enter"?(c.preventDefault(),n.value=s):c.key==="ArrowRight"?(c.preventDefault(),r(s)):c.key==="ArrowLeft"&&(c.preventDefault(),a(s))};return()=>{var s;const c=(((s=t.default)==null?void 0:s.call(t))||[]).filter(l=>l.type.name==="CodeGroupItem").map(l=>(l.props===null&&(l.props={}),l));return c.length===0?null:(n.value<0||n.value>c.length-1?(n.value=c.findIndex(l=>l.props.active===""||l.props.active===!0),n.value===-1&&(n.value=0)):c.forEach((l,u)=>{l.props.active=u===n.value}),Te("div",{class:"code-group"},[Te("div",{class:"code-group__nav"},Te("ul",{class:"code-group__ul"},c.map((l,u)=>{const m=u===n.value;return Te("li",{class:"code-group__li"},Te("button",{ref:d=>{d&&(o.value[u]=d)},class:{"code-group__nav-tab":!0,"code-group__nav-tab-active":m},ariaPressed:m,ariaExpanded:m,onClick:()=>n.value=u,onKeydown:d=>i(d,u)},l.props.title))}))),c]))}}}),jp=["aria-selected"],Hp=je({name:"CodeGroupItem"}),$p=je({...Hp,props:{title:{type:String,required:!0},active:{type:Boolean,required:!1,default:!1}},setup(e){return(t,n)=>(V(),X("div",{class:Ue(["code-group-item",{"code-group-item__active":e.active}]),"aria-selected":e.active},[He(t.$slots,"default")],10,jp))}}),qp=we($p,[["__file","CodeGroupItem.vue"]]);var Tc;const pu=typeof window<"u",Vp=e=>typeof e=="function",Np=e=>typeof e=="string",Jr=()=>{};pu&&((Tc=window==null?void 0:window.navigator)==null?void 0:Tc.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ur(e){return typeof e=="function"?e():F(e)}function Fp(e,t){function n(...o){e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})}return n}const _u=e=>e();function Bp(e=_u){const t=De(!0);function n(){t.value=!1}function o(){t.value=!0}return{isActive:t,pause:n,resume:o,eventFilter:(...a)=>{t.value&&e(...a)}}}function zp(e){return e}function vu(e){return Vm()?(Nm(e),!0):!1}function Up(e,t=!0){ni()?Za(e):t?e():wo(e)}function Wp(e,t=!0){ni()?et(e):t?e():wo(e)}function Kp(e=!1,t={}){const{truthyValue:n=!0,falsyValue:o=!1}=t,r=ze(e),a=De(e);function i(c){if(arguments.length)return a.value=c,a.value;{const s=ur(n);return a.value=a.value===s?ur(o):s,a.value}}return r?i:[a,i]}var Ic=Object.getOwnPropertySymbols,Yp=Object.prototype.hasOwnProperty,Jp=Object.prototype.propertyIsEnumerable,Qp=(e,t)=>{var n={};for(var o in e)Yp.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Ic)for(var o of Ic(e))t.indexOf(o)<0&&Jp.call(e,o)&&(n[o]=e[o]);return n};function Gp(e,t,n={}){const o=n,{eventFilter:r=_u}=o,a=Qp(o,["eventFilter"]);return ot(e,Fp(r,t),a)}var Zp=Object.defineProperty,Xp=Object.defineProperties,e_=Object.getOwnPropertyDescriptors,mr=Object.getOwnPropertySymbols,gu=Object.prototype.hasOwnProperty,bu=Object.prototype.propertyIsEnumerable,Lc=(e,t,n)=>t in e?Zp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,t_=(e,t)=>{for(var n in t||(t={}))gu.call(t,n)&&Lc(e,n,t[n]);if(mr)for(var n of mr(t))bu.call(t,n)&&Lc(e,n,t[n]);return e},n_=(e,t)=>Xp(e,e_(t)),o_=(e,t)=>{var n={};for(var o in e)gu.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&mr)for(var o of mr(e))t.indexOf(o)<0&&bu.call(e,o)&&(n[o]=e[o]);return n};function r_(e,t,n={}){const o=n,{eventFilter:r}=o,a=o_(o,["eventFilter"]),{eventFilter:i,pause:c,resume:s,isActive:l}=Bp(r);return{stop:Gp(e,t,n_(t_({},a),{eventFilter:i})),pause:c,resume:s,isActive:l}}function a_(e){var t;const n=ur(e);return(t=n==null?void 0:n.$el)!=null?t:n}const dr=pu?window:void 0;function i_(...e){let t,n,o,r;if(Np(e[0])?([n,o,r]=e,t=dr):[t,n,o,r]=e,!t)return Jr;let a=Jr;const i=ot(()=>a_(t),s=>{a(),s&&(s.addEventListener(n,o,r),a=()=>{s.removeEventListener(n,o,r),a=Jr})},{immediate:!0,flush:"post"}),c=()=>{i(),a()};return vu(c),c}function c_(e,t=!1){const n=De(),o=()=>n.value=Boolean(e());return o(),Wp(o,t),n}function s_(e,t={}){const{window:n=dr}=t,o=c_(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let r;const a=De(!1),i=()=>{!o.value||(r||(r=n.matchMedia(e)),a.value=r.matches)};return Up(()=>{i(),r&&("addEventListener"in r?r.addEventListener("change",i):r.addListener(i),vu(()=>{"removeEventListener"in r?r.removeEventListener("change",i):r.removeListener(i)}))}),a}const wa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Oa="__vueuse_ssr_handlers__";wa[Oa]=wa[Oa]||{};const l_=wa[Oa];function u_(e,t){return l_[e]||t}function m_(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"||Array.isArray(e)?"object":Number.isNaN(e)?"any":"number"}var d_=Object.defineProperty,Dc=Object.getOwnPropertySymbols,f_=Object.prototype.hasOwnProperty,h_=Object.prototype.propertyIsEnumerable,Rc=(e,t,n)=>t in e?d_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kc=(e,t)=>{for(var n in t||(t={}))f_.call(t,n)&&Rc(e,n,t[n]);if(Dc)for(var n of Dc(t))h_.call(t,n)&&Rc(e,n,t[n]);return e};const p_={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}};function __(e,t,n,o={}){var r;const{flush:a="pre",deep:i=!0,listenToStorageChanges:c=!0,writeDefaults:s=!0,mergeDefaults:l=!1,shallow:u,window:m=dr,eventFilter:d,onError:f=R=>{console.error(R)}}=o,v=(u?vl:De)(t);if(!n)try{n=u_("getDefaultStorage",()=>{var R;return(R=dr)==null?void 0:R.localStorage})()}catch(R){f(R)}if(!n)return v;const g=ur(t),b=m_(g),_=(r=o.serializer)!=null?r:p_[b],{pause:y,resume:S}=r_(v,()=>A(v.value),{flush:a,deep:i,eventFilter:d});return m&&c&&i_(m,"storage",K),K(),v;function A(R){try{R==null?n.removeItem(e):n.setItem(e,_.write(R))}catch(E){f(E)}}function D(R){if(!(R&&R.key!==e)){y();try{const E=R?R.newValue:n.getItem(e);if(E==null)return s&&g!==null&&n.setItem(e,_.write(g)),g;if(!R&&l){const U=_.read(E);return Vp(l)?l(U,g):b==="object"&&!Array.isArray(U)?kc(kc({},g),U):U}else return typeof E!="string"?E:_.read(E)}catch(E){f(E)}finally{S()}}}function K(R){R&&R.key!==e||(v.value=D(R))}}function v_(e){return s_("(prefers-color-scheme: dark)",e)}var xc;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(xc||(xc={}));var g_=Object.defineProperty,Cc=Object.getOwnPropertySymbols,b_=Object.prototype.hasOwnProperty,y_=Object.prototype.propertyIsEnumerable,Mc=(e,t,n)=>t in e?g_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E_=(e,t)=>{for(var n in t||(t={}))b_.call(t,n)&&Mc(e,n,t[n]);if(Cc)for(var n of Cc(t))y_.call(t,n)&&Mc(e,n,t[n]);return e};const w_={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};E_({linear:zp},w_);const nt=()=>Cr(),yu=Symbol(""),si=()=>{const e=We(yu);if(!e)throw new Error("useDarkMode() is called without provider.");return e},O_=()=>{const e=nt(),t=v_(),n=__("vuepress-color-scheme",e.value.colorMode),o=te({get(){return e.value.colorModeSwitch?n.value==="auto"?t.value:n.value==="dark":e.value.colorMode==="dark"},set(r){r===t.value?n.value="auto":n.value=r?"dark":"light"}});hn(yu,o),P_(o)},P_=e=>{const t=(n=e.value)=>{const o=window==null?void 0:window.document.querySelector("html");o==null||o.classList.toggle("dark",n)};et(()=>{ot(e,t,{immediate:!0})}),Lr(()=>t())},Eu=(...e)=>{const n=vn().resolve(...e),o=n.matched[n.matched.length-1];if(!(o!=null&&o.redirect))return n;const{redirect:r}=o,a=he(r)?r(n):r,i=Le(a)?{path:a}:a;return Eu({hash:n.hash,query:n.query,params:n.params,...i})},li=e=>{const t=Eu(encodeURI(e));return{text:t.meta.title||e,link:t.name==="404"?e:t.fullPath}};let Qr=null,Kn=null;const S_={wait:()=>Qr,pending:()=>{Qr=new Promise(e=>Kn=e)},resolve:()=>{Kn==null||Kn(),Qr=null,Kn=null}},wu=()=>S_,Ou=Symbol("sidebarItems"),ui=()=>{const e=We(Ou);if(!e)throw new Error("useSidebarItems() is called without provider.");return e},A_=()=>{const e=nt(),t=At(),n=te(()=>T_(t.value,e.value));hn(Ou,n)},T_=(e,t)=>{var r,a,i,c;const n=(a=(r=e.sidebar)!=null?r:t.sidebar)!=null?a:"auto",o=(c=(i=e.sidebarDepth)!=null?i:t.sidebarDepth)!=null?c:2;return e.home||n===!1?[]:n==="auto"?L_(o):ce(n)?Pu(n,o):oi(n)?D_(n,o):[]},I_=(e,t)=>({text:e.title,link:e.link,children:mi(e.children,t)}),mi=(e,t)=>t>0?e.map(n=>I_(n,t-1)):[],L_=e=>{const t=mt();return[{text:t.value.title,children:mi(t.value.headers,e)}]},Pu=(e,t)=>{const n=Dt(),o=mt(),r=a=>{var c;let i;if(Le(a)?i=li(a):i=a,i.children)return{...i,children:i.children.map(s=>r(s))};if(i.link===n.path){const s=((c=o.value.headers[0])==null?void 0:c.level)===1?o.value.headers[0].children:o.value.headers;return{...i,children:mi(s,t)}}return i};return e.map(a=>r(a))},D_=(e,t)=>{var a;const n=Dt(),o=Xl(e,n.path),r=(a=e[o])!=null?a:[];return Pu(r,t)};const R_=["src"],k_={__name:"UserBoard",props:{img:{type:Object,required:!0}},setup(e){return(t,n)=>(V(),X("img",{class:"users-logo",src:e.img.logo},null,8,R_))}},x_=we(k_,[["__scopeId","data-v-024b28a0"],["__file","UserBoard.vue"]]);const C_={key:0,class:"user-boards"},M_=["innerHTML"],j_={class:"user-logos"},H_={__name:"HomeUserBoards",setup(e){const t=At(),n=Oe(t.value.users)||[];return(o,r)=>F(n)?(V(),X("div",C_,[ue("h1",null,Me(F(t).users_title),1),ue("p",{innerHTML:F(t).users_details},null,8,M_),ue("div",j_,[(V(!0),X(Ae,null,vt(F(n),a=>(V(),$e(x_,{key:a.logo,img:a},null,8,["img"]))),128))])])):Ne("v-if",!0)}},$_=we(H_,[["__scopeId","data-v-5032c352"],["__file","HomeUserBoards.vue"]]);const q_={key:0,class:"features"},V_={key:0,class:"icon"},N_={__name:"HomeFeatures",setup(e){const t=At(),n=te(()=>ce(t.value.features)?t.value.features:[]);return(o,r)=>F(n).length?(V(),X("div",q_,[(V(!0),X(Ae,null,vt(F(n),a=>(V(),X("div",{key:a.title,class:"feature"},[a.icon?(V(),X("div",V_,Me(a.icon),1)):Ne("v-if",!0),ue("h2",null,Me(a.title),1),ue("p",null,Me(a.details),1)]))),128))])):Ne("v-if",!0)}},F_=we(N_,[["__scopeId","data-v-514d14c6"],["__file","HomeFeatures.vue"]]),B_={name:"Star"},z_={version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",style:{"enable-background":"new 0 0 512 512",height:"1rem",fill:"var(--c-text)"},"xml:space":"preserve"},U_=ue("g",null,[ue("path",{d:`M175.1,168.9L13.7,186.8c-5.8,0.7-11,4.6-12.9,10.5c-1.9,5.9,0,12.1,4.3,16c48,43.8,120.1,109.4,120.1,109.4 + c-0.1,0-19.8,95.4-32.9,159.1c-1.1,5.8,1,11.9,6,15.5c5,3.7,11.4,3.7,16.5,0.9C171.3,466,256,417.7,256,417.7l141.1,80.5 + c5.1,2.8,11.6,2.8,16.6-0.9c5-3.7,7.1-9.7,6-15.5l-32.8-159.1L507,213.4c4.3-4,6.2-10.2,4.3-16.1c-1.9-5.9-7.1-9.8-12.9-10.4 + c-64.6-7.2-161.5-18-161.5-18L269.9,20.8c-2.5-5.3-7.8-9-14-9c-6.2,0-11.5,3.7-13.9,9L175.1,168.9z`})],-1),W_=[U_];function K_(e,t,n,o,r,a){return V(),X("svg",z_,W_)}const Y_=we(B_,[["render",K_],["__file","Star.vue"]]),J_={name:"Fork"},Q_={version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"131 -131 512 512",style:{"enable-background":"new 131 -131 512 512",height:"1rem",fill:"var(--c-text)"},"xml:space":"preserve"},G_=ue("g",{id:"XMLID_2_"},[ue("path",{id:"XMLID_8_",d:`M312.8,317c0-8.5-3.4-16.2-9.4-23s-13.7-9.4-23-9.4c-9.3,0-16.2,3.4-23,9.4c-6,6-9.4,13.7-9.4,23 + s3.4,16.2,9.4,23c6,6,13.7,9.4,23,9.4c9.3,0,16.2-3.4,23-9.4C310.2,334,312.8,325.5,312.8,317z M312.8-67c0-8.5-3.4-16.2-9.4-23 + c-6-6-13.7-9.4-23-9.4c-9.3,0-16.2,3.4-23,9.4c-6,6-9.4,13.7-9.4,23c0,8.5,3.4,16.2,9.4,23c6,6,13.7,9.4,23,9.4 + c9.3,0,16.2-3.4,23-9.4C310.2-49.9,312.8-58.5,312.8-67z M526.1-24.3c0-8.5-3.4-16.2-9.4-23s-13.7-9.4-23-9.4s-16.2,3.4-23,9.4 + s-9.4,13.7-9.4,23s3.4,16.2,9.4,23c6,6,13.7,9.4,23,9.4s16.2-3.4,23-9.4C522.7-8.1,526.1-15.8,526.1-24.3z M557.7-24.3 + c0,11.9-2.6,22.2-8.5,32.4s-13.7,17.9-23,23c-0.9,64-25.6,110.1-75.1,138.2c-15.4,8.5-37.5,17.1-67.4,27.3 + c-28.2,8.5-46.9,17.1-56.3,23.9c-9.4,6.8-13.7,17.9-13.7,33.3v8.5c9.4,6,17.9,13.7,23,23c5.1,9.4,8.5,20.5,8.5,32.4 + c0,17.9-6,33.3-18.8,45.2c-12.8,11.9-28.1,18.1-46.1,18.1s-33.3-6-45.2-18.8s-18.8-27.3-18.8-45.2c0-11.9,2.6-22.2,8.5-32.4 + c6-10.2,13.7-17.9,23-23V-11.5c-9.4-6-17.9-13.7-23-23s-8.5-20.6-8.5-32.5c0-17.9,6-33.3,18.8-45.2c12.8-11.9,27.3-18.8,45.2-18.8 + c17.9,0,33.3,6,45.2,18.8s18.8,27.3,18.8,45.2c0,11.9-2.6,22.2-8.5,32.4c-5.9,10.2-13.7,17.9-23,23V154c11.9-6,29-11.9,51.2-18.8 + c11.9-3.4,22.2-6.8,29-10.2c6.8-3.4,15.4-6,23.9-10.2s15.4-8.5,19.6-12.8s9.4-10.2,13.7-17.1s7.7-14.5,9.4-23 + c1.7-8.5,2.6-18.8,2.6-30.7c-9.4-6-17.9-13.7-23-23s-8.5-20.5-8.5-32.4c0-17.9,6-33.3,18.8-45.2c12.8-12.8,27.3-18.8,45.2-18.8 + s33.3,6,45.2,18.8C551.7-57.6,557.7-42.3,557.7-24.3z`})],-1),Z_=[G_];function X_(e,t,n,o,r,a){return V(),X("svg",Q_,Z_)}const ev=we(J_,[["render",X_],["__file","Fork.vue"]]);const tv=["href"],nv=Xt(" \xA0 "),ov={__name:"Badge",props:{comp:{type:Object,required:!0},data:{type:Number,required:!0}},setup(e){const t=e,o=`https://github.com/${Cr().value.repo}`,r=o,a=`${o}/fork`;let i=o;switch(t.comp.name){case"Star":i=r;break;case"Fork":i=a;break}return(c,s)=>{const l=It("CountTo");return V(),X("a",{class:"my-badge",href:F(i),target:"_blank"},[(V(),$e(Bd(e.comp))),nv,ie(l,{startVal:0,endVal:e.data,duration:500},null,8,["endVal"])],8,tv)}}},jc=we(ov,[["__scopeId","data-v-b201bc64"],["__file","Badge.vue"]]);const rv={class:"badges"},av={__name:"HomeBadges",setup(e){const t=De(29582),n=De(6494);return Za(async()=>{const r=await fetch("https://arthas.aliyun.com/api/starCount").then(i=>i.json()),a=await fetch("https://arthas.aliyun.com/api/forkCount").then(i=>i.json());t.value=r||t.value,n.value=a||n.value}),(r,a)=>(V(),X("div",rv,[ie(jc,{comp:Y_,data:t.value},null,8,["data"]),ie(jc,{comp:ev,data:n.value},null,8,["data"])]))}},iv=we(av,[["__scopeId","data-v-d7ced36e"],["__file","HomeBadges.vue"]]),cv={name:"MdiGithub"},sv={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24",style:{height:"1.25rem",width:"1.25rem","vertical-align":"bottom"}},lv=ue("path",{fill:"currentColor",d:"M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33c.85 0 1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2Z"},null,-1),uv=[lv];function mv(e,t,n,o,r,a){return V(),X("svg",sv,uv)}const dv=we(cv,[["render",mv],["__file","GitHub.vue"]]),fv=["href","rel","target","aria-label"],hv={key:1},pv=je({inheritAttrs:!1}),_v=Object.assign(pv,{__name:"AutoLink",props:{item:{type:Object,required:!0}},setup(e){const t=e,n=Dt(),o=_i(),{item:r}=Qa(t),a=te(()=>So(r.value.link)),i=te(()=>nh(r.value.link)||oh(r.value.link)),c=te(()=>{if(!i.value){if(r.value.target)return r.value.target;if(a.value)return"_blank"}}),s=te(()=>c.value==="_blank"),l=te(()=>!a.value&&!i.value&&!s.value),u=te(()=>{if(!i.value){if(r.value.rel)return r.value.rel;if(s.value)return"noopener noreferrer"}}),m=te(()=>r.value.ariaLabel||r.value.text),d=te(()=>{const g=Object.keys(o.value.locales);return g.length?!g.some(b=>b===r.value.link):r.value.link!=="/"}),f=te(()=>d.value?n.path.startsWith(r.value.link):!1),v=te(()=>l.value?r.value.activeMatch?new RegExp(r.value.activeMatch).test(n.path):f.value:!1);return(g,b)=>{const _=It("RouterLink"),y=It("AutoLinkExternalIcon");return F(l)?(V(),$e(_,_a({key:0,class:{"router-link-active":F(v)},to:F(r).link,"aria-label":F(m)},g.$attrs),{default:Ke(()=>[He(g.$slots,"before"),Xt(" "+Me(F(r).text)+" ",1),He(g.$slots,"after")]),_:3},16,["class","to","aria-label"])):(V(),X("a",_a({key:1,class:"external-link",href:F(r).link,rel:F(u),target:F(c),"aria-label":F(m)},g.$attrs),[He(g.$slots,"before"),F(r).text==="GitHub"?(V(),$e(dv,{key:0})):(V(),X("span",hv,Me(F(r).text),1)),F(s)&&F(r).text!=="GitHub"?(V(),$e(y,{key:2})):Ne("v-if",!0),He(g.$slots,"after")],16,fv))}}}),Ht=we(_v,[["__file","AutoLink.vue"]]),Hc=e=>decodeURI(e).replace(/#.*$/,"").replace(/(index)?\.(md|html)$/,""),vv=(e,t)=>{if(t.hash===e)return!0;const n=Hc(t.path),o=Hc(e);return n===o},Su=(e,t)=>e.link&&vv(e.link,t)?!0:e.children?e.children.some(n=>Su(n,t)):!1,Au=e=>!So(e)||/github\.com/.test(e)?"GitHub":/bitbucket\.org/.test(e)?"Bitbucket":/gitlab\.com/.test(e)?"GitLab":/gitee\.com/.test(e)?"Gitee":null,gv={GitHub:":repo/edit/:branch/:path",GitLab:":repo/-/edit/:branch/:path",Gitee:":repo/edit/:branch/:path",Bitbucket:":repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default"},bv=({docsRepo:e,editLinkPattern:t})=>{if(t)return t;const n=Au(e);return n!==null?gv[n]:null},yv=({docsRepo:e,docsBranch:t,docsDir:n,filePathRelative:o,editLinkPattern:r})=>{if(!o)return null;const a=bv({docsRepo:e,editLinkPattern:r});return a?a.replace(/:repo/,So(e)?e:`https://github.com/${e}`).replace(/:branch/,t).replace(/:path/,Zl(`${Gl(n)}/${o}`)):null},Ev={class:"hero"},wv={key:0,id:"main-title"},Ov={key:1,class:"description"},Pv={key:2,class:"actions"},Sv={__name:"HomeHero",setup(e){const t=At(),n=vi(),o=si(),r=te(()=>o.value&&t.value.heroImageDark!==void 0?t.value.heroImageDark:t.value.heroImage),a=te(()=>t.value.heroText===null?null:t.value.heroText||n.value.title||"Hello"),i=te(()=>t.value.heroAlt||a.value||"hero"),c=te(()=>t.value.tagline===null?null:t.value.tagline||n.value.description||"Welcome to your VuePress site"),s=te(()=>ce(t.value.actions)?t.value.actions.map(({text:u,link:m,type:d="primary"})=>({text:u,link:m,type:d})):[]),l=()=>{if(!r.value)return null;const u=Te("img",{src:bi(r.value),style:"width: 60%;",alt:i.value});return t.value.heroImageDark===void 0?u:Te(gi,()=>u)};return(u,m)=>(V(),X("header",Ev,[ie(l),ue("div",null,[F(a)?(V(),X("h1",wv,Me(F(a)),1)):Ne("v-if",!0),F(c)?(V(),X("p",Ov,Me(F(c)),1)):Ne("v-if",!0),ie(iv),F(s).length?(V(),X("p",Pv,[(V(!0),X(Ae,null,vt(F(s),d=>(V(),$e(Ht,{key:d.text,class:Ue(["action-button",[d.type]]),item:d},null,8,["class","item"]))),128))])):Ne("v-if",!0)])]))}},Av=we(Sv,[["__file","HomeHero.vue"]]),Tv={},Iv={class:"theme-default-content"};function Lv(e,t){const n=It("Content");return V(),X("div",Iv,[ie(n)])}const Dv=we(Tv,[["render",Lv],["__file","HomeContent.vue"]]),Rv=["innerHTML"],kv=["textContent"],xv=je({__name:"HomeFooter",setup(e){const t=At(),n=te(()=>t.value.footer),o=te(()=>t.value.footerHtml);return(r,a)=>F(n)?(V(),X(Ae,{key:0},[Ne(" eslint-disable-next-line vue/no-v-html "),F(o)?(V(),X("div",{key:0,class:"footer",innerHTML:F(n)},null,8,Rv)):(V(),X("div",{key:1,class:"footer",textContent:Me(F(n))},null,8,kv))],64)):Ne("v-if",!0)}}),Cv=we(xv,[["__file","HomeFooter.vue"]]),Mv={class:"home"},jv={__name:"Home",setup(e){return(t,n)=>(V(),X("main",Mv,[ie(Av),ie(F_),ie(Dv),ie($_),ie(Cv)]))}},Hv=we(jv,[["__file","Home.vue"]]);const $v={__name:"NavbarBrand",setup(e){const t=mt(),n=si(),o=Fn(),r=vi(),a=Cr(),i=De(t.value.version),c=te(()=>a.value.home||o.value),s=te(()=>r.value.title),l=te(()=>n.value&&a.value.logoDark!==void 0?a.value.logoDark:a.value.logo),u=()=>Te("span",{class:"navbar-version"},`v${i.value}`),m=()=>{if(!l.value)return null;const d=Te("img",{class:"logo",src:bi(l.value),alt:s.value});return a.value.logoDark===void 0?d:Te(gi,()=>d)};return(d,f)=>{const v=It("RouterLink");return V(),$e(v,{to:F(c)},{default:Ke(()=>[ie(m),F(s)?(V(),X("span",{key:0,class:Ue(["site-name",{"can-hide":F(l)}])},Me(F(s)),3)):Ne("v-if",!0),ie(u)]),_:1},8,["to"])}}},qv=we($v,[["__scopeId","data-v-a8869d06"],["__file","NavbarBrand.vue"]]),Vv={},Nv={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"1em",height:"1em",style:{height:"1.25rem",width:"1.25rem","vertical-align":"bottom"},viewBox:"0 0 24 24"},Fv=ue("path",{fill:"currentColor",d:"M13.35 22q-.6 0-.862-.387q-.263-.388-.063-.963l3.65-9.675q.15-.4.563-.688Q17.05 10 17.5 10q.425 0 .85.287q.425.288.575.688l3.65 9.675q.2.575-.062.963q-.263.387-.888.387q-.275 0-.5-.175q-.225-.175-.325-.425l-.85-2.45H15.1l-.875 2.45q-.1.25-.35.425q-.25.175-.525.175Zm2.35-4.8h3.6l-1.75-4.95h-.1ZM7.15 8.55q.4.725.85 1.337q.45.613 1.05 1.263q1.1-1.2 1.825-2.462Q11.6 7.425 12.1 6H2q-.425 0-.712-.287Q1 5.425 1 5t.288-.713Q1.575 4 2 4h6V3q0-.425.288-.713Q8.575 2 9 2t.713.287Q10 2.575 10 3v1h6q.425 0 .712.287Q17 4.575 17 5t-.288.713Q16.425 6 16 6h-1.9q-.525 1.775-1.425 3.45q-.9 1.675-2.225 3.15l2.4 2.45l-.75 2.05L9 14l-4.3 4.3q-.275.275-.7.275q-.425 0-.7-.275q-.275-.275-.275-.7q0-.425.275-.7l4.35-4.35q-.675-.775-1.25-1.563q-.575-.787-1.025-1.662Q5.1 8.8 5.35 8.4t.875-.4q.25 0 .525.162q.275.163.4.388Z"},null,-1),Bv=[Fv];function zv(e,t){return V(),X("svg",Nv,Bv)}const $c=we(Vv,[["render",zv],["__file","Translate.vue"]]),Uv=je({__name:"DropdownTransition",setup(e){const t=o=>{o.style.height=o.scrollHeight+"px"},n=o=>{o.style.height=""};return(o,r)=>(V(),$e(Po,{name:"dropdown",onEnter:t,onAfterEnter:n,onBeforeLeave:t},{default:Ke(()=>[He(o.$slots,"default")]),_:3}))}}),Tu=we(Uv,[["__file","DropdownTransition.vue"]]),Wv=["aria-label"],Kv={key:1,class:"title"},Yv=ue("span",{class:"arrow down"},null,-1),Jv=["aria-label"],Qv={key:1,class:"title"},Gv={class:"navbar-dropdown"},Zv={class:"navbar-dropdown-subtitle"},Xv={key:1},eg={class:"navbar-dropdown-subitem-wrapper"},tg={__name:"NavbarDropdown",props:{item:{type:Object,required:!0}},setup(e){const t=e,{item:n}=Qa(t),o=te(()=>n.value.ariaLabel||n.value.text),r=De(!1),a=Dt();ot(()=>a.path,()=>{r.value=!1});const i=s=>{s.detail===0?r.value=!r.value:r.value=!1},c=(s,l)=>l[l.length-1]===s;return(s,l)=>(V(),X("div",{class:Ue(["navbar-dropdown-wrapper",{open:r.value}])},[ue("button",{class:"navbar-dropdown-title",type:"button","aria-label":F(o),onClick:i},[F(n).text==="Languages"?(V(),$e($c,{key:0})):(V(),X("span",Kv,Me(F(n).text),1)),Yv],8,Wv),ue("button",{class:"navbar-dropdown-title-mobile",type:"button","aria-label":F(o),onClick:l[0]||(l[0]=u=>r.value=!r.value)},[F(n).text==="Languages"?(V(),$e($c,{key:0})):(V(),X("span",Qv,Me(F(n).text),1)),ue("span",{class:Ue(["arrow",r.value?"down":"right"])},null,2)],8,Jv),ie(Tu,null,{default:Ke(()=>[or(ue("ul",Gv,[(V(!0),X(Ae,null,vt(F(n).children,u=>(V(),X("li",{key:u.text,class:"navbar-dropdown-item"},[u.children?(V(),X(Ae,{key:0},[ue("h4",Zv,[u.link?(V(),$e(Ht,{key:0,item:u,onFocusout:m=>c(u,F(n).children)&&u.children.length===0&&(r.value=!1)},null,8,["item","onFocusout"])):(V(),X("span",Xv,Me(u.text),1))]),ue("ul",eg,[(V(!0),X(Ae,null,vt(u.children,m=>(V(),X("li",{key:m.link,class:"navbar-dropdown-subitem"},[ie(Ht,{item:m,onFocusout:d=>c(m,u.children)&&c(u,F(n).children)&&(r.value=!1)},null,8,["item","onFocusout"])]))),128))])],64)):(V(),$e(Ht,{key:1,item:u,onFocusout:m=>c(u,F(n).children)&&(r.value=!1)},null,8,["item","onFocusout"]))]))),128))],512),[[sr,r.value]])]),_:1})],2))}},ng=we(tg,[["__file","NavbarDropdown.vue"]]),og={key:0,class:"navbar-items"},rg=je({__name:"NavbarItems",setup(e){const t=()=>{const l=vn(),u=Fn(),m=vi(),d=nt();return te(()=>{var y,S,A;const f=Object.keys(m.value.locales);if(f.length<2)return[];const v=l.currentRoute.value.path,g=l.currentRoute.value.fullPath,b=l.currentRoute.value.hash;return[{text:(y=d.value.selectLanguageText)!=null?y:"unknown language",ariaLabel:(A=(S=d.value.selectLanguageAriaLabel)!=null?S:d.value.selectLanguageText)!=null?A:"unknown language",children:f.map(D=>{var H,P,T,k,M,j;const K=(P=(H=m.value.locales)==null?void 0:H[D])!=null?P:{},R=(k=(T=d.value.locales)==null?void 0:T[D])!=null?k:{},E=`${K.lang}`,U=(M=R.selectLanguageName)!=null?M:E;let Y;if(E===m.value.lang)Y=g;else{const W=v.replace(u.value,D);l.getRoutes().some(ee=>ee.path===W)?Y=`${W}${b}`:Y=(j=R.home)!=null?j:D}return{text:U,link:Y}})}]})},n=()=>{const l=nt(),u=te(()=>l.value.repo),m=te(()=>u.value?Au(u.value):null),d=te(()=>u.value&&!So(u.value)?`https://github.com/${u.value}`:u.value),f=te(()=>d.value?l.value.repoLabel?l.value.repoLabel:m.value===null?"Source":m.value:null);return te(()=>!d.value||!f.value?[]:[{text:f.value,link:d.value}])},o=l=>Le(l)?li(l):l.children?{...l,children:l.children.map(o)}:l,a=(()=>{const l=nt();return te(()=>(l.value.navbar||[]).map(o))})(),i=t(),c=n(),s=te(()=>[...a.value,...i.value,...c.value]);return(l,u)=>F(s).length?(V(),X("nav",og,[(V(!0),X(Ae,null,vt(F(s),m=>(V(),X("div",{key:m.text,class:"navbar-item"},[m.children?(V(),$e(ng,{key:0,item:m},null,8,["item"])):(V(),$e(Ht,{key:1,item:m},null,8,["item"]))]))),128))])):Ne("v-if",!0)}}),Iu=we(rg,[["__file","NavbarItems.vue"]]),ag=["title"],ig={class:"icon",focusable:"false",viewBox:"0 0 32 32"},cg=df('',9),sg=[cg],lg={class:"icon",focusable:"false",viewBox:"0 0 32 32"},ug=ue("path",{d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z",fill:"currentColor"},null,-1),mg=[ug],dg=je({__name:"ToggleColorModeButton",setup(e){const t=nt(),n=si(),o=()=>{n.value=!n.value};return(r,a)=>(V(),X("button",{class:"toggle-color-mode-button",title:F(t).toggleColorMode,onClick:o},[or((V(),X("svg",ig,sg,512)),[[sr,!F(n)]]),or((V(),X("svg",lg,mg,512)),[[sr,F(n)]])],8,ag))}}),fg=we(dg,[["__file","ToggleColorModeButton.vue"]]),hg=["title"],pg=ue("div",{class:"icon","aria-hidden":"true"},[ue("span"),ue("span"),ue("span")],-1),_g=[pg],vg=je({__name:"ToggleSidebarButton",emits:["toggle"],setup(e){const t=nt();return(n,o)=>(V(),X("div",{class:"toggle-sidebar-button",title:F(t).toggleSidebar,"aria-expanded":"false",role:"button",tabindex:"0",onClick:o[0]||(o[0]=r=>n.$emit("toggle"))},_g,8,hg))}}),gg=we(vg,[["__file","ToggleSidebarButton.vue"]]),bg=je({__name:"Navbar",emits:["toggle-sidebar"],setup(e){const t=nt(),n=De(null),o=De(null),r=De(0),a=te(()=>r.value?{maxWidth:r.value+"px"}:{});et(()=>{const s=i(n.value,"paddingLeft")+i(n.value,"paddingRight"),l=()=>{var u;window.innerWidth<=719?r.value=0:r.value=n.value.offsetWidth-s-(((u=o.value)==null?void 0:u.offsetWidth)||0)};l(),window.addEventListener("resize",l,!1),window.addEventListener("orientationchange",l,!1)});function i(c,s){var m,d,f;const l=(f=(d=(m=c==null?void 0:c.ownerDocument)==null?void 0:m.defaultView)==null?void 0:d.getComputedStyle(c,null))==null?void 0:f[s],u=Number.parseInt(l,10);return Number.isNaN(u)?0:u}return(c,s)=>{const l=It("NavbarSearch");return V(),X("header",{ref_key:"navbar",ref:n,class:"navbar"},[ie(gg,{onToggle:s[0]||(s[0]=u=>c.$emit("toggle-sidebar"))}),ue("span",{ref_key:"navbarBrand",ref:o},[ie(qv)],512),ue("div",{class:"navbar-items-wrapper",style:bo(F(a))},[He(c.$slots,"before"),ie(Iu,{class:"can-hide"}),He(c.$slots,"after"),F(t).colorModeSwitch?(V(),$e(fg,{key:0})):Ne("v-if",!0),ie(l)],4)],512)}}}),yg=we(bg,[["__file","Navbar.vue"]]);const Eg={class:"right-menu-wrapper"},wg={class:"right-menu-margin"},Og={class:"right-menu-title"},Pg={class:"right-menu-content"},Sg=["href","title"],Ag=["href"],Tg=["href","title"],Ig=["href"],Lg={__name:"RightMenu",setup(e){var s;const t=mt(),n=Cr(),o=De(""),r=De([]);let a=De("");o.value=(s=n.value.rightMenuText)!=null?s:"Table of Contents";function i(){r.value=t.value.headers}function c(){a.value=decodeURIComponent(window.location.hash.slice(1))}return et(()=>{i(),c()}),ot(Dt(),()=>{r.value=t.value.headers,c()}),(l,u)=>(V(),X("div",Eg,[ue("div",wg,[ue("div",Og,Me(o.value),1),ue("div",Pg,[(V(!0),X(Ae,null,vt(r.value,(m,d)=>(V(),X(Ae,{key:d},[ue("div",{class:Ue(["right-menu-item","level"+m.level,{active:m.slug===F(a)}])},[m.title.replace(/[^\x00-\xff]/g,"01").length>=36?(V(),X("a",{key:0,href:"#"+m.slug,title:m.title},Me(m.title),9,Sg)):(V(),X("a",{key:1,href:"#"+m.slug},Me(m.title),9,Ag))],2),(V(!0),X(Ae,null,vt(m.children,(f,v)=>(V(),X("div",{class:Ue(["right-menu-item","level"+f.level,{active:f.slug===F(a)}]),key:v},[f.title.replace(/[^\x00-\xff]/g,"01").length>=35?(V(),X("a",{key:0,href:"#"+f.slug,title:f.title},Me(f.title),9,Tg)):(V(),X("a",{key:1,href:"#"+f.slug},Me(f.title),9,Ig))],2))),128))],64))),128))])])]))}},Dg=we(Lg,[["__scopeId","data-v-64666cd5"],["__file","RightMenu.vue"]]),Rg={class:"page-meta"},kg={key:0,class:"meta-item edit-link"},xg={key:1,class:"meta-item last-updated"},Cg={class:"meta-item-label"},Mg={class:"meta-item-info"},jg={key:2,class:"meta-item contributors"},Hg={class:"meta-item-label"},$g={class:"meta-item-info"},qg=["title"],Vg=Xt(", "),Ng=je({__name:"PageMeta",setup(e){const t=()=>{const s=nt(),l=mt(),u=At();return te(()=>{var y,S,A;if(!((S=(y=u.value.editLink)!=null?y:s.value.editLink)!=null?S:!0))return null;const{repo:d,docsRepo:f=d,docsBranch:v="main",docsDir:g="",editLinkText:b}=s.value;if(!f)return null;const _=yv({docsRepo:f,docsBranch:v,docsDir:g,filePathRelative:l.value.filePathRelative,editLinkPattern:(A=u.value.editLinkPattern)!=null?A:s.value.editLinkPattern});return _?{text:b!=null?b:"Edit this page",link:_}:null})},n=()=>{const s=nt(),l=mt(),u=At();return te(()=>{var f,v,g,b;return!((v=(f=u.value.lastUpdated)!=null?f:s.value.lastUpdated)!=null?v:!0)||!((g=l.value.git)!=null&&g.updatedTime)?null:new Date((b=l.value.git)==null?void 0:b.updatedTime).toLocaleString()})},o=()=>{const s=nt(),l=mt(),u=At();return te(()=>{var d,f,v,g;return((f=(d=u.value.contributors)!=null?d:s.value.contributors)!=null?f:!0)&&(g=(v=l.value.git)==null?void 0:v.contributors)!=null?g:null})},r=nt(),a=t(),i=n(),c=o();return(s,l)=>{const u=It("ClientOnly");return V(),X("footer",Rg,[F(a)?(V(),X("div",kg,[ie(Ht,{class:"meta-item-label",item:F(a)},null,8,["item"])])):Ne("v-if",!0),F(i)?(V(),X("div",xg,[ue("span",Cg,Me(F(r).lastUpdatedText)+": ",1),ie(u,null,{default:Ke(()=>[ue("span",Mg,Me(F(i)),1)]),_:1})])):Ne("v-if",!0),F(c)&&F(c).length?(V(),X("div",jg,[ue("span",Hg,Me(F(r).contributorsText)+": ",1),ue("span",$g,[(V(!0),X(Ae,null,vt(F(c),(m,d)=>(V(),X(Ae,{key:d},[ue("span",{class:"contributor",title:`email: ${m.email}`},Me(m.name),9,qg),d!==F(c).length-1?(V(),X(Ae,{key:0},[Vg],64)):Ne("v-if",!0)],64))),128))])])):Ne("v-if",!0)])}}}),Fg=we(Ng,[["__file","PageMeta.vue"]]),Bg={key:0,class:"page-nav"},zg={class:"inner"},Ug={key:0,class:"prev"},Wg={key:1,class:"next"},Kg=je({__name:"PageNav",setup(e){const t=s=>s===!1?null:Le(s)?li(s):oi(s)?s:!1,n=(s,l,u)=>{const m=s.findIndex(d=>d.link===l);if(m!==-1){const d=s[m+u];return d!=null&&d.link?d:null}for(const d of s)if(d.children){const f=n(d.children,l,u);if(f)return f}return null},o=At(),r=ui(),a=Dt(),i=te(()=>{const s=t(o.value.prev);return s!==!1?s:n(r.value,a.path,-1)}),c=te(()=>{const s=t(o.value.next);return s!==!1?s:n(r.value,a.path,1)});return(s,l)=>F(i)||F(c)?(V(),X("nav",Bg,[ue("p",zg,[F(i)?(V(),X("span",Ug,[ie(Ht,{item:F(i)},null,8,["item"])])):Ne("v-if",!0),F(c)?(V(),X("span",Wg,[ie(Ht,{item:F(c)},null,8,["item"])])):Ne("v-if",!0)])])):Ne("v-if",!0)}}),Yg=we(Kg,[["__file","PageNav.vue"]]);const Jg={class:"page"},Qg={__name:"Page",setup(e){function t(){return mt().value.headers.length>0}return(n,o)=>{const r=It("Content");return V(),X("main",Jg,[He(n.$slots,"top",{},void 0,!0),ue("div",{class:Ue([t()&&"right-menu-padding","theme-default-content"])},[He(n.$slots,"content-top",{},void 0,!0),t()?(V(),$e(Dg,{key:0})):Ne("v-if",!0),ie(r),He(n.$slots,"content-bottom",{},void 0,!0)],2),ie(Fg,{class:Ue(t()&&"right-menu-padding")},null,8,["class"]),ie(Yg,{class:Ue(t()&&"right-menu-padding")},null,8,["class"]),He(n.$slots,"bottom",{},void 0,!0)])}}},Gg=we(Qg,[["__scopeId","data-v-fdd717e0"],["__file","Page.vue"]]),Zg=["onKeydown"],Xg={class:"sidebar-item-children"},e0=je({__name:"SidebarItem",props:{item:{type:Object,required:!0},depth:{type:Number,required:!1,default:0}},setup(e){const t=e,{item:n,depth:o}=Qa(t),r=Dt(),a=vn(),i=te(()=>Su(n.value,r)),c=te(()=>({"sidebar-item":!0,"sidebar-heading":o.value===0,active:i.value,collapsible:n.value.collapsible})),s=te(()=>n.value.collapsible?i.value:!0),[l,u]=Kp(s.value),m=f=>{n.value.collapsible&&(f.preventDefault(),u())},d=a.afterEach(f=>{wo(()=>{l.value=s.value})});return Ir(()=>{d()}),(f,v)=>{var b;const g=It("SidebarItem",!0);return V(),X("li",null,[F(n).link?(V(),$e(Ht,{key:0,class:Ue(F(c)),item:F(n)},null,8,["class","item"])):(V(),X("p",{key:1,tabindex:"0",class:Ue(F(c)),onClick:m,onKeydown:Yf(m,["enter"])},[Xt(Me(F(n).text)+" ",1),F(n).collapsible?(V(),X("span",{key:0,class:Ue(["arrow",F(l)?"down":"right"])},null,2)):Ne("v-if",!0)],42,Zg)),(b=F(n).children)!=null&&b.length?(V(),$e(Tu,{key:2},{default:Ke(()=>[or(ue("ul",Xg,[(V(!0),X(Ae,null,vt(F(n).children,_=>(V(),$e(g,{key:`${F(o)}${_.text}${_.link}`,item:_,depth:F(o)+1},null,8,["item","depth"]))),128))],512),[[sr,F(l)]])]),_:1})):Ne("v-if",!0)])}}}),t0=we(e0,[["__file","SidebarItem.vue"]]),n0={key:0,class:"sidebar-items"},o0=je({__name:"SidebarItems",setup(e){const t=Dt(),n=ui();return et(()=>{ot(()=>t.hash,o=>{const r=document.querySelector(".sidebar");if(!r)return;const a=document.querySelector(`.sidebar a.sidebar-item[href="${t.path}${o}"]`);if(!a)return;const{top:i,height:c}=r.getBoundingClientRect(),{top:s,height:l}=a.getBoundingClientRect();si+c&&a.scrollIntoView(!1)})}),(o,r)=>F(n).length?(V(),X("ul",n0,[(V(!0),X(Ae,null,vt(F(n),a=>(V(),$e(t0,{key:`${a.text}${a.link}`,item:a},null,8,["item"]))),128))])):Ne("v-if",!0)}}),r0=we(o0,[["__file","SidebarItems.vue"]]),a0={class:"sidebar"},i0=je({__name:"Sidebar",setup(e){return(t,n)=>(V(),X("aside",a0,[ie(Iu),He(t.$slots,"top"),ie(r0),He(t.$slots,"bottom")]))}}),c0=we(i0,[["__file","Sidebar.vue"]]),s0=je({__name:"Layout",setup(e){const t=mt(),n=At(),o=nt(),r=te(()=>n.value.navbar!==!1&&o.value.navbar!==!1),a=ui(),i=De(!1),c=b=>{i.value=typeof b=="boolean"?b:!i.value},s={x:0,y:0},l=b=>{s.x=b.changedTouches[0].clientX,s.y=b.changedTouches[0].clientY},u=b=>{const _=b.changedTouches[0].clientX-s.x,y=b.changedTouches[0].clientY-s.y;Math.abs(_)>Math.abs(y)&&Math.abs(_)>40&&(_>0&&s.x<=80?c(!0):c(!1))},m=te(()=>[{"no-navbar":!r.value,"no-sidebar":!a.value.length,"sidebar-open":i.value},n.value.pageClass]);let d;et(()=>{d=vn().afterEach(()=>{c(!1)})}),Lr(()=>{d()});const f=wu(),v=f.resolve,g=f.pending;return(b,_)=>(V(),X("div",{class:Ue(["theme-container",F(m)]),onTouchstart:l,onTouchend:u},[He(b.$slots,"navbar",{},()=>[F(r)?(V(),$e(yg,{key:0,onToggleSidebar:c},{before:Ke(()=>[He(b.$slots,"navbar-before")]),after:Ke(()=>[He(b.$slots,"navbar-after")]),_:3})):Ne("v-if",!0)]),ue("div",{class:"sidebar-mask",onClick:_[0]||(_[0]=y=>c(!1))}),He(b.$slots,"sidebar",{},()=>[ie(c0,null,{top:Ke(()=>[He(b.$slots,"sidebar-top")]),bottom:Ke(()=>[He(b.$slots,"sidebar-bottom")]),_:3})]),He(b.$slots,"page",{},()=>[F(n).home?(V(),$e(Hv,{key:0})):(V(),$e(Po,{key:1,name:"fade-slide-y",mode:"out-in",onBeforeEnter:F(v),onBeforeLeave:F(g)},{default:Ke(()=>[(V(),$e(Gg,{key:F(t).path},{top:Ke(()=>[He(b.$slots,"page-top")]),"content-top":Ke(()=>[He(b.$slots,"page-content-top")]),"content-bottom":Ke(()=>[He(b.$slots,"page-content-bottom")]),bottom:Ke(()=>[He(b.$slots,"page-bottom")]),_:3}))]),_:3},8,["onBeforeEnter","onBeforeLeave"]))])],34))}}),l0=we(s0,[["__file","Layout.vue"]]),u0={class:"theme-container"},m0={class:"page"},d0={class:"theme-default-content"},f0=ue("h1",null,"404",-1),h0=je({__name:"NotFound",setup(e){var c,s,l;const t=Fn(),n=nt(),o=(c=n.value.notFound)!=null?c:["Not Found"],r=()=>o[Math.floor(Math.random()*o.length)],a=(s=n.value.home)!=null?s:t.value,i=(l=n.value.backToHome)!=null?l:"Back to home";return(u,m)=>{const d=It("RouterLink");return V(),X("div",u0,[ue("main",m0,[ue("div",d0,[f0,ue("blockquote",null,Me(r()),1),ie(d,{to:F(a)},{default:Ke(()=>[Xt(Me(F(i)),1)]),_:1},8,["to"])])])])}}}),p0=we(h0,[["__file","NotFound.vue"]]);const _0=Lt({enhance({app:e,router:t}){e.component("Badge",Cp),e.component("CodeGroup",Mp),e.component("CodeGroupItem",qp),e.component("AutoLinkExternalIcon",()=>{const o=e.component("ExternalLinkIcon");return o?Te(o):null}),e.component("NavbarSearch",()=>{const o=e.component("Docsearch")||e.component("SearchBox");return o?Te(o):null});const n=t.options.scrollBehavior;t.options.scrollBehavior=async(...o)=>(await wu().wait(),n(...o))},setup(){O_(),A_()},layouts:{Layout:l0,NotFound:p0}});const v0={},g0=e=>{const t=Fn();return te(()=>e[t.value])};class b0{constructor(){this.messageElements={};const t="message-container",n=document.getElementById(t);n?this.containerElement=n:(this.containerElement=document.createElement("div"),this.containerElement.id=t,document.body.appendChild(this.containerElement))}pop(t,n=2e3){const o=document.createElement("div"),r=Date.now();return o.className="message move-in",o.innerHTML=t,this.containerElement.appendChild(o),this.messageElements[r]=o,n>0&&setTimeout(()=>{this.close(r)},n),r}close(t){if(t){const n=this.messageElements[t];n.className=n.className.replace("move-in",""),n.className+="move-out",n.addEventListener("animationend",()=>{n.remove(),delete this.messageElements[t]})}else Object.keys(this.messageElements).forEach(n=>this.close(Number(n)))}destory(){document.body.removeChild(this.containerElement)}}var Gr,Ct=function(){var e=1e3,t=6e4,n=36e5,o="millisecond",r="second",a="minute",i="hour",c="day",s="week",l="month",u="quarter",m="year",d="date",f="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},_=function(H,P,T){var k=String(H);return!k||k.length>=P?H:""+Array(P+1-k.length).join(T)+H},y={s:_,z:function(H){var P=-H.utcOffset(),T=Math.abs(P),k=Math.floor(T/60),M=T%60;return(P<=0?"+":"-")+_(k,2,"0")+":"+_(M,2,"0")},m:function H(P,T){if(P.date()1)return H(W[0])}else{var ee=P.name;A[ee]=P,M=ee}return!k&&M&&(S=M),M||!k&&S},R=function(H,P){if(D(H))return H.clone();var T=typeof P=="object"?P:{};return T.date=H,T.args=arguments,new U(T)},E=y;E.l=K,E.i=D,E.w=function(H,P){return R(H,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var U=function(){function H(T){this.$L=K(T.locale,null,!0),this.parse(T)}var P=H.prototype;return P.parse=function(T){this.$d=function(k){var M=k.date,j=k.utc;if(M===null)return new Date(NaN);if(E.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var W=M.match(v);if(W){var ee=W[2]-1||0,me=(W[7]||"0").substring(0,3);return j?new Date(Date.UTC(W[1],ee,W[3]||1,W[4]||0,W[5]||0,W[6]||0,me)):new Date(W[1],ee,W[3]||1,W[4]||0,W[5]||0,W[6]||0,me)}}return new Date(M)}(T),this.$x=T.x||{},this.init()},P.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},P.$utils=function(){return E},P.isValid=function(){return this.$d.toString()!==f},P.isSame=function(T,k){var M=R(T);return this.startOf(k)<=M&&M<=this.endOf(k)},P.isAfter=function(T,k){return R(T)=0?1:v.date()),b=f.year||v.year(),_=f.month>=0?f.month:f.year||f.day?0:v.month(),y=f.hour||0,S=f.minute||0,A=f.second||0,D=f.millisecond||0;return d?new Date(Date.UTC(b,_,g,y,S,A,D)):new Date(b,_,g,y,S,A,D)}return m},a=o.parse;o.parse=function(l){l.date=r.bind(this)(l),a.bind(this)(l)};var i=o.set,c=o.add,s=function(l,u,m,d){if(d===void 0&&(d=1),u instanceof Object){var f=Object.keys(u),v=this;return f.forEach(function(g){v=l.bind(v)(u[g]*d,g)}),v}return l.bind(this)(u*d,m)};o.set=function(l,u){return u=u===void 0?l:u,s.bind(this)(function(m,d){return i.bind(this)(d,m)},u,l)},o.add=function(l,u){return s.bind(this)(c,l,u)},o.subtract=function(l,u){return s.bind(this)(c,l,u,-1)}},Du=function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,o,r){var a,i=function(u,m,d){d===void 0&&(d={});var f=new Date(u),v=function(g,b){b===void 0&&(b={});var _=b.timeZoneName||"short",y=g+"|"+_,S=t[y];return S||(S=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:_}),t[y]=S),S}(m,d);return v.formatToParts(f)},c=function(u,m){for(var d=i(u,m),f=[],v=0;v=0&&(f[y]=parseInt(_,10))}var S=f[3],A=S===24?0:S,D=f[0]+"-"+f[1]+"-"+f[2]+" "+A+":"+f[4]+":"+f[5]+":000",K=+u;return(r.utc(D).valueOf()-(K-=K%1e3))/6e4},s=o.prototype;s.tz=function(u,m){u===void 0&&(u=a);var d=this.utcOffset(),f=this.toDate(),v=f.toLocaleString("en-US",{timeZone:u}),g=Math.round((f-new Date(v))/1e3/60),b=r(v).$set("millisecond",this.$ms).utcOffset(15*-Math.round(f.getTimezoneOffset()/15)-g,!0);if(m){var _=b.utcOffset();b=b.add(d-_,"minute")}return b.$x.$timezone=u,b},s.offsetName=function(u){var m=this.$x.$timezone||r.tz.guess(),d=i(this.valueOf(),m,{timeZoneName:u}).find(function(f){return f.type.toLowerCase()==="timezonename"});return d&&d.value};var l=s.startOf;s.startOf=function(u,m){if(!this.$x||!this.$x.$timezone)return l.call(this,u,m);var d=r(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return l.call(d,u,m).tz(this.$x.$timezone,!0)},r.tz=function(u,m,d){var f=d&&m,v=d||m||a,g=c(+r(),v);if(typeof u!="string")return r(u).tz(v);var b=function(A,D,K){var R=A-60*D*1e3,E=c(R,K);if(D===E)return[R,D];var U=c(R-=60*(E-D)*1e3,K);return E===U?[R,E]:[A-60*Math.min(E,U)*1e3,Math.max(E,U)]}(r.utc(u,f).valueOf(),g,v),_=b[0],y=b[1],S=r(_).utcOffset(y);return S.$x.$timezone=v,S},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(u){a=u}}}(),Ru=function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(o,r,a){var i=r.prototype;a.utc=function(f){return new r({date:f,utc:!0,args:arguments})},i.utc=function(f){var v=a(this.toDate(),{locale:this.$L,utc:!0});return f?v.add(this.utcOffset(),e):v},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=i.parse;i.parse=function(f){f.utc&&(this.$u=!0),this.$utils().u(f.$offset)||(this.$offset=f.$offset),c.call(this,f)};var s=i.init;i.init=function(){if(this.$u){var f=this.$d;this.$y=f.getUTCFullYear(),this.$M=f.getUTCMonth(),this.$D=f.getUTCDate(),this.$W=f.getUTCDay(),this.$H=f.getUTCHours(),this.$m=f.getUTCMinutes(),this.$s=f.getUTCSeconds(),this.$ms=f.getUTCMilliseconds()}else s.call(this)};var l=i.utcOffset;i.utcOffset=function(f,v){var g=this.$utils().u;if(g(f))return this.$u?0:g(this.$offset)?l.call(this):this.$offset;if(typeof f=="string"&&(f=function(S){S===void 0&&(S="");var A=S.match(t);if(!A)return null;var D=(""+A[0]).match(n)||["-",0,0],K=D[0],R=60*+D[1]+ +D[2];return R===0?0:K==="+"?R:-R}(f),f===null))return this;var b=Math.abs(f)<=16?60*f:f,_=this;if(v)return _.$offset=b,_.$u=f===0,_;if(f!==0){var y=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(_=this.local().add(b+y,e)).$offset=b,_.$x.$localOffset=y}else _=this.utc();return _};var u=i.format;i.format=function(f){var v=f||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,v)},i.valueOf=function(){var f=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*f},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var m=i.toDate;i.toDate=function(f){return f==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var d=i.diff;i.diff=function(f,v,g){if(f&&this.$u===f.$u)return d.call(this,f,v,g);var b=this.local(),_=a(f).local();return d.call(b,_,v,g)}}}();Ct.extend(y0),Ct.extend(Lu),Ct.extend(Ru),Ct.extend(Du);const E0={name:"zh-cn",weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:(e,t)=>t==="W"?`${e}\u5468`:`${e}\u65E5`,weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206",LLLL:"YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},relativeTime:{future:"%s\u5185",past:"%s\u524D",s:"\u51E0\u79D2",m:"1 \u5206\u949F",mm:"%d \u5206\u949F",h:"1 \u5C0F\u65F6",hh:"%d \u5C0F\u65F6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4E2A\u6708",MM:"%d \u4E2A\u6708",y:"1 \u5E74",yy:"%d \u5E74"},meridiem:(e,t)=>{const n=100*e+t;return n<600?"\u51CC\u6668":n<900?"\u65E9\u4E0A":n<1100?"\u4E0A\u5348":n<1300?"\u4E2D\u5348":n<1800?"\u4E0B\u5348":"\u665A\u4E0A"}},w0={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")};Ct.locale("zh",E0),Ct.locale("en",w0),Ct.extend(Lu),Ct.extend(Ru),Ct.extend(Du);const jo={showInMobile:!1,pure:!0},qc=()=>!!navigator&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/iu.test(navigator.userAgent),O0=()=>{const e=Dt(),t=g0({"/en/":{copy:"Copied successfully",hint:"Copy code"},"/":{copy:"\u590D\u5236\u6210\u529F",hint:"\u590D\u5236\u4EE3\u7801"}}),n=r=>{if(!r.hasAttribute("copy-code-registered")){const a=document.createElement("button");a.className="copy-code-pure-button",a.innerHTML='',a.addEventListener("click",()=>{(i=>{const c=document.getSelection(),s=!!(c&&c.rangeCount>0)&&c.getRangeAt(0),l=document.createElement("textarea");l.value=i,l.setAttribute("readonly",""),l.style.position="absolute",l.style.top="-9999px",document.body.appendChild(l),l.select(),document.execCommand("copy"),document.body.removeChild(l),s&&c&&(c.removeAllRanges(),c.addRange(s))})(r.innerText)}),a.setAttribute("aria-label",t.value.hint),a.setAttribute("data-balloon-pos","left"),r.parentElement&&r.parentElement.insertBefore(a,r),r.setAttribute("copy-code-registered","")}},o=()=>{const r=jo.selector||'.theme-default-content div[class*="language-"] pre';setTimeout(()=>{typeof r=="string"?document.querySelectorAll(r).forEach(n):Array.isArray(r)&&r.forEach(a=>{document.querySelectorAll(a).forEach(n)})},jo.delay||500)};et(()=>{new b0,qc()&&!jo.showInMobile||o()}),ot(()=>e.path,()=>{qc()&&!jo.showInMobile||o()})};var P0=Lt({setup:()=>{O0()}});const S0=({headerLinkSelector:e,headerAnchorSelector:t,delay:n,offset:o=5})=>{const r=vn(),i=ri(()=>{var g,b,_,y;const c=Math.max(window.scrollY,document.documentElement.scrollTop,document.body.scrollTop);if(Math.abs(c-0)d.some(A=>A.hash===S.hash));for(let S=0;S=((b=(g=A.parentElement)==null?void 0:g.offsetTop)!=null?b:0)-o,R=!D||c<((y=(_=D.parentElement)==null?void 0:_.offsetTop)!=null?y:0)-o;if(!(K&&R))continue;const U=decodeURIComponent(r.currentRoute.value.hash),Y=decodeURIComponent(A.hash);if(U===Y)return;if(m){for(let H=S+1;H{window.addEventListener("scroll",i)}),Ir(()=>{window.removeEventListener("scroll",i)})},Vc=async(e,t)=>{const{scrollBehavior:n}=e.options;e.options.scrollBehavior=void 0,await e.replace({query:e.currentRoute.value.query,hash:t,force:!0}).finally(()=>e.options.scrollBehavior=n)},A0="div.right-menu-item > a",T0=".header-anchor",I0=200,L0=5,D0=Lt({setup(){S0({headerLinkSelector:A0,headerAnchorSelector:T0,delay:I0,offset:L0})}});/*! @docsearch/js 3.2.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function Nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Pe(e){for(var t=1;t=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fr(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,o){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var a,i,c=[],s=!0,l=!1;try{for(r=r.call(n);!(s=(a=r.next()).done)&&(c.push(a.value),!o||c.length!==o);s=!0);}catch(u){l=!0,i=u}finally{try{s||r.return==null||r.return()}finally{if(l)throw i}}return c}}(e,t)||ku(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function hr(e){return function(t){if(Array.isArray(t))return Sa(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||ku(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ku(e,t){if(e){if(typeof e=="string")return Sa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sa(e,t):void 0}}function Sa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n3)for(n=[n],a=3;a0?io(f.type,f.props,f.key,null,f.__v):f)!=null){if(f.__=n,f.__b=n.__b+1,(d=_[u])===null||d&&f.key==d.key&&f.type===d.type)_[u]=void 0;else for(m=0;m3)for(n=[n],a=3;a=n.__.length&&n.__.push({}),n.__[e]}function zu(e){return kn=1,Uu(Ku,e)}function Uu(e,t,n){var o=Ao(Nn++,2);return o.t=e,o.__c||(o.__=[n?n(t):Ku(void 0,t),function(r){var a=o.t(o.__[0],r);o.__[0]!==a&&(o.__=[a,o.__[1]],o.__c.setState({}))}],o.__c=Xe),o.__}function Wu(e,t){var n=Ao(Nn++,3);!ae.__s&&hi(n.__H,t)&&(n.__=e,n.__H=t,Xe.__H.__h.push(n))}function Zc(e,t){var n=Ao(Nn++,4);!ae.__s&&hi(n.__H,t)&&(n.__=e,n.__H=t,Xe.__h.push(n))}function Zr(e,t){var n=Ao(Nn++,7);return hi(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function H0(){Ta.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(Ko),e.__H.__h.forEach(Ia),e.__H.__h=[]}catch(t){e.__H.__h=[],ae.__e(t,e.__v)}}),Ta=[]}ae.__b=function(e){Xe=null,Kc&&Kc(e)},ae.__r=function(e){Yc&&Yc(e),Nn=0;var t=(Xe=e.__c).__H;t&&(t.__h.forEach(Ko),t.__h.forEach(Ia),t.__h=[])},ae.diffed=function(e){Jc&&Jc(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(Ta.push(t)!==1&&Wc===ae.requestAnimationFrame||((Wc=ae.requestAnimationFrame)||function(n){var o,r=function(){clearTimeout(a),Xc&&cancelAnimationFrame(o),setTimeout(n)},a=setTimeout(r,100);Xc&&(o=requestAnimationFrame(r))})(H0)),Xe=void 0},ae.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ko),n.__h=n.__h.filter(function(o){return!o.__||Ia(o)})}catch(o){t.some(function(r){r.__h&&(r.__h=[])}),t=[],ae.__e(o,n.__v)}}),Qc&&Qc(e,t)},ae.unmount=function(e){Gc&&Gc(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Ko)}catch(n){ae.__e(n,t.__v)}};var Xc=typeof requestAnimationFrame=="function";function Ko(e){var t=Xe;typeof e.__c=="function"&&e.__c(),Xe=t}function Ia(e){var t=Xe;e.__c=e.__(),Xe=t}function hi(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function Ku(e,t){return typeof t=="function"?t(e):t}function Yu(e,t){for(var n in t)e[n]=t[n];return e}function La(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function Da(e){this.props=e}(Da.prototype=new St).isPureReactComponent=!0,Da.prototype.shouldComponentUpdate=function(e,t){return La(this.props,e)||La(this.state,t)};var es=ae.__b;ae.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),es&&es(e)};var $0=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,ts=function(e,t){return e==null?null:$t($t(e).map(t))},q0={map:ts,forEach:ts,count:function(e){return e?$t(e).length:0},only:function(e){var t=$t(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:$t},V0=ae.__e;function Yo(){this.__u=0,this.t=null,this.__b=null}function Ju(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function Zn(){this.u=null,this.o=null}ae.__e=function(e,t,n){if(e.then){for(var o,r=t;r=r.__;)if((o=r.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}V0(e,t,n)},(Yo.prototype=new St).__c=function(e,t){var n=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(n);var r=Ju(o.__v),a=!1,i=function(){a||(a=!0,n.componentWillUnmount=n.__c,r?r(c):c())};n.__c=n.componentWillUnmount,n.componentWillUnmount=function(){i(),n.__c&&n.__c()};var c=function(){if(!--o.__u){if(o.state.__e){var l=o.state.__e;o.__v.__k[0]=function m(d,f,v){return d&&(d.__v=null,d.__k=d.__k&&d.__k.map(function(g){return m(g,f,v)}),d.__c&&d.__c.__P===f&&(d.__e&&v.insertBefore(d.__e,d.__d),d.__c.__e=!0,d.__c.__P=v)),d}(l,l.__c.__P,l.__c.__O)}var u;for(o.setState({__e:o.__b=null});u=o.t.pop();)u.forceUpdate()}},s=t.__h===!0;o.__u++||s||o.setState({__e:o.__b=o.__v.__k[0]}),e.then(i,i)},Yo.prototype.componentWillUnmount=function(){this.t=[]},Yo.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function a(i,c,s){return i&&(i.__c&&i.__c.__H&&(i.__c.__H.__.forEach(function(l){typeof l.__c=="function"&&l.__c()}),i.__c.__H=null),(i=Yu({},i)).__c!=null&&(i.__c.__P===s&&(i.__c.__P=c),i.__c=null),i.__k=i.__k&&i.__k.map(function(l){return a(l,c,s)})),i}(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__e&&Pt(Zt,null,e.fallback);return r&&(r.__h=null),[Pt(Zt,null,t.__e?null:e.children),r]};var ns=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(o)}}),vo(Pt(N0,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Qu(e,t){return Pt(F0,{__v:e,i:t})}(Zn.prototype=new St).__e=function(e){var t=this,n=Ju(t.__v),o=t.o.get(e);return o[0]++,function(r){var a=function(){t.props.revealOrder?(o.push(r),ns(t,e,o)):r()};n?n(a):a()}},Zn.prototype.render=function(e){this.u=null,this.o=new Map;var t=$t(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Zn.prototype.componentDidUpdate=Zn.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ns(e,n,t)})};var Gu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,B0=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,z0=function(e){return(typeof Symbol<"u"&&po(Symbol())=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Zu(e,t,n){return t.__k==null&&(t.textContent=""),vo(e,t),typeof n=="function"&&n(),e?e.__c:null}St.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(St.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var os=ae.event;function U0(){}function W0(){return this.cancelBubble}function K0(){return this.defaultPrevented}ae.event=function(e){return os&&(e=os(e)),e.persist=U0,e.isPropagationStopped=W0,e.isDefaultPrevented=K0,e.nativeEvent=e};var Xu,rs={configurable:!0,get:function(){return this.class}},as=ae.vnode;ae.vnode=function(e){var t=e.type,n=e.props,o=n;if(typeof t=="string"){for(var r in o={},n){var a=n[r];r==="value"&&"defaultValue"in n&&a==null||(r==="defaultValue"&&"value"in n&&n.value==null?r="value":r==="download"&&a===!0?a="":/ondoubleclick/i.test(r)?r="ondblclick":/^onchange(textarea|input)/i.test(r+t)&&!z0(n.type)?r="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(r)?r=r.toLowerCase():B0.test(r)?r=r.replace(/[A-Z0-9]/,"-$&").toLowerCase():a===null&&(a=void 0),o[r]=a)}t=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=$t(n.children).forEach(function(i){i.props.selected=o.value.indexOf(i.props.value)!=-1})),t=="select"&&o.defaultValue!=null&&(o.value=$t(n.children).forEach(function(i){i.props.selected=o.multiple?o.defaultValue.indexOf(i.props.value)!=-1:o.defaultValue==i.props.value})),e.props=o}t&&n.class!=n.className&&(rs.enumerable="className"in n,n.className!=null&&(o.class=n.className),Object.defineProperty(o,"className",rs)),e.$$typeof=Gu,as&&as(e)};var is=ae.__r;ae.__r=function(e){is&&is(e),Xu=e.__c};var Y0={ReactCurrentDispatcher:{current:{readContext:function(e){return Xu.__n[e.__c].props.value}}}};(typeof performance>"u"?"undefined":po(performance))=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function cs(e){return!!e&&e.$$typeof===Gu}var O={useState:zu,useReducer:Uu,useEffect:Wu,useLayoutEffect:Zc,useRef:function(e){return kn=5,Zr(function(){return{current:e}},[])},useImperativeHandle:function(e,t,n){kn=6,Zc(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))},useMemo:Zr,useCallback:function(e,t){return kn=8,Zr(function(){return e},t)},useContext:function(e){var t=Xe.context[e.__c],n=Ao(Nn++,9);return n.__c=e,t?(n.__==null&&(n.__=!0,t.sub(Xe)),t.props.value):e.__},useDebugValue:function(e,t){ae.useDebugValue&&ae.useDebugValue(t?t(e):e)},version:"16.8.0",Children:q0,render:Zu,hydrate:function(e,t,n){return Bu(e,t),typeof n=="function"&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(vo(null,e),!0)},createPortal:Qu,createElement:Pt,createContext:function(e,t){var n={__c:t="__cC"+Cu++,__:e,Consumer:function(o,r){return o.children(r)},Provider:function(o){var r,a;return this.getChildContext||(r=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&r.some(Aa)},this.sub=function(i){r.push(i);var c=i.componentWillUnmount;i.componentWillUnmount=function(){r.splice(r.indexOf(i),1),c&&c.call(i)}}),o.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return Pt.bind(null,e)},cloneElement:function(e){return cs(e)?j0.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:Zt,isValidElement:cs,findDOMNode:function(e){return e&&(e.base||e.nodeType===1&&e)||null},Component:St,PureComponent:Da,memo:function(e,t){function n(r){var a=this.props.ref,i=a==r.ref;return!i&&a&&(a.call?a(null):a.current=null),t?!t(this.props,r)||!i:La(this.props,r)}function o(r){return this.shouldComponentUpdate=n,Pt(e,r)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o},forwardRef:function(e){function t(n,o){var r=Yu({},n);return delete r.ref,e(r,(o=n.ref||o)&&(po(o)!="object"||"current"in o)?o:null)}return t.$$typeof=$0,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:Zt,Suspense:Yo,SuspenseList:Zn,lazy:function(e){var t,n,o;function r(a){if(t||(t=e()).then(function(i){n=i.default||i},function(i){o=i}),o)throw o;if(!n)throw t;return Pt(n,a)}return r.displayName="Lazy",r.__f=!0,r},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Y0};function J0(){return O.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},O.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function em(){return O.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},O.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var Q0=["translations"];function Ra(){return Ra=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);n=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var X0=O.forwardRef(function(e,t){var n=e.translations,o=n===void 0?{}:n,r=Z0(e,Q0),a=o.buttonText,i=a===void 0?"Search":a,c=o.buttonAriaLabel,s=c===void 0?"Search":c,l=G0(zu(null),2),u=l[0],m=l[1];return Wu(function(){typeof navigator<"u"&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?m("\u2318"):m("Ctrl"))},[]),O.createElement("button",Ra({type:"button",className:"DocSearch DocSearch-Button","aria-label":s},r,{ref:t}),O.createElement("span",{className:"DocSearch-Button-Container"},O.createElement(em,null),O.createElement("span",{className:"DocSearch-Button-Placeholder"},i)),O.createElement("span",{className:"DocSearch-Button-Keys"},u!==null&&O.createElement(O.Fragment,null,O.createElement("kbd",{className:"DocSearch-Button-Key"},u==="Ctrl"?O.createElement(J0,null):u),O.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))});function go(e){return e.reduce(function(t,n){return t.concat(n)},[])}var e1=0;function ka(e){return e.collections.length===0?0:e.collections.reduce(function(t,n){return t+n.items.length},0)}var tm=function(){},t1=[{segment:"autocomplete-core",version:"1.7.1"}];function Jo(e,t){var n=t;return{then:function(o,r){return Jo(e.then($o(o,n,e),$o(r,n,e)),n)},catch:function(o){return Jo(e.catch($o(o,n,e)),n)},finally:function(o){return o&&n.onCancelList.push(o),Jo(e.finally($o(o&&function(){return n.onCancelList=[],o()},n,e)),n)},cancel:function(){n.isCanceled=!0;var o=n.onCancelList;n.onCancelList=[],o.forEach(function(r){r()})},isCanceled:function(){return n.isCanceled===!0}}}function ls(e){return Jo(e,{isCanceled:!1,onCancelList:[]})}function $o(e,t,n){return e?function(o){return t.isCanceled?o:e(o)}:n}function us(e,t,n,o){if(!n)return null;if(e<0&&(t===null||o!==null&&t===0))return n+e;var r=(t===null?-1:t)+e;return r<=-1||r>=n?o===null?null:0:r}function ms(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function n1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o1(e,t){var n=[];return Promise.resolve(e(t)).then(function(o){return Promise.all(o.filter(function(r){return Boolean(r)}).map(function(r){if(r.sourceId,n.includes(r.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(r.sourceId)," is not unique."));n.push(r.sourceId);var a=function(i){for(var c=1;ce.length)&&(t=e.length);for(var n=0,o=new Array(t);ne.length)&&(t=e.length);for(var n=0,o=new Array(t);n=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ys,ta,Bo,Jn=null,Es=(ys=-1,ta=-1,Bo=void 0,function(e){var t=++ys;return Promise.resolve(e).then(function(n){return Bo&&t=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var w1=["props","refresh","store"],O1=["inputElement","formElement","panelElement"],P1=["inputElement"],S1=["inputElement","maxLength"],A1=["item","source"];function Os(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Je(e){for(var t=1;t=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function I1(e){var t=e.props,n=e.refresh,o=e.store,r=Qn(e,w1);return{getEnvironmentProps:function(a){var i=a.inputElement,c=a.formElement,s=a.panelElement;function l(u){!o.getState().isOpen&&o.pendingRequests.isEmpty()||u.target===i||[c,s].some(function(m){return d=m,f=u.target,d===f||d.contains(f);var d,f})===!1&&(o.dispatch("blur",null),t.debug||o.pendingRequests.cancelAll())}return Je({onTouchStart:l,onMouseDown:l,onTouchMove:function(u){o.getState().isOpen!==!1&&i===t.environment.document.activeElement&&u.target!==i&&i.blur()}},Qn(a,O1))},getRootProps:function(a){return Je({role:"combobox","aria-expanded":o.getState().isOpen,"aria-haspopup":"listbox","aria-owns":o.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},a)},getFormProps:function(a){return a.inputElement,Je({action:"",noValidate:!0,role:"search",onSubmit:function(i){var c;i.preventDefault(),t.onSubmit(Je({event:i,refresh:n,state:o.getState()},r)),o.dispatch("submit",null),(c=a.inputElement)===null||c===void 0||c.blur()},onReset:function(i){var c;i.preventDefault(),t.onReset(Je({event:i,refresh:n,state:o.getState()},r)),o.dispatch("reset",null),(c=a.inputElement)===null||c===void 0||c.focus()}},Qn(a,P1))},getLabelProps:function(a){return Je({htmlFor:"".concat(t.id,"-input"),id:"".concat(t.id,"-label")},a)},getInputProps:function(a){var i;function c(g){(t.openOnFocus||Boolean(o.getState().query))&&Pn(Je({event:g,props:t,query:o.getState().completion||o.getState().query,refresh:n,store:o},r)),o.dispatch("focus",null)}var s=a||{},l=(s.inputElement,s.maxLength),u=l===void 0?512:l,m=Qn(s,S1),d=Sn(o.getState()),f=function(g){return Boolean(g&&g.match(r1))}(((i=t.environment.navigator)===null||i===void 0?void 0:i.userAgent)||""),v=d!=null&&d.itemUrl&&!f?"go":"search";return Je({"aria-autocomplete":"both","aria-activedescendant":o.getState().isOpen&&o.getState().activeItemId!==null?"".concat(t.id,"-item-").concat(o.getState().activeItemId):void 0,"aria-controls":o.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:o.getState().completion||o.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:v,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:u,type:"search",onChange:function(g){Pn(Je({event:g,props:t,query:g.currentTarget.value.slice(0,u),refresh:n,store:o},r))},onKeyDown:function(g){(function(b){var _=b.event,y=b.props,S=b.refresh,A=b.store,D=E1(b,b1);if(_.key==="ArrowUp"||_.key==="ArrowDown"){var K=function(){var T=y.environment.document.getElementById("".concat(y.id,"-item-").concat(A.getState().activeItemId));T&&(T.scrollIntoViewIfNeeded?T.scrollIntoViewIfNeeded(!1):T.scrollIntoView(!1))},R=function(){var T=Sn(A.getState());if(A.getState().activeItemId!==null&&T){var k=T.item,M=T.itemInputValue,j=T.itemUrl,W=T.source;W.onActive(on({event:_,item:k,itemInputValue:M,itemUrl:j,refresh:S,source:W,state:A.getState()},D))}};_.preventDefault(),A.getState().isOpen===!1&&(y.openOnFocus||Boolean(A.getState().query))?Pn(on({event:_,props:y,query:A.getState().query,refresh:S,store:A},D)).then(function(){A.dispatch(_.key,{nextActiveItemId:y.defaultActiveItemId}),R(),setTimeout(K,0)}):(A.dispatch(_.key,{}),R(),K())}else if(_.key==="Escape")_.preventDefault(),A.dispatch(_.key,null),A.pendingRequests.cancelAll();else if(_.key==="Tab")A.dispatch("blur",null),A.pendingRequests.cancelAll();else if(_.key==="Enter"){if(A.getState().activeItemId===null||A.getState().collections.every(function(T){return T.items.length===0}))return void(y.debug||A.pendingRequests.cancelAll());_.preventDefault();var E=Sn(A.getState()),U=E.item,Y=E.itemInputValue,H=E.itemUrl,P=E.source;if(_.metaKey||_.ctrlKey)H!==void 0&&(P.onSelect(on({event:_,item:U,itemInputValue:Y,itemUrl:H,refresh:S,source:P,state:A.getState()},D)),y.navigator.navigateNewTab({itemUrl:H,item:U,state:A.getState()}));else if(_.shiftKey)H!==void 0&&(P.onSelect(on({event:_,item:U,itemInputValue:Y,itemUrl:H,refresh:S,source:P,state:A.getState()},D)),y.navigator.navigateNewWindow({itemUrl:H,item:U,state:A.getState()}));else if(!_.altKey){if(H!==void 0)return P.onSelect(on({event:_,item:U,itemInputValue:Y,itemUrl:H,refresh:S,source:P,state:A.getState()},D)),void y.navigator.navigate({itemUrl:H,item:U,state:A.getState()});Pn(on({event:_,nextState:{isOpen:!1},props:y,query:Y,refresh:S,store:A},D)).then(function(){P.onSelect(on({event:_,item:U,itemInputValue:Y,itemUrl:H,refresh:S,source:P,state:A.getState()},D))})}}})(Je({event:g,props:t,refresh:n,store:o},r))},onFocus:c,onBlur:tm,onClick:function(g){a.inputElement!==t.environment.document.activeElement||o.getState().isOpen||c(g)}},m)},getPanelProps:function(a){return Je({onMouseDown:function(i){i.preventDefault()},onMouseLeave:function(){o.dispatch("mouseleave",null)}},a)},getListProps:function(a){return Je({role:"listbox","aria-labelledby":"".concat(t.id,"-label"),id:"".concat(t.id,"-list")},a)},getItemProps:function(a){var i=a.item,c=a.source,s=Qn(a,A1);return Je({id:"".concat(t.id,"-item-").concat(i.__autocomplete_id),role:"option","aria-selected":o.getState().activeItemId===i.__autocomplete_id,onMouseMove:function(l){if(i.__autocomplete_id!==o.getState().activeItemId){o.dispatch("mousemove",i.__autocomplete_id);var u=Sn(o.getState());if(o.getState().activeItemId!==null&&u){var m=u.item,d=u.itemInputValue,f=u.itemUrl,v=u.source;v.onActive(Je({event:l,item:m,itemInputValue:d,itemUrl:f,refresh:n,source:v,state:o.getState()},r))}}},onMouseDown:function(l){l.preventDefault()},onClick:function(l){var u=c.getItemInputValue({item:i,state:o.getState()}),m=c.getItemUrl({item:i,state:o.getState()});(m?Promise.resolve():Pn(Je({event:l,nextState:{isOpen:!1},props:t,query:u,refresh:n,store:o},r))).then(function(){c.onSelect(Je({event:l,item:i,itemInputValue:u,itemUrl:m,refresh:n,source:c,state:o.getState()},r))})}},s)}}}function Ps(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function L1(e){for(var t=1;t0},reshape:function(d){return d.sources}},c),{},{id:(l=c.id)!==null&&l!==void 0?l:"autocomplete-".concat(e1++),plugins:m,initialState:En({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},c.initialState),onStateChange:function(d){var f;(f=c.onStateChange)===null||f===void 0||f.call(c,d),m.forEach(function(v){var g;return(g=v.onStateChange)===null||g===void 0?void 0:g.call(v,d)})},onSubmit:function(d){var f;(f=c.onSubmit)===null||f===void 0||f.call(c,d),m.forEach(function(v){var g;return(g=v.onSubmit)===null||g===void 0?void 0:g.call(v,d)})},onReset:function(d){var f;(f=c.onReset)===null||f===void 0||f.call(c,d),m.forEach(function(v){var g;return(g=v.onReset)===null||g===void 0?void 0:g.call(v,d)})},getSources:function(d){return Promise.all([].concat(l1(m.map(function(f){return f.getSources})),[c.getSources]).filter(Boolean).map(function(f){return o1(f,d)})).then(function(f){return go(f)}).then(function(f){return f.map(function(v){return En(En({},v),{},{onSelect:function(g){v.onSelect(g),s.forEach(function(b){var _;return(_=b.onSelect)===null||_===void 0?void 0:_.call(b,g)})},onActive:function(g){v.onActive(g),s.forEach(function(b){var _;return(_=b.onActive)===null||_===void 0?void 0:_.call(b,g)})}})})})},navigator:En({navigate:function(d){var f=d.itemUrl;u.location.assign(f)},navigateNewTab:function(d){var f=d.itemUrl,v=u.open(f,"_blank","noopener");v==null||v.focus()},navigateNewWindow:function(d){var f=d.itemUrl;u.open(f,"_blank","noopener")}},c.navigator)})}(e,t),o=c1(k1,n,function(c){var s=c.prevState,l=c.state;n.onStateChange(rn({prevState:s,state:l,refresh:i},r))}),r=function(c){var s=c.store;return{setActiveItemId:function(l){s.dispatch("setActiveItemId",l)},setQuery:function(l){s.dispatch("setQuery",l)},setCollections:function(l){var u=0,m=l.map(function(d){return Vo(Vo({},d),{},{items:go(d.items).map(function(f){return Vo(Vo({},f),{},{__autocomplete_id:u++})})})});s.dispatch("setCollections",m)},setIsOpen:function(l){s.dispatch("setIsOpen",l)},setStatus:function(l){s.dispatch("setStatus",l)},setContext:function(l){s.dispatch("setContext",l)}}}({store:o}),a=I1(rn({props:n,refresh:i,store:o},r));function i(){return Pn(rn({event:new Event("input"),nextState:{isOpen:o.getState().isOpen},props:n,query:o.getState().query,refresh:i,store:o},r))}return n.plugins.forEach(function(c){var s;return(s=c.subscribe)===null||s===void 0?void 0:s.call(c,rn(rn({},r),{},{refresh:i,onSelect:function(l){t.push({onSelect:l})},onActive:function(l){t.push({onActive:l})}}))}),function(c){var s,l,u=c.metadata,m=c.environment;if(!((s=m.navigator)===null||s===void 0||(l=s.userAgent)===null||l===void 0)&&l.includes("Algolia Crawler")){var d=m.document.createElement("meta"),f=m.document.querySelector("head");d.name="algolia:metadata",setTimeout(function(){d.content=JSON.stringify(u),f.appendChild(d)},0)}}({metadata:D1({plugins:n.plugins,options:e}),environment:n.environment}),rn(rn({refresh:i},a),r)}function M1(e){var t=e.translations,n=(t===void 0?{}:t).searchByText,o=n===void 0?"Search by":n;return O.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},O.createElement("span",{className:"DocSearch-Label"},o),O.createElement("svg",{width:"77",height:"19","aria-label":"Algolia",role:"img"},O.createElement("path",{d:"M2.5067 0h14.0245c1.384.001 2.5058 1.1205 2.5068 2.5017V16.5c-.0014 1.3808-1.1232 2.4995-2.5068 2.5H2.5067C1.1232 18.9995.0014 17.8808 0 16.5V2.4958A2.495 2.495 0 01.735.7294 2.505 2.505 0 012.5068 0zM37.95 15.0695c-3.7068.0168-3.7068-2.986-3.7068-3.4634L34.2372.3576 36.498 0v11.1794c0 .2715 0 1.9889 1.452 1.994v1.8961zm-9.1666-1.8388c.694 0 1.2086-.0397 1.5678-.1088v-2.2934a5.3639 5.3639 0 00-1.3303-.1679 4.8283 4.8283 0 00-.758.0582 2.2845 2.2845 0 00-.688.2024c-.2029.0979-.371.2362-.4919.4142-.1268.1788-.185.2826-.185.5533 0 .5297.185.8359.5205 1.0375.3355.2016.7928.3053 1.365.3053v-.0008zm-.1969-8.1817c.7463 0 1.3768.092 1.8856.2767.5088.1838.9195.4428 1.2204.7717.3068.334.5147.7777.6423 1.251.1327.4723.196.991.196 1.5603v5.798c-.5235.1036-1.05.192-1.5787.2649-.7048.1037-1.4976.156-2.3774.156-.5832 0-1.1215-.0582-1.6016-.167a3.385 3.385 0 01-1.2432-.5364 2.6034 2.6034 0 01-.8037-.9565c-.191-.3922-.29-.9447-.29-1.5208 0-.5533.11-.905.3246-1.2863a2.7351 2.7351 0 01.8849-.9329c.376-.242.8029-.415 1.2948-.5187a7.4517 7.4517 0 011.5381-.156 7.1162 7.1162 0 011.6667.2024V8.886c0-.259-.0296-.5061-.093-.7372a1.5847 1.5847 0 00-.3245-.6158 1.5079 1.5079 0 00-.6119-.4158 2.6788 2.6788 0 00-.966-.173c-.5206 0-.9948.0634-1.4283.1384a6.5481 6.5481 0 00-1.065.259l-.2712-1.849c.2831-.0986.7048-.1964 1.2491-.2943a9.2979 9.2979 0 011.752-.1501v.0008zm44.6597 8.1193c.6947 0 1.2086-.0405 1.567-.1097v-2.2942a5.3743 5.3743 0 00-1.3303-.1679c-.2485 0-.503.0177-.7573.0582a2.2853 2.2853 0 00-.688.2024 1.2333 1.2333 0 00-.4918.4142c-.1268.1788-.1843.2826-.1843.5533 0 .5297.1843.8359.5198 1.0375.3414.2066.7927.3053 1.365.3053v.0009zm-.191-8.1767c.7463 0 1.3768.0912 1.8856.2759.5087.1847.9195.4436 1.2204.7717.3.329.5147.7786.6414 1.251a5.7248 5.7248 0 01.197 1.562v5.7972c-.3466.0742-.874.1602-1.5788.2648-.7049.1038-1.4976.1552-2.3774.1552-.5832 0-1.1215-.0573-1.6016-.167a3.385 3.385 0 01-1.2432-.5356 2.6034 2.6034 0 01-.8038-.9565c-.191-.3922-.2898-.9447-.2898-1.5216 0-.5533.1098-.905.3245-1.2854a2.7373 2.7373 0 01.8849-.9338c.376-.2412.8029-.4141 1.2947-.5178a7.4545 7.4545 0 012.325-.1097c.2781.0287.5672.081.879.156v-.3686a2.7781 2.7781 0 00-.092-.738 1.5788 1.5788 0 00-.3246-.6166 1.5079 1.5079 0 00-.612-.415 2.6797 2.6797 0 00-.966-.1729c-.5205 0-.9947.0633-1.4282.1384a6.5608 6.5608 0 00-1.065.259l-.2712-1.8498c.283-.0979.7048-.1957 1.2491-.2935a9.8597 9.8597 0 011.752-.1494zm-6.79-1.072c-.7576.001-1.373-.6103-1.3759-1.3664 0-.755.6128-1.3664 1.376-1.3664.764 0 1.3775.6115 1.3775 1.3664s-.6195 1.3664-1.3776 1.3664zm1.1393 11.1507h-2.2726V5.3409l2.2734-.3568v10.0845l-.0008.0017zm-3.984 0c-3.707.0168-3.707-2.986-3.707-3.4642L59.7069.3576 61.9685 0v11.1794c0 .2715 0 1.9889 1.452 1.994V15.0703zm-7.3512-4.979c0-.975-.2138-1.7873-.6305-2.3516-.4167-.571-.9998-.852-1.747-.852-.7454 0-1.3302.281-1.7452.852-.4166.5702-.6195 1.3765-.6195 2.3516 0 .9851.208 1.6473.6254 2.2183.4158.576.9998.8587 1.7461.8587.7454 0 1.3303-.2885 1.747-.8595.4158-.5761.6237-1.2315.6237-2.2184v.0009zm2.3132-.006c0 .7609-.1099 1.3361-.3356 1.9654a4.654 4.654 0 01-.9533 1.6076A4.214 4.214 0 0155.613 14.69c-.579.2412-1.4697.3795-1.9143.3795-.4462-.005-1.3303-.1324-1.9033-.3795a4.307 4.307 0 01-1.474-1.0316c-.4115-.4445-.7293-.9801-.9609-1.6076a5.3423 5.3423 0 01-.3465-1.9653c0-.7608.104-1.493.3356-2.1155a4.683 4.683 0 01.9719-1.5958 4.3383 4.3383 0 011.479-1.0257c.5739-.242 1.2043-.3567 1.8864-.3567.6829 0 1.3125.1197 1.8906.3567a4.1245 4.1245 0 011.4816 1.0257 4.7587 4.7587 0 01.9592 1.5958c.2426.6225.3643 1.3547.3643 2.1155zm-17.0198 0c0 .9448.208 1.9932.6238 2.431.4166.4386.955.6579 1.6142.6579.3584 0 .6998-.0523 1.0176-.1502.3186-.0978.5721-.2134.775-.3517V7.0784a8.8706 8.8706 0 00-1.4926-.1906c-.8206-.0236-1.4452.312-1.8847.8468-.4335.5365-.6533 1.476-.6533 2.3516v-.0008zm6.2863 4.4485c0 1.5385-.3938 2.662-1.1866 3.3773-.791.7136-2.0005 1.0712-3.6308 1.0712-.5958 0-1.834-.1156-2.8228-.334l.3643-1.7865c.8282.173 1.9202.2193 2.4932.2193.9077 0 1.555-.1847 1.943-.5533.388-.3686.578-.916.578-1.643v-.3687a6.8289 6.8289 0 01-.8848.3349c-.3634.1096-.786.167-1.261.167-.6246 0-1.1917-.0979-1.7055-.2944a3.5554 3.5554 0 01-1.3244-.8645c-.3642-.3796-.6541-.8579-.8561-1.4289-.2028-.571-.3068-1.59-.3068-2.339 0-.7034.1099-1.5856.3245-2.1735.2198-.5871.5316-1.0949.9542-1.515.4167-.42.9255-.743 1.5213-.98a5.5923 5.5923 0 012.052-.3855c.7353 0 1.4114.092 2.0707.2024.6592.1088 1.2204.2236 1.6776.35v8.945-.0008zM11.5026 4.2418v-.6511c-.0005-.4553-.3704-.8241-.8266-.8241H8.749c-.4561 0-.826.3688-.8265.824v.669c0 .0742.0693.1264.1445.1096a6.0346 6.0346 0 011.6768-.2362 6.125 6.125 0 011.6202.2185.1116.1116 0 00.1386-.1097zm-5.2806.852l-.3296-.3282a.8266.8266 0 00-1.168 0l-.393.3922a.8199.8199 0 000 1.164l.3237.323c.0524.0515.1268.0397.1733-.0117.191-.259.3989-.507.6305-.7372.2374-.2362.48-.4437.7462-.6335.0575-.0354.0634-.1155.017-.1687zm3.5159 2.069v2.818c0 .081.0879.1392.1622.0987l2.5102-1.2964c.0574-.0287.0752-.0987.0464-.1552a3.1237 3.1237 0 00-2.603-1.574c-.0575 0-.115.0456-.115.1097l-.0008-.0009zm.0008 6.789c-2.0933.0005-3.7915-1.6912-3.7947-3.7804C5.9468 8.0821 7.6452 6.39 9.7387 6.391c2.0932-.0005 3.7911 1.6914 3.794 3.7804a3.7783 3.7783 0 01-1.1124 2.675 3.7936 3.7936 0 01-2.6824 1.1054h.0008zM9.738 4.8002c-1.9218 0-3.6975 1.0232-4.6584 2.6841a5.359 5.359 0 000 5.3683c.9609 1.661 2.7366 2.6841 4.6584 2.6841a5.3891 5.3891 0 003.8073-1.5725 5.3675 5.3675 0 001.578-3.7987 5.3574 5.3574 0 00-1.5771-3.797A5.379 5.379 0 009.7387 4.801l-.0008-.0008z",fill:"currentColor",fillRule:"evenodd"})))}function zo(e){return O.createElement("svg",{width:"15",height:"15","aria-label":e.ariaLabel,role:"img"},O.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2"},e.children))}function j1(e){var t=e.translations,n=t===void 0?{}:t,o=n.selectText,r=o===void 0?"to select":o,a=n.selectKeyAriaLabel,i=a===void 0?"Enter key":a,c=n.navigateText,s=c===void 0?"to navigate":c,l=n.navigateUpKeyAriaLabel,u=l===void 0?"Arrow up":l,m=n.navigateDownKeyAriaLabel,d=m===void 0?"Arrow down":m,f=n.closeText,v=f===void 0?"to close":f,g=n.closeKeyAriaLabel,b=g===void 0?"Escape key":g,_=n.searchByText,y=_===void 0?"Search by":_;return O.createElement(O.Fragment,null,O.createElement("div",{className:"DocSearch-Logo"},O.createElement(M1,{translations:{searchByText:y}})),O.createElement("ul",{className:"DocSearch-Commands"},O.createElement("li",null,O.createElement("kbd",{className:"DocSearch-Commands-Key"},O.createElement(zo,{ariaLabel:i},O.createElement("path",{d:"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"}))),O.createElement("span",{className:"DocSearch-Label"},r)),O.createElement("li",null,O.createElement("kbd",{className:"DocSearch-Commands-Key"},O.createElement(zo,{ariaLabel:d},O.createElement("path",{d:"M7.5 3.5v8M10.5 8.5l-3 3-3-3"}))),O.createElement("kbd",{className:"DocSearch-Commands-Key"},O.createElement(zo,{ariaLabel:u},O.createElement("path",{d:"M7.5 11.5v-8M10.5 6.5l-3-3-3 3"}))),O.createElement("span",{className:"DocSearch-Label"},s)),O.createElement("li",null,O.createElement("kbd",{className:"DocSearch-Commands-Key"},O.createElement(zo,{ariaLabel:b},O.createElement("path",{d:"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"}))),O.createElement("span",{className:"DocSearch-Label"},v))))}function H1(e){var t=e.hit,n=e.children;return O.createElement("a",{href:t.url},n)}function $1(){return O.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},O.createElement("g",{fill:"none",fillRule:"evenodd"},O.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},O.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),O.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},O.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function q1(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},O.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),O.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function xa(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("path",{d:"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function V1(){return O.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},O.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),O.createElement("path",{d:"M8 17l-6-6 6-6"})))}var N1=function(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function F1(e){switch(e.type){case"lvl1":return O.createElement(N1,null);case"content":return O.createElement(z1,null);default:return O.createElement(B1,null)}}function B1(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function z1(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Is(){return O.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},O.createElement("path",{d:"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function U1(){return O.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},O.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function W1(){return O.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},O.createElement("path",{d:"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"}))}function K1(e){var t=e.translations,n=t===void 0?{}:t,o=n.titleText,r=o===void 0?"Unable to fetch results":o,a=n.helpText,i=a===void 0?"You might want to check your network connection.":a;return O.createElement("div",{className:"DocSearch-ErrorScreen"},O.createElement("div",{className:"DocSearch-Screen-Icon"},O.createElement(U1,null)),O.createElement("p",{className:"DocSearch-Title"},r),O.createElement("p",{className:"DocSearch-Help"},i))}var Y1=["translations"];function J1(e){return function(t){if(Array.isArray(t))return na(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(!!t){if(typeof t=="string")return na(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);if(o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set")return Array.from(t);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return na(t,n)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function na(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function G1(e){var t=e.translations,n=t===void 0?{}:t,o=Q1(e,Y1),r=n.noResultsText,a=r===void 0?"No results for":r,i=n.suggestedQueryText,c=i===void 0?"Try searching for":i,s=n.reportMissingResultsText,l=s===void 0?"Believe this query should return results?":s,u=n.reportMissingResultsLinkText,m=u===void 0?"Let us know.":u,d=o.state.context.searchSuggestions;return O.createElement("div",{className:"DocSearch-NoResults"},O.createElement("div",{className:"DocSearch-Screen-Icon"},O.createElement(W1,null)),O.createElement("p",{className:"DocSearch-Title"},a,' "',O.createElement("strong",null,o.state.query),'"'),d&&d.length>0&&O.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},O.createElement("p",{className:"DocSearch-Help"},c,":"),O.createElement("ul",null,d.slice(0,3).reduce(function(f,v){return[].concat(J1(f),[O.createElement("li",{key:v},O.createElement("button",{className:"DocSearch-Prefill",key:v,type:"button",onClick:function(){o.setQuery(v.toLowerCase()+" "),o.refresh(),o.inputRef.current.focus()}},v))])},[]))),o.getMissingResultsUrl&&O.createElement("p",{className:"DocSearch-Help"},"".concat(l," "),O.createElement("a",{href:o.getMissingResultsUrl({query:o.state.query}),target:"_blank",rel:"noopener noreferrer"},m)))}var Z1=["hit","attribute","tagName"];function Ls(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Ds(e){for(var t=1;t=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Rs(e,t){return t.split(".").reduce(function(n,o){return n!=null&&n[o]?n[o]:null},e)}function wn(e){var t=e.hit,n=e.attribute,o=e.tagName;return Pt(o===void 0?"span":o,Ds(Ds({},eb(e,Z1)),{},{dangerouslySetInnerHTML:{__html:Rs(t,"_snippetResult.".concat(n,".value"))||Rs(t,n)}}))}function ks(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,o){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var a,i,c=[],s=!0,l=!1;try{for(r=r.call(n);!(s=(a=r.next()).done)&&(c.push(a.value),!o||c.length!==o);s=!0);}catch(u){l=!0,i=u}finally{try{s||r.return==null||r.return()}finally{if(l)throw i}}return c}}(e,t)||function(n,o){if(!!n){if(typeof n=="string")return xs(n,o);var r=Object.prototype.toString.call(n).slice(8,-1);if(r==="Object"&&n.constructor&&(r=n.constructor.name),r==="Map"||r==="Set")return Array.from(n);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xs(n,o)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n|<\/mark>)/g,ob=RegExp(rm.source);function am(e){var t,n,o,r,a,i=e;if(!i.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var c=((i.__docsearch_parent?(t=i.__docsearch_parent)===null||t===void 0||(n=t._highlightResult)===null||n===void 0||(o=n.hierarchy)===null||o===void 0?void 0:o.lvl0:(r=e._highlightResult)===null||r===void 0||(a=r.hierarchy)===null||a===void 0?void 0:a.lvl0)||{}).value;return c&&ob.test(c)?c.replace(rm,""):c}function Ma(){return Ma=Object.assign||function(e){for(var t=1;t=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cb(e){var t=e.translations,n=t===void 0?{}:t,o=ib(e,ab),r=n.recentSearchesTitle,a=r===void 0?"Recent":r,i=n.noRecentSearchesText,c=i===void 0?"No recent searches":i,s=n.saveRecentSearchButtonTitle,l=s===void 0?"Save this search":s,u=n.removeRecentSearchButtonTitle,m=u===void 0?"Remove this search from history":u,d=n.favoriteSearchesTitle,f=d===void 0?"Favorite":d,v=n.removeFavoriteSearchButtonTitle,g=v===void 0?"Remove this search from favorites":v;return o.state.status==="idle"&&o.hasCollections===!1?o.disableUserPersonalization?null:O.createElement("div",{className:"DocSearch-StartScreen"},O.createElement("p",{className:"DocSearch-Help"},c)):o.hasCollections===!1?null:O.createElement("div",{className:"DocSearch-Dropdown-Container"},O.createElement(Ca,gr({},o,{title:a,collection:o.state.collections[0],renderIcon:function(){return O.createElement("div",{className:"DocSearch-Hit-icon"},O.createElement(q1,null))},renderAction:function(b){var _=b.item,y=b.runFavoriteTransition,S=b.runDeleteTransition;return O.createElement(O.Fragment,null,O.createElement("div",{className:"DocSearch-Hit-action"},O.createElement("button",{className:"DocSearch-Hit-action-button",title:l,type:"submit",onClick:function(A){A.preventDefault(),A.stopPropagation(),y(function(){o.favoriteSearches.add(_),o.recentSearches.remove(_),o.refresh()})}},O.createElement(Is,null))),O.createElement("div",{className:"DocSearch-Hit-action"},O.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(A){A.preventDefault(),A.stopPropagation(),S(function(){o.recentSearches.remove(_),o.refresh()})}},O.createElement(xa,null))))}})),O.createElement(Ca,gr({},o,{title:f,collection:o.state.collections[1],renderIcon:function(){return O.createElement("div",{className:"DocSearch-Hit-icon"},O.createElement(Is,null))},renderAction:function(b){var _=b.item,y=b.runDeleteTransition;return O.createElement("div",{className:"DocSearch-Hit-action"},O.createElement("button",{className:"DocSearch-Hit-action-button",title:g,type:"submit",onClick:function(S){S.preventDefault(),S.stopPropagation(),y(function(){o.favoriteSearches.remove(_),o.refresh()})}},O.createElement(xa,null)))}})))}var sb=["translations"];function br(){return br=Object.assign||function(e){for(var t=1;t=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ub=O.memo(function(e){var t=e.translations,n=t===void 0?{}:t,o=lb(e,sb);if(o.state.status==="error")return O.createElement(K1,{translations:n==null?void 0:n.errorScreen});var r=o.state.collections.some(function(a){return a.items.length>0});return o.state.query?r===!1?O.createElement(G1,br({},o,{translations:n==null?void 0:n.noResultsScreen})):O.createElement(rb,o):O.createElement(cb,br({},o,{hasCollections:r,translations:n==null?void 0:n.startScreen}))},function(e,t){return t.state.status==="loading"||t.state.status==="stalled"}),mb=["translations"];function yr(){return yr=Object.assign||function(e){for(var t=1;t=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fb(e){var t=e.translations,n=t===void 0?{}:t,o=db(e,mb),r=n.resetButtonTitle,a=r===void 0?"Clear the query":r,i=n.resetButtonAriaLabel,c=i===void 0?"Clear the query":i,s=n.cancelButtonText,l=s===void 0?"Cancel":s,u=n.cancelButtonAriaLabel,m=u===void 0?"Cancel":u,d=o.getFormProps({inputElement:o.inputRef.current}).onReset;return O.useEffect(function(){o.autoFocus&&o.inputRef.current&&o.inputRef.current.focus()},[o.autoFocus,o.inputRef]),O.useEffect(function(){o.isFromSelection&&o.inputRef.current&&o.inputRef.current.select()},[o.isFromSelection,o.inputRef]),O.createElement(O.Fragment,null,O.createElement("form",{className:"DocSearch-Form",onSubmit:function(f){f.preventDefault()},onReset:d},O.createElement("label",yr({className:"DocSearch-MagnifierLabel"},o.getLabelProps()),O.createElement(em,null)),O.createElement("div",{className:"DocSearch-LoadingIndicator"},O.createElement($1,null)),O.createElement("input",yr({className:"DocSearch-Input",ref:o.inputRef},o.getInputProps({inputElement:o.inputRef.current,autoFocus:o.autoFocus,maxLength:64}))),O.createElement("button",{type:"reset",title:a,className:"DocSearch-Reset","aria-label":c,hidden:!o.state.query},O.createElement(xa,null))),O.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":m,onClick:o.onClose},l))}var hb=["_highlightResult","_snippetResult"];function pb(e,t){if(e==null)return{};var n,o,r=function(i,c){if(i==null)return{};var s,l,u={},m=Object.keys(i);for(l=0;l=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _b(e){return function(){var t="__TEST_KEY__";try{return localStorage.setItem(t,""),localStorage.removeItem(t),!0}catch{return!1}}()===!1?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function js(e){var t=e.key,n=e.limit,o=n===void 0?5:n,r=_b(t),a=r.getItem().slice(0,o);return{add:function(i){var c=i,s=(c._highlightResult,c._snippetResult,pb(c,hb)),l=a.findIndex(function(u){return u.objectID===s.objectID});l>-1&&a.splice(l,1),a.unshift(s),a=a.slice(0,o),r.setItem(a)},remove:function(i){a=a.filter(function(c){return c.objectID!==i.objectID}),r.setItem(a)},getAll:function(){return a}}}var vb=["facetName","facetQuery"];function gb(e){var t,n="algoliasearch-client-js-".concat(e.key),o=function(){return t===void 0&&(t=e.localStorage||window.localStorage),t},r=function(){return JSON.parse(o().getItem(n)||"{}")};return{get:function(a,i){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var s=JSON.stringify(a),l=r()[s];return Promise.all([l||i(),l!==void 0])}).then(function(s){var l=fr(s,2),u=l[0],m=l[1];return Promise.all([u,m||c.miss(u)])}).then(function(s){return fr(s,1)[0]})},set:function(a,i){return Promise.resolve().then(function(){var c=r();return c[JSON.stringify(a)]=i,o().setItem(n,JSON.stringify(c)),i})},delete:function(a){return Promise.resolve().then(function(){var i=r();delete i[JSON.stringify(a)],o().setItem(n,JSON.stringify(i))})},clear:function(){return Promise.resolve().then(function(){o().removeItem(n)})}}}function Xn(e){var t=hr(e.caches),n=t.shift();return n===void 0?{get:function(o,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return r().then(function(i){return Promise.all([i,a.miss(i)])}).then(function(i){return fr(i,1)[0]})},set:function(o,r){return Promise.resolve(r)},delete:function(o){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(o,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(o,r,a).catch(function(){return Xn({caches:t}).get(o,r,a)})},set:function(o,r){return n.set(o,r).catch(function(){return Xn({caches:t}).set(o,r)})},delete:function(o){return n.delete(o).catch(function(){return Xn({caches:t}).delete(o)})},clear:function(){return n.clear().catch(function(){return Xn({caches:t}).clear()})}}}function oa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(n,o){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var i=o(),c=r&&r.miss||function(){return Promise.resolve()};return i.then(function(s){return c(s)}).then(function(){return i})},set:function(n,o){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(o):o,Promise.resolve(o)},delete:function(n){return delete t[JSON.stringify(n)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function bb(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),o=e[t];e[t]=e[n],e[n]=o}return e}function im(e,t){return t&&Object.keys(t).forEach(function(n){e[n]=t[n](e)}),e}function Mr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o0?o:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var An={Read:1,Write:2,Any:3},cm=1,yb=2,sm=3;function lm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cm;return Pe(Pe({},e),{},{status:t,lastUpdate:Date.now()})}function um(e){return typeof e=="string"?{protocol:"https",url:e,accept:An.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||An.Any}}var $s="GET",jr="POST";function Eb(e,t){return Promise.all(t.map(function(n){return e.get(n,function(){return Promise.resolve(lm(n))})})).then(function(n){var o=n.filter(function(i){return function(c){return c.status===cm||Date.now()-c.lastUpdate>12e4}(i)}),r=n.filter(function(i){return function(c){return c.status===sm&&Date.now()-c.lastUpdate<=12e4}(i)}),a=[].concat(hr(o),hr(r));return{getTimeout:function(i,c){return(r.length===0&&i===0?1:r.length+3+i)*c},statelessHosts:a.length>0?a.map(function(i){return um(i)}):t}})}function qs(e,t,n,o){var r=[],a=function(d,f){if(!(d.method===$s||d.data===void 0&&f.data===void 0)){var v=Array.isArray(d.data)?d.data:Pe(Pe({},d.data),f.data);return JSON.stringify(v)}}(n,o),i=function(d,f){var v=Pe(Pe({},d.headers),f.headers),g={};return Object.keys(v).forEach(function(b){var _=v[b];g[b.toLowerCase()]=_}),g}(e,o),c=n.method,s=n.method!==$s?{}:Pe(Pe({},n.data),o.data),l=Pe(Pe(Pe({"x-algolia-agent":e.userAgent.value},e.queryParameters),s),o.queryParameters),u=0,m=function d(f,v){var g=f.pop();if(g===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Vs(r)};var b={data:a,headers:i,method:c,url:Ob(g,n.path,l),connectTimeout:v(u,e.timeouts.connect),responseTimeout:v(u,o.timeout)},_=function(S){var A={request:b,response:S,host:g,triesLeft:f.length};return r.push(A),A},y={onSucess:function(S){return function(A){try{return JSON.parse(A.content)}catch(D){throw function(K,R){return{name:"DeserializationError",message:K,response:R}}(D.message,A)}}(S)},onRetry:function(S){var A=_(S);return S.isTimedOut&&u++,Promise.all([e.logger.info("Retryable failure",dm(A)),e.hostsCache.set(g,lm(g,S.isTimedOut?sm:yb))]).then(function(){return d(f,v)})},onFail:function(S){throw _(S),function(A,D){var K=A.content,R=A.status,E=K;try{E=JSON.parse(K).message}catch{}return function(U,Y,H){return{name:"ApiError",message:U,status:Y,transporterStackTrace:H}}(E,R,D)}(S,Vs(r))}};return e.requester.send(b).then(function(S){return function(A,D){return function(K){var R=K.status;return K.isTimedOut||function(E){var U=E.isTimedOut,Y=E.status;return!U&&~~Y==0}(K)||~~(R/100)!=2&&~~(R/100)!=4}(A)?D.onRetry(A):~~(A.status/100)==2?D.onSucess(A):D.onFail(A)}(S,y)})};return Eb(e.hostsCache,t).then(function(d){return m(hr(d.statelessHosts).reverse(),d.getTimeout)})}function wb(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(n){var o="; ".concat(n.segment).concat(n.version!==void 0?" (".concat(n.version,")"):"");return t.value.indexOf(o)===-1&&(t.value="".concat(t.value).concat(o)),t}};return t}function Ob(e,t,n){var o=mm(n),r="".concat(e.protocol,"://").concat(e.url,"/").concat(t.charAt(0)==="/"?t.substr(1):t);return o.length&&(r+="?".concat(o)),r}function mm(e){return Object.keys(e).map(function(t){return Mr("%s=%s",t,(n=e[t],Object.prototype.toString.call(n)==="[object Object]"||Object.prototype.toString.call(n)==="[object Array]"?JSON.stringify(e[t]):e[t]));var n}).join("&")}function Vs(e){return e.map(function(t){return dm(t)})}function dm(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return Pe(Pe({},e),{},{request:Pe(Pe({},e.request),{},{headers:Pe(Pe({},e.request.headers),t)})})}var Pb=function(e){var t=e.appId,n=function(a,i,c){var s={"x-algolia-api-key":c,"x-algolia-application-id":i};return{headers:function(){return a===Qo.WithinHeaders?s:{}},queryParameters:function(){return a===Qo.WithinQueryParameters?s:{}}}}(e.authMode!==void 0?e.authMode:Qo.WithinHeaders,t,e.apiKey),o=function(a){var i=a.hostsCache,c=a.logger,s=a.requester,l=a.requestsCache,u=a.responsesCache,m=a.timeouts,d=a.userAgent,f=a.hosts,v=a.queryParameters,g={hostsCache:i,logger:c,requester:s,requestsCache:l,responsesCache:u,timeouts:m,userAgent:d,headers:a.headers,queryParameters:v,hosts:f.map(function(b){return um(b)}),read:function(b,_){var y=Hs(_,g.timeouts.read),S=function(){return qs(g,g.hosts.filter(function(D){return(D.accept&An.Read)!=0}),b,y)};if((y.cacheable!==void 0?y.cacheable:b.cacheable)!==!0)return S();var A={request:b,mappedRequestOptions:y,transporter:{queryParameters:g.queryParameters,headers:g.headers}};return g.responsesCache.get(A,function(){return g.requestsCache.get(A,function(){return g.requestsCache.set(A,S()).then(function(D){return Promise.all([g.requestsCache.delete(A),D])},function(D){return Promise.all([g.requestsCache.delete(A),Promise.reject(D)])}).then(function(D){var K=fr(D,2);return K[0],K[1]})})},{miss:function(D){return g.responsesCache.set(A,D)}})},write:function(b,_){return qs(g,g.hosts.filter(function(y){return(y.accept&An.Write)!=0}),b,Hs(_,g.timeouts.write))}};return g}(Pe(Pe({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:An.Read},{url:"".concat(t,".algolia.net"),accept:An.Write}].concat(bb([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:Pe(Pe(Pe({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:Pe(Pe({},n.queryParameters()),e.queryParameters)})),r={transporter:o,appId:t,addAlgoliaAgent:function(a,i){o.userAgent.add({segment:a,version:i})},clearCache:function(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then(function(){})}};return im(r,e.methods)},fm=function(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o={transporter:e.transporter,appId:e.appId,indexName:t};return im(o,n.methods)}},Ns=function(e){return function(t,n){var o=t.map(function(r){return Pe(Pe({},r),{},{params:mm(r.params||{})})});return e.transporter.read({method:jr,path:"1/indexes/*/queries",data:{requests:o},cacheable:!0},n)}},Fs=function(e){return function(t,n){return Promise.all(t.map(function(o){var r=o.params,a=r.facetName,i=r.facetQuery,c=k0(r,vb);return fm(e)(o.indexName,{methods:{searchForFacetValues:hm}}).searchForFacetValues(a,i,Pe(Pe({},n),c))}))}},Sb=function(e){return function(t,n,o){return e.transporter.read({method:jr,path:Mr("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},o)}},Ab=function(e){return function(t,n){return e.transporter.read({method:jr,path:Mr("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},n)}},hm=function(e){return function(t,n,o){return e.transporter.read({method:jr,path:Mr("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:n},cacheable:!0},o)}},Tb=1,Ib=2,Lb=3;function pm(e,t,n){var o,r={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(a){return new Promise(function(i){var c=new XMLHttpRequest;c.open(a.method,a.url,!0),Object.keys(a.headers).forEach(function(m){return c.setRequestHeader(m,a.headers[m])});var s,l=function(m,d){return setTimeout(function(){c.abort(),i({status:0,content:d,isTimedOut:!0})},1e3*m)},u=l(a.connectTimeout,"Connection timeout");c.onreadystatechange=function(){c.readyState>c.OPENED&&s===void 0&&(clearTimeout(u),s=l(a.responseTimeout,"Socket timeout"))},c.onerror=function(){c.status===0&&(clearTimeout(u),clearTimeout(s),i({content:c.responseText||"Network request failed",status:c.status,isTimedOut:!1}))},c.onload=function(){clearTimeout(u),clearTimeout(s),i({content:c.responseText,status:c.status,isTimedOut:!1})},c.send(a.data)})}},logger:(o=Lb,{debug:function(a,i){return Tb>=o&&console.debug(a,i),Promise.resolve()},info:function(a,i){return Ib>=o&&console.info(a,i),Promise.resolve()},error:function(a,i){return console.error(a,i),Promise.resolve()}}),responsesCache:oa(),requestsCache:oa({serializable:!1}),hostsCache:Xn({caches:[gb({key:"".concat("4.8.5","-").concat(e)}),oa()]}),userAgent:wb("4.8.5").add({segment:"Browser",version:"lite"}),authMode:Qo.WithinQueryParameters};return Pb(Pe(Pe(Pe({},r),n),{},{methods:{search:Ns,searchForFacetValues:Fs,multipleQueries:Ns,multipleSearchForFacetValues:Fs,initIndex:function(a){return function(i){return fm(a)(i,{methods:{search:Ab,searchForFacetValues:hm,findAnswers:Sb}})}}}}))}pm.version="4.8.5";var Db=["footer","searchBox"];function co(){return co=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);n=0||(u[s]=i[s]);return u}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Cb(e){var t=e.appId,n=e.apiKey,o=e.indexName,r=e.placeholder,a=r===void 0?"Search docs":r,i=e.searchParameters,c=e.onClose,s=c===void 0?nb:c,l=e.transformItems,u=l===void 0?Ms:l,m=e.hitComponent,d=m===void 0?H1:m,f=e.resultsFooterComponent,v=f===void 0?function(){return null}:f,g=e.navigator,b=e.initialScrollY,_=b===void 0?0:b,y=e.transformSearchClient,S=y===void 0?Ms:y,A=e.disableUserPersonalization,D=A!==void 0&&A,K=e.initialQuery,R=K===void 0?"":K,E=e.translations,U=E===void 0?{}:E,Y=e.getMissingResultsUrl,H=U.footer,P=U.searchBox,T=xb(U,Db),k=kb(O.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),M=k[0],j=k[1],W=O.useRef(null),ee=O.useRef(null),me=O.useRef(null),de=O.useRef(null),ve=O.useRef(null),Se=O.useRef(10),Re=O.useRef(typeof window<"u"?window.getSelection().toString().slice(0,64):"").current,Fe=O.useRef(R||Re).current,x=function(p,w,I){return O.useMemo(function(){var C=pm(p,w);return C.addAlgoliaAgent("docsearch","3.2.1"),/docsearch.js \(.*\)/.test(C.transporter.userAgent.value)===!1&&C.addAlgoliaAgent("docsearch-react","3.2.1"),I(C)},[p,w,I])}(t,n,S),Z=O.useRef(js({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(o),limit:10})).current,N=O.useRef(js({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(o),limit:Z.getAll().length===0?7:4})).current,G=O.useCallback(function(p){if(!D){var w=p.type==="content"?p.__docsearch_parent:p;w&&Z.getAll().findIndex(function(I){return I.objectID===w.objectID})===-1&&N.add(w)}},[Z,N,D]),pe=O.useMemo(function(){return C1({id:"docsearch",defaultActiveItemId:0,placeholder:a,openOnFocus:!0,initialState:{query:Fe,context:{searchSuggestions:[]}},navigator:g,onStateChange:function(p){j(p.state)},getSources:function(p){var w=p.query,I=p.state,C=p.setContext,$=p.setStatus;return w?x.search([{query:w,indexName:o,params:ra({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(Se.current),"hierarchy.lvl2:".concat(Se.current),"hierarchy.lvl3:".concat(Se.current),"hierarchy.lvl4:".concat(Se.current),"hierarchy.lvl5:".concat(Se.current),"hierarchy.lvl6:".concat(Se.current),"content:".concat(Se.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20},i)}]).catch(function(q){throw q.name==="RetryError"&&$("error"),q}).then(function(q){var J=q.results[0],z=J.hits,Q=J.nbHits,B=Cs(z,function(re){return am(re)});return I.context.searchSuggestions.length0&&(le(),ve.current&&ve.current.focus())},[Fe,le]),O.useEffect(function(){function p(){if(ee.current){var w=.01*window.innerHeight;ee.current.style.setProperty("--docsearch-vh","".concat(w,"px"))}}return p(),window.addEventListener("resize",p),function(){window.removeEventListener("resize",p)}},[]),O.createElement("div",co({ref:W},fe({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",M.status==="stalled"&&"DocSearch-Container--Stalled",M.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(p){p.target===p.currentTarget&&s()}}),O.createElement("div",{className:"DocSearch-Modal",ref:ee},O.createElement("header",{className:"DocSearch-SearchBar",ref:me},O.createElement(fb,co({},pe,{state:M,autoFocus:Fe.length===0,inputRef:ve,isFromSelection:Boolean(Fe)&&Fe===Re,translations:P,onClose:s}))),O.createElement("div",{className:"DocSearch-Dropdown",ref:de},O.createElement(ub,co({},pe,{indexName:o,state:M,hitComponent:d,resultsFooterComponent:v,disableUserPersonalization:D,recentSearches:N,favoriteSearches:Z,inputRef:ve,translations:T,getMissingResultsUrl:Y,onItemClick:function(p){G(p),s()}}))),O.createElement("footer",{className:"DocSearch-Footer"},O.createElement(j1,{translations:H}))))}function ja(){return ja=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:window;return typeof t=="string"?n.document.querySelector(t):t}(e.container,e.environment))}const Hb=e=>e.button===1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey,$b=()=>{const e=vn(),t=_i();return{hitComponent:({hit:n,children:o})=>({type:"a",ref:void 0,constructor:void 0,key:void 0,props:{href:n.url,onClick:r=>{Hb(r)||(r.preventDefault(),e.push(rc(n.url,t.value.base)))},children:o},__v:null}),navigator:{navigate:({itemUrl:n})=>{e.push(rc(n,t.value.base))}},transformSearchClient:n=>{const o=ri(n.search,500);return{...n,search:async(...r)=>o(...r)}}}};const qb=je({name:"Docsearch",props:{containerId:{type:String,required:!1,default:"docsearch-container"},options:{type:Object,required:!0}},setup(e){const t=Fn(),n=Em(),o=$b(),r=te(()=>{var c;return{...e.options,...(c=e.options.locales)==null?void 0:c[t.value]}}),a=[],i=()=>{var s,l;const c=(l=(s=r.value.searchParameters)==null?void 0:s.facetFilters)!=null?l:[];a.splice(0,a.length,`lang:${n.value}`,...ce(c)?c:[c]),jb({...o,...r.value,container:`#${e.containerId}`,searchParameters:{...r.value.searchParameters,facetFilters:a}})};return et(()=>{i(),ot([t,r],([c,s],[l,u])=>{c!==l&&JSON.stringify(s)!==JSON.stringify(u)&&i()}),ot(n,(c,s)=>{if(c!==s){const l=a.findIndex(u=>u===`lang:${s}`);l>-1&&a.splice(l,1,`lang:${c}`)}})}),()=>Te("div",{id:e.containerId})}}),Vb={apiKey:"30c521836bfc8e97915576e11ac2cebc",indexName:"arthas",appId:"UX8WBNVHHR",locales:{"/":{placeholder:"\u641C\u7D22\u6587\u6863",translations:{button:{buttonText:"\u641C\u7D22\u6587\u6863",buttonAriaLabel:"\u641C\u7D22\u6587\u6863"},modal:{searchBox:{resetButtonTitle:"\u6E05\u9664\u67E5\u8BE2\u6761\u4EF6",resetButtonAriaLabel:"\u6E05\u9664\u67E5\u8BE2\u6761\u4EF6",cancelButtonText:"\u53D6\u6D88",cancelButtonAriaLabel:"\u53D6\u6D88"},startScreen:{recentSearchesTitle:"\u641C\u7D22\u5386\u53F2",noRecentSearchesText:"\u6CA1\u6709\u641C\u7D22\u5386\u53F2",saveRecentSearchButtonTitle:"\u4FDD\u5B58\u81F3\u641C\u7D22\u5386\u53F2",removeRecentSearchButtonTitle:"\u4ECE\u641C\u7D22\u5386\u53F2\u4E2D\u79FB\u9664",favoriteSearchesTitle:"\u6536\u85CF",removeFavoriteSearchButtonTitle:"\u4ECE\u6536\u85CF\u4E2D\u79FB\u9664"},errorScreen:{titleText:"\u65E0\u6CD5\u83B7\u53D6\u7ED3\u679C",helpText:"\u4F60\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u4F60\u7684\u7F51\u7EDC\u8FDE\u63A5"},footer:{selectText:"\u9009\u62E9",navigateText:"\u5207\u6362",closeText:"\u5173\u95ED",searchByText:"\u641C\u7D22\u63D0\u4F9B\u8005"},noResultsScreen:{noResultsText:"\u65E0\u6CD5\u627E\u5230\u76F8\u5173\u7ED3\u679C",suggestedQueryText:"\u4F60\u53EF\u4EE5\u5C1D\u8BD5\u67E5\u8BE2",reportMissingResultsText:"\u4F60\u8BA4\u4E3A\u8BE5\u67E5\u8BE2\u5E94\u8BE5\u6709\u7ED3\u679C\uFF1F",reportMissingResultsLinkText:"\u70B9\u51FB\u53CD\u9988"}}}}}},Nb=Lt({enhance({app:e}){e.component("Docsearch",()=>Te(qb,{options:Vb}))}}),Fb={"doc/start-arthas.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"mantuliu",email:"240951888@qq.com",commits:1}],"doc/sm.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1}],"doc/session.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"doc/retransform.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3}],"doc/redefine.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:8},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1}],"doc/quit.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"doc/quick-start.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:23},{name:"Gene",email:"geneq@hotmail.com",commits:1},{name:"Sergio Escalante",email:"sergioescala@gmail.com",commits:1},{name:"northmorn",email:"northmorn@gmail.com",commits:1},{name:"\u9773\u9633",email:"260893248@qq.com",commits:1}],"doc/profiler.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:7},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/perfcounter.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/options.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:9},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"qianmoke",email:"zzilovey@gmail.com",commits:1}],"doc/ognl.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"gongdewei",email:"kylixs@qq.com",commits:1}],"doc/monitor.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"mikawudi",email:"mikawudi@qq.com",commits:1}],"doc/memory.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:1}],"doc/mc.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:5},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1},{name:"vic",email:"snipercy@users.noreply.github.com",commits:1}],"doc/mbean.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"\u5F90\u5FD7\u6BC5",email:"xuzhiyi@youzan.com",commits:1}],"doc/manual-install.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:12},{name:"gongdewei",email:"kylixs@qq.com",commits:1}],"doc/keymap.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/jvm.md":[{name:"bohr.qiu",email:"bohr.qiu@gmail.com",commits:4},{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/jad.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:8},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1},{name:"penguin-wwy",email:"940375606@qq.com",commits:1}],"doc/install-detail.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:29}],"doc/index.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:53},{name:"TheoneFx",email:"chenxilzx1@gmail.com",commits:1},{name:"gongdewei",email:"kylixs@qq.com",commits:1},{name:"lzc-alioo",email:"33567235+lzc-alioo@users.noreply.github.com",commits:1}],"doc/idea-plugin.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:1},{name:"zthreefires",email:"34255589+zthreefires@users.noreply.github.com",commits:1},{name:"\u6C6A\u5409",email:"983433479@qq.com",commits:1}],"doc/http-api.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"gongdewei",email:"kylixs@qq.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/history.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"doc/help.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"doc/heapdump.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/groovy.md":[{name:"beiwei30",email:"ian.luo@gmail.com",commits:1},{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:1}],"doc/grep.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/getstatic.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1}],"doc/faq.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:17},{name:"\u6C6A\u5409",email:"983433479@qq.com",commits:2},{name:"Gong Dewei",email:"kylixs@qq.com",commits:1}],"doc/echo.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/dump.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1}],"doc/download.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:7}],"doc/docker.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:6},{name:"garenchan",email:"1412950785@qq.com",commits:1}],"doc/dashboard.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"gongdewei",email:"kylixs@qq.com",commits:1},{name:"xuefeng0707",email:"xuefeng0707@hotmail.com",commits:1}],"doc/contact-us.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:10}],"doc/commands.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:23},{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"doc/cls.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"doc/classloader.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:5},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:2},{name:"LHearen",email:"lhearen@gmail.com",commits:1}],"doc/cat.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/batch-support.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"D-H-T",email:"dht925nerd@126.com",commits:1}],"doc/base64.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:1}],"doc/auth.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:7}],"doc/async.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:5},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"\u6C6A\u5409",email:"983433479@qq.com",commits:1}],"doc/arthas3.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:5}],"doc/arthas-properties.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3}],"doc/agent.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3}],"doc/advice-class.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2}],"doc/advanced-use.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:28},{name:"penguin-wwy",email:"940375606@qq.com",commits:1},{name:"\u5F90\u5FD7\u6BC5",email:"xuzhiyi@youzan.com",commits:1},{name:"\u9759\u5B8F",email:"acvrock.cn@gmail.com",commits:1}],"doc/README.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:1}],"doc/stack.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:5},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/thread.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"gongdewei",email:"kylixs@qq.com",commits:1},{name:"\u674E\u9F0E",email:"oldratlee@gmail.com",commits:1}],"doc/sysenv.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/tee.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"pipetee",email:"toyangmin@gmail.com",commits:1}],"doc/stop.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"doc/trace.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:14},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Jerry",email:"favoorr@gmail.com",commits:1},{name:"\u5F90\u5FD7\u6BC5",email:"xuzhiyi@youzan.com",commits:1}],"doc/pwd.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/release-notes.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:8}],"doc/reset.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:5},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/save-log.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/sc.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1}],"doc/spring-boot-starter.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:11}],"doc/tunnel.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:6}],"doc/vmtool.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3}],"doc/tt.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:5},{name:"superheizai",email:"superheizai@aliyun.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Xiangmingzhe",email:"xiangmz0928@gmail.com",commits:1},{name:"vic",email:"snipercy@users.noreply.github.com",commits:1},{name:"\u6C6A\u5409",email:"983433479@qq.com",commits:1}],"doc/vmoption.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/logger.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1}],"doc/sysprop.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"doc/version.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"doc/watch.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:12},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"vic",email:"snipercy@users.noreply.github.com",commits:1},{name:"\u6C6A\u5409",email:"983433479@qq.com",commits:1}],"doc/web-console.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:14},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/sm.md":[{name:"Hearen",email:"LHearen@126.com",commits:2},{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/session.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"en/doc/sc.md":[{name:"Hearen",email:"LHearen@126.com",commits:2},{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1},{name:"Sergio Escalante",email:"sergioescala@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/save-log.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/retransform.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3}],"en/doc/reset.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/release-notes.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:7},{name:"0xflotus",email:"26602940+0xflotus@users.noreply.github.com",commits:1},{name:"Hearen",email:"LHearen@126.com",commits:1}],"en/doc/redefine.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:7},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1},{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/quit.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"en/doc/quick-start.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:15},{name:"Hearen",email:"LHearen@126.com",commits:2},{name:"0xflotus",email:"26602940+0xflotus@users.noreply.github.com",commits:1},{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1},{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1},{name:"garenchan",email:"1412950785@qq.com",commits:1}],"en/doc/pwd.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/profiler.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:7},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/perfcounter.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/options.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:8},{name:"Hearen",email:"LHearen@126.com",commits:2},{name:"alfredzouang",email:"43456743+alfredzouang@users.noreply.github.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/ognl.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"gongdewei",email:"kylixs@qq.com",commits:1}],"en/doc/monitor.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1},{name:"mikawudi",email:"mikawudi@qq.com",commits:1}],"en/doc/memory.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:1}],"en/doc/mc.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:5},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1},{name:"vic",email:"snipercy@users.noreply.github.com",commits:1}],"en/doc/mbean.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"\u5F90\u5FD7\u6BC5",email:"xuzhiyi@youzan.com",commits:1}],"en/doc/manual-install.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:7},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Sergio Escalante",email:"sergioescala@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1},{name:"gongdewei",email:"kylixs@qq.com",commits:1}],"en/doc/logger.md":[{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:2},{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/keymap.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/jvm.md":[{name:"bohr.qiu",email:"bohr.qiu@gmail.com",commits:2},{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/jad.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:6},{name:"Hearen",email:"LHearen@126.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/install-detail.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:18},{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1},{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"Sahil Jha",email:"sjha200000@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/index.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:28},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"LHearen",email:"LHearen@gmail.com",commits:1},{name:"Nithyanandan Natchimuthu",email:"anand1st@gmail.com",commits:1},{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1},{name:"gongdewei",email:"kylixs@qq.com",commits:1},{name:"Sahil Jha",email:"sjha200000@gmail.com",commits:1}],"en/doc/idea-plugin.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:1},{name:"\u6C6A\u5409",email:"983433479@qq.com",commits:1}],"en/doc/http-api.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"gongdewei",email:"kylixs@qq.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/history.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"en/doc/help.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"en/doc/heapdump.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/groovy.md":[{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/grep.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/getstatic.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/faq.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:15},{name:"\u6C6A\u5409",email:"983433479@qq.com",commits:2},{name:"Gong Dewei",email:"kylixs@qq.com",commits:1}],"en/doc/echo.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/dump.md":[{name:"Hearen",email:"LHearen@126.com",commits:2},{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Hollow Man",email:"hollowman@hollowman.ml",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/download.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:6},{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1}],"en/doc/docker.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:6},{name:"garenchan",email:"1412950785@qq.com",commits:1}],"en/doc/dashboard.md":[{name:"LHearen",email:"lhearen@gmail.com",commits:2},{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1},{name:"gongdewei",email:"kylixs@qq.com",commits:1},{name:"xuefeng0707",email:"xuefeng0707@hotmail.com",commits:1}],"en/doc/contact-us.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Sahil Jha",email:"sjha200000@gmail.com",commits:1}],"en/doc/commands.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:21},{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/cls.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"en/doc/classloader.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:4},{name:"Hearen",email:"LHearen@126.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:2},{name:"0xflotus",email:"26602940+0xflotus@users.noreply.github.com",commits:1},{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/cat.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/batch-support.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/base64.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:1}],"en/doc/auth.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:6}],"en/doc/async.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"0xflotus",email:"26602940+0xflotus@users.noreply.github.com",commits:1},{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Sergio Escalante",email:"sergioescala@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1},{name:"\u6C6A\u5409",email:"983433479@qq.com",commits:1}],"en/doc/arthas-properties.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3}],"en/doc/agent.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3}],"en/doc/advice-class.md":[{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/advanced-use.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:28},{name:"Arteev Raina",email:"arteevraina@gmail.com",commits:1},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"HearingSmile",email:"41669762+tianjindong@users.noreply.github.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1},{name:"\u5F90\u5FD7\u6BC5",email:"xuzhiyi@youzan.com",commits:1},{name:"0xflotus",email:"26602940+0xflotus@users.noreply.github.com",commits:1},{name:"\u9759\u5B8F",email:"acvrock.cn@gmail.com",commits:1}],"en/doc/README.md":[{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:1}],"en/doc/stack.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"LHearen",email:"lhearen@gmail.com",commits:2},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/start-arthas.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1},{name:"mantuliu",email:"240951888@qq.com",commits:1}],"en/doc/spring-boot-starter.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:8}],"en/doc/stop.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"en/doc/sysenv.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/sysprop.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/tee.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"pipetee",email:"toyangmin@gmail.com",commits:1}],"en/doc/thread.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1},{name:"gongdewei",email:"kylixs@qq.com",commits:1},{name:"\u674E\u9F0E",email:"oldratlee@gmail.com",commits:1}],"en/doc/tt.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"LHearen",email:"lhearen@gmail.com",commits:2},{name:"superheizai",email:"superheizai@aliyun.com",commits:2},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Sergio Escalante",email:"sergioescala@gmail.com",commits:1},{name:"\u6C6A\u5409",email:"983433479@qq.com",commits:1}],"en/doc/version.md":[{name:"Fu",email:"dkafussss@gmail.com",commits:1}],"en/doc/watch.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:10},{name:"Hearen",email:"LHearen@126.com",commits:2},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"\u6C6A\u5409",email:"983433479@qq.com",commits:1}],"en/doc/tunnel.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:5}],"en/doc/vmtool.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3}],"en/doc/trace.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:12},{name:"0xflotus",email:"26602940+0xflotus@users.noreply.github.com",commits:1},{name:"Hearen",email:"LHearen@126.com",commits:1},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1},{name:"Jerry",email:"favoorr@gmail.com",commits:1},{name:"LHearen",email:"lhearen@gmail.com",commits:1},{name:"beiwei30",email:"ian.luo@gmail.com",commits:1}],"en/doc/vmoption.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:3},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}],"en/doc/web-console.md":[{name:"hengyunabc",email:"hengyunabc@gmail.com",commits:15},{name:"Hollow Man",email:"hollowman186@vip.qq.com",commits:1}]};let Ks=0;const Ys="webkit moz ms o".split(" ");let Et,wt;const Bb=typeof window>"u";if(Bb)Et=function(){},wt=function(){};else{Et=window.requestAnimationFrame,wt=window.cancelAnimationFrame;let e;for(let t=0;t{t(n+o)},o);return Ks=n+o,r},wt=function(t){window.clearTimeout(t)})}const zb={props:{startVal:{type:Number,required:!1,default:0},endVal:{type:Number,required:!1,default:2017},duration:{type:Number,required:!1,default:3e3},autoplay:{type:Boolean,required:!1,default:!0},decimals:{type:Number,required:!1,default:0,validator(e){return e>=0}},decimal:{type:String,required:!1,default:"."},separator:{type:String,required:!1,default:","},prefix:{type:String,required:!1,default:""},suffix:{type:String,required:!1,default:""},useEasing:{type:Boolean,required:!1,default:!0},easingFn:{type:Function,default(e,t,n,o){return n*(-Math.pow(2,-10*e/o)+1)*1024/1023+t}}},data(){return{localStartVal:this.startVal,displayValue:this.formatNumber(this.startVal),printVal:null,paused:!1,localDuration:this.duration,startTime:null,timestamp:null,remaining:null,rAF:null}},computed:{countDown(){return this.startVal>this.endVal}},watch:{startVal(){this.autoplay&&this.start()},endVal(){this.autoplay&&this.start()}},mounted(){this.autoplay&&this.start(),this.$emit("mountedCallback")},methods:{start(){this.localStartVal=this.startVal,this.startTime=null,this.localDuration=this.duration,this.paused=!1,this.rAF=Et(this.count)},pauseResume(){this.paused?(this.resume(),this.paused=!1):(this.pause(),this.paused=!0)},pause(){wt(this.rAF)},resume(){this.startTime=null,this.localDuration=+this.remaining,this.localStartVal=+this.printVal,Et(this.count)},reset(){this.startTime=null,wt(this.rAF),this.displayValue=this.formatNumber(this.startVal)},count(e){this.startTime||(this.startTime=e),this.timestamp=e;const t=e-this.startTime;this.remaining=this.localDuration-t,this.useEasing?this.countDown?this.printVal=this.localStartVal-this.easingFn(t,0,this.localStartVal-this.endVal,this.localDuration):this.printVal=this.easingFn(t,this.localStartVal,this.endVal-this.localStartVal,this.localDuration):this.countDown?this.printVal=this.localStartVal-(this.localStartVal-this.endVal)*(t/this.localDuration):this.printVal=this.localStartVal+(this.endVal-this.localStartVal)*(t/this.localDuration),this.countDown?this.printVal=this.printValthis.endVal?this.endVal:this.printVal,this.displayValue=this.formatNumber(this.printVal),t1?this.decimal+t[1]:"",r=/(\d+)(\d{3})/;if(this.separator&&!this.isNumber(this.separator))for(;r.test(n);)n=n.replace(r,"$1"+this.separator+"$2");return this.prefix+n+o+this.suffix}},destroyed(){wt(this.rAF)}};function Ub(e,t,n,o,r,a){return V(),X("span",null,Me(r.displayValue),1)}const Wb=we(zb,[["render",Ub],["__file","vue-countTo.vue"]]),Kb=()=>{const e=mt();if(!e.value.git)return;const t=e.value.filePathRelative,n=e.value.git.contributors,o=Fb[t],r=(a,i)=>a.find(c=>c.name===i.name&&c.email===i.email);o&&o.forEach(a=>{r(n,a)?r(n,a).commits+=a.commits:n.push(a)}),n==null||n.sort((a,i)=>i.commits-a.commits)},Yb=Lt({enhance({router:e,app:t}){t.component("CountTo",Wb),e.afterEach((n,o)=>{n.path!==o.path&&Kb()}),e.beforeEach((n,o,r)=>{typeof _hmt<"u"&&n.path&&n.fullPath!==o.fullPath&&_hmt.push(["_trackPageview",n.fullPath]),r()})}}),Go=[ih,uh,wh,Ip,kp,_0,v0,P0,D0,Nb,Yb];var _m=De(Sm),vm=Ka({key:"",path:"",title:"",lang:"",frontmatter:{},excerpt:"",headers:[]}),Mt=De(vm),mt=()=>Mt;import.meta.webpackHot&&(__VUE_HMR_RUNTIME__.updatePageData=e=>{_m.value[e.key]=()=>Promise.resolve(e),e.key===Mt.value.key&&(Mt.value=e)});var gm=Symbol(""),At=()=>{const e=We(gm);if(!e)throw new Error("usePageFrontmatter() is called without provider.");return e},bm=Symbol(""),Jb=()=>{const e=We(bm);if(!e)throw new Error("usePageHead() is called without provider.");return e},Qb=Symbol(""),ym=Symbol(""),Em=()=>{const e=We(ym);if(!e)throw new Error("usePageLang() is called without provider.");return e},pi=Symbol(""),Fn=()=>{const e=We(pi);if(!e)throw new Error("useRouteLocale() is called without provider.");return e},Kt=De(Xf),_i=()=>Kt;import.meta.webpackHot&&(__VUE_HMR_RUNTIME__.updateSiteData=e=>{Kt.value=e});var wm=Symbol(""),vi=()=>{const e=We(wm);if(!e)throw new Error("useSiteLocaleData() is called without provider.");return e},Gb=Symbol(""),sn=Vn({resolvePageData:async e=>{const t=_m.value[e],n=await(t==null?void 0:t());return n!=null?n:vm},resolvePageFrontmatter:e=>e.frontmatter,resolvePageHead:(e,t,n)=>{const o=Le(t.description)?t.description:n.description,r=[...ce(t.head)?t.head:[],...n.head,["title",{},e],["meta",{name:"description",content:o}]];return th(r)},resolvePageHeadTitle:(e,t)=>`${e.title?`${e.title} | `:""}${t.title}`,resolvePageLang:e=>e.lang||"en",resolveRouteLocale:(e,t)=>Xl(e,t),resolveSiteLocaleData:(e,t)=>({...e,...e.locales[t]})}),gi=je({name:"ClientOnly",setup(e,t){const n=De(!1);return et(()=>{n.value=!0}),()=>{var o,r;return n.value?(r=(o=t.slots).default)==null?void 0:r.call(o):null}}}),Zb=je({name:"Content",props:{pageKey:{type:String,required:!1,default:""}},setup(e){const t=mt(),n=te(()=>eu[e.pageKey||t.value.key]);return()=>n.value?Te(n.value):Te("div","404 Not Found")}}),Xb="Layout",ey="NotFound",ty=Go.reduce((e,t)=>({...e,...t.layouts}),{}),Js=je({name:"Vuepress",setup(){const e=mt(),t=te(()=>{let n;if(e.value.path){const o=e.value.frontmatter.layout;Le(o)?n=o:n=Xb}else n=ey;return ty[n]});return()=>Te(t.value)}}),bi=e=>So(e)?e:`${_i().value.base}${Zl(e)}`;const ny=[["v-8daa1a0e","/",{title:""},["/index.html","/README.md"]],["v-7445f070","/doc/",{title:"\u7B80\u4ECB"},["/doc/index.html","/doc/README.md"]],["v-0d09f68d","/doc/advanced-use.html",{title:"\u5176\u4ED6\u7279\u6027"},["/doc/advanced-use","/doc/advanced-use.md"]],["v-46e53834","/doc/advice-class.html",{title:"\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF"},["/doc/advice-class","/doc/advice-class.md"]],["v-37178538","/doc/agent.html",{title:"\u4EE5 Java Agent \u7684\u65B9\u5F0F\u542F\u52A8"},["/doc/agent","/doc/agent.md"]],["v-5c517900","/doc/arthas-properties.html",{title:"Arthas Properties"},["/doc/arthas-properties","/doc/arthas-properties.md"]],["v-02eb6d0d","/doc/arthas3.html",{title:""},["/doc/arthas3","/doc/arthas3.md"]],["v-4f82df66","/doc/async.html",{title:"Arthas \u540E\u53F0\u5F02\u6B65\u4EFB\u52A1"},["/doc/async","/doc/async.md"]],["v-d0358c7e","/doc/auth.html",{title:"auth"},["/doc/auth","/doc/auth.md"]],["v-3157067a","/doc/base64.html",{title:"base64"},["/doc/base64","/doc/base64.md"]],["v-cc8f4ae6","/doc/batch-support.html",{title:"\u6279\u5904\u7406\u529F\u80FD"},["/doc/batch-support","/doc/batch-support.md"]],["v-6542b733","/doc/cat.html",{title:"cat"},["/doc/cat","/doc/cat.md"]],["v-49b1709e","/doc/classloader.html",{title:"classloader"},["/doc/classloader","/doc/classloader.md"]],["v-ad1b2b42","/doc/cls.html",{title:"cls"},["/doc/cls","/doc/cls.md"]],["v-5ed4d0e1","/doc/commands.html",{title:"\u547D\u4EE4\u5217\u8868"},["/doc/commands","/doc/commands.md"]],["v-3992adde","/doc/contact-us.html",{title:"\u8054\u7CFB\u6211\u4EEC"},["/doc/contact-us","/doc/contact-us.md"]],["v-0d1e3f35","/doc/dashboard.html",{title:"dashboard"},["/doc/dashboard","/doc/dashboard.md"]],["v-02361049","/doc/docker.html",{title:"Docker"},["/doc/docker","/doc/docker.md"]],["v-2116d2e1","/doc/download.html",{title:"\u4E0B\u8F7D"},["/doc/download","/doc/download.md"]],["v-1fe4a616","/doc/dump.html",{title:"dump"},["/doc/dump","/doc/dump.md"]],["v-2c48f364","/doc/echo.html",{title:"echo"},["/doc/echo","/doc/echo.md"]],["v-d070981a","/doc/faq.html",{title:"FAQ"},["/doc/faq","/doc/faq.md"]],["v-78c35af6","/doc/getstatic.html",{title:"getstatic"},["/doc/getstatic","/doc/getstatic.md"]],["v-63f4cd5a","/doc/grep.html",{title:"grep"},["/doc/grep","/doc/grep.md"]],["v-809381ca","/doc/groovy.html",{title:"groovy"},["/doc/groovy","/doc/groovy.md"]],["v-07868089","/doc/heapdump.html",{title:"heapdump"},["/doc/heapdump","/doc/heapdump.md"]],["v-e3b34070","/doc/help.html",{title:"help"},["/doc/help","/doc/help.md"]],["v-26f43d96","/doc/history.html",{title:"history"},["/doc/history","/doc/history.md"]],["v-225de034","/doc/http-api.html",{title:"Http API"},["/doc/http-api","/doc/http-api.md"]],["v-7c670020","/doc/idea-plugin.html",{title:"IDEA Plugin"},["/doc/idea-plugin","/doc/idea-plugin.md"]],["v-0cb398f4","/doc/install-detail.html",{title:"Arthas Install"},["/doc/install-detail","/doc/install-detail.md"]],["v-211d675c","/doc/jad.html",{title:"jad"},["/doc/jad","/doc/jad.md"]],["v-41806853","/doc/jfr.html",{title:"jfr"},["/doc/jfr","/doc/jfr.md"]],["v-f1483d70","/doc/jvm.html",{title:"jvm"},["/doc/jvm","/doc/jvm.md"]],["v-4039cdec","/doc/keymap.html",{title:"keymap"},["/doc/keymap","/doc/keymap.md"]],["v-5ae8aed9","/doc/logger.html",{title:"logger"},["/doc/logger","/doc/logger.md"]],["v-6a31cc55","/doc/manual-install.html",{title:"\u624B\u52A8\u5B89\u88C5 Arthas"},["/doc/manual-install","/doc/manual-install.md"]],["v-8ebd6c68","/doc/mbean.html",{title:"mbean"},["/doc/mbean","/doc/mbean.md"]],["v-3b401ada","/doc/mc.html",{title:"mc"},["/doc/mc","/doc/mc.md"]],["v-4d9433f0","/doc/memory.html",{title:"memory"},["/doc/memory","/doc/memory.md"]],["v-6e88d7a2","/doc/monitor.html",{title:"monitor"},["/doc/monitor","/doc/monitor.md"]],["v-627e52da","/doc/ognl.html",{title:"ognl"},["/doc/ognl","/doc/ognl.md"]],["v-27b6152a","/doc/options.html",{title:"options"},["/doc/options","/doc/options.md"]],["v-2f05b636","/doc/perfcounter.html",{title:"perfcounter"},["/doc/perfcounter","/doc/perfcounter.md"]],["v-13eae420","/doc/profiler.html",{title:"profiler"},["/doc/profiler","/doc/profiler.md"]],["v-1c2d8c2c","/doc/pwd.html",{title:"pwd"},["/doc/pwd","/doc/pwd.md"]],["v-5afc3a07","/doc/quick-start.html",{title:"\u5FEB\u901F\u5165\u95E8"},["/doc/quick-start","/doc/quick-start.md"]],["v-aa7c750c","/doc/quit.html",{title:"quit"},["/doc/quit","/doc/quit.md"]],["v-0446ad7b","/doc/redefine.html",{title:"redefine"},["/doc/redefine","/doc/redefine.md"]],["v-648880ae","/doc/release-notes.html",{title:"Release Notes"},["/doc/release-notes","/doc/release-notes.md"]],["v-71f77d4c","/doc/reset.html",{title:"reset"},["/doc/reset","/doc/reset.md"]],["v-54cde250","/doc/retransform.html",{title:"retransform"},["/doc/retransform","/doc/retransform.md"]],["v-8e632816","/doc/save-log.html",{title:"\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7"},["/doc/save-log","/doc/save-log.md"]],["v-1fc55619","/doc/sc.html",{title:"sc"},["/doc/sc","/doc/sc.md"]],["v-3891b473","/doc/session.html",{title:"session"},["/doc/session","/doc/session.md"]],["v-30d5cc4f","/doc/sm.html",{title:"sm"},["/doc/sm","/doc/sm.md"]],["v-07cf9d55","/doc/spring-boot-starter.html",{title:"Arthas Spring Boot Starter"},["/doc/spring-boot-starter","/doc/spring-boot-starter.md"]],["v-b75a107e","/doc/stack.html",{title:"stack"},["/doc/stack","/doc/stack.md"]],["v-a9c412f2","/doc/start-arthas.html",{title:"\u542F\u52A8 Arthas"},["/doc/start-arthas","/doc/start-arthas.md"]],["v-bc0910b2","/doc/stop.html",{title:"stop"},["/doc/stop","/doc/stop.md"]],["v-0333612e","/doc/sysenv.html",{title:"sysenv"},["/doc/sysenv","/doc/sysenv.md"]],["v-7012b8ce","/doc/sysprop.html",{title:"sysprop"},["/doc/sysprop","/doc/sysprop.md"]],["v-0536edb5","/doc/tee.html",{title:"tee"},["/doc/tee","/doc/tee.md"]],["v-10845ac2","/doc/thread.html",{title:"thread"},["/doc/thread","/doc/thread.md"]],["v-65d67724","/doc/trace.html",{title:"trace"},["/doc/trace","/doc/trace.md"]],["v-71adf3e9","/doc/tt.html",{title:"tt"},["/doc/tt","/doc/tt.md"]],["v-d2ddc9fe","/doc/tunnel.html",{title:"Arthas Tunnel"},["/doc/tunnel","/doc/tunnel.md"]],["v-5b5d3371","/doc/version.html",{title:"version"},["/doc/version","/doc/version.md"]],["v-40db67fd","/doc/vmoption.html",{title:"vmoption"},["/doc/vmoption","/doc/vmoption.md"]],["v-10890efa","/doc/vmtool.html",{title:"vmtool"},["/doc/vmtool","/doc/vmtool.md"]],["v-24fc49da","/doc/watch.html",{title:"watch"},["/doc/watch","/doc/watch.md"]],["v-a5f6e7aa","/doc/web-console.html",{title:"Web Console"},["/doc/web-console","/doc/web-console.md"]],["v-2d0a870d","/en/",{title:"Home"},["/en/index.html","/en/README.md"]],["v-07555a84","/en/doc/",{title:"Introduction"},["/en/doc/index.html","/en/doc/README.md"]],["v-463d120e","/en/doc/advanced-use.html",{title:"Other features"},["/en/doc/advanced-use","/en/doc/advanced-use.md"]],["v-a736375c","/en/doc/advice-class.html",{title:"Fundamental Fields in Expressions"},["/en/doc/advice-class","/en/doc/advice-class.md"]],["v-f6b5c310","/en/doc/agent.html",{title:"Start as a Java Agent"},["/en/doc/agent","/en/doc/agent.md"]],["v-74fb2694","/en/doc/arthas-properties.html",{title:"Arthas Properties"},["/en/doc/arthas-properties","/en/doc/arthas-properties.md"]],["v-786f7161","/en/doc/async.html",{title:"Arthas Async Jobs"},["/en/doc/async","/en/doc/async.md"]],["v-f76c33a6","/en/doc/auth.html",{title:"auth"},["/en/doc/auth","/en/doc/auth.md"]],["v-d17b7034","/en/doc/base64.html",{title:"base64"},["/en/doc/base64","/en/doc/base64.md"]],["v-765e30be","/en/doc/batch-support.html",{title:"Batch Processing"},["/en/doc/batch-support","/en/doc/batch-support.md"]],["v-64a0cd47","/en/doc/cat.html",{title:"cat"},["/en/doc/cat","/en/doc/cat.md"]],["v-fc1b9a9c","/en/doc/classloader.html",{title:"classloader"},["/en/doc/classloader","/en/doc/classloader.md"]],["v-ae5eff1a","/en/doc/cls.html",{title:"cls"},["/en/doc/cls","/en/doc/cls.md"]],["v-12153166","/en/doc/commands.html",{title:"All Commands"},["/en/doc/commands","/en/doc/commands.md"]],["v-4be7594a","/en/doc/contact-us.html",{title:"Contact Us"},["/en/doc/contact-us","/en/doc/contact-us.md"]],["v-79107649","/en/doc/dashboard.html",{title:"dashboard"},["/en/doc/dashboard","/en/doc/dashboard.md"]],["v-682151b5","/en/doc/docker.html",{title:"Docker"},["/en/doc/docker","/en/doc/docker.md"]],["v-8d912d66","/en/doc/download.html",{title:"Download"},["/en/doc/download","/en/doc/download.md"]],["v-471b4d3e","/en/doc/dump.html",{title:"dump"},["/en/doc/dump","/en/doc/dump.md"]],["v-18ad9fd0","/en/doc/echo.html",{title:"echo"},["/en/doc/echo","/en/doc/echo.md"]],["v-d1b46bf2","/en/doc/faq.html",{title:"FAQ"},["/en/doc/faq","/en/doc/faq.md"]],["v-2f908999","/en/doc/getstatic.html",{title:"getstatic"},["/en/doc/getstatic","/en/doc/getstatic.md"]],["v-8b2b7482","/en/doc/grep.html",{title:"grep"},["/en/doc/grep","/en/doc/grep.md"]],["v-25a18087","/en/doc/groovy.html",{title:"groovy"},["/en/doc/groovy","/en/doc/groovy.md"]],["v-c0b1d216","/en/doc/heapdump.html",{title:"heapdump"},["/en/doc/heapdump","/en/doc/heapdump.md"]],["v-7a8b0c34","/en/doc/help.html",{title:"help"},["/en/doc/help","/en/doc/help.md"]],["v-4402cd49","/en/doc/history.html",{title:"history"},["/en/doc/history","/en/doc/history.md"]],["v-8b0312c0","/en/doc/http-api.html",{title:"Http API"},["/en/doc/http-api","/en/doc/http-api.md"]],["v-96b07b98","/en/doc/idea-plugin.html",{title:"IDEA Plugin"},["/en/doc/idea-plugin","/en/doc/idea-plugin.md"]],["v-319f48f2","/en/doc/install-detail.html",{title:"Install Arthas"},["/en/doc/install-detail","/en/doc/install-detail.md"]],["v-207b7d70","/en/doc/jad.html",{title:"jad"},["/en/doc/jad","/en/doc/jad.md"]],["v-40de7e67","/en/doc/jfr.html",{title:"jfr"},["/en/doc/jfr","/en/doc/jfr.md"]],["v-f28c1148","/en/doc/jvm.html",{title:"jvm"},["/en/doc/jvm","/en/doc/jvm.md"]],["v-b3b5e150","/en/doc/keymap.html",{title:"keymap"},["/en/doc/keymap","/en/doc/keymap.md"]],["v-7e581f76","/en/doc/logger.html",{title:"logger"},["/en/doc/logger","/en/doc/logger.md"]],["v-bbaa3c7e","/en/doc/manual-install.html",{title:"Manually Install Arthas"},["/en/doc/manual-install","/en/doc/manual-install.md"]],["v-58d22ae0","/en/doc/mbean.html",{title:"mbean"},["/en/doc/mbean","/en/doc/mbean.md"]],["v-2ac66c02","/en/doc/mc.html",{title:"mc"},["/en/doc/mc","/en/doc/mc.md"]],["v-3f212774","/en/doc/memory.html",{title:"memory"},["/en/doc/memory","/en/doc/memory.md"]],["v-20388043","/en/doc/monitor.html",{title:"monitor"},["/en/doc/monitor","/en/doc/monitor.md"]],["v-89b4fa02","/en/doc/ognl.html",{title:"ognl"},["/en/doc/ognl","/en/doc/ognl.md"]],["v-43a1e17f","/en/doc/options.html",{title:"options"},["/en/doc/options","/en/doc/options.md"]],["v-6746784a","/en/doc/perfcounter.html",{title:"perfcounter"},["/en/doc/perfcounter","/en/doc/perfcounter.md"]],["v-a7e90ae8","/en/doc/profiler.html",{title:"profiler"},["/en/doc/profiler","/en/doc/profiler.md"]],["v-1b8ba240","/en/doc/pwd.html",{title:"pwd"},["/en/doc/pwd","/en/doc/pwd.md"]],["v-d98607ca","/en/doc/quick-start.html",{title:"Quick Start"},["/en/doc/quick-start","/en/doc/quick-start.md"]],["v-d1b31c34","/en/doc/quit.html",{title:"quit"},["/en/doc/quit","/en/doc/quit.md"]],["v-c7317832","/en/doc/redefine.html",{title:"redefine"},["/en/doc/redefine","/en/doc/redefine.md"]],["v-e0bde47c","/en/doc/release-notes.html",{title:"Release Notes"},["/en/doc/release-notes","/en/doc/release-notes.md"]],["v-6735226e","/en/doc/reset.html",{title:"reset"},["/en/doc/reset","/en/doc/reset.md"]],["v-e5e2b738","/en/doc/retransform.html",{title:"retransform"},["/en/doc/retransform","/en/doc/retransform.md"]],["v-50ef0261","/en/doc/save-log.html",{title:"Log command outputs"},["/en/doc/save-log","/en/doc/save-log.md"]],["v-28022d85","/en/doc/sc.html",{title:"sc"},["/en/doc/sc","/en/doc/sc.md"]],["v-dfe2bef2","/en/doc/session.html",{title:"session"},["/en/doc/session","/en/doc/session.md"]],["v-3912a3bb","/en/doc/sm.html",{title:"sm"},["/en/doc/sm","/en/doc/sm.md"]],["v-71870b69","/en/doc/spring-boot-starter.html",{title:"Arthas Spring Boot Starter"},["/en/doc/spring-boot-starter","/en/doc/spring-boot-starter.md"]],["v-4483d8d5","/en/doc/stack.html",{title:"stack"},["/en/doc/stack","/en/doc/stack.md"]],["v-7af576f3","/en/doc/start-arthas.html",{title:"Start Arthas"},["/en/doc/start-arthas","/en/doc/start-arthas.md"]],["v-e33fb7da","/en/doc/stop.html",{title:"stop"},["/en/doc/stop","/en/doc/stop.md"]],["v-645190d5","/en/doc/sysenv.html",{title:"sysenv"},["/en/doc/sysenv","/en/doc/sysenv.md"]],["v-1f738fad","/en/doc/sysprop.html",{title:"sysprop"},["/en/doc/sysprop","/en/doc/sysprop.md"]],["v-049503c9","/en/doc/tee.html",{title:"tee"},["/en/doc/tee","/en/doc/tee.md"]],["v-5da9140b","/en/doc/thread.html",{title:"thread"},["/en/doc/thread","/en/doc/thread.md"]],["v-06075838","/en/doc/trace.html",{title:"trace"},["/en/doc/trace","/en/doc/trace.md"]],["v-79eacb55","/en/doc/tt.html",{title:"tt"},["/en/doc/tt","/en/doc/tt.md"]],["v-07074726","/en/doc/tunnel.html",{title:"Arthas Tunnel"},["/en/doc/tunnel","/en/doc/tunnel.md"]],["v-9a4bc0f6","/en/doc/version.html",{title:"version"},["/en/doc/version","/en/doc/version.md"]],["v-4e08032e","/en/doc/vmoption.html",{title:"vmoption"},["/en/doc/vmoption","/en/doc/vmoption.md"]],["v-76745066","/en/doc/vmtool.html",{title:"vmtool"},["/en/doc/vmtool","/en/doc/vmtool.md"]],["v-75a5aa24","/en/doc/watch.html",{title:"watch"},["/en/doc/watch","/en/doc/watch.md"]],["v-35756382","/en/doc/web-console.html",{title:"Web Console"},["/en/doc/web-console","/en/doc/web-console.md"]],["v-3706649a","/404.html",{title:""},["/404"]]];var oy=()=>ny.reduce((e,[t,n,o,r])=>(e.push({name:t,path:n,component:Js,meta:o},...r.map(a=>({path:a,redirect:n}))),e),[{name:"404",path:"/:catchAll(.*)",component:Js}]),ry=Vh,ay=()=>{const e=Op({history:ry(Gl(Kt.value.base)),routes:oy(),scrollBehavior:(t,n,o)=>o||(t.hash?{el:t.hash}:{top:0})});return e.beforeResolve(async(t,n)=>{var o;(t.path!==n.path||n===kt)&&([Mt.value]=await Promise.all([sn.resolvePageData(t.name),(o=eu[t.name])==null?void 0:o.__asyncLoader()]))}),e},iy=e=>{e.component("ClientOnly",gi),e.component("Content",Zb)},cy=(e,t)=>{const n=te(()=>sn.resolveRouteLocale(Kt.value.locales,t.currentRoute.value.path)),o=te(()=>sn.resolveSiteLocaleData(Kt.value,n.value)),r=te(()=>sn.resolvePageFrontmatter(Mt.value)),a=te(()=>sn.resolvePageHeadTitle(Mt.value,o.value)),i=te(()=>sn.resolvePageHead(a.value,r.value,o.value)),c=te(()=>sn.resolvePageLang(Mt.value));return e.provide(pi,n),e.provide(wm,o),e.provide(gm,r),e.provide(Qb,a),e.provide(bm,i),e.provide(ym,c),Object.defineProperties(e.config.globalProperties,{$frontmatter:{get:()=>r.value},$head:{get:()=>i.value},$headTitle:{get:()=>a.value},$lang:{get:()=>c.value},$page:{get:()=>Mt.value},$routeLocale:{get:()=>n.value},$site:{get:()=>Kt.value},$siteLocale:{get:()=>o.value},$withBase:{get:()=>bi}}),{pageData:Mt,pageFrontmatter:r,pageHead:i,pageHeadTitle:a,pageLang:c,routeLocale:n,siteData:Kt,siteLocaleData:o}},sy=()=>{const e=Dt(),t=Jb(),n=Em(),o=De([]),r=()=>{t.value.forEach(i=>{const c=ly(i);c&&o.value.push(c)})},a=()=>{document.documentElement.lang=n.value,o.value.forEach(i=>{i.parentNode===document.head&&document.head.removeChild(i)}),o.value.splice(0,o.value.length),t.value.forEach(i=>{const c=uy(i);c!==null&&(document.head.appendChild(c),o.value.push(c))})};hn(Gb,a),et(()=>{r(),a(),ot(()=>e.path,()=>a())})},ly=([e,t,n=""])=>{const o=Object.entries(t).map(([c,s])=>Le(s)?`[${c}="${s}"]`:s===!0?`[${c}]`:"").join(""),r=`head > ${e}${o}`;return Array.from(document.querySelectorAll(r)).find(c=>c.innerText===n)||null},uy=([e,t,n])=>{if(!Le(e))return null;const o=document.createElement(e);return oi(t)&&Object.entries(t).forEach(([r,a])=>{Le(a)?o.setAttribute(r,a):a===!0&&o.setAttribute(r,"")}),Le(n)&&o.appendChild(document.createTextNode(n)),o},my=Gf,dy=async()=>{var n;const e=my({name:"VuepressApp",setup(){var o;sy();for(const r of Go)(o=r.setup)==null||o.call(r);return()=>[Te(mu),...Go.flatMap(({rootComponents:r=[]})=>r.map(a=>Te(a)))]}}),t=ay();iy(e),cy(e,t);for(const o of Go)await((n=o.enhance)==null?void 0:n.call(o,{app:e,router:t,siteData:Kt}));return e.use(t),{app:e,router:t}};dy().then(({app:e,router:t})=>{t.isReady().then(()=>{e.mount("#app")})});export{we as _,ue as a,ie as b,X as c,dy as createVueApp,df as d,Xt as e,V as o,It as r,Me as t,Ke as w}; diff --git a/3.x/assets/arthas-output-recording.5e4ef7bc.js b/3.x/assets/arthas-output-recording.5e4ef7bc.js new file mode 100644 index 00000000000..3985c9e8fc4 --- /dev/null +++ b/3.x/assets/arthas-output-recording.5e4ef7bc.js @@ -0,0 +1 @@ +const t="/3.x/images/arthas-output-recording.png";export{t as _}; diff --git a/3.x/assets/arthas-output-svg.30f64f53.js b/3.x/assets/arthas-output-svg.30f64f53.js new file mode 100644 index 00000000000..9b7c585e76c --- /dev/null +++ b/3.x/assets/arthas-output-svg.30f64f53.js @@ -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}; diff --git a/3.x/assets/arthas-properties.html.1fb20763.js b/3.x/assets/arthas-properties.html.1fb20763.js new file mode 100644 index 00000000000..179ede1e130 --- /dev/null +++ b/3.x/assets/arthas-properties.html.1fb20763.js @@ -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}; diff --git a/3.x/assets/arthas-properties.html.3164354d.js b/3.x/assets/arthas-properties.html.3164354d.js new file mode 100644 index 00000000000..b6d8831cc7f --- /dev/null +++ b/3.x/assets/arthas-properties.html.3164354d.js @@ -0,0 +1,13 @@ +import{_ as e,o as t,c as a,d as s}from"./app.4d248835.js";const r={},i=s(`

Arthas Properties

arthas.properties\u6587\u4EF6\u5728 arthas \u7684\u76EE\u5F55\u4E0B\u3002

  • \u5982\u679C\u662F\u81EA\u52A8\u4E0B\u8F7D\u7684 arthas\uFF0C\u5219\u76EE\u5F55\u5728~/.arthas/lib/3.x.x/arthas/\u4E0B\u9762
  • \u5982\u679C\u662F\u4E0B\u8F7D\u7684\u5B8C\u6574\u5305\uFF0C\u5728 arthas \u89E3\u538B\u76EE\u5F55\u4E0B

\u652F\u6301\u7684\u914D\u7F6E\u9879

\u6CE8\u610F

\u6CE8\u610F\u914D\u7F6E\u5FC5\u987B\u662F\u9A7C\u5CF0\u7684\uFF0C\u548C spring boot \u7684-\u98CE\u683C\u4E0D\u4E00\u6837\u3002spring boot \u5E94\u7528\u624D\u540C\u65F6\u652F\u6301\u9A7C\u5CF0 \u548C -\u98CE\u683C\u7684\u914D\u7F6E\u3002

#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
+
  • \u5982\u679C\u914D\u7F6E arthas.telnetPort\u4E3A -1 \uFF0C\u5219\u4E0D listen telnet \u7AEF\u53E3\u3002arthas.httpPort\u7C7B\u4F3C\u3002
  • \u5982\u679C\u914D\u7F6E arthas.telnetPort\u4E3A 0 \uFF0C\u5219\u968F\u673A telnet \u7AEF\u53E3\uFF0C\u5728~/logs/arthas/arthas.log\u91CC\u53EF\u4EE5\u627E\u5230\u5177\u4F53\u7AEF\u53E3\u65E5\u5FD7\u3002arthas.httpPort\u7C7B\u4F3C\u3002

\u63D0\u793A

\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

\u7981\u6B62\u6307\u5B9A\u547D\u4EE4

\u63D0\u793A

since 3.5.2

\u6BD4\u5982\u914D\u7F6E\uFF1A

arthas.disabledCommands=stop,dump
+

\u4E5F\u53EF\u4EE5\u5728\u547D\u4EE4\u884C\u914D\u7F6E\uFF1A --disabled-commands stop,dump \u3002

\u63D0\u793A

\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0Carthas-spring-boot-starter \u4F1A\u7981\u6389stop\u547D\u4EE4\u3002

\u914D\u7F6E\u7684\u4F18\u5148\u7EA7

\u914D\u7F6E\u7684\u4F18\u5148\u7EA7\u662F\uFF1A\u547D\u4EE4\u884C\u53C2\u6570 > System Env > System Properties > arthas.properties \u3002

\u6BD4\u5982\uFF1A

  • ./as3.sh --telnet-port 9999 \u4F20\u5165\u7684\u914D\u7F6E\u4F1A\u8986\u76D6\u6389arthas.properties\u91CC\u7684\u9ED8\u8BA4\u503Carthas.telnetPort=3658\u3002
  • \u5982\u679C\u5E94\u7528\u81EA\u8EAB\u8BBE\u7F6E\u4E86 system properties arthas.telnetPort=8888\uFF0C\u5219\u4F1A\u8986\u76D6\u6389arthas.properties\u91CC\u7684\u9ED8\u8BA4\u503Carthas.telnetPort=3658\u3002

\u5982\u679C\u60F3\u8981 arthas.properties\u7684\u4F18\u5148\u7EA7\u6700\u9AD8\uFF0C\u5219\u53EF\u4EE5\u914D\u7F6E arthas.config.overrideAll=true \u3002

`,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}; diff --git a/3.x/assets/arthas-properties.html.c6a378d8.js b/3.x/assets/arthas-properties.html.c6a378d8.js new file mode 100644 index 00000000000..b8296ebb28a --- /dev/null +++ b/3.x/assets/arthas-properties.html.c6a378d8.js @@ -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}; diff --git a/3.x/assets/arthas-properties.html.f3f99ef8.js b/3.x/assets/arthas-properties.html.f3f99ef8.js new file mode 100644 index 00000000000..f8ac1bbf06e --- /dev/null +++ b/3.x/assets/arthas-properties.html.f3f99ef8.js @@ -0,0 +1,13 @@ +import{_ as e,o as t,c as a,d as i}from"./app.4d248835.js";const o={},r=i(`

Arthas Properties

The arthas.properties file is in the arthas directory.

  • If it is automatically downloaded arthas, the directory is under ~/.arthas/lib/3.x.x/arthas/
  • If it is a downloaded complete package, under the decompression directory of arthas

Supported configuration items

WARNING

Note that the configuration must be camel case, which is different from the - style of spring boot. Only the spring boot application supports both camel case and - style configuration.

#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
+
  • If the configuration of arthas.telnetPort is -1, the telnet port will not be listened. arthas.httpPort is similar.
  • If you configure arthas.telnetPort to 0, then random listen telnet port, you can find the random port log in ~/logs/arthas/arthas.log. arthas.httpPort is similar.

TIP

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.

disable specify commands

TIP

since 3.5.2

Such as configuration:

arthas.disabledCommands=stop,dump
+

It can also be configured on the command line: --disabled-commands stop,dump.

TIP

By default, arthas-spring-boot-starter will disable the stop command.

Configured order

The order of configuration is: command line parameters > System Env > System Properties > arthas.properties.

such as:

  • ./as3.sh --telnet-port 9999 command line configuration will overwrite the default value arthas.telnetPort=3658 in arthas.properties.
  • If the application itself sets system properties arthas.telnetPort=8888, it will override the default value arthas.telnetPort=3658 in arthas.properties.

If you want arthas.properties to have the highest order, you can configure arthas.config.overrideAll=true.

`,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}; diff --git a/3.x/assets/arthas-web-ui.89f4fc6d.js b/3.x/assets/arthas-web-ui.89f4fc6d.js new file mode 100644 index 00000000000..d968884f94b --- /dev/null +++ b/3.x/assets/arthas-web-ui.89f4fc6d.js @@ -0,0 +1 @@ +const s="/3.x/images/arthas-web-ui.png";export{s as _}; diff --git a/3.x/assets/arthas.b23d3e5a.js b/3.x/assets/arthas.b23d3e5a.js new file mode 100644 index 00000000000..47c8de21b98 --- /dev/null +++ b/3.x/assets/arthas.b23d3e5a.js @@ -0,0 +1 @@ +const s="/3.x/images/arthas.png";export{s as _}; diff --git a/3.x/assets/arthas3.html.62e301e7.js b/3.x/assets/arthas3.html.62e301e7.js new file mode 100644 index 00000000000..de9ec28ade4 --- /dev/null +++ b/3.x/assets/arthas3.html.62e301e7.js @@ -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(`

Arthas3.0 \u7684\u65B0\u7279\u6027

\u5728\u7EBF\u8BCA\u65AD\u529F\u80FD

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

\u4F7F\u7528\u6B65\u9AA4

TODO

\u52A8\u56FE\u6F14\u793A

TODO

\u7BA1\u9053\u652F\u6301

Arthas 3.0 \u5F00\u59CB\u652F\u6301\u7BA1\u9053, \u7387\u5148\u63D0\u4F9B\u4E86grep,wc,plaintext\u7684\u652F\u6301\u3002

\u53BB groovy \u4F9D\u8D56

groovy \u8868\u8FBE\u5F0F\u5728 arthas2.0 \u4E2D\u5927\u91CF\u4F7F\u7528\uFF0C\u4F8B\u5982 watch \u8868\u8FBE\u5F0F

watch com.alibaba.sample.petstore.web.store.module.screen.ItemList add "params + ' ' + returnObj" params.size()==2
+

\u5176\u4E2D"params + ' ' + returnObj"\u4EE5\u53CAparams.size()==2\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

\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

`,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(`

\u63D0\u5347 rt \u7EDF\u8BA1\u7CBE\u5EA6

Arthas 2.0 \u4E2D\uFF0C\u7EDF\u8BA1 rt \u90FD\u662F\u4EE5ms\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\u7528ns\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

$ 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
+

watch/stack/trace \u547D\u4EE4\u652F\u6301\u6309\u8017\u65F6\u8FC7\u6EE4

\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#cost(\u65B9\u6CD5\u6267\u884C\u8017\u65F6,\u5355\u4F4D\u4E3Ams)\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

sysprop \u547D\u4EE4\u64CD\u4F5C SystemProperty

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

$ 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
+

thread \u547D\u4EE4\u652F\u6301\u6307\u5B9A\u91C7\u6837\u65F6\u95F4

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(\u4EE5ms\u4E3A\u5355\u4F4D)\uFF0C\u53EF\u4EE5\u89C2\u5BDF\u4EFB\u610F\u65F6\u95F4\u6BB5\u5185\u7684 cpu \u6D88\u8017\u5360\u6BD4\u60C5\u51B5\u3002

$ 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
+

trace \u547D\u4EE4\u81EA\u52A8\u9AD8\u4EAE\u663E\u793A\u6700\u8017\u65F6\u65B9\u6CD5\u8C03\u7528

trace \u547D\u4EE4\u73B0\u5728\u4F1A\u81EA\u52A8\u663E\u793A

![Untitled2](TODO /Untitled2.gif)

`,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}; diff --git a/3.x/assets/arthas3.html.f5096367.js b/3.x/assets/arthas3.html.f5096367.js new file mode 100644 index 00000000000..12106192f3b --- /dev/null +++ b/3.x/assets/arthas3.html.f5096367.js @@ -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}; diff --git a/3.x/assets/async.html.0718d03c.js b/3.x/assets/async.html.0718d03c.js new file mode 100644 index 00000000000..d6994e35155 --- /dev/null +++ b/3.x/assets/async.html.0718d03c.js @@ -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(`

1. Use & to run the command in the background

For example, execute the trace command in the background:

trace Test t &
+

By doing this, the current command is put to the background to run, you can continue to execute other commands in the console.

2. List background jobs

If you want to list all background jobs, you can execute the jobs command and the results are as follows:

$ jobs
+[10]*
+       Stopped           watch com.taobao.container.Test test "params[0].{? #this.name == null }" -x 2
+       execution count : 19
+       start time      : Fri Sep 22 09:59:55 CST 2017
+       timeout date    : Sat Sep 23 09:59:55 CST 2017
+       session         : 3648e874-5e69-473f-9eed-7f89660b079b (current)
+

You can see that there is currently a background job executing:

  • job id is 10, * indicates that this job is created by the current session.
  • status is Stopped
  • execution count is the number of executions, which have been executed 19 times since the start.
  • timeout date: timeout timestamp, when the time exceeds this timestamp, the job will be automatically timeout and exit.

3. Suspend and cancel job

When the job is executing in the foreground, for example, directly executing the command trace Test t, or executing the background job command trace Test t &, then putting the job back to the foreground via fg command, the console cannot continue to execute other command, but can receive and process the following keyboard events:

  • \u2018ctrl + z\u2019: Suspends the job, the job status will change to Stopped, and the job can be restarted by bg <job-id> or fg <job-id>
  • \u2018ctrl + c\u2019: Stops the job
  • \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.

4. fg/bg, switch the job from the foreground to the background, and vise verse

  • When a job is executed in the background or in suspended status (use ctrl + z to suspend job), fg <job-id> can transfer the job to the foreground to continue to run.
  • When a job is in suspended status (use ctrl + z to suspend job), bg <job-id> can put the job to the background to continue to run.
  • A job created by other session can only be put to the foreground to run by using fg in the current session.

5. Redirect the output

The job output can be redirect to the specified file by > or >>, and can be used together with &. By doing this, you can achieve running commands asynchronously, for example:

$ trace Test t >> test.out &
+

At this time, the trace command will be executed in the background, and the result will be output to the test.out file under the working directory 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 pwd command to view the working directory of the current application.

$ cat test.out
+

If no redirect file is specified, the result will be output to the ~/logs/arthas-cache/ directory, for example:

$ trace Test t >> &
+job id : 2
+cache location : /Users/admin/logs/arthas-cache/28198/2
+

At this time, the command will be executed asynchronously in the background, and the result will be asynchronously saved in the file (~/logs/arthas-cache/\${PID}/\${JobId});

  • 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 options command;
  • The result of this command will be output asynchronously to the file; at this time, regardless of whether save-result is true or not, the result will not be written asynchronously to ~/logs/arthas-cache/result.log.

6. Stop job

If you want to stop background job, just kill <job-id>.

7. Others

  • Support up to 8 commands at the same time to redirect the output to the log files.
  • Do not open too many background jobs at the same time to avoid negative performance effect to the target JVM.
  • If you do not want to stop the Arthas service and continue to perform background tasks, you can exit the Arthas console by executing quit command (stop command will stop the Arthas service)
`,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}; diff --git a/3.x/assets/async.html.08408f7f.js b/3.x/assets/async.html.08408f7f.js new file mode 100644 index 00000000000..3aba026a983 --- /dev/null +++ b/3.x/assets/async.html.08408f7f.js @@ -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}; diff --git a/3.x/assets/async.html.0990e2e8.js b/3.x/assets/async.html.0990e2e8.js new file mode 100644 index 00000000000..ff4e2ecd29f --- /dev/null +++ b/3.x/assets/async.html.0990e2e8.js @@ -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}; diff --git a/3.x/assets/async.html.d8cce9ca.js b/3.x/assets/async.html.d8cce9ca.js new file mode 100644 index 00000000000..d003f555e51 --- /dev/null +++ b/3.x/assets/async.html.d8cce9ca.js @@ -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(`

1. \u4F7F\u7528&\u5728\u540E\u53F0\u6267\u884C\u4EFB\u52A1

\u6BD4\u5982\u5E0C\u671B\u6267\u884C\u540E\u53F0\u6267\u884C trace \u547D\u4EE4\uFF0C\u90A3\u4E48\u8C03\u7528\u4E0B\u9762\u547D\u4EE4

trace Test t &
+

\u8FD9\u65F6\u547D\u4EE4\u5728\u540E\u53F0\u6267\u884C\uFF0C\u53EF\u4EE5\u5728 console \u4E2D\u7EE7\u7EED\u6267\u884C\u5176\u4ED6\u547D\u4EE4\u3002

2. \u901A\u8FC7 jobs \u67E5\u770B\u4EFB\u52A1

\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

$ jobs
+[10]*
+       Stopped           watch com.taobao.container.Test test "params[0].{? #this.name == null }" -x 2
+       execution count : 19
+       start time      : Fri Sep 22 09:59:55 CST 2017
+       timeout date    : Sat Sep 23 09:59:55 CST 2017
+       session         : 3648e874-5e69-473f-9eed-7f89660b079b (current)
+

\u53EF\u4EE5\u770B\u5230\u76EE\u524D\u6709\u4E00\u4E2A\u540E\u53F0\u4EFB\u52A1\u5728\u6267\u884C\u3002

  • job id \u662F 10, * \u8868\u793A\u6B64 job \u662F\u5F53\u524D session \u521B\u5EFA
  • \u72B6\u6001\u662F Stopped
  • execution count \u662F\u6267\u884C\u6B21\u6570\uFF0C\u4ECE\u542F\u52A8\u5F00\u59CB\u5DF2\u7ECF\u6267\u884C\u4E86 19 \u6B21
  • 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

3. \u4EFB\u52A1\u6682\u505C\u548C\u53D6\u6D88

\u5F53\u4EFB\u52A1\u6B63\u5728\u524D\u53F0\u6267\u884C\uFF0C\u6BD4\u5982\u76F4\u63A5\u8C03\u7528\u547D\u4EE4trace Test t\u6216\u8005\u8C03\u7528\u540E\u53F0\u6267\u884C\u547D\u4EE4trace Test t &\u540E\u53C8\u901A\u8FC7fg\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

  • \u2018ctrl + z\u2019\uFF1A\u5C06\u4EFB\u52A1\u6682\u505C\u3002\u901A\u8FC7jbos\u67E5\u770B\u4EFB\u52A1\u72B6\u6001\u5C06\u4F1A\u53D8\u4E3A Stopped\uFF0C\u901A\u8FC7bg <job-id>\u6216\u8005fg <job-id>\u53EF\u8BA9\u4EFB\u52A1\u91CD\u65B0\u5F00\u59CB\u6267\u884C
  • \u2018ctrl + c\u2019\uFF1A\u505C\u6B62\u4EFB\u52A1
  • \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

4. fg\u3001bg \u547D\u4EE4\uFF0C\u5C06\u547D\u4EE4\u8F6C\u5230\u524D\u53F0\u3001\u540E\u53F0\u7EE7\u7EED\u6267\u884C

  • \u4EFB\u52A1\u5728\u540E\u53F0\u6267\u884C\u6216\u8005\u6682\u505C\u72B6\u6001\uFF08ctrl + z\u6682\u505C\u4EFB\u52A1\uFF09\u65F6\uFF0C\u6267\u884Cfg <job-id>\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
  • \u5F53\u4EFB\u52A1\u5904\u4E8E\u6682\u505C\u72B6\u6001\u65F6\uFF08ctrl + z\u6682\u505C\u4EFB\u52A1\uFF09\uFF0C\u6267\u884Cbg <job-id>\u5C06\u53EF\u4EE5\u628A\u5BF9\u5E94\u7684\u4EFB\u52A1\u5728\u540E\u53F0\u7EE7\u7EED\u6267\u884C
  • \u975E\u5F53\u524D session \u521B\u5EFA\u7684 job\uFF0C\u53EA\u80FD\u7531\u5F53\u524D session fg \u5230\u524D\u53F0\u6267\u884C

5. \u4EFB\u52A1\u8F93\u51FA\u91CD\u5B9A\u5411

\u53EF\u901A\u8FC7>\u6216\u8005>>\u5C06\u4EFB\u52A1\u8F93\u51FA\u7ED3\u679C\u8F93\u51FA\u5230\u6307\u5B9A\u7684\u6587\u4EF6\u4E2D\uFF0C\u53EF\u4EE5\u548C&\u4E00\u8D77\u4F7F\u7528\uFF0C\u5B9E\u73B0 arthas \u547D\u4EE4\u7684\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1\u3002\u6BD4\u5982\uFF1A

$ trace Test t >> test.out &
+

\u8FD9\u65F6 trace \u547D\u4EE4\u4F1A\u5728\u540E\u53F0\u6267\u884C\uFF0C\u5E76\u4E14\u628A\u7ED3\u679C\u8F93\u51FA\u5230\u5E94\u7528\u5DE5\u4F5C\u76EE\u5F55\u4E0B\u9762\u7684test.out\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\u884Cpwd\u547D\u4EE4\u67E5\u770B\u5F53\u524D\u5E94\u7528\u7684\u5DE5\u4F5C\u76EE\u5F55\u3002

$ cat test.out
+

\u5982\u679C\u6CA1\u6709\u6307\u5B9A\u91CD\u5B9A\u5411\u6587\u4EF6\uFF0C\u5219\u4F1A\u628A\u7ED3\u679C\u8F93\u51FA\u5230~/logs/arthas-cache/\u76EE\u5F55\u4E0B\uFF0C\u6BD4\u5982\uFF1A

$ trace Test t >>  &
+job id  : 2
+cache location  : /Users/admin/logs/arthas-cache/28198/2
+

\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~/logs/arthas-cache/\${PID}/\${JobId}\uFF09\u4E2D\uFF1B

  • \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 options \u547D\u4EE4\u4FEE\u6539\u9ED8\u8BA4\u8D85\u65F6\u65F6\u95F4\uFF1B
  • \u6B64\u547D\u4EE4\u7684\u7ED3\u679C\u5C06\u5F02\u6B65\u8F93\u51FA\u5230 \b \u6587\u4EF6\u4E2D\uFF1B\u6B64\u65F6\u4E0D\u7BA1 save-result \u662F\u5426\u4E3A true\uFF0C\u90FD\u4E0D\u4F1A\u518D\u5F80~/logs/arthas-cache/result.log \u4E2D\u5F02\u6B65\u5199\u7ED3\u679C\u3002

6. \u505C\u6B62\u547D\u4EE4

\u5F02\u6B65\u6267\u884C\u7684\u547D\u4EE4\uFF0C\u5982\u679C\u5E0C\u671B\u505C\u6B62\uFF0C\u53EF\u6267\u884Ckill <job-id>

7. \u5176\u4ED6

  • \u6700\u591A\u540C\u65F6\u652F\u6301 8 \u4E2A\u547D\u4EE4\u4F7F\u7528\u91CD\u5B9A\u5411\u5C06\u7ED3\u679C\u5199\u65E5\u5FD7
  • \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
  • \u5982\u679C\u4E0D\u60F3\u505C\u6B62 arthas\uFF0C\u7EE7\u7EED\u6267\u884C\u540E\u53F0\u4EFB\u52A1\uFF0C\u53EF\u4EE5\u6267\u884C quit \u9000\u51FA arthas \u63A7\u5236\u53F0\uFF08stop \u4F1A\u505C\u6B62 arthas \u670D\u52A1\uFF09
`,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}; diff --git a/3.x/assets/auth.html.0cae929d.js b/3.x/assets/auth.html.0cae929d.js new file mode 100644 index 00000000000..a4890c5e0f8 --- /dev/null +++ b/3.x/assets/auth.html.0cae929d.js @@ -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}; diff --git a/3.x/assets/auth.html.35f80b21.js b/3.x/assets/auth.html.35f80b21.js new file mode 100644 index 00000000000..1df497d0501 --- /dev/null +++ b/3.x/assets/auth.html.35f80b21.js @@ -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(`

auth

\u63D0\u793A

\u9A8C\u8BC1\u5F53\u524D\u4F1A\u8BDD

\u914D\u7F6E\u7528\u6237\u540D\u548C\u5BC6\u7801

\u5728 attach \u65F6\uFF0C\u53EF\u4EE5\u5728\u547D\u4EE4\u884C\u6307\u5B9A\u5BC6\u7801\u3002\u6BD4\u5982\uFF1A

java -jar arthas-boot3.jar --password ppp
+
  • \u53EF\u4EE5\u901A\u8FC7 --username \u9009\u9879\u6765\u6307\u5B9A\u7528\u6237\uFF0C\u9ED8\u8BA4\u503C\u662Farthas\u3002

  • \u4E5F\u53EF\u4EE5\u5728 arthas.properties \u91CC\u4E2D\u914D\u7F6E username/password\u3002\u547D\u4EE4\u884C\u7684\u4F18\u5148\u7EA7\u5927\u4E8E\u914D\u7F6E\u6587\u4EF6\u3002

  • \u5982\u679C\u53EA\u914D\u7F6Eusername\uFF0C\u6CA1\u6709\u914D\u7F6Epassword\uFF0C\u5219\u4F1A\u751F\u6210\u968F\u673A\u5BC6\u7801\uFF0C\u6253\u5370\u5728~/logs/arthas/arthas.log\u4E2D

    Using generated security password: 0vUBJpRIppkKuZ7dYzYqOKtranj4unGh
    +

\u672C\u5730\u8FDE\u63A5\u4E0D\u9274\u6743

\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u5728arthas.properties\u6587\u4EF6\u91CC\u6709\u914D\u7F6E\uFF1A

arthas.localConnectionNonAuth=true
+

\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

\u5728 telnet console \u91CC\u9274\u6743

\u8FDE\u63A5\u5230 arthas \u540E\uFF0C\u76F4\u63A5\u6267\u884C\u547D\u4EE4\u4F1A\u63D0\u793A\u9700\u8981\u9274\u6743\uFF1A

[arthas@37430]$ help
+Error! command not permitted, try to use 'auth' command to authenticates.
+

\u4F7F\u7528auth\u547D\u4EE4\u6765\u9274\u6743\uFF0C\u6210\u529F\u4E4B\u540E\u53EF\u4EE5\u6267\u884C\u5176\u5B83\u547D\u4EE4\u3002

[arthas@37430]$ auth ppp
+Authentication result: true
+
  • \u53EF\u4EE5\u901A\u8FC7 --username \u9009\u9879\u6765\u6307\u5B9A\u7528\u6237\uFF0C\u9ED8\u8BA4\u503C\u662Farthas\u3002

Web console \u5BC6\u7801\u9A8C\u8BC1

\u6253\u5F00\u6D4F\u89C8\u5668\uFF0C\u4F1A\u6709\u5F39\u7A97\u63D0\u793A\u9700\u8981\u8F93\u5165 \u7528\u6237\u540D \u548C \u5BC6\u7801\u3002

\u6210\u529F\u4E4B\u540E\uFF0C\u5219\u53EF\u4EE5\u76F4\u63A5\u8FDE\u63A5\u4E0A web console\u3002

HTTP API \u9A8C\u8BC1

Authorization Header \u65B9\u5F0F\uFF08\u63A8\u8350\uFF09

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

`,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(`

\u4F8B\u5982\uFF0C\u7528\u6237\u540D\u662F\uFF1Aadmin\uFF0C\u5BC6\u7801\u662F admin\uFF0C\u5219\u7EC4\u5408\u4E3A\u5B57\u7B26\u4E32\uFF1A admin:admin\uFF0Cbase64 \u7ED3\u679C\u662F\uFF1A YWRtaW46YWRtaW4=\uFF0C\u5219 HTTP \u8BF7\u6C42\u589E\u52A0Authorization header\uFF1A

curl 'http://localhost:8563/api' \\
+  -H 'Authorization: Basic YWRtaW46YWRtaW4=' \\
+  --data-raw '{"action":"exec","command":"version"}'
+

URL \u53C2\u6570\u4F20\u9012\u65B9\u5F0F

\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

curl 'http://localhost:8563/api?password=admin' \\
+  --data-raw '{"action":"exec","command":"version"}'
+
`,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}; diff --git a/3.x/assets/auth.html.3fe3d5ca.js b/3.x/assets/auth.html.3fe3d5ca.js new file mode 100644 index 00000000000..97fb64f68c9 --- /dev/null +++ b/3.x/assets/auth.html.3fe3d5ca.js @@ -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}; diff --git a/3.x/assets/auth.html.d091b8de.js b/3.x/assets/auth.html.d091b8de.js new file mode 100644 index 00000000000..354c7548999 --- /dev/null +++ b/3.x/assets/auth.html.d091b8de.js @@ -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(`

auth

TIP

Authenticates the current session

Configure username and password

When attaching, you can specify a password on the command line. such as:

java -jar arthas-boot3.jar --password ppp
+
  • The user can be specified by the --username option, the default value is arthas.

  • You can also configure username/password in arthas.properties. The priority of the command line is higher than that of the configuration file.

  • If only username is configured and no password is configured, a random password will be generated and printed in ~/logs/arthas/arthas.log

    Using generated security password: 0vUBJpRIppkKuZ7dYzYqOKtranj4unGh
    +

Local connection does not require authentication

By default, there are configurations in the arthas.properties file:

arthas.localConnectionNonAuth=true
+

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.

Authenticate in the telnet console

After connecting to arthas, directly executing the command will prompt for authentication:

[arthas@37430]$ help
+Error! command not permitted, try to use 'auth' command to authenticates.
+

Use the auth command to authenticate, and you can execute other commands after success.

[arthas@37430]$ auth ppp
+Authentication result: true
+
  • The user can be specified by the --username option, the default value is arthas.

Web console Authentication

Open the browser, there will be a pop-up window prompting you to enter your username and password.

After success, you can directly connect to the web console.

HTTP API Authentication

Arthas uses the HTTP standard Basic Authorization.

`,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(`

For example, if the user name is: admin and the password is admin, the combination is a string: admin:admin, the base64 result is: YWRtaW46YWRtaW4=, then the HTTP request adds the Authorization header:

curl 'http://localhost:8563/api' \\
+  -H 'Authorization: Basic YWRtaW46YWRtaW4=' \\
+  --data-raw '{"action":"exec","command":"version"}'
+

URL parameters

It supports passing username and password in parameters. such as:

curl 'http://localhost:8563/api?password=admin' \\
+  --data-raw '{"action":"exec","command":"version"}'
+
`,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}; diff --git a/3.x/assets/back-to-top.8efcbe56.svg b/3.x/assets/back-to-top.8efcbe56.svg new file mode 100644 index 00000000000..83236781a94 --- /dev/null +++ b/3.x/assets/back-to-top.8efcbe56.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/3.x/assets/base64.html.4fc99fea.js b/3.x/assets/base64.html.4fc99fea.js new file mode 100644 index 00000000000..e3a7b22fc51 --- /dev/null +++ b/3.x/assets/base64.html.4fc99fea.js @@ -0,0 +1,11 @@ +import{_ as e,o as a,c as s,d as n}from"./app.4d248835.js";const t={},i=n(`

base64

TIP

Encode and decode using Base64 representation.

Encode to base64

[arthas@70070]$ echo 'abc' > /tmp/test.txt
+[arthas@70070]$ cat /tmp/test.txt
+abc
+
+[arthas@70070]$ base64 /tmp/test.txt
+YWJjCg==
+

Encode to base64 and save output to file

$ base64 --input /tmp/test.txt --output /tmp/result.txt
+

Decode from base64

$ base64 -d /tmp/result.txt
+abc
+

Decode from base64 and save output to file

$ base64 -d /tmp/result.txt --output /tmp/bbb.txt
+
`,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}; diff --git a/3.x/assets/base64.html.4feec68d.js b/3.x/assets/base64.html.4feec68d.js new file mode 100644 index 00000000000..b45749b7eaa --- /dev/null +++ b/3.x/assets/base64.html.4feec68d.js @@ -0,0 +1,11 @@ +import{_ as a,o as e,c as s,d as n}from"./app.4d248835.js";const t={},i=n(`

base64

\u63D0\u793A

base64 \u7F16\u7801\u8F6C\u6362\uFF0C\u548C linux \u91CC\u7684 base64 \u547D\u4EE4\u7C7B\u4F3C\u3002

\u5BF9\u6587\u4EF6\u8FDB\u884C base64 \u7F16\u7801

[arthas@70070]$ echo 'abc' > /tmp/test.txt
+[arthas@70070]$ cat /tmp/test.txt
+abc
+
+[arthas@70070]$ base64 /tmp/test.txt
+YWJjCg==
+

\u5BF9\u6587\u4EF6\u8FDB\u884C base64 \u7F16\u7801\u5E76\u628A\u7ED3\u679C\u4FDD\u5B58\u5230\u6587\u4EF6\u91CC

$ base64 --input /tmp/test.txt --output /tmp/result.txt
+

\u7528 base64 \u89E3\u7801\u6587\u4EF6

$ base64 -d /tmp/result.txt
+abc
+

\u7528 base64 \u89E3\u7801\u6587\u4EF6\u5E76\u4FDD\u5B58\u7ED3\u679C\u5230\u6587\u4EF6\u91CC

$ base64 -d /tmp/result.txt --output /tmp/bbb.txt
+
`,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}; diff --git a/3.x/assets/base64.html.d9951e03.js b/3.x/assets/base64.html.d9951e03.js new file mode 100644 index 00000000000..50bf9109635 --- /dev/null +++ b/3.x/assets/base64.html.d9951e03.js @@ -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}; diff --git a/3.x/assets/base64.html.e5a32bd6.js b/3.x/assets/base64.html.e5a32bd6.js new file mode 100644 index 00000000000..2f6a8e167cc --- /dev/null +++ b/3.x/assets/base64.html.e5a32bd6.js @@ -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}; diff --git a/3.x/assets/batch-support.html.09feead8.js b/3.x/assets/batch-support.html.09feead8.js new file mode 100644 index 00000000000..5c46fca2433 --- /dev/null +++ b/3.x/assets/batch-support.html.09feead8.js @@ -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(`

Batch Processing

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.

Usage

Step 1: Create the script

Create a test.as script suffixed with as. Here as is suggested for the suffix of the filename, but in fact any suffix is acceptable.

\u279C  arthas git:(develop) cat /var/tmp/test.as
+help
+dashboard -n 1
+session
+thread
+sc -d org.apache.commons.lang.StringUtils
+

Note:

`,7),p=a("
  • Each command takes one line.
  • Batch mode execution times (via -n) must be explicitly specified for dashboard, otherwise batch script cannot terminate.
  • Commands such as watch/tt/trace/monitor/stack should include -n option to ensure the script can be able to quit.
  • ",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(`

    Step 2: Run the script

    Use -f 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:

    ./as3.sh -f /var/tmp/test.as 56328 > test.out
    +

    Use -c also can specify the commands, like this:

    ./as3.sh -c 'sysprop; thread' 56328 > test.out
    +

    Step 3: Check the output

    cat test.out
    +
    `,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}; diff --git a/3.x/assets/batch-support.html.1959143d.js b/3.x/assets/batch-support.html.1959143d.js new file mode 100644 index 00000000000..2b696d6629e --- /dev/null +++ b/3.x/assets/batch-support.html.1959143d.js @@ -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('

    \u6279\u5904\u7406\u529F\u80FD

    \u63D0\u793A

    \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 --select \u53C2\u6570\u53EF\u4EE5\u6307\u5B9A\u8FDB\u7A0B\u540D\u5B57\u4E00\u8D77\u4F7F\u7528\u3002

    \u4F7F\u7528\u65B9\u6CD5

    \u7B2C\u4E00\u6B65\uFF1A\u521B\u5EFA\u4F60\u7684\u6279\u5904\u7406\u811A\u672C

    \u8FD9\u91CC\u6211\u4EEC\u65B0\u5EFA\u4E86\u4E00\u4E2Atest.as\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

    ',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(`
    \u279C  arthas git:(develop) cat /var/tmp/test.as
    +help
    +dashboard -n 1
    +session
    +thread
    +sc -d org.apache.commons.lang.StringUtils
    +

    \u7B2C\u4E8C\u6B65\uFF1A\u8FD0\u884C\u4F60\u7684\u6279\u5904\u7406\u811A\u672C

    \u901A\u8FC7-f\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

    ./as3.sh -f /var/tmp/test.as <pid> > test.out # pid \u53EF\u4EE5\u901A\u8FC7 jps \u547D\u4EE4\u67E5\u770B
    +

    \u4E5F\u53EF\u4EE5\u901A\u8FC7 -c \u6765\u6307\u5B9A\u6307\u884C\u7684\u547D\u4EE4\uFF0C\u6BD4\u5982

    ./as3.sh -c 'sysprop; thread' <pid> > test.out # pid \u53EF\u4EE5\u901A\u8FC7 jps \u547D\u4EE4\u67E5\u770B
    +

    \u7B2C\u4E09\u6B65\uFF1A\u67E5\u770B\u8FD0\u884C\u7ED3\u679C

    cat test.out
    +
    `,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}; diff --git a/3.x/assets/batch-support.html.a2012b98.js b/3.x/assets/batch-support.html.a2012b98.js new file mode 100644 index 00000000000..e300587092b --- /dev/null +++ b/3.x/assets/batch-support.html.a2012b98.js @@ -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}; diff --git a/3.x/assets/batch-support.html.acbd1eb9.js b/3.x/assets/batch-support.html.acbd1eb9.js new file mode 100644 index 00000000000..3d459668d0b --- /dev/null +++ b/3.x/assets/batch-support.html.acbd1eb9.js @@ -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}; diff --git a/3.x/assets/cat.html.77044202.js b/3.x/assets/cat.html.77044202.js new file mode 100644 index 00000000000..638da81b958 --- /dev/null +++ b/3.x/assets/cat.html.77044202.js @@ -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(`

    \u63D0\u793A

    \u6253\u5370\u6587\u4EF6\u5185\u5BB9\uFF0C\u548C linux \u91CC\u7684 cat \u547D\u4EE4\u7C7B\u4F3C\u3002

    \u4F7F\u7528\u53C2\u8003

    $ cat /tmp/a.txt
    +
    `,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}; diff --git a/3.x/assets/cat.html.79af7693.js b/3.x/assets/cat.html.79af7693.js new file mode 100644 index 00000000000..8b11c748ba4 --- /dev/null +++ b/3.x/assets/cat.html.79af7693.js @@ -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}; diff --git a/3.x/assets/cat.html.7e324ac6.js b/3.x/assets/cat.html.7e324ac6.js new file mode 100644 index 00000000000..1092b48d954 --- /dev/null +++ b/3.x/assets/cat.html.7e324ac6.js @@ -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(`

    TIP

    Concatenate and print files

    Usage

    $ cat /tmp/a.txt
    +
    `,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}; diff --git a/3.x/assets/cat.html.c8a558a6.js b/3.x/assets/cat.html.c8a558a6.js new file mode 100644 index 00000000000..4f0c8faa298 --- /dev/null +++ b/3.x/assets/cat.html.c8a558a6.js @@ -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}; diff --git a/3.x/assets/classloader.html.2b5b952f.js b/3.x/assets/classloader.html.2b5b952f.js new file mode 100644 index 00000000000..301f7aeb498 --- /dev/null +++ b/3.x/assets/classloader.html.2b5b952f.js @@ -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(`

    \u63D0\u793A

    \u67E5\u770B classloader \u7684\u7EE7\u627F\u6811\uFF0Curls\uFF0C\u7C7B\u52A0\u8F7D\u4FE1\u606F

    classloader \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

    \u53EF\u4EE5\u8BA9\u6307\u5B9A\u7684 classloader \u53BB getResources\uFF0C\u6253\u5370\u51FA\u6240\u6709\u67E5\u627E\u5230\u7684 resources \u7684 url\u3002\u5BF9\u4E8EResourceNotFoundException\u6BD4\u8F83\u6709\u7528\u3002

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    [l]\u6309\u7C7B\u52A0\u8F7D\u5B9E\u4F8B\u8FDB\u884C\u7EDF\u8BA1
    [t]\u6253\u5370\u6240\u6709 ClassLoader \u7684\u7EE7\u627F\u6811
    [a]\u5217\u51FA\u6240\u6709 ClassLoader \u52A0\u8F7D\u7684\u7C7B\uFF0C\u8BF7\u8C28\u614E\u4F7F\u7528
    [c:]ClassLoader \u7684 hashcode
    [classLoaderClass:]\u6307\u5B9A\u6267\u884C\u8868\u8FBE\u5F0F\u7684 ClassLoader \u7684 class name
    [c: r:]\u7528 ClassLoader \u53BB\u67E5\u627E resource
    [c: load:]\u7528 ClassLoader \u53BB\u52A0\u8F7D\u6307\u5B9A\u7684\u7C7B

    \u4F7F\u7528\u53C2\u8003

    \u6309\u7C7B\u52A0\u8F7D\u7C7B\u578B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F

    $ classloader
    + name                                       numberOfInstances  loadedCountTotal
    + com.taobao.arthas.agent.ArthasClassloader  1                  2115
    + BootstrapClassLoader                       1                  1861
    + sun.reflect.DelegatingClassLoader          5                  5
    + sun.misc.Launcher$AppClassLoader           1                  4
    + sun.misc.Launcher$ExtClassLoader           1                  1
    +Affect(row-cnt:5) cost in 3 ms.
    +

    \u6309\u7C7B\u52A0\u8F7D\u5B9E\u4F8B\u67E5\u770B\u7EDF\u8BA1\u4FE1\u606F

    $ classloader -l
    + name                                                loadedCount  hash      parent
    + BootstrapClassLoader                                1861         null      null
    + com.taobao.arthas.agent.ArthasClassloader@68b31f0a  2115         68b31f0a  sun.misc.Launcher$ExtClassLoader@66350f69
    + sun.misc.Launcher$AppClassLoader@3d4eac69           4            3d4eac69  sun.misc.Launcher$ExtClassLoader@66350f69
    + sun.misc.Launcher$ExtClassLoader@66350f69           1            66350f69  null
    +Affect(row-cnt:4) cost in 2 ms.
    +

    \u67E5\u770B ClassLoader \u7684\u7EE7\u627F\u6811

    $ classloader -t
    ++-BootstrapClassLoader
    ++-sun.misc.Launcher$ExtClassLoader@66350f69
    +  +-com.taobao.arthas.agent.ArthasClassloader@68b31f0a
    +  +-sun.misc.Launcher$AppClassLoader@3d4eac69
    +Affect(row-cnt:4) cost in 3 ms.
    +

    \u67E5\u770B URLClassLoader \u5B9E\u9645\u7684 urls

    $ classloader -c 3d4eac69
    +file:/private/tmp/math-game.jar
    +file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
    +
    +Affect(row-cnt:9) cost in 3 ms.
    +

    \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

    \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

    $ classloader --classLoaderClass sun.misc.Launcher$AppClassLoader
    +file:/private/tmp/math-game.jar
    +file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
    +
    +Affect(row-cnt:9) cost in 3 ms.
    +

    \u4F7F\u7528 ClassLoader \u53BB\u67E5\u627E resource

    $ classloader -c 3d4eac69  -r META-INF/MANIFEST.MF
    + jar:file:/System/Library/Java/Extensions/MRJToolkit.jar!/META-INF/MANIFEST.MF
    + jar:file:/private/tmp/math-game.jar!/META-INF/MANIFEST.MF
    + jar:file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar!/META-INF/MANIFEST.MF
    +

    \u4E5F\u53EF\u4EE5\u5C1D\u8BD5\u67E5\u627E\u7C7B\u7684 class \u6587\u4EF6\uFF1A

    $ classloader -c 1b6d3586 -r java/lang/String.class
    + jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/rt.jar!/java/lang/String.class
    +

    \u4F7F\u7528 ClassLoader \u53BB\u52A0\u8F7D\u7C7B

    $ classloader -c 3d4eac69 --load demo.MathGame
    +load class success.
    + class-info        demo.MathGame
    + code-source       /private/tmp/math-game.jar
    + name              demo.MathGame
    + isInterface       false
    + isAnnotation      false
    + isEnum            false
    + isAnonymousClass  false
    + isArray           false
    + isLocalClass      false
    + isMemberClass     false
    + isPrimitive       false
    + isSynthetic       false
    + simple-name       MathGame
    + modifier          public
    + annotation
    + interfaces
    + super-class       +-java.lang.Object
    + class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
    +                     +-sun.misc.Launcher$ExtClassLoader@66350f69
    + classLoaderHash   3d4eac69
    +

    \u7EDF\u8BA1 ClassLoader \u5B9E\u9645\u4F7F\u7528 URL \u548C\u672A\u4F7F\u7528\u7684 URL

    \u6CE8\u610F

    \u6CE8\u610F\uFF0C\u57FA\u4E8E JVM \u76EE\u524D\u5DF2\u52A0\u8F7D\u7684\u6240\u6709\u7C7B\u7EDF\u8BA1\uFF0C\u4E0D\u4EE3\u8868Unused URLs\u53EF\u4EE5\u4ECE\u5E94\u7528\u4E2D\u5220\u6389\u3002\u56E0\u4E3A\u53EF\u80FD\u5C06\u6765\u9700\u8981\u4ECEUnused URLs\u91CC\u52A0\u8F7D\u7C7B\uFF0C\u6216\u8005\u9700\u8981\u52A0\u8F7Dresources\u3002

    $ 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
    +
    `,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}; diff --git a/3.x/assets/classloader.html.50846686.js b/3.x/assets/classloader.html.50846686.js new file mode 100644 index 00000000000..90008396e0e --- /dev/null +++ b/3.x/assets/classloader.html.50846686.js @@ -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}; diff --git a/3.x/assets/classloader.html.5b255ef1.js b/3.x/assets/classloader.html.5b255ef1.js new file mode 100644 index 00000000000..638e898792f --- /dev/null +++ b/3.x/assets/classloader.html.5b255ef1.js @@ -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}; diff --git a/3.x/assets/classloader.html.d971b2e3.js b/3.x/assets/classloader.html.d971b2e3.js new file mode 100644 index 00000000000..2ac954586bd --- /dev/null +++ b/3.x/assets/classloader.html.d971b2e3.js @@ -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(`

    TIP

    View hierarchy, urls and classes-loading info for the class-loaders.

    classloader can search and print out the URLs for a specified resource from one particular classloader. It is quite handy when analyzing ResourceNotFoundException.

    Options

    NameSpecification
    [l]list all classloader instances
    [t]print classloader's hierarchy
    [a]list all the classes loaded by all the classloaders (use it with great caution since the output can be huge)
    [c:]print classloader's hashcode
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.
    [c: r:]using ClassLoader to search resource
    [c: load:]using ClassLoader to load class

    Usage

    View statistics categorized by class type

    $ classloader
    + name                                       numberOfInstances  loadedCountTotal
    + com.taobao.arthas.agent.ArthasClassloader  1                  2115
    + BootstrapClassLoader                       1                  1861
    + sun.reflect.DelegatingClassLoader          5                  5
    + sun.misc.Launcher$AppClassLoader           1                  4
    + sun.misc.Launcher$ExtClassLoader           1                  1
    +Affect(row-cnt:5) cost in 3 ms.
    +

    View statistics categorized by loaded classes number

    $ classloader -l
    + name                                                loadedCount  hash      parent
    + BootstrapClassLoader                                1861         null      null
    + com.taobao.arthas.agent.ArthasClassloader@68b31f0a  2115         68b31f0a  sun.misc.Launcher$ExtClassLoader@66350f69
    + sun.misc.Launcher$AppClassLoader@3d4eac69           4            3d4eac69  sun.misc.Launcher$ExtClassLoader@66350f69
    + sun.misc.Launcher$ExtClassLoader@66350f69           1            66350f69  null
    +Affect(row-cnt:4) cost in 2 ms.
    +

    View class-loaders hierarchy

    $ classloader -t
    ++-BootstrapClassLoader
    ++-sun.misc.Launcher$ExtClassLoader@66350f69
    +  +-com.taobao.arthas.agent.ArthasClassloader@68b31f0a
    +  +-sun.misc.Launcher$AppClassLoader@3d4eac69
    +Affect(row-cnt:4) cost in 3 ms.
    +

    Show the URLs of the URLClassLoader

    $ classloader -c 3d4eac69
    +file:/private/tmp/math-game.jar
    +file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
    +
    +Affect(row-cnt:9) cost in 3 ms.
    +

    Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader.

    For ClassLoader with only unique instance, it can be specified by class name, which is more convenient to use:

    $ classloader --classLoaderClass sun.misc.Launcher$AppClassLoader
    +file:/private/tmp/math-game.jar
    +file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
    +
    +Affect(row-cnt:9) cost in 3 ms.
    +

    Use the classloader to load resource

    $ classloader -c 3d4eac69  -r META-INF/MANIFEST.MF
    + jar:file:/System/Library/Java/Extensions/MRJToolkit.jar!/META-INF/MANIFEST.MF
    + jar:file:/private/tmp/math-game.jar!/META-INF/MANIFEST.MF
    + jar:file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar!/META-INF/MANIFEST.MF
    +

    Use the classloader to load .class resource

    $ classloader -c 1b6d3586 -r java/lang/String.class
    + jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/rt.jar!/java/lang/String.class
    +

    Use the classloader to load class

    $ classloader -c 3d4eac69 --load demo.MathGame
    +load class success.
    + class-info        demo.MathGame
    + code-source       /private/tmp/math-game.jar
    + name              demo.MathGame
    + isInterface       false
    + isAnnotation      false
    + isEnum            false
    + isAnonymousClass  false
    + isArray           false
    + isLocalClass      false
    + isMemberClass     false
    + isPrimitive       false
    + isSynthetic       false
    + simple-name       MathGame
    + modifier          public
    + annotation
    + interfaces
    + super-class       +-java.lang.Object
    + class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
    +                     +-sun.misc.Launcher$ExtClassLoader@66350f69
    + classLoaderHash   3d4eac69
    +

    Statistics ClassLoader actually used URLs and unused URLs

    WARNING

    Note that statistics are based on all classes currently loaded by the JVM. Does not mean that Unused URLs can be removed from the application. Because it may be necessary to load classes from Unused URLs in the future, or to load resources.

    $ 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
    +
    `,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}; diff --git a/3.x/assets/cls.html.92ac93b9.js b/3.x/assets/cls.html.92ac93b9.js new file mode 100644 index 00000000000..70f03d11a8b --- /dev/null +++ b/3.x/assets/cls.html.92ac93b9.js @@ -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}; diff --git a/3.x/assets/cls.html.9332bbdf.js b/3.x/assets/cls.html.9332bbdf.js new file mode 100644 index 00000000000..e2fa4ae2391 --- /dev/null +++ b/3.x/assets/cls.html.9332bbdf.js @@ -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}; diff --git a/3.x/assets/cls.html.a6a13162.js b/3.x/assets/cls.html.a6a13162.js new file mode 100644 index 00000000000..88bfa82f101 --- /dev/null +++ b/3.x/assets/cls.html.a6a13162.js @@ -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}; diff --git a/3.x/assets/cls.html.aef45d21.js b/3.x/assets/cls.html.aef45d21.js new file mode 100644 index 00000000000..8ab8105e7ab --- /dev/null +++ b/3.x/assets/cls.html.aef45d21.js @@ -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}; diff --git a/3.x/assets/commands.html.b9c3ff85.js b/3.x/assets/commands.html.b9c3ff85.js new file mode 100644 index 00000000000..7c2119d8c10 --- /dev/null +++ b/3.x/assets/commands.html.b9c3ff85.js @@ -0,0 +1 @@ +import{_ as d,o as c,c as a,a as e,b as o,w as n,e as t,d as h,r as i}from"./app.4d248835.js";const r={},_=e("h1",{id:"all-commands",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#all-commands","aria-hidden":"true"},"#"),t(" All Commands")],-1),u=e("h2",{id:"jvm-related",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jvm-related","aria-hidden":"true"},"#"),t(" jvm - related")],-1),m=t("dashboard"),f=t(" - dashboard for the system's real-time data"),p=t("getstatic"),g=t(" - examine class's static properties"),b=t("heapdump"),y=t(" - dump java heap in hprof binary format, like "),v=e("code",null,"jmap",-1),w=t("jvm"),j=t(" - show JVM information"),k=t("logger"),x=t(" - print the logger information, update the logger level"),A=t("mbean"),V=t(" - show Mbean information"),C=t("memory"),J=t(" - show JVM memory information"),M=t("ognl"),N=t(" - execute ognl expression"),B=t("perfcounter"),I=t(" - show JVM Perf Counter information"),E=t("sysenv"),L=t(" \u2014 view system environment variables"),R=t("sysprop"),S=t(" - view/modify system properties"),q=t("thread"),G=t(" - show java thread information"),P=t("vmoption"),T=t(" - view/modify the vm diagnostic options."),z=t("vmtool"),W=t(" - jvm tool, getInstances in jvm, forceGc"),D=e("h2",{id:"class-classloader-related",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#class-classloader-related","aria-hidden":"true"},"#"),t(" class/classloader - related")],-1),F=t("classloader"),H=t(" - check the inheritance structure, urls, class loading info for the specified class; using classloader to get the url of the resource e.g. "),K=e("code",null,"java/lang/String.class",-1),O=t("dump"),Q=t(" - dump the loaded classes in byte code to the specified location"),U=t("jad"),X=t(" - decompile the specified loaded classes"),Y=t("mc"),Z=t(" - Memory compiler, compiles "),$=e("code",null,".java",-1),tt=t(" files into "),et=e("code",null,".class",-1),ot=t(" files in memory"),st=t("redefine"),nt=t(" - load external "),lt=e("code",null,"*.class",-1),it=t(" files and re-define it into JVM"),dt=t("retransform"),ct=t(" - load external "),at=e("code",null,"*.class",-1),ht=t(" files and retransform it into JVM"),rt=t("sc"),_t=t(" - check the info for the classes loaded by JVM"),ut=t("sm"),mt=t(" - check methods info for the loaded classes"),ft=e("h2",{id:"monitor-watch-trace-related",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#monitor-watch-trace-related","aria-hidden":"true"},"#"),t(" monitor/watch/trace - related")],-1),pt={class:"custom-container warning"},gt=e("p",{class:"custom-container-title"},"WARNING",-1),bt=e("strong",null,"Attention",-1),yt=t(": commands here are taking advantage of byte-code-injection, which means we are injecting some "),vt={href:"https://en.wikipedia.org/wiki/Aspect-oriented_programming",target:"_blank",rel:"noopener noreferrer"},wt=t("aspects"),jt=t(" into the current classes for monitoring and statistics purpose. Therefore, when using it for online troubleshooting in your production environment, you'd better "),kt=e("strong",null,"explicitly specify",-1),xt=t(" classes/methods/criteria, and remember to remove the injected code by "),At=e("code",null,"stop",-1),Vt=t(" or "),Ct=e("code",null,"reset",-1),Jt=t("."),Mt=t("monitor"),Nt=t(" - monitor method execution statistics"),Bt=t("stack"),It=t(" - display the stack trace for the specified class and method"),Et=t("trace"),Lt=t(" - trace the execution time of specified method invocation"),Rt=t("tt"),St=t(" - time tunnel, record the arguments and returned value for the methods and replay"),qt=t("watch"),Gt=t(" - display the input/output parameter, return object, and thrown exception of specified method invocation"),Pt=e("h2",{id:"profiler-flame-graph",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#profiler-flame-graph","aria-hidden":"true"},"#"),t(" profiler/flame graph")],-1),Tt=t("profiler"),zt=t(" - use "),Wt={href:"https://github.com/jvm-profiling-tools/async-profiler",target:"_blank",rel:"noopener noreferrer"},Dt=t("async-profiler"),Ft=t(" to generate flame graph"),Ht=t("jfr"),Kt=t(" - dynamic opening and closing of jfr recordings"),Ot=e("h2",{id:"authentication",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#authentication","aria-hidden":"true"},"#"),t(" authentication")],-1),Qt=t("auth"),Ut=t(" - authentication"),Xt=e("h2",{id:"options",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#options","aria-hidden":"true"},"#"),t(" options")],-1),Yt=t("options"),Zt=t(" - check/set Arthas global optionss"),$t=e("h2",{id:"pipe",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#pipe","aria-hidden":"true"},"#"),t(" pipe")],-1),te=e("p",null,[t("Arthas provides "),e("code",null,"pipe"),t(" to process the result returned from commands further, e.g. "),e("code",null,"sm java.lang.String * | grep 'index'"),t(". Commands supported in "),e("code",null,"pipe"),t(":")],-1),ee=t("grep"),oe=t("- filter the result with the given keyword"),se=e("li",null,"plaintext - remove the ANSI color",-1),ne=e("li",null,"wc - count lines",-1),le=e("h2",{id:"async-jobs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#async-jobs","aria-hidden":"true"},"#"),t(" async jobs")],-1),ie=t("async"),de=t(" can be handy when a problem is hardly to reproduce in the production environment, e.g. one "),ce=e("code",null,"watch",-1),ae=t(" condition may happen only once in one single day."),he=h('
    • job control - use > to redirect result into the log file, use & to put the job to the background. Job keeps running even if the session is disconnected (the session lifecycle is 1 day by default)
    • jobs - list all jobs
    • kill - forcibly terminate the job
    • fg - bring the suspend job to the foreground
    • bg - put the job to run in the background

    Basic Arthas Commands

    ',2),re=t("base64"),_e=t(" - Encode and decode using Base64 representation."),ue=t("cat"),me=t(" - Concatenate and print files"),fe=t("cls"),pe=t(" - clear the screen"),ge=t("echo"),be=t(" - write arguments to the standard output"),ye=t("grep"),ve=t(" - Pattern searcher"),we=t("help"),je=t(" - display Arthas help"),ke=t("history"),xe=t(" - view command history"),Ae=t("keymap"),Ve=t(" - keymap for Arthas keyboard shortcut"),Ce=t("pwd"),Je=t(" - Return working directory name"),Me=t("quit/exit"),Ne=t(" - exit the current Arthas session, without effecting other sessions"),Be=t("reset"),Ie=t(" - reset all the enhanced classes. All enhanced classes will also be reset when Arthas server is closed by "),Ee=e("code",null,"stop",-1),Le=t("session"),Re=t(" - display current session information"),Se=t("stop"),qe=t(" - terminate the Arthas server, all Arthas sessions will be destroyed"),Ge=t("tee"),Pe=t(" - Copies standard input to standard output, making a copy in zero or more files."),Te=t("version"),ze=t(" - print the version for the Arthas attached to the current Java process");function We(De,Fe){const s=i("RouterLink"),l=i("ExternalLinkIcon");return c(),a("div",null,[_,u,e("ul",null,[e("li",null,[o(s,{to:"/en/doc/dashboard.html"},{default:n(()=>[m]),_:1}),f]),e("li",null,[o(s,{to:"/en/doc/getstatic.html"},{default:n(()=>[p]),_:1}),g]),e("li",null,[o(s,{to:"/en/doc/heapdump.html"},{default:n(()=>[b]),_:1}),y,v]),e("li",null,[o(s,{to:"/en/doc/jvm.html"},{default:n(()=>[w]),_:1}),j]),e("li",null,[o(s,{to:"/en/doc/logger.html"},{default:n(()=>[k]),_:1}),x]),e("li",null,[o(s,{to:"/en/doc/mbean.html"},{default:n(()=>[A]),_:1}),V]),e("li",null,[o(s,{to:"/en/doc/memory.html"},{default:n(()=>[C]),_:1}),J]),e("li",null,[o(s,{to:"/en/doc/ognl.html"},{default:n(()=>[M]),_:1}),N]),e("li",null,[o(s,{to:"/en/doc/perfcounter.html"},{default:n(()=>[B]),_:1}),I]),e("li",null,[o(s,{to:"/en/doc/sysenv.html"},{default:n(()=>[E]),_:1}),L]),e("li",null,[o(s,{to:"/en/doc/sysprop.html"},{default:n(()=>[R]),_:1}),S]),e("li",null,[o(s,{to:"/en/doc/thread.html"},{default:n(()=>[q]),_:1}),G]),e("li",null,[o(s,{to:"/en/doc/vmoption.html"},{default:n(()=>[P]),_:1}),T]),e("li",null,[o(s,{to:"/en/doc/vmtool.html"},{default:n(()=>[z]),_:1}),W])]),D,e("ul",null,[e("li",null,[o(s,{to:"/en/doc/classloader.html"},{default:n(()=>[F]),_:1}),H,K]),e("li",null,[o(s,{to:"/en/doc/dump.html"},{default:n(()=>[O]),_:1}),Q]),e("li",null,[o(s,{to:"/en/doc/jad.html"},{default:n(()=>[U]),_:1}),X]),e("li",null,[o(s,{to:"/en/doc/mc.html"},{default:n(()=>[Y]),_:1}),Z,$,tt,et,ot]),e("li",null,[o(s,{to:"/en/doc/redefine.html"},{default:n(()=>[st]),_:1}),nt,lt,it]),e("li",null,[o(s,{to:"/en/doc/retransform.html"},{default:n(()=>[dt]),_:1}),ct,at,ht]),e("li",null,[o(s,{to:"/en/doc/sc.html"},{default:n(()=>[rt]),_:1}),_t]),e("li",null,[o(s,{to:"/en/doc/sm.html"},{default:n(()=>[ut]),_:1}),mt])]),ft,e("div",pt,[gt,e("p",null,[bt,yt,e("a",vt,[wt,o(l)]),jt,kt,xt,At,Vt,Ct,Jt])]),e("ul",null,[e("li",null,[o(s,{to:"/en/doc/monitor.html"},{default:n(()=>[Mt]),_:1}),Nt]),e("li",null,[o(s,{to:"/en/doc/stack.html"},{default:n(()=>[Bt]),_:1}),It]),e("li",null,[o(s,{to:"/en/doc/trace.html"},{default:n(()=>[Et]),_:1}),Lt]),e("li",null,[o(s,{to:"/en/doc/tt.html"},{default:n(()=>[Rt]),_:1}),St]),e("li",null,[o(s,{to:"/en/doc/watch.html"},{default:n(()=>[qt]),_:1}),Gt])]),Pt,e("ul",null,[e("li",null,[o(s,{to:"/en/doc/profiler.html"},{default:n(()=>[Tt]),_:1}),zt,e("a",Wt,[Dt,o(l)]),Ft]),e("li",null,[o(s,{to:"/en/doc/jfr.html"},{default:n(()=>[Ht]),_:1}),Kt])]),Ot,e("ul",null,[e("li",null,[o(s,{to:"/en/doc/auth.html"},{default:n(()=>[Qt]),_:1}),Ut])]),Xt,e("ul",null,[e("li",null,[o(s,{to:"/en/doc/options.html"},{default:n(()=>[Yt]),_:1}),Zt])]),$t,te,e("ul",null,[e("li",null,[o(s,{to:"/en/doc/grep.html"},{default:n(()=>[ee]),_:1}),oe]),se,ne]),le,e("p",null,[o(s,{to:"/en/doc/async.html"},{default:n(()=>[ie]),_:1}),de,ce,ae]),he,e("ul",null,[e("li",null,[o(s,{to:"/en/doc/base64.html"},{default:n(()=>[re]),_:1}),_e]),e("li",null,[o(s,{to:"/en/doc/cat.html"},{default:n(()=>[ue]),_:1}),me]),e("li",null,[o(s,{to:"/en/doc/cls.html"},{default:n(()=>[fe]),_:1}),pe]),e("li",null,[o(s,{to:"/en/doc/echo.html"},{default:n(()=>[ge]),_:1}),be]),e("li",null,[o(s,{to:"/en/doc/grep.html"},{default:n(()=>[ye]),_:1}),ve]),e("li",null,[o(s,{to:"/en/doc/help.html"},{default:n(()=>[we]),_:1}),je]),e("li",null,[o(s,{to:"/en/doc/history.html"},{default:n(()=>[ke]),_:1}),xe]),e("li",null,[o(s,{to:"/en/doc/keymap.html"},{default:n(()=>[Ae]),_:1}),Ve]),e("li",null,[o(s,{to:"/en/doc/pwd.html"},{default:n(()=>[Ce]),_:1}),Je]),e("li",null,[o(s,{to:"/en/doc/quit.html"},{default:n(()=>[Me]),_:1}),Ne]),e("li",null,[o(s,{to:"/en/doc/reset.html"},{default:n(()=>[Be]),_:1}),Ie,Ee]),e("li",null,[o(s,{to:"/en/doc/session.html"},{default:n(()=>[Le]),_:1}),Re]),e("li",null,[o(s,{to:"/en/doc/stop.html"},{default:n(()=>[Se]),_:1}),qe]),e("li",null,[o(s,{to:"/en/doc/tee.html"},{default:n(()=>[Ge]),_:1}),Pe]),e("li",null,[o(s,{to:"/en/doc/version.html"},{default:n(()=>[Te]),_:1}),ze])])])}const Ke=d(r,[["render",We],["__file","commands.html.vue"]]);export{Ke as default}; diff --git a/3.x/assets/commands.html.e2567b24.js b/3.x/assets/commands.html.e2567b24.js new file mode 100644 index 00000000000..4a5278d029b --- /dev/null +++ b/3.x/assets/commands.html.e2567b24.js @@ -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}; diff --git a/3.x/assets/commands.html.e522310c.js b/3.x/assets/commands.html.e522310c.js new file mode 100644 index 00000000000..ae7a5d34ffe --- /dev/null +++ b/3.x/assets/commands.html.e522310c.js @@ -0,0 +1 @@ +import{_ as n,o as c,c as i,a as o,b as e,w as l,e as t,d as h,r as d}from"./app.4d248835.js";const a={},r=o("h1",{id:"\u547D\u4EE4\u5217\u8868",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u547D\u4EE4\u5217\u8868","aria-hidden":"true"},"#"),t(" \u547D\u4EE4\u5217\u8868")],-1),u=o("h2",{id:"jvm-\u76F8\u5173",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#jvm-\u76F8\u5173","aria-hidden":"true"},"#"),t(" jvm \u76F8\u5173")],-1),m=t("dashboard"),f=t(" - \u5F53\u524D\u7CFB\u7EDF\u7684\u5B9E\u65F6\u6570\u636E\u9762\u677F"),p=t("getstatic"),g=t(" - \u67E5\u770B\u7C7B\u7684\u9759\u6001\u5C5E\u6027"),b=t("heapdump"),x=t(" - dump java heap, \u7C7B\u4F3C jmap \u547D\u4EE4\u7684 heap dump \u529F\u80FD"),v=t("jvm"),j=t(" - \u67E5\u770B\u5F53\u524D JVM \u7684\u4FE1\u606F"),y=t("logger"),V=t(" - \u67E5\u770B\u548C\u4FEE\u6539 logger"),k=t("mbean"),w=t(" - \u67E5\u770B Mbean \u7684\u4FE1\u606F"),J=t("memory"),A=t(" - \u67E5\u770B JVM \u7684\u5185\u5B58\u4FE1\u606F"),M=t("ognl"),N=t(" - \u6267\u884C ognl \u8868\u8FBE\u5F0F"),L=t("perfcounter"),R=t(" - \u67E5\u770B\u5F53\u524D JVM \u7684 Perf Counter \u4FE1\u606F"),B=t("sysenv"),C=t(" - \u67E5\u770B JVM \u7684\u73AF\u5883\u53D8\u91CF"),E=t("sysprop"),I=t(" - \u67E5\u770B\u548C\u4FEE\u6539 JVM \u7684\u7CFB\u7EDF\u5C5E\u6027"),S=t("thread"),q=t(" - \u67E5\u770B\u5F53\u524D JVM \u7684\u7EBF\u7A0B\u5806\u6808\u4FE1\u606F"),F=t("vmoption"),G=t(" - \u67E5\u770B\u548C\u4FEE\u6539 JVM \u91CC\u8BCA\u65AD\u76F8\u5173\u7684 option"),P=t("vmtool"),T=t(" - \u4ECE jvm \u91CC\u67E5\u8BE2\u5BF9\u8C61\uFF0C\u6267\u884C forceGc"),z=o("h2",{id:"class-classloader-\u76F8\u5173",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#class-classloader-\u76F8\u5173","aria-hidden":"true"},"#"),t(" class/classloader \u76F8\u5173")],-1),D=t("classloader"),H=t(" - \u67E5\u770B classloader \u7684\u7EE7\u627F\u6811\uFF0Curls\uFF0C\u7C7B\u52A0\u8F7D\u4FE1\u606F\uFF0C\u4F7F\u7528 classloader \u53BB getResource"),K=t("dump"),O=t(" - dump \u5DF2\u52A0\u8F7D\u7C7B\u7684 byte code \u5230\u7279\u5B9A\u76EE\u5F55"),Q=t("jad"),U=t(" - \u53CD\u7F16\u8BD1\u6307\u5B9A\u5DF2\u52A0\u8F7D\u7C7B\u7684\u6E90\u7801"),W=t("mc"),X=t(" - \u5185\u5B58\u7F16\u8BD1\u5668\uFF0C\u5185\u5B58\u7F16\u8BD1"),Y=o("code",null,".java",-1),Z=t("\u6587\u4EF6\u4E3A"),$=o("code",null,".class",-1),tt=t("\u6587\u4EF6"),ot=t("redefine"),et=t(" - \u52A0\u8F7D\u5916\u90E8\u7684"),st=o("code",null,".class",-1),lt=t("\u6587\u4EF6\uFF0Credefine \u5230 JVM \u91CC"),dt=t("retransform"),_t=t(" - \u52A0\u8F7D\u5916\u90E8\u7684"),nt=o("code",null,".class",-1),ct=t("\u6587\u4EF6\uFF0Cretransform \u5230 JVM \u91CC"),it=t("sc"),ht=t(" - \u67E5\u770B JVM \u5DF2\u52A0\u8F7D\u7684\u7C7B\u4FE1\u606F"),at=t("sm"),rt=t(" - \u67E5\u770B\u5DF2\u52A0\u8F7D\u7C7B\u7684\u65B9\u6CD5\u4FE1\u606F"),ut=o("h2",{id:"monitor-watch-trace-\u76F8\u5173",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#monitor-watch-trace-\u76F8\u5173","aria-hidden":"true"},"#"),t(" monitor/watch/trace \u76F8\u5173")],-1),mt=o("div",{class:"custom-container warning"},[o("p",{class:"custom-container-title"},"\u6CE8\u610F"),o("p",null,[t("\u8BF7\u6CE8\u610F\uFF0C\u8FD9\u4E9B\u547D\u4EE4\uFF0C\u90FD\u901A\u8FC7\u5B57\u8282\u7801\u589E\u5F3A\u6280\u672F\u6765\u5B9E\u73B0\u7684\uFF0C\u4F1A\u5728\u6307\u5B9A\u7C7B\u7684\u65B9\u6CD5\u4E2D\u63D2\u5165\u4E00\u4E9B\u5207\u9762\u6765\u5B9E\u73B0\u6570\u636E\u7EDF\u8BA1\u548C\u89C2\u6D4B\uFF0C\u56E0\u6B64\u5728\u7EBF\u4E0A\u3001\u9884\u53D1\u4F7F\u7528\u65F6\uFF0C\u8BF7\u5C3D\u91CF\u660E\u786E\u9700\u8981\u89C2\u6D4B\u7684\u7C7B\u3001\u65B9\u6CD5\u4EE5\u53CA\u6761\u4EF6\uFF0C\u8BCA\u65AD\u7ED3\u675F\u8981\u6267\u884C "),o("code",null,"stop"),t(" \u6216\u5C06\u589E\u5F3A\u8FC7\u7684\u7C7B\u6267\u884C "),o("code",null,"reset"),t(" \u547D\u4EE4\u3002")])],-1),ft=t("monitor"),pt=t(" - \u65B9\u6CD5\u6267\u884C\u76D1\u63A7"),gt=t("stack"),bt=t(" - \u8F93\u51FA\u5F53\u524D\u65B9\u6CD5\u88AB\u8C03\u7528\u7684\u8C03\u7528\u8DEF\u5F84"),xt=t("trace"),vt=t(" - \u65B9\u6CD5\u5185\u90E8\u8C03\u7528\u8DEF\u5F84\uFF0C\u5E76\u8F93\u51FA\u65B9\u6CD5\u8DEF\u5F84\u4E0A\u7684\u6BCF\u4E2A\u8282\u70B9\u4E0A\u8017\u65F6"),jt=t("tt"),yt=t(" - \u65B9\u6CD5\u6267\u884C\u6570\u636E\u7684\u65F6\u7A7A\u96A7\u9053\uFF0C\u8BB0\u5F55\u4E0B\u6307\u5B9A\u65B9\u6CD5\u6BCF\u6B21\u8C03\u7528\u7684\u5165\u53C2\u548C\u8FD4\u56DE\u4FE1\u606F\uFF0C\u5E76\u80FD\u5BF9\u8FD9\u4E9B\u4E0D\u540C\u7684\u65F6\u95F4\u4E0B\u8C03\u7528\u8FDB\u884C\u89C2\u6D4B"),Vt=t("watch"),kt=t(" - \u65B9\u6CD5\u6267\u884C\u6570\u636E\u89C2\u6D4B"),wt=o("h2",{id:"profiler-\u706B\u7130\u56FE",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#profiler-\u706B\u7130\u56FE","aria-hidden":"true"},"#"),t(" profiler/\u706B\u7130\u56FE")],-1),Jt=t("profiler"),At=t(" - \u4F7F\u7528"),Mt={href:"https://github.com/jvm-profiling-tools/async-profiler",target:"_blank",rel:"noopener noreferrer"},Nt=t("async-profiler"),Lt=t("\u5BF9\u5E94\u7528\u91C7\u6837\uFF0C\u751F\u6210\u706B\u7130\u56FE"),Rt=t("jfr"),Bt=t(" - \u52A8\u6001\u5F00\u542F\u5173\u95ED JFR \u8BB0\u5F55"),Ct=o("h2",{id:"\u9274\u6743",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u9274\u6743","aria-hidden":"true"},"#"),t(" \u9274\u6743")],-1),Et=t("auth"),It=t(" - \u9274\u6743"),St=o("h2",{id:"options",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#options","aria-hidden":"true"},"#"),t(" options")],-1),qt=t("options"),Ft=t(" - \u67E5\u770B\u6216\u8BBE\u7F6E Arthas \u5168\u5C40\u5F00\u5173"),Gt=o("h2",{id:"\u7BA1\u9053",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u7BA1\u9053","aria-hidden":"true"},"#"),t(" \u7BA1\u9053")],-1),Pt=o("p",null,[t("Arthas \u652F\u6301\u4F7F\u7528\u7BA1\u9053\u5BF9\u4E0A\u8FF0\u547D\u4EE4\u7684\u7ED3\u679C\u8FDB\u884C\u8FDB\u4E00\u6B65\u7684\u5904\u7406\uFF0C\u5982"),o("code",null,"sm java.lang.String * | grep 'index'")],-1),Tt=t("grep"),zt=t(" - \u641C\u7D22\u6EE1\u8DB3\u6761\u4EF6\u7684\u7ED3\u679C"),Dt=o("li",null,"plaintext - \u5C06\u547D\u4EE4\u7684\u7ED3\u679C\u53BB\u9664 ANSI \u989C\u8272",-1),Ht=o("li",null,"wc - \u6309\u884C\u7EDF\u8BA1\u8F93\u51FA\u7ED3\u679C",-1),Kt=o("h2",{id:"\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u540E\u53F0\u5F02\u6B65\u4EFB\u52A1","aria-hidden":"true"},"#"),t(" \u540E\u53F0\u5F02\u6B65\u4EFB\u52A1")],-1),Ot=t("\u5F53\u7EBF\u4E0A\u51FA\u73B0\u5076\u53D1\u7684\u95EE\u9898\uFF0C\u6BD4\u5982\u9700\u8981 watch \u67D0\u4E2A\u6761\u4EF6\uFF0C\u800C\u8FD9\u4E2A\u6761\u4EF6\u4E00\u5929\u53EF\u80FD\u624D\u4F1A\u51FA\u73B0\u4E00\u6B21\u65F6\uFF0C\u5F02\u6B65\u540E\u53F0\u4EFB\u52A1\u5C31\u6D3E\u4E0A\u7528\u573A\u4E86\uFF0C\u8BE6\u60C5\u8BF7\u53C2\u8003"),Qt=t("\u8FD9\u91CC"),Ut=h('
    • \u4F7F\u7528 > \u5C06\u7ED3\u679C\u91CD\u5199\u5411\u5230\u65E5\u5FD7\u6587\u4EF6\uFF0C\u4F7F\u7528 & \u6307\u5B9A\u547D\u4EE4\u662F\u540E\u53F0\u8FD0\u884C\uFF0Csession \u65AD\u5F00\u4E0D\u5F71\u54CD\u4EFB\u52A1\u6267\u884C\uFF08\u751F\u547D\u5468\u671F\u9ED8\u8BA4\u4E3A 1 \u5929\uFF09
    • jobs - \u5217\u51FA\u6240\u6709 job
    • kill - \u5F3A\u5236\u7EC8\u6B62\u4EFB\u52A1
    • fg - \u5C06\u6682\u505C\u7684\u4EFB\u52A1\u62C9\u5230\u524D\u53F0\u6267\u884C
    • bg - \u5C06\u6682\u505C\u7684\u4EFB\u52A1\u653E\u5230\u540E\u53F0\u6267\u884C

    \u57FA\u7840\u547D\u4EE4

    ',2),Wt=t("base64"),Xt=t(" - base64 \u7F16\u7801\u8F6C\u6362\uFF0C\u548C linux \u91CC\u7684 base64 \u547D\u4EE4\u7C7B\u4F3C"),Yt=t("cat"),Zt=t(" - \u6253\u5370\u6587\u4EF6\u5185\u5BB9\uFF0C\u548C linux \u91CC\u7684 cat \u547D\u4EE4\u7C7B\u4F3C"),$t=t("cls"),to=t(" - \u6E05\u7A7A\u5F53\u524D\u5C4F\u5E55\u533A\u57DF"),oo=t("echo"),eo=t(" - \u6253\u5370\u53C2\u6570\uFF0C\u548C linux \u91CC\u7684 echo \u547D\u4EE4\u7C7B\u4F3C"),so=t("grep"),lo=t(" - \u5339\u914D\u67E5\u627E\uFF0C\u548C linux \u91CC\u7684 grep \u547D\u4EE4\u7C7B\u4F3C"),_o=t("help"),no=t(" - \u67E5\u770B\u547D\u4EE4\u5E2E\u52A9\u4FE1\u606F"),co=t("history"),io=t(" - \u6253\u5370\u547D\u4EE4\u5386\u53F2"),ho=t("keymap"),ao=t(" - Arthas \u5FEB\u6377\u952E\u5217\u8868\u53CA\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E"),ro=t("pwd"),uo=t(" - \u8FD4\u56DE\u5F53\u524D\u7684\u5DE5\u4F5C\u76EE\u5F55\uFF0C\u548C linux \u547D\u4EE4\u7C7B\u4F3C"),mo=t("quit"),fo=t(" - \u9000\u51FA\u5F53\u524D Arthas \u5BA2\u6237\u7AEF\uFF0C\u5176\u4ED6 Arthas \u5BA2\u6237\u7AEF\u4E0D\u53D7\u5F71\u54CD"),po=t("reset"),go=t(" - \u91CD\u7F6E\u589E\u5F3A\u7C7B\uFF0C\u5C06\u88AB Arthas \u589E\u5F3A\u8FC7\u7684\u7C7B\u5168\u90E8\u8FD8\u539F\uFF0CArthas \u670D\u52A1\u7AEF\u5173\u95ED\u65F6\u4F1A\u91CD\u7F6E\u6240\u6709\u589E\u5F3A\u8FC7\u7684\u7C7B"),bo=t("session"),xo=t(" - \u67E5\u770B\u5F53\u524D\u4F1A\u8BDD\u7684\u4FE1\u606F"),vo=t("stop"),jo=t(" - \u5173\u95ED Arthas \u670D\u52A1\u7AEF\uFF0C\u6240\u6709 Arthas \u5BA2\u6237\u7AEF\u5168\u90E8\u9000\u51FA"),yo=t("tee"),Vo=t(" - \u590D\u5236\u6807\u51C6\u8F93\u5165\u5230\u6807\u51C6\u8F93\u51FA\u548C\u6307\u5B9A\u7684\u6587\u4EF6\uFF0C\u548C linux \u91CC\u7684 tee \u547D\u4EE4\u7C7B\u4F3C"),ko=t("version"),wo=t(" - \u8F93\u51FA\u5F53\u524D\u76EE\u6807 Java \u8FDB\u7A0B\u6240\u52A0\u8F7D\u7684 Arthas \u7248\u672C\u53F7");function Jo(Ao,Mo){const s=d("RouterLink"),_=d("ExternalLinkIcon");return c(),i("div",null,[r,u,o("ul",null,[o("li",null,[e(s,{to:"/doc/dashboard.html"},{default:l(()=>[m]),_:1}),f]),o("li",null,[e(s,{to:"/doc/getstatic.html"},{default:l(()=>[p]),_:1}),g]),o("li",null,[e(s,{to:"/doc/heapdump.html"},{default:l(()=>[b]),_:1}),x]),o("li",null,[e(s,{to:"/doc/jvm.html"},{default:l(()=>[v]),_:1}),j]),o("li",null,[e(s,{to:"/doc/logger.html"},{default:l(()=>[y]),_:1}),V]),o("li",null,[e(s,{to:"/doc/mbean.html"},{default:l(()=>[k]),_:1}),w]),o("li",null,[e(s,{to:"/doc/memory.html"},{default:l(()=>[J]),_:1}),A]),o("li",null,[e(s,{to:"/doc/ognl.html"},{default:l(()=>[M]),_:1}),N]),o("li",null,[e(s,{to:"/doc/perfcounter.html"},{default:l(()=>[L]),_:1}),R]),o("li",null,[e(s,{to:"/doc/sysenv.html"},{default:l(()=>[B]),_:1}),C]),o("li",null,[e(s,{to:"/doc/sysprop.html"},{default:l(()=>[E]),_:1}),I]),o("li",null,[e(s,{to:"/doc/thread.html"},{default:l(()=>[S]),_:1}),q]),o("li",null,[e(s,{to:"/doc/vmoption.html"},{default:l(()=>[F]),_:1}),G]),o("li",null,[e(s,{to:"/doc/vmtool.html"},{default:l(()=>[P]),_:1}),T])]),z,o("ul",null,[o("li",null,[e(s,{to:"/doc/classloader.html"},{default:l(()=>[D]),_:1}),H]),o("li",null,[e(s,{to:"/doc/dump.html"},{default:l(()=>[K]),_:1}),O]),o("li",null,[e(s,{to:"/doc/jad.html"},{default:l(()=>[Q]),_:1}),U]),o("li",null,[e(s,{to:"/doc/mc.html"},{default:l(()=>[W]),_:1}),X,Y,Z,$,tt]),o("li",null,[e(s,{to:"/doc/redefine.html"},{default:l(()=>[ot]),_:1}),et,st,lt]),o("li",null,[e(s,{to:"/doc/retransform.html"},{default:l(()=>[dt]),_:1}),_t,nt,ct]),o("li",null,[e(s,{to:"/doc/sc.html"},{default:l(()=>[it]),_:1}),ht]),o("li",null,[e(s,{to:"/doc/sm.html"},{default:l(()=>[at]),_:1}),rt])]),ut,mt,o("ul",null,[o("li",null,[e(s,{to:"/doc/monitor.html"},{default:l(()=>[ft]),_:1}),pt]),o("li",null,[e(s,{to:"/doc/stack.html"},{default:l(()=>[gt]),_:1}),bt]),o("li",null,[e(s,{to:"/doc/trace.html"},{default:l(()=>[xt]),_:1}),vt]),o("li",null,[e(s,{to:"/doc/tt.html"},{default:l(()=>[jt]),_:1}),yt]),o("li",null,[e(s,{to:"/doc/watch.html"},{default:l(()=>[Vt]),_:1}),kt])]),wt,o("ul",null,[o("li",null,[e(s,{to:"/doc/profiler.html"},{default:l(()=>[Jt]),_:1}),At,o("a",Mt,[Nt,e(_)]),Lt]),o("li",null,[e(s,{to:"/doc/jfr.html"},{default:l(()=>[Rt]),_:1}),Bt])]),Ct,o("ul",null,[o("li",null,[e(s,{to:"/doc/auth.html"},{default:l(()=>[Et]),_:1}),It])]),St,o("ul",null,[o("li",null,[e(s,{to:"/doc/options.html"},{default:l(()=>[qt]),_:1}),Ft])]),Gt,Pt,o("ul",null,[o("li",null,[e(s,{to:"/doc/grep.html"},{default:l(()=>[Tt]),_:1}),zt]),Dt,Ht]),Kt,o("p",null,[Ot,e(s,{to:"/doc/async.html"},{default:l(()=>[Qt]),_:1})]),Ut,o("ul",null,[o("li",null,[e(s,{to:"/doc/base64.html"},{default:l(()=>[Wt]),_:1}),Xt]),o("li",null,[e(s,{to:"/doc/cat.html"},{default:l(()=>[Yt]),_:1}),Zt]),o("li",null,[e(s,{to:"/doc/cls.html"},{default:l(()=>[$t]),_:1}),to]),o("li",null,[e(s,{to:"/doc/echo.html"},{default:l(()=>[oo]),_:1}),eo]),o("li",null,[e(s,{to:"/doc/grep.html"},{default:l(()=>[so]),_:1}),lo]),o("li",null,[e(s,{to:"/doc/help.html"},{default:l(()=>[_o]),_:1}),no]),o("li",null,[e(s,{to:"/doc/history.html"},{default:l(()=>[co]),_:1}),io]),o("li",null,[e(s,{to:"/doc/keymap.html"},{default:l(()=>[ho]),_:1}),ao]),o("li",null,[e(s,{to:"/doc/pwd.html"},{default:l(()=>[ro]),_:1}),uo]),o("li",null,[e(s,{to:"/doc/quit.html"},{default:l(()=>[mo]),_:1}),fo]),o("li",null,[e(s,{to:"/doc/reset.html"},{default:l(()=>[po]),_:1}),go]),o("li",null,[e(s,{to:"/doc/session.html"},{default:l(()=>[bo]),_:1}),xo]),o("li",null,[e(s,{to:"/doc/stop.html"},{default:l(()=>[vo]),_:1}),jo]),o("li",null,[e(s,{to:"/doc/tee.html"},{default:l(()=>[yo]),_:1}),Vo]),o("li",null,[e(s,{to:"/doc/version.html"},{default:l(()=>[ko]),_:1}),wo])])])}const Lo=n(a,[["render",Jo],["__file","commands.html.vue"]]);export{Lo as default}; diff --git a/3.x/assets/commands.html.ea43666c.js b/3.x/assets/commands.html.ea43666c.js new file mode 100644 index 00000000000..99f60bf2077 --- /dev/null +++ b/3.x/assets/commands.html.ea43666c.js @@ -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}; diff --git a/3.x/assets/contact-us.html.6b2c4bcc.js b/3.x/assets/contact-us.html.6b2c4bcc.js new file mode 100644 index 00000000000..219d751d100 --- /dev/null +++ b/3.x/assets/contact-us.html.6b2c4bcc.js @@ -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('

    DingDing Group

    • Arthas open source discussion Group\uFF1A 21965291 \uFF0CYou can join by searching for group number\u3002

    • Arthas open source discussion Group 2\uFF1A 30707824 \uFF0CYou can join by searching for group number\u3002

    • Arthas open source discussion Group 3\uFF1A 17605006847 , You can join by searching for group number\u3002

    Instructions for Installing DingTalk

    ',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('

    After installing you can search for group number and join it.

    QQ Group

    Arthas open source discussion QQ group\uFF1A916328269

    Arthas open source discussion QQ group2\uFF1A854625984

    Arthas open source discussion QQ group 3\uFF1A 672077388

    ',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}; diff --git a/3.x/assets/contact-us.html.6d0fe4e6.js b/3.x/assets/contact-us.html.6d0fe4e6.js new file mode 100644 index 00000000000..f5fa882990d --- /dev/null +++ b/3.x/assets/contact-us.html.6d0fe4e6.js @@ -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}; diff --git a/3.x/assets/contact-us.html.77c0699c.js b/3.x/assets/contact-us.html.77c0699c.js new file mode 100644 index 00000000000..73f5c865023 --- /dev/null +++ b/3.x/assets/contact-us.html.77c0699c.js @@ -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}; diff --git a/3.x/assets/contact-us.html.c4d19d8e.js b/3.x/assets/contact-us.html.c4d19d8e.js new file mode 100644 index 00000000000..183ae35ffea --- /dev/null +++ b/3.x/assets/contact-us.html.c4d19d8e.js @@ -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('

    \u5FAE\u4FE1\u516C\u4F17\u53F7

    \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

    \u9489\u9489\u7FA4

    • 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

    • 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

    • Arthas \u5F00\u6E90\u4EA4\u6D41\u9489\u9489\u7FA4 3\uFF1A 17605006847 \uFF0C\u641C\u7D22\u7FA4\u53F7\u5373\u53EF\u52A0\u5165\u3002

    QQ \u7FA4

    Arthas \u5F00\u6E90\u4EA4\u6D41 QQ \u7FA4\uFF1A 916328269 \uFF08\u5982\u679C\u6EE1\u4E86\u65E0\u6CD5\u52A0\u5165\uFF0C\u8BF7\u52A0 3 \u7FA4\uFF09

    Arthas \u5F00\u6E90\u4EA4\u6D41 QQ \u7FA4 2\uFF1A 854625984

    Arthas \u5F00\u6E90\u4EA4\u6D41 QQ \u7FA4 3\uFF1A 672077388

    ',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}; diff --git a/3.x/assets/dashboard.eb1e1fee.js b/3.x/assets/dashboard.eb1e1fee.js new file mode 100644 index 00000000000..6bddc7d2e9e --- /dev/null +++ b/3.x/assets/dashboard.eb1e1fee.js @@ -0,0 +1 @@ +const s="/3.x/images/dashboard.png";export{s as _}; diff --git a/3.x/assets/dashboard.html.79bd7e0f.js b/3.x/assets/dashboard.html.79bd7e0f.js new file mode 100644 index 00000000000..12d3eb20fec --- /dev/null +++ b/3.x/assets/dashboard.html.79bd7e0f.js @@ -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(`

    Options

    NameSpecification
    [i:]The interval (in ms) between two executions, default is 5000 ms.
    [n:]The number of times this command will be executed.

    Usage

    $ 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
    +

    Notes on column headers

    • ID: JVM thread ID, pls. note this ID is different from the nativeID in jstack
    • NAME: thread name
    • GROUP: thread group name
    • PRIORITY: thread priority, ranged from 1 to 10. The greater number, the higher priority
    • STATE: thread state
    • 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%
    • DELTA_TIME: incremental CPU time of thread running after the last sampling in second format
    • TIME: total CPU time of the thread in minute:second format
    • INTERRUPTED: the thread interruption state
    • DAEMON: daemon thread or not

    JVM internal threads

    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).

    JVM activities can be observed through internal threads, such as GC, JIT compilation, etc., to perceive the overall status of JVM.

    • 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.
    • After executing commands such as trace/watch/tt/redefine, 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.

    JVM internal threads include the following:

    • JIT compilation thread: such as C1 CompilerThread0, C2 CompilerThread0
    • GC thread: such as GC Thread0, G1 Young RemSet Sampling
    • Other internal threads: such asVM Periodic Task Thread, VM Thread, Service Thread

    Screenshot

    ',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}; diff --git a/3.x/assets/dashboard.html.88ef26c5.js b/3.x/assets/dashboard.html.88ef26c5.js new file mode 100644 index 00000000000..55afcf597f3 --- /dev/null +++ b/3.x/assets/dashboard.html.88ef26c5.js @@ -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(`

    \u63D0\u793A

    \u5F53\u524D\u7CFB\u7EDF\u7684\u5B9E\u65F6\u6570\u636E\u9762\u677F\uFF0C\u6309 ctrl+c \u9000\u51FA\u3002

    \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

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    [i:]\u5237\u65B0\u5B9E\u65F6\u6570\u636E\u7684\u65F6\u95F4\u95F4\u9694 (ms)\uFF0C\u9ED8\u8BA4 5000ms
    [n:]\u5237\u65B0\u5B9E\u65F6\u6570\u636E\u7684\u6B21\u6570

    \u4F7F\u7528\u53C2\u8003

    $ 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
    +

    \u6570\u636E\u8BF4\u660E

    • 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
    • NAME: \u7EBF\u7A0B\u540D
    • GROUP: \u7EBF\u7A0B\u7EC4\u540D
    • PRIORITY: \u7EBF\u7A0B\u4F18\u5148\u7EA7, 1~10 \u4E4B\u95F4\u7684\u6570\u5B57\uFF0C\u8D8A\u5927\u8868\u793A\u4F18\u5148\u7EA7\u8D8A\u9AD8
    • STATE: \u7EBF\u7A0B\u7684\u72B6\u6001
    • 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%
    • DELTA_TIME: \u4E0A\u6B21\u91C7\u6837\u4E4B\u540E\u7EBF\u7A0B\u8FD0\u884C\u589E\u91CF CPU \u65F6\u95F4\uFF0C\u6570\u636E\u683C\u5F0F\u4E3A\u79D2
    • TIME: \u7EBF\u7A0B\u8FD0\u884C\u603B CPU \u65F6\u95F4\uFF0C\u6570\u636E\u683C\u5F0F\u4E3A\u5206:\u79D2
    • INTERRUPTED: \u7EBF\u7A0B\u5F53\u524D\u7684\u4E2D\u65AD\u4F4D\u72B6\u6001
    • DAEMON: \u662F\u5426\u662F daemon \u7EBF\u7A0B

    JVM \u5185\u90E8\u7EBF\u7A0B

    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

    • \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
    • \u5F53\u6267\u884Ctrace/watch/tt/redefine\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

    JVM \u5185\u90E8\u7EBF\u7A0B\u5305\u62EC\u4E0B\u9762\u51E0\u79CD\uFF1A

    • JIT \u7F16\u8BD1\u7EBF\u7A0B: \u5982 C1 CompilerThread0, C2 CompilerThread0
    • GC \u7EBF\u7A0B: \u5982GC Thread0, G1 Young RemSet Sampling
    • \u5176\u5B83\u5185\u90E8\u7EBF\u7A0B: \u5982VM Periodic Task Thread, VM Thread, Service Thread

    \u622A\u56FE\u5C55\u793A

    ',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}; diff --git a/3.x/assets/dashboard.html.c7a97553.js b/3.x/assets/dashboard.html.c7a97553.js new file mode 100644 index 00000000000..4ccda42599c --- /dev/null +++ b/3.x/assets/dashboard.html.c7a97553.js @@ -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}; diff --git a/3.x/assets/dashboard.html.f56e6c96.js b/3.x/assets/dashboard.html.f56e6c96.js new file mode 100644 index 00000000000..36baf89528d --- /dev/null +++ b/3.x/assets/dashboard.html.f56e6c96.js @@ -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}; diff --git a/3.x/assets/docker.html.030cca04.js b/3.x/assets/docker.html.030cca04.js new file mode 100644 index 00000000000..d1c37ec1397 --- /dev/null +++ b/3.x/assets/docker.html.030cca04.js @@ -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}; diff --git a/3.x/assets/docker.html.77dd787e.js b/3.x/assets/docker.html.77dd787e.js new file mode 100644 index 00000000000..e467b1ff82a --- /dev/null +++ b/3.x/assets/docker.html.77dd787e.js @@ -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(`

    Docker

    Use JDK in Docker

    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.

    Use public JDK image

    • https://hub.docker.com/_/openjdk/

    such as:

    FROM openjdk:8-jdk
    +

    or:

    FROM openjdk:8-jdk-alpine
    +

    Install via package management software

    such as:

    # Install OpenJDK-8
    +RUN apt-get update && \\
    +    apt-get install -y openjdk-8-jdk && \\
    +    apt-get install -y ant && \\
    +    apt-get clean;
    +
    +# Fix certificate issues
    +RUN apt-get update && \\
    +    apt-get install ca-certificates-java && \\
    +    apt-get clean && \\
    +    update-ca-certificates -f;
    +
    +# Setup JAVA_HOME - useful for docker commandline
    +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
    +RUN export JAVA_HOME
    +

    or:

    RUN yum install -y \\
    +   java-1.8.0-openjdk \\
    +   java-1.8.0-openjdk-devel
    +
    +ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk/
    +RUN export JAVA_HOME
    +

    Quick start with Docker

    1. Delete the existing math-game docker container (not necessary)

      $ docker stop math-game || true && docker rm math-game || true
      +
    2. Start math-game

      $ docker run --name math-game -it hengyunabc/arthas:latest /bin/sh -c "java -jar /opt/arthas/math-game.jar"
      +
    3. Start arthas-boot3 for diagnosis

      $ docker exec -it math-game /bin/sh -c "java -jar /opt/arthas/arthas-boot3.jar"
      +* [1]: 9 jar
      +
      +[INFO] arthas home: /opt/arthas
      +[INFO] Try to attach process 9
      +[INFO] Attach process 9 success.
      +[INFO] arthas-client connect 127.0.0.1 3658
      +,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
      +/  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
      +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
      +|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
      +\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
      +
      +
      +wiki: https://arthas.aliyun.com/3.x/doc
      +version: 3.0.5
      +pid: 9
      +time: 2018-12-18 11:30:36
      +

    Diagnose the Java process in Docker

    docker exec -it  \${containerId} /bin/bash -c "wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"
    +

    Diagnose the Java process in the container in k8s

    kubectl exec -it \${pod} --container \${containerId} -- /bin/bash -c "wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"
    +

    Install Arthas into the base Docker image

    It's easy to install Arthas into your Docker image.

    FROM openjdk:8-jdk-alpine
    +
    +# copy arthas
    +COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas
    +

    If you want to specify a version, you can view all the tags:

    `,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}; diff --git a/3.x/assets/docker.html.8430667f.js b/3.x/assets/docker.html.8430667f.js new file mode 100644 index 00000000000..3f138b861c3 --- /dev/null +++ b/3.x/assets/docker.html.8430667f.js @@ -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(`

    Docker

    \u5728 Docker \u91CC\u4F7F\u7528 JDK

    \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

    \u4F7F\u7528\u516C\u5F00\u7684 JDK \u955C\u50CF

    • https://hub.docker.com/_/openjdk/

    \u6BD4\u5982\uFF1A

    FROM openjdk:8-jdk
    +

    \u6216\u8005\uFF1A

    FROM openjdk:8-jdk-alpine
    +

    \u901A\u8FC7\u5305\u7BA1\u7406\u8F6F\u4EF6\u6765\u5B89\u88C5

    \u6BD4\u5982\uFF1A

    # Install OpenJDK-8
    +RUN apt-get update && \\
    +    apt-get install -y openjdk-8-jdk && \\
    +    apt-get install -y ant && \\
    +    apt-get clean;
    +
    +# Fix certificate issues
    +RUN apt-get update && \\
    +    apt-get install ca-certificates-java && \\
    +    apt-get clean && \\
    +    update-ca-certificates -f;
    +
    +# Setup JAVA_HOME -- useful for docker commandline
    +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
    +RUN export JAVA_HOME
    +

    \u6216\u8005\uFF1A

    RUN yum install -y \\
    +   java-1.8.0-openjdk \\
    +   java-1.8.0-openjdk-devel
    +
    +ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk/
    +RUN export JAVA_HOME
    +

    \u901A\u8FC7 Docker \u5FEB\u901F\u5165\u95E8

    1. \u5220\u9664\u672C\u5730\u5DF2\u6709\u7684math-game docker container\uFF08\u975E\u5FC5\u8981\uFF09

      $ docker stop math-game || true && docker rm math-game || true
      +
    2. \u542F\u52A8math-game

      $ docker run --name math-game -it hengyunabc/arthas:latest /bin/sh -c "java -jar /opt/arthas/math-game.jar"
      +
    3. \u542F\u52A8arthas-boot3\u6765\u8FDB\u884C\u8BCA\u65AD

      $ docker exec -it math-game /bin/sh -c "java -jar /opt/arthas/arthas-boot3.jar"
      +* [1]: 9 jar
      +
      +[INFO] arthas home: /opt/arthas
      +[INFO] Try to attach process 9
      +[INFO] Attach process 9 success.
      +[INFO] arthas-client connect 127.0.0.1 3658
      +,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
      +/  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
      +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
      +|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
      +\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
      +
      +
      +wiki: https://arthas.aliyun.com/3.x/doc
      +version: 3.0.5
      +pid: 9
      +time: 2018-12-18 11:30:36
      +

    \u8BCA\u65AD Docker \u91CC\u7684 Java \u8FDB\u7A0B

    docker exec -it  \${containerId} /bin/bash -c "wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"
    +

    \u8BCA\u65AD k8s \u91CC\u5BB9\u5668\u91CC\u7684 Java \u8FDB\u7A0B

    kubectl exec -it \${pod} --container \${containerId} -- /bin/bash -c "wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"
    +

    \u628A Arthas \u5B89\u88C5\u5230\u57FA\u7840\u955C\u50CF\u91CC

    \u53EF\u4EE5\u5F88\u7B80\u5355\u628A Arthas \u5B89\u88C5\u5230\u4F60\u7684 Docker \u955C\u50CF\u91CC\u3002

    FROM openjdk:8-jdk-alpine
    +
    +# copy arthas
    +COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas
    +

    \u5982\u679C\u60F3\u6307\u5B9A\u7248\u672C\uFF0C\u53EF\u4EE5\u67E5\u770B\u5177\u4F53\u7684 tags\uFF1A

    `,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}; diff --git a/3.x/assets/docker.html.a7fd435f.js b/3.x/assets/docker.html.a7fd435f.js new file mode 100644 index 00000000000..ec704405048 --- /dev/null +++ b/3.x/assets/docker.html.a7fd435f.js @@ -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}; diff --git a/3.x/assets/download.html.0aec292a.js b/3.x/assets/download.html.0aec292a.js new file mode 100644 index 00000000000..311f3810e42 --- /dev/null +++ b/3.x/assets/download.html.0aec292a.js @@ -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('

    Download

    Download full package

    Download from Github Releases

    ',3),h={href:"https://github.com/alibaba/arthas/releases",target:"_blank",rel:"noopener noreferrer"},u=i("https://github.com/alibaba/arthas/releases"),b=e(`

    Use as3.sh

    Download and unzip, find as3.sh in the directory. Start it in bash:

    ./as3.sh
    +

    Print usage:

    ./as3.sh -h
    +

    Use arthas-boot3.jar

    Download and unzip, find arthas-boot3.jar in the directory. Start with java command:

    java -jar arthas-boot3.jar
    +

    Print usage:

    java -jar arthas-boot3.jar -h
    +
    `,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}; diff --git a/3.x/assets/download.html.127d6cde.js b/3.x/assets/download.html.127d6cde.js new file mode 100644 index 00000000000..113fc542768 --- /dev/null +++ b/3.x/assets/download.html.127d6cde.js @@ -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}; diff --git a/3.x/assets/download.html.5cdfc6bd.js b/3.x/assets/download.html.5cdfc6bd.js new file mode 100644 index 00000000000..879313c7287 --- /dev/null +++ b/3.x/assets/download.html.5cdfc6bd.js @@ -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('

    \u4E0B\u8F7D

    \u4E0B\u8F7D\u5168\u91CF\u5305

    \u4ECE Github Releases \u9875\u4E0B\u8F7D

    ',3),l={href:"https://github.com/alibaba/arthas/releases",target:"_blank",rel:"noopener noreferrer"},b=t("https://github.com/alibaba/arthas/releases"),p=e(`

    \u7528 as3.sh \u542F\u52A8

    \u89E3\u538B\u540E\uFF0C\u5728\u6587\u4EF6\u5939\u91CC\u6709as3.sh\uFF0C\u76F4\u63A5\u7528./as3.sh\u7684\u65B9\u5F0F\u542F\u52A8\uFF1A

    ./as3.sh
    +

    \u6253\u5370\u5E2E\u52A9\u4FE1\u606F\uFF1A

    ./as3.sh -h
    +

    \u7528 arthas-boot3 \u542F\u52A8

    \u6216\u8005\u5728\u89E3\u538B\u540E\uFF0C\u5728\u6587\u4EF6\u5939\u91CC\u6709arthas-boot3.jar\uFF0C\u76F4\u63A5\u7528java -jar\u7684\u65B9\u5F0F\u542F\u52A8\uFF1A

    java -jar arthas-boot3.jar
    +

    \u6253\u5370\u5E2E\u52A9\u4FE1\u606F\uFF1A

    java -jar arthas-boot3.jar -h
    +
    `,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}; diff --git a/3.x/assets/download.html.b853bfd7.js b/3.x/assets/download.html.b853bfd7.js new file mode 100644 index 00000000000..9586e833c8d --- /dev/null +++ b/3.x/assets/download.html.b853bfd7.js @@ -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}; diff --git a/3.x/assets/dump.html.148d41dc.js b/3.x/assets/dump.html.148d41dc.js new file mode 100644 index 00000000000..01940f66790 --- /dev/null +++ b/3.x/assets/dump.html.148d41dc.js @@ -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}; diff --git a/3.x/assets/dump.html.3f441711.js b/3.x/assets/dump.html.3f441711.js new file mode 100644 index 00000000000..c5dab8ec10a --- /dev/null +++ b/3.x/assets/dump.html.3f441711.js @@ -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}; diff --git a/3.x/assets/dump.html.a9afcd2b.js b/3.x/assets/dump.html.a9afcd2b.js new file mode 100644 index 00000000000..aaa111bd36e --- /dev/null +++ b/3.x/assets/dump.html.a9afcd2b.js @@ -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(`

    Usage

    $ dump java.lang.String
    + HASHCODE  CLASSLOADER  LOCATION
    + null                   /Users/admin/logs/arthas/classdump/java/lang/String.class
    +Affect(row-cnt:1) cost in 119 ms.
    +
    $ dump demo.*
    + HASHCODE  CLASSLOADER                                    LOCATION
    + 3d4eac69  +-sun.misc.Launcher$AppClassLoader@3d4eac69    /Users/admin/logs/arthas/classdump/sun.misc.Launcher$AppClassLoader-3d4eac69/demo/MathGame.class
    +             +-sun.misc.Launcher$ExtClassLoader@66350f69
    +Affect(row-cnt:1) cost in 39 ms.
    +
    $ dump -d /tmp/output java.lang.String
    + HASHCODE  CLASSLOADER  LOCATION
    + null                   /tmp/output/java/lang/String.class
    +Affect(row-cnt:1) cost in 138 ms.
    +
    • Specify classLoader

    Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader.

    if you use-c, you have to manually type hashcode by -c <hashcode>.

    $ dump -c 3d4eac69 demo.*
    +

    For classloader with only one instance, it can be specified by --classLoaderClass using class name, which is more convenient to use.

    $ dump --classLoaderClass sun.misc.Launcher$AppClassLoader demo.*
    + HASHCODE  CLASSLOADER                                    LOCATION
    + 3d4eac69  +-sun.misc.Launcher$AppClassLoader@3d4eac69    /Users/admin/logs/arthas/classdump/sun.misc.Launcher$AppClassLoader-3d4eac69/demo/MathGame.class
    +             +-sun.misc.Launcher$ExtClassLoader@66350f69
    +Affect(row-cnt:1) cost in 39 ms.
    +
    • 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.

    The value of --classloaderclass 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, -c <hashcode> is dynamic.

    `,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}; diff --git a/3.x/assets/dump.html.aa1d0523.js b/3.x/assets/dump.html.aa1d0523.js new file mode 100644 index 00000000000..cc85c1e4c72 --- /dev/null +++ b/3.x/assets/dump.html.aa1d0523.js @@ -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(`

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    class-pattern\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    [c:]\u7C7B\u6240\u5C5E ClassLoader \u7684 hashcode
    [classLoaderClass:]\u6307\u5B9A\u6267\u884C\u8868\u8FBE\u5F0F\u7684 ClassLoader \u7684 class name
    [d:]\u8BBE\u7F6E\u7C7B\u6587\u4EF6\u7684\u76EE\u6807\u76EE\u5F55
    [E]\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D

    \u4F7F\u7528\u53C2\u8003

    $ dump java.lang.String
    + HASHCODE  CLASSLOADER  LOCATION
    + null                   /Users/admin/logs/arthas/classdump/java/lang/String.class
    +Affect(row-cnt:1) cost in 119 ms.
    +
    $ dump demo.*
    + HASHCODE  CLASSLOADER                                    LOCATION
    + 3d4eac69  +-sun.misc.Launcher$AppClassLoader@3d4eac69    /Users/admin/logs/arthas/classdump/sun.misc.Launcher$AppClassLoader-3d4eac69/demo/MathGame.class
    +             +-sun.misc.Launcher$ExtClassLoader@66350f69
    +Affect(row-cnt:1) cost in 39 ms.
    +
    $ dump -d /tmp/output java.lang.String
    + HASHCODE  CLASSLOADER  LOCATION
    + null                   /tmp/output/java/lang/String.class
    +Affect(row-cnt:1) cost in 138 ms.
    +
    • \u6307\u5B9A classLoader

    \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

    \u5982\u679C\u4F60\u4F7F\u7528-c\uFF0C\u4F60\u9700\u8981\u624B\u52A8\u8F93\u5165 hashcode\uFF1A-c <hashcode>

    $ dump -c 3d4eac69 demo.*
    +

    \u5BF9\u4E8E\u53EA\u6709\u552F\u4E00\u5B9E\u4F8B\u7684 ClassLoader \u53EF\u4EE5\u901A\u8FC7--classLoaderClass\u6307\u5B9A class name\uFF0C\u4F7F\u7528\u8D77\u6765\u66F4\u52A0\u65B9\u4FBF\uFF1A

    $ dump --classLoaderClass sun.misc.Launcher$AppClassLoader demo.*
    + HASHCODE  CLASSLOADER                                    LOCATION
    + 3d4eac69  +-sun.misc.Launcher$AppClassLoader@3d4eac69    /Users/admin/logs/arthas/classdump/sun.misc.Launcher$AppClassLoader-3d4eac69/demo/MathGame.class
    +             +-sun.misc.Launcher$ExtClassLoader@66350f69
    +Affect(row-cnt:1) cost in 39 ms.
    +
    • \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

    --classLoaderClass \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-c <hashcode>\u662F\u52A8\u6001\u53D8\u5316\u7684\u3002

    `,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}; diff --git a/3.x/assets/echo.html.239528da.js b/3.x/assets/echo.html.239528da.js new file mode 100644 index 00000000000..8eb0ced9db5 --- /dev/null +++ b/3.x/assets/echo.html.239528da.js @@ -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}; diff --git a/3.x/assets/echo.html.8619670c.js b/3.x/assets/echo.html.8619670c.js new file mode 100644 index 00000000000..b3de38c83ca --- /dev/null +++ b/3.x/assets/echo.html.8619670c.js @@ -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}; diff --git a/3.x/assets/echo.html.c9564b4c.js b/3.x/assets/echo.html.c9564b4c.js new file mode 100644 index 00000000000..ad71ee4a9df --- /dev/null +++ b/3.x/assets/echo.html.c9564b4c.js @@ -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(`

    TIP

    write arguments to the standard output.

    Usage

    $ echo 'hello'
    +
    `,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}; diff --git a/3.x/assets/echo.html.f45a06cc.js b/3.x/assets/echo.html.f45a06cc.js new file mode 100644 index 00000000000..22f1d37edd7 --- /dev/null +++ b/3.x/assets/echo.html.f45a06cc.js @@ -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(`

    \u63D0\u793A

    \u6253\u5370\u53C2\u6570\uFF0C\u548C linux \u91CC\u7684 echo \u547D\u4EE4\u7C7B\u4F3C\u3002

    \u4F7F\u7528\u53C2\u8003

    $ echo 'hello'
    +
    `,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}; diff --git a/3.x/assets/faq.html.18da055d.js b/3.x/assets/faq.html.18da055d.js new file mode 100644 index 00000000000..2272d81860b --- /dev/null +++ b/3.x/assets/faq.html.18da055d.js @@ -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}; diff --git a/3.x/assets/faq.html.39698152.js b/3.x/assets/faq.html.39698152.js new file mode 100644 index 00000000000..9b1f10f6fe7 --- /dev/null +++ b/3.x/assets/faq.html.39698152.js @@ -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(`

    Can commands such as trace/watch enhance the classes in jdk?

    By default, classes beginning with java. or the classes loaded by the Bootstrap ClassLoader are filtered out, but they can be turned on:

    options unsafe true
    +
    `,3),T=t("See more at "),A=t("options"),M=r(`

    TIP

    To support the jars appended by java.lang.instrument.Instrumentation#appendToBootstrapClassLoaderSearch need to enable unsafe.

    How to view the result in json format

    options json-format true
    +
    `,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(`
    watch demo.MathGame primeFactors '{params,returnObj,throwExp}' 'params.length >0 && returnObj instanceof java.util.List' -v
    +

    How to watch or trace constructor?

    watch demo.MathGame <init> '{params,returnObj,throwExp}' -v
    +

    How to watch or trace inner classes?

    In the JVM specification the name of inner classes is OuterClass$InnerClass.

    watch OuterClass$InnerClass
    +

    Enter Unicode characters

    Convert Unicode characters to \\u representation:

    ognl '@java.lang.System@out.println("Hello \\u4e2d\\u6587")'
    +

    java.lang.ClassFormatError: null, skywalking arthas compatible use

    When error log appear java.lang.ClassFormatError: null, it is usually modified by other bytecode tools that are not compatible with arthas modified bytecode.

    `,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}; diff --git a/3.x/assets/faq.html.abd28b1f.js b/3.x/assets/faq.html.abd28b1f.js new file mode 100644 index 00000000000..aaf7a058dfb --- /dev/null +++ b/3.x/assets/faq.html.abd28b1f.js @@ -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}; diff --git a/3.x/assets/faq.html.b9626740.js b/3.x/assets/faq.html.b9626740.js new file mode 100644 index 00000000000..aaff6ef9b45 --- /dev/null +++ b/3.x/assets/faq.html.b9626740.js @@ -0,0 +1,7 @@ +import{_ as d,o as h,c,a,b as t,w as n,e,d as r,r as i}from"./app.4d248835.js";const l={},_=a("h1",{id:"faq",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#faq","aria-hidden":"true"},"#"),e(" FAQ")],-1),u={class:"custom-container tip"},p=a("p",{class:"custom-container-title"},"\u63D0\u793A",-1),b=e("\u4E0D\u5728\u672C\u5217\u8868\u91CC\u7684\u95EE\u9898\uFF0C\u8BF7\u5230 issue \u91CC\u641C\u7D22\u3002 "),m={href:"https://github.com/alibaba/arthas/issues",target:"_blank",rel:"noopener noreferrer"},g=e("https://github.com/alibaba/arthas/issues"),f=a("h3",{id:"\u65E5\u5FD7\u6587\u4EF6\u5728\u54EA\u91CC",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u65E5\u5FD7\u6587\u4EF6\u5728\u54EA\u91CC","aria-hidden":"true"},"#"),e(" \u65E5\u5FD7\u6587\u4EF6\u5728\u54EA\u91CC\uFF1F")],-1),v=a("p",null,[e("\u65E5\u5FD7\u6587\u4EF6\u8DEF\u5F84\uFF1A "),a("code",null,"~/logs/arthas/arthas.log")],-1),k=a("h3",{id:"arthas-attach-\u4E4B\u540E\u5BF9\u539F\u8FDB\u7A0B\u6027\u80FD\u6709\u591A\u5927\u7684\u5F71\u54CD",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#arthas-attach-\u4E4B\u540E\u5BF9\u539F\u8FDB\u7A0B\u6027\u80FD\u6709\u591A\u5927\u7684\u5F71\u54CD","aria-hidden":"true"},"#"),e(" Arthas attach \u4E4B\u540E\u5BF9\u539F\u8FDB\u7A0B\u6027\u80FD\u6709\u591A\u5927\u7684\u5F71\u54CD")],-1),x={href:"https://github.com/alibaba/arthas/issues/44",target:"_blank",rel:"noopener noreferrer"},j=e("https://github.com/alibaba/arthas/issues/44"),w=a("h3",{id:"target-process-not-responding-or-hotspot-vm-not-loaded",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#target-process-not-responding-or-hotspot-vm-not-loaded","aria-hidden":"true"},"#"),e(" target process not responding or HotSpot VM not loaded")],-1),C=a("p",null,"com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded",-1),y=a("li",null,"\u68C0\u67E5\u5F53\u524D\u7528\u6237\u548C\u76EE\u6807 java \u8FDB\u7A0B\u662F\u5426\u4E00\u81F4\u3002\u5982\u679C\u4E0D\u4E00\u81F4\uFF0C\u5219\u5207\u6362\u5230\u540C\u4E00\u7528\u6237\u3002JVM \u53EA\u80FD attach \u540C\u6837\u7528\u6237\u4E0B\u7684 java \u8FDB\u7A0B\u3002",-1),V=a("li",null,[e("\u5C1D\u8BD5\u4F7F\u7528 "),a("code",null,"jstack -l $pid"),e("\uFF0C\u5982\u679C\u8FDB\u7A0B\u6CA1\u6709\u53CD\u5E94\uFF0C\u5219\u8BF4\u660E\u8FDB\u7A0B\u53EF\u80FD\u5047\u6B7B\uFF0C\u65E0\u6CD5\u54CD\u5E94 JVM attach \u4FE1\u53F7\u3002\u6240\u4EE5\u540C\u6837\u57FA\u4E8E attach \u673A\u5236\u7684 Arthas \u65E0\u6CD5\u5DE5\u4F5C\u3002\u5C1D\u8BD5\u4F7F\u7528"),a("code",null,"jmap"),e(" heapdump \u540E\u5206\u6790\u3002")],-1),q=e("\u5C1D\u8BD5\u6309"),A=e("quick-start"),L=e("\u91CC\u7684\u65B9\u5F0F attach math-game\u3002"),E=e("\u66F4\u591A\u60C5\u51B5\u53C2\u8003\uFF1A "),M={href:"https://github.com/alibaba/arthas/issues/347",target:"_blank",rel:"noopener noreferrer"},S=e("https://github.com/alibaba/arthas/issues/347"),B=r(`

    trace/watch \u7B49\u547D\u4EE4\u80FD\u5426\u589E\u5F3A jdk \u91CC\u7684\u7C7B\uFF1F

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B\u4F1A\u8FC7\u6EE4\u6389java.\u5F00\u5934\u7684\u7C7B\u548C\u88ABBootStrap ClassLoader\u52A0\u8F7D\u7684\u7C7B\u3002\u53EF\u4EE5\u901A\u8FC7\u53C2\u6570\u5F00\u542F\u3002

    options unsafe true
    +
    `,3),I=e("\u66F4\u591A\u53C2\u8003 "),O=e("options"),F=r(`

    \u63D0\u793A

    \u901A\u8FC7 java.lang.instrument.Instrumentation#appendToBootstrapClassLoaderSearch append \u5230Bootstrap ClassLoader\u7684 jar \u5305\u9700\u8981\u5F00\u542F unsafe\u3002

    \u600E\u4E48\u4EE5json\u683C\u5F0F\u67E5\u770B\u7ED3\u679C

    options json-format true
    +
    `,3),N=e("\u66F4\u591A\u53C2\u8003 "),H=e("options"),J=a("h3",{id:"arthas-\u80FD\u5426\u8DDF\u8E2A-native-\u51FD\u6570",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#arthas-\u80FD\u5426\u8DDF\u8E2A-native-\u51FD\u6570","aria-hidden":"true"},"#"),e(" Arthas \u80FD\u5426\u8DDF\u8E2A native \u51FD\u6570")],-1),U=a("p",null,"\u4E0D\u80FD\u3002",-1),$=a("h3",{id:"\u80FD\u4E0D\u80FD\u67E5\u770B\u5185\u5B58\u91CC\u67D0\u4E2A\u53D8\u91CF\u7684\u503C",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u80FD\u4E0D\u80FD\u67E5\u770B\u5185\u5B58\u91CC\u67D0\u4E2A\u53D8\u91CF\u7684\u503C","aria-hidden":"true"},"#"),e(" \u80FD\u4E0D\u80FD\u67E5\u770B\u5185\u5B58\u91CC\u67D0\u4E2A\u53D8\u91CF\u7684\u503C")],-1),G=e("\u53EF\u4EE5\u4F7F\u7528"),Q=a("code",null,"vmtool",-1),R=e("\u547D\u4EE4\u3002"),T=e("\u53EF\u4EE5\u7528\u4E00\u4E9B\u6280\u5DE7\uFF0C\u7528"),z=a("code",null,"tt",-1),D=e("\u547D\u4EE4\u62E6\u622A\u5230\u5BF9\u8C61\uFF0C\u6216\u8005\u4ECE\u9759\u6001\u51FD\u6570\u91CC\u53D6\u5230\u5BF9\u8C61\u3002"),K=a("h3",{id:"\u65B9\u6CD5\u540C\u540D\u8FC7\u6EE4",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u65B9\u6CD5\u540C\u540D\u8FC7\u6EE4","aria-hidden":"true"},"#"),e(" \u65B9\u6CD5\u540C\u540D\u8FC7\u6EE4")],-1),P=e("\u540C\u540D\u65B9\u6CD5\u8FC7\u6EE4\u53EF\u4EE5\u901A\u8FC7\u5339\u914D\u8868\u8FBE\u5F0F,\u53EF\u4EE5\u4F7F\u7528"),W=e("\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF"),X=e("\u4E2D\u6240\u6709\u53D8\u91CF\u4F5C\u4E3A\u5DF2\u77E5\u6761\u4EF6,\u53EF\u4EE5\u901A\u8FC7\u5224\u65AD\u53C2\u6570\u4E2A\u6570"),Y=a("code",null,"params.length ==1",-1),Z=e(", \u53C2\u6570\u7C7B\u578B"),aa=a("code",null,"params[0] instanceof java.lang.Integer",-1),ea=e("\u3001\u8FD4\u56DE\u503C\u7C7B\u578B "),ta=a("code",null,"returnObj instanceof java.util.List",-1),sa=e(" \u7B49\u7B49\u4E00\u79CD\u6216\u8005\u591A\u79CD\u7EC4\u5408\u8FDB\u884C\u8FC7\u6EE4\u3002"),oa=e("\u53EF\u4EE5\u4F7F\u7528 "),na=a("code",null,"-v",-1),ra=e(" \u67E5\u770B\u89C2\u5BDF\u5339\u914D\u8868\u8FBE\u5F0F\u7684\u6267\u884C\u7ED3\u679C "),ia={href:"https://github.com/alibaba/arthas/issues/1348",target:"_blank",rel:"noopener noreferrer"},da=e("https://github.com/alibaba/arthas/issues/1348"),ha=e("\u4F8B\u5B50"),ca=e("math-game"),la=r(`
    watch demo.MathGame primeFactors '{params,returnObj,throwExp}' 'params.length >0 && returnObj instanceof java.util.List' -v
    +

    \u600E\u4E48 watch\u3001trace \u6784\u9020\u51FD\u6570 \uFF1F

    watch demo.MathGame <init> '{params,returnObj,throwExp}' -v
    +

    \u600E\u6837 watch\u3001trace \u5185\u90E8\u7C7B\uFF1F

    \u5728 JVM \u89C4\u8303\u91CC\u5185\u90E8\u7C7B\u7684\u683C\u5F0F\u662FOuterClass$InnerClass\u3002

    watch OuterClass$InnerClass
    +

    \u8F93\u5165\u4E2D\u6587/Unicode \u5B57\u7B26

    \u628A\u4E2D\u6587/Unicode \u5B57\u7B26\u8F6C\u4E3A\\u\u8868\u793A\u65B9\u6CD5\uFF1A

    ognl '@java.lang.System@out.println("Hello \\u4e2d\\u6587")'
    +

    java.lang.ClassFormatError: null\u3001skywalking arthas \u517C\u5BB9\u4F7F\u7528

    \u5F53\u51FA\u73B0\u8FD9\u4E2A\u9519\u8BEF\u65E5\u5FD7java.lang.ClassFormatError: null,\u901A\u5E38\u60C5\u51B5\u4E0B\u90FD\u662F\u88AB\u5176\u4ED6\u5B57\u8282\u7801\u5DE5\u5177\u4FEE\u6539\u8FC7\u4E0E arthas \u4FEE\u6539\u5B57\u8282\u7801\u4E0D\u517C\u5BB9\u3002

    `,11),_a=e("\u6BD4\u5982: \u4F7F\u7528 skywalking V8.1.0 \u4EE5\u4E0B\u7248\u672C "),ua={href:"https://github.com/alibaba/arthas/issues/1141",target:"_blank",rel:"noopener noreferrer"},pa=e("\u65E0\u6CD5 trace\u3001watch \u88AB skywalking agent \u589E\u5F3A\u8FC7\u7684\u7C7B"),ba=e(", V8.1.0 \u4EE5\u4E0A\u7248\u672C\u53EF\u4EE5\u517C\u5BB9\u4F7F\u7528,\u66F4\u591A\u53C2\u8003 skywalking \u914D\u7F6E "),ma={href:"https://github.com/apache/skywalking/blob/master/docs/en/FAQ/Compatible-with-other-javaagent-bytecode-processing.md#",target:"_blank",rel:"noopener noreferrer"},ga=e("skywalking compatible with other javaagent bytecode processing"),fa=e("\u3002"),va=a("h4",{id:"class-redefinition-failed-attempted-to-change-the-schema-add-remove-fields",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#class-redefinition-failed-attempted-to-change-the-schema-add-remove-fields","aria-hidden":"true"},"#"),e(" class redefinition failed: attempted to change the schema (add/remove fields)")],-1),ka=e("\u53C2\u8003\uFF1A "),xa={href:"https://github.com/alibaba/arthas/issues/2165",target:"_blank",rel:"noopener noreferrer"},ja=e("https://github.com/alibaba/arthas/issues/2165"),wa=a("h3",{id:"arthas-\u80FD\u4E0D\u80FD\u79BB\u7EBF\u4F7F\u7528",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#arthas-\u80FD\u4E0D\u80FD\u79BB\u7EBF\u4F7F\u7528","aria-hidden":"true"},"#"),e(" Arthas \u80FD\u4E0D\u80FD\u79BB\u7EBF\u4F7F\u7528")],-1),Ca=e("\u53EF\u4EE5\u3002\u4E0B\u8F7D\u5168\u91CF\u5305\u89E3\u538B\u5373\u53EF\uFF0C\u53C2\u8003: "),ya=e("\u4E0B\u8F7D"),Va=e("\u3002"),qa=a("h3",{id:"attach-docker-k8s-\u91CC\u7684-pid-\u4E3A-1-\u7684\u8FDB\u7A0B\u5931\u8D25",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#attach-docker-k8s-\u91CC\u7684-pid-\u4E3A-1-\u7684\u8FDB\u7A0B\u5931\u8D25","aria-hidden":"true"},"#"),e(" Attach docker/k8s \u91CC\u7684 pid \u4E3A 1 \u7684\u8FDB\u7A0B\u5931\u8D25")],-1),Aa=e("\u53C2\u8003\uFF1A "),La={href:"https://github.com/alibaba/arthas/issues/362#issuecomment-448185416",target:"_blank",rel:"noopener noreferrer"},Ea=e("https://github.com/alibaba/arthas/issues/362#issuecomment-448185416"),Ma=a("h3",{id:"\u4E3A\u4EC0\u4E48\u4E0B\u8F7D\u4E86\u65B0\u7248\u672C\u7684-arthas-\u8FDE\u63A5\u7684\u5374\u662F\u65E7\u7248\u672C",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u4E3A\u4EC0\u4E48\u4E0B\u8F7D\u4E86\u65B0\u7248\u672C\u7684-arthas-\u8FDE\u63A5\u7684\u5374\u662F\u65E7\u7248\u672C","aria-hidden":"true"},"#"),e(" \u4E3A\u4EC0\u4E48\u4E0B\u8F7D\u4E86\u65B0\u7248\u672C\u7684 Arthas\uFF0C\u8FDE\u63A5\u7684\u5374\u662F\u65E7\u7248\u672C\uFF1F")],-1),Sa=a("p",null,[e("\u6BD4\u5982\u542F\u52A8\u7684 "),a("code",null,"as3.sh/arthas-boot3.jar"),e(" \u7248\u672C\u662F 3.5._ \u7684\uFF0C\u4F46\u662F\u8FDE\u63A5\u4E0A\u4E4B\u540E\uFF0C\u6253\u5370\u7684 arthas \u7248\u672C\u662F 3.4._ \u7684\u3002")],-1),Ba=a("p",null,[e("\u53EF\u80FD\u662F\u4E4B\u524D\u4F7F\u7528\u65E7\u7248\u672C\u7684 arthas \u8BCA\u65AD\u8FC7\u76EE\u6807\u8FDB\u7A0B\u3002\u53EF\u4EE5\u5148\u6267\u884C"),a("code",null,"stop"),e("\u505C\u6B62\u6389\u65E7\u7248\u672C\u7684 arthas\uFF0C\u518D\u91CD\u65B0\u4F7F\u7528\u65B0\u7248\u672C attach\u3002")],-1);function Ia(Oa,Fa){const s=i("ExternalLinkIcon"),o=i("RouterLink");return h(),c("div",null,[_,a("div",u,[p,a("p",null,[b,a("a",m,[g,t(s)])])]),f,v,k,a("p",null,[a("a",x,[j,t(s)])]),w,C,a("ol",null,[y,V,a("li",null,[q,t(o,{to:"/doc/quick-start.html"},{default:n(()=>[A]),_:1}),L]),a("li",null,[E,a("a",M,[S,t(s)])])]),B,a("p",null,[I,t(o,{to:"/doc/options.html"},{default:n(()=>[O]),_:1})]),F,a("p",null,[N,t(o,{to:"/doc/options.html"},{default:n(()=>[H]),_:1})]),J,U,$,a("ol",null,[a("li",null,[G,t(o,{to:"/doc/vmtool.html"},{default:n(()=>[Q]),_:1}),R]),a("li",null,[T,t(o,{to:"/doc/tt.html"},{default:n(()=>[z]),_:1}),D])]),K,a("p",null,[P,t(o,{to:"/doc/advice-class.html"},{default:n(()=>[W]),_:1}),X,Y,Z,aa,ea,ta,sa]),a("p",null,[oa,na,ra,a("a",ia,[da,t(s)])]),a("p",null,[ha,t(o,{to:"/doc/quick-start.html"},{default:n(()=>[ca]),_:1})]),la,a("p",null,[_a,a("a",ua,[pa,t(s)]),ba,a("a",ma,[ga,t(s)]),fa]),va,a("p",null,[ka,a("a",xa,[ja,t(s)])]),wa,a("p",null,[Ca,t(o,{to:"/doc/download.html"},{default:n(()=>[ya]),_:1}),Va]),qa,a("p",null,[Aa,a("a",La,[Ea,t(s)])]),Ma,Sa,Ba])}const Ha=d(l,[["render",Ia],["__file","faq.html.vue"]]);export{Ha as default}; diff --git a/3.x/assets/getstatic.html.194e97dd.js b/3.x/assets/getstatic.html.194e97dd.js new file mode 100644 index 00000000000..9ee3a14d17c --- /dev/null +++ b/3.x/assets/getstatic.html.194e97dd.js @@ -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(`

    \u901A\u8FC7 getstatic \u547D\u4EE4\u53EF\u4EE5\u65B9\u4FBF\u7684\u67E5\u770B\u7C7B\u7684\u9759\u6001\u5C5E\u6027\u3002\u4F7F\u7528\u65B9\u6CD5\u4E3Agetstatic class_name field_name

    $ getstatic demo.MathGame random
    +field: random
    +@Random[
    +    serialVersionUID=@Long[3905348978240129619],
    +    seed=@AtomicLong[120955813885284],
    +    multiplier=@Long[25214903917],
    +    addend=@Long[11],
    +    mask=@Long[281474976710655],
    +    DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +    BadBound=@String[bound must be positive],
    +    BadRange=@String[bound must be greater than origin],
    +    BadSize=@String[size must be non-negative],
    +    seedUniquifier=@AtomicLong[-3282039941672302964],
    +    nextNextGaussian=@Double[0.0],
    +    haveNextNextGaussian=@Boolean[false],
    +    serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +    unsafe=@Unsafe[sun.misc.Unsafe@2eaa1027],
    +    seedOffset=@Long[24],
    +]
    +
    • \u6307\u5B9A classLoader

    \u6CE8\u610F hashcode \u662F\u53D8\u5316\u7684\uFF0C\u9700\u8981\u5148\u67E5\u770B\u5F53\u524D\u7684 ClassLoader \u4FE1\u606F\uFF0C\u4F7F\u7528sc -d <ClassName>\u63D0\u53D6\u5BF9\u5E94 ClassLoader \u7684 hashcode\u3002

    \u5982\u679C\u4F60\u4F7F\u7528-c\uFF0C\u4F60\u9700\u8981\u624B\u52A8\u8F93\u5165 hashcode\uFF1A-c <hashcode>

    $ getstatic -c 3d4eac69 demo.MathGame random
    +

    \u5BF9\u4E8E\u53EA\u6709\u552F\u4E00\u5B9E\u4F8B\u7684 ClassLoader \u53EF\u4EE5\u901A\u8FC7--classLoaderClass\u6307\u5B9A class name\uFF0C\u4F7F\u7528\u8D77\u6765\u66F4\u52A0\u65B9\u4FBF\uFF1A

    getstatic --classLoaderClass sun.misc.Launcher$AppClassLoader demo.MathGame random

    • \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

    --classLoaderClass \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-c <hashcode>\u662F\u52A8\u6001\u53D8\u5316\u7684\u3002

    \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

    `,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(`

    \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

    $ 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],
    +]
    +
    `,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}; diff --git a/3.x/assets/getstatic.html.2229049b.js b/3.x/assets/getstatic.html.2229049b.js new file mode 100644 index 00000000000..56f9b2a97cd --- /dev/null +++ b/3.x/assets/getstatic.html.2229049b.js @@ -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}; diff --git a/3.x/assets/getstatic.html.d81e76f2.js b/3.x/assets/getstatic.html.d81e76f2.js new file mode 100644 index 00000000000..b4ecfbc2b53 --- /dev/null +++ b/3.x/assets/getstatic.html.d81e76f2.js @@ -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(`

    Usage

    • It is recommended to use the [OGNL] (ognl.md) command, which will be more flexible.

    Check the static fields of classes conveniently, the usage is getstatic class_name field_name.

    $ getstatic demo.MathGame random
    +field: random
    +@Random[
    +    serialVersionUID=@Long[3905348978240129619],
    +    seed=@AtomicLong[120955813885284],
    +    multiplier=@Long[25214903917],
    +    addend=@Long[11],
    +    mask=@Long[281474976710655],
    +    DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +    BadBound=@String[bound must be positive],
    +    BadRange=@String[bound must be greater than origin],
    +    BadSize=@String[size must be non-negative],
    +    seedUniquifier=@AtomicLong[-3282039941672302964],
    +    nextNextGaussian=@Double[0.0],
    +    haveNextNextGaussian=@Boolean[false],
    +    serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +    unsafe=@Unsafe[sun.misc.Unsafe@2eaa1027],
    +    seedOffset=@Long[24],
    +]
    +
    • Specify classLoader

    Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader using sc -d <ClassName>.

    if you use-c, you have to manually type hashcode by -c <hashcode>.

    $ getstatic -c 3d4eac69 demo.MathGame random
    +

    For classloader with only one instance, it can be specified by --classLoaderClass using class name, which is more convenient to use.

    getstatic --classLoaderClass demo.MathGame random

    • 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.

    The value of --classloaderclass 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, -c <hashcode> is dynamic.

    `,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(`

    E.g. suppose n is a Map and its key is a Enum, then you can achieve this if you want to pick the key with a specific Enum value:

    $ 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],
    +]
    +
    `,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}; diff --git a/3.x/assets/getstatic.html.e01bd744.js b/3.x/assets/getstatic.html.e01bd744.js new file mode 100644 index 00000000000..67af66b15ff --- /dev/null +++ b/3.x/assets/getstatic.html.e01bd744.js @@ -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}; diff --git a/3.x/assets/grep.html.1c2ee274.js b/3.x/assets/grep.html.1c2ee274.js new file mode 100644 index 00000000000..dac9e080608 --- /dev/null +++ b/3.x/assets/grep.html.1c2ee274.js @@ -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(`

    TIP

    Similar to the traditional grep command.

    Usage

     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
    +
    `,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}; diff --git a/3.x/assets/grep.html.4aa91236.js b/3.x/assets/grep.html.4aa91236.js new file mode 100644 index 00000000000..a6ef052eac5 --- /dev/null +++ b/3.x/assets/grep.html.4aa91236.js @@ -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}; diff --git a/3.x/assets/grep.html.8e0aee31.js b/3.x/assets/grep.html.8e0aee31.js new file mode 100644 index 00000000000..2f02fd64613 --- /dev/null +++ b/3.x/assets/grep.html.8e0aee31.js @@ -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}; diff --git a/3.x/assets/grep.html.c753d37b.js b/3.x/assets/grep.html.c753d37b.js new file mode 100644 index 00000000000..b7c7152114e --- /dev/null +++ b/3.x/assets/grep.html.c753d37b.js @@ -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(`

    \u63D0\u793A

    \u7C7B\u4F3C\u4F20\u7EDF\u7684grep\u547D\u4EE4\u3002

    \u4F7F\u7528\u53C2\u8003

     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
    +
    `,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}; diff --git a/3.x/assets/groovy.html.21de60b6.js b/3.x/assets/groovy.html.21de60b6.js new file mode 100644 index 00000000000..d4fe26d3183 --- /dev/null +++ b/3.x/assets/groovy.html.21de60b6.js @@ -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}; diff --git a/3.x/assets/groovy.html.292661c1.js b/3.x/assets/groovy.html.292661c1.js new file mode 100644 index 00000000000..d38f92014b7 --- /dev/null +++ b/3.x/assets/groovy.html.292661c1.js @@ -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(`

    groovy

    \u63D0\u793A

    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

    \u9650\u5236\u5185\u5BB9

    1. \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
    2. \u53EA\u5141\u8BB8\u5728\u65B9\u6CD5\u7684 before/success/exception/finish \u56DB\u4E2A\u73AF\u8282\u8FDB\u884C\u76D1\u542C\u3002

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    class-pattern\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    method-pattern\u65B9\u6CD5\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    script-filepathgroovy \u811A\u672C\u7684\u7EDD\u5BF9\u8DEF\u5F84
    [S]\u5339\u914D\u6240\u6709\u7684\u5B50\u7C7B
    [E]\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D

    \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 /tmp/test.groovy\uFF0C\u4E0D\u5EFA\u8BAE\u8F93\u5165\u76F8\u5BF9\u8DEF\u5F84\uFF0C\u6BD4\u5982 ./test.groovy

    \u4E94\u4E2A\u5173\u952E\u51FD\u6570\u58F0\u660E

    /**
    + * \u589E\u5F3A\u811A\u672C\u76D1\u542C\u5668
    + */
    +interface ScriptListener {
    +
    +    /**
    +     * \u811A\u672C\u521B\u5EFA
    +     *
    +     * @param output \u8F93\u51FA\u5668
    +     */
    +    void create(Output output);
    +
    +    /**
    +     * \u811A\u672C\u9500\u6BC1
    +     *
    +     * @param output \u8F93\u51FA\u5668
    +     */
    +    void destroy(Output output);
    +
    +    /**
    +     * \u65B9\u6CD5\u6267\u884C\u524D
    +     *
    +     * @param output \u8F93\u51FA\u5668
    +     * @param advice \u901A\u77E5\u70B9
    +     */
    +    void before(Output output, Advice advice);
    +
    +    /**
    +     * \u65B9\u6CD5\u6B63\u5E38\u8FD4\u56DE
    +     *
    +     * @param output \u8F93\u51FA\u5668
    +     * @param advice \u901A\u77E5\u70B9
    +     */
    +    void afterReturning(Output output, Advice advice);
    +
    +    /**
    +     * \u65B9\u6CD5\u5F02\u5E38\u8FD4\u56DE
    +     *
    +     * @param output \u8F93\u51FA\u5668
    +     * @param advice \u901A\u77E5\u70B9
    +     */
    +    void afterThrowing(Output output, Advice advice);
    +
    +}
    +

    \u53C2\u6570 Advice \u8BF4\u660E

    `,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(`

    \u53C2\u6570 Output \u8BF4\u660E

    Output \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

    /**
    + * \u8F93\u51FA\u5668
    + */
    +interface Output {
    +
    +    /**
    +     * \u8F93\u51FA\u5B57\u7B26\u4E32(\u4E0D\u6362\u884C)
    +     *
    +     * @param string \u5F85\u8F93\u51FA\u5B57\u7B26\u4E32
    +     * @return this
    +     */
    +    Output print(String string);
    +
    +    /**
    +     * \u8F93\u51FA\u5B57\u7B26\u4E32(\u6362\u884C)
    +     *
    +     * @param string \u5F85\u8F93\u51FA\u5B57\u7B26\u4E32
    +     * @return this
    +     */
    +    Output println(String string);
    +
    +    /**
    +     * \u7ED3\u675F\u5F53\u524D\u811A\u672C
    +     *
    +     * @return this
    +     */
    +    Output finish();
    +
    +}
    +

    \u4E00\u4E2A\u8F93\u51FA\u65E5\u5FD7\u7684 groovy \u811A\u672C\u793A\u4F8B

    import com.taobao.arthas.core.command.ScriptSupportCommand
    +import com.taobao.arthas.core.util.Advice
    +
    +import static java.lang.String.format
    +
    +/**
    + * \u8F93\u51FA\u65B9\u6CD5\u65E5\u5FD7
    + */
    +public class Logger implements ScriptSupportCommand.ScriptListener {
    +
    +    @Override
    +    void create(ScriptSupportCommand.Output output) {
    +        output.println("script create.");
    +    }
    +
    +    @Override
    +    void destroy(ScriptSupportCommand.Output output) {
    +        output.println("script destroy.");
    +    }
    +
    +    @Override
    +    void before(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("before:class=%s;method=%s;paramslen=%d;%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName(),
    +                advice.getParams().length, advice.getParams()))
    +    }
    +
    +    @Override
    +    void afterReturning(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("returning:class=%s;method=%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName()))
    +    }
    +
    +    @Override
    +    void afterThrowing(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("throwing:class=%s;method=%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName()))
    +    }
    +}
    +

    \u4F7F\u7528\u793A\u4F8B\uFF1A

    $ 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;
    +
    `,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}; diff --git a/3.x/assets/groovy.html.2ef01485.js b/3.x/assets/groovy.html.2ef01485.js new file mode 100644 index 00000000000..25cb14f0fdc --- /dev/null +++ b/3.x/assets/groovy.html.2ef01485.js @@ -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(`

    groovy

    TIP

    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.

    Limitations

    1. Prohibit from alternating the original logic. Like watch command, The major purpose of scripting is monitoring and observing.
    2. Only allow to monitor at the stages of before/success/exception/finish on one method.

    Parameters

    ParameterExplanation
    class-patternclass name pattern
    method-patternmethod name pattern
    script-filepaththe absolute path of the groovy script
    [S]match all sub classes
    [E]enable regex match, the default is wildcard match

    Note: the third parameter script-filepath must be the absolute path of the groovy script, for example /tmp/test.groovy. It is not recommended to use relative path, e.g. ./test.groovy.

    Explanation on the important callbacks

    /**
    + * Listeners for script to enhance the class
    + */
    +interface ScriptListener {
    +
    +    /**
    +     * When the script is created
    +     *
    +     * @param output Output
    +     */
    +    void create(Output output);
    +
    +    /**
    +     * When the script is destroyed
    +     *
    +     * @param output Output
    +     */
    +    void destroy(Output output);
    +
    +    /**
    +     * Before the method executes
    +     *
    +     * @param output Output
    +     * @param advice Advice
    +     */
    +    void before(Output output, Advice advice);
    +
    +    /**
    +     * After the method returns
    +     *
    +     * @param output Output
    +     * @param advice Advice
    +     */
    +    void afterReturning(Output output, Advice advice);
    +
    +    /**
    +     * After the method throws exceptions
    +     *
    +     * @param output Output
    +     * @param advice Advice
    +     */
    +    void afterThrowing(Output output, Advice advice);
    +
    +}
    +

    Advice parameter

    `,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(`

    Output parameter

    There are three methods in Output, used for outputting the corresponding text.

    /**
    + * Output
    + */
    +interface Output {
    +
    +    /**
    +     * Output text without line break
    +     *
    +     * @param string Text to output
    +     * @return this
    +     */
    +    Output print(String string);
    +
    +    /**
    +     * Output text with line break
    +     *
    +     * @param string Text to output
    +     * @return this
    +     */
    +    Output println(String string);
    +
    +    /**
    +     * Finish outputting from the script
    +     *
    +     * @return this
    +     */
    +    Output finish();
    +
    +}
    +

    A groovy sample script to output logs

    import com.taobao.arthas.core.command.ScriptSupportCommand
    +import com.taobao.arthas.core.util.Advice
    +
    +import static java.lang.String.format
    +
    +/**
    + * Output method logs
    + */
    +public class Logger implements ScriptSupportCommand.ScriptListener {
    +
    +    @Override
    +    void create(ScriptSupportCommand.Output output) {
    +        output.println("script create.");
    +    }
    +
    +    @Override
    +    void destroy(ScriptSupportCommand.Output output) {
    +        output.println("script destroy.");
    +    }
    +
    +    @Override
    +    void before(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("before:class=%s;method=%s;paramslen=%d;%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName(),
    +                advice.getParams().length, advice.getParams()))
    +    }
    +
    +    @Override
    +    void afterReturning(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("returning:class=%s;method=%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName()))
    +    }
    +
    +    @Override
    +    void afterThrowing(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("throwing:class=%s;method=%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName()))
    +    }
    +}
    +

    Run the script like this:

    $ 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;
    +
    `,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}; diff --git a/3.x/assets/groovy.html.92f5e844.js b/3.x/assets/groovy.html.92f5e844.js new file mode 100644 index 00000000000..694d420eb21 --- /dev/null +++ b/3.x/assets/groovy.html.92f5e844.js @@ -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}; diff --git a/3.x/assets/heapdump.html.19f5486f.js b/3.x/assets/heapdump.html.19f5486f.js new file mode 100644 index 00000000000..2e4d6cc95ba --- /dev/null +++ b/3.x/assets/heapdump.html.19f5486f.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-c0b1d216","path":"/en/doc/heapdump.html","title":"heapdump","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"Dump to file","slug":"dump-to-file","link":"#dump-to-file","children":[]},{"level":3,"title":"Dump only live objects","slug":"dump-only-live-objects","link":"#dump-only-live-objects","children":[]},{"level":3,"title":"Dump to tmp file","slug":"dump-to-tmp-file","link":"#dump-to-tmp-file","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1}]},"filePathRelative":"en/doc/heapdump.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/heapdump.html.2d73c547.js b/3.x/assets/heapdump.html.2d73c547.js new file mode 100644 index 00000000000..5193f1f5aea --- /dev/null +++ b/3.x/assets/heapdump.html.2d73c547.js @@ -0,0 +1,10 @@ +import{_ as s,o as t,c as d,a,b as p,e,d as i,r as c}from"./app.4d248835.js";const r={},o=a("h1",{id:"heapdump",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#heapdump","aria-hidden":"true"},"#"),e(" heapdump")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-heapdump",target:"_blank",rel:"noopener noreferrer"},l=a("code",null,"heapdump",-1),h=e("\u5728\u7EBF\u6559\u7A0B"),m=i(`

    \u63D0\u793A

    dump java heap, \u7C7B\u4F3C jmap \u547D\u4EE4\u7684 heap dump \u529F\u80FD\u3002

    \u4F7F\u7528\u53C2\u8003

    dump \u5230\u6307\u5B9A\u6587\u4EF6

    [arthas@58205]$ heapdump arthas-output/dump.hprof
    +Dumping heap to arthas-output/dump.hprof ...
    +Heap dump file created
    +

    \u63D0\u793A

    \u751F\u6210\u6587\u4EF6\u5728arthas-output\u76EE\u5F55\uFF0C\u53EF\u4EE5\u901A\u8FC7\u6D4F\u89C8\u5668\u4E0B\u8F7D\uFF1A http://localhost:8563/arthas-output/

    \u53EA dump live \u5BF9\u8C61

    [arthas@58205]$ heapdump --live /tmp/dump.hprof
    +Dumping heap to /tmp/dump.hprof ...
    +Heap dump file created
    +

    dump \u5230\u4E34\u65F6\u6587\u4EF6

    [arthas@58205]$ heapdump
    +Dumping heap to /var/folders/my/wy7c9w9j5732xbkcyt1mb4g40000gp/T/heapdump2019-09-03-16-385121018449645518991.hprof...
    +Heap dump file created
    +
    `,9);function v(b,f){const n=c("ExternalLinkIcon");return t(),d("div",null,[o,a("p",null,[a("a",u,[l,h,p(n)])]),m])}const g=s(r,[["render",v],["__file","heapdump.html.vue"]]);export{g as default}; diff --git a/3.x/assets/heapdump.html.3fe356b2.js b/3.x/assets/heapdump.html.3fe356b2.js new file mode 100644 index 00000000000..04dfe286aee --- /dev/null +++ b/3.x/assets/heapdump.html.3fe356b2.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-07868089","path":"/doc/heapdump.html","title":"heapdump","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[{"level":3,"title":"dump \u5230\u6307\u5B9A\u6587\u4EF6","slug":"dump-\u5230\u6307\u5B9A\u6587\u4EF6","link":"#dump-\u5230\u6307\u5B9A\u6587\u4EF6","children":[]},{"level":3,"title":"\u53EA dump live \u5BF9\u8C61","slug":"\u53EA-dump-live-\u5BF9\u8C61","link":"#\u53EA-dump-live-\u5BF9\u8C61","children":[]}]},{"level":2,"title":"dump \u5230\u4E34\u65F6\u6587\u4EF6","slug":"dump-\u5230\u4E34\u65F6\u6587\u4EF6","link":"#dump-\u5230\u4E34\u65F6\u6587\u4EF6","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"cao","email":"caojinsheng123@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/heapdump.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/heapdump.html.51c1271f.js b/3.x/assets/heapdump.html.51c1271f.js new file mode 100644 index 00000000000..7627b32a4e4 --- /dev/null +++ b/3.x/assets/heapdump.html.51c1271f.js @@ -0,0 +1,10 @@ +import{_ as s,o as t,c as i,a,b as d,e,d as p,r as o}from"./app.4d248835.js";const c={},r=a("h1",{id:"heapdump",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#heapdump","aria-hidden":"true"},"#"),e(" heapdump")],-1),l={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-heapdump",target:"_blank",rel:"noopener noreferrer"},u=a("code",null,"heapdump",-1),h=e(" online tutorial"),m=p(`

    TIP

    dump java heap in hprof binary format, like jmap.

    Usage

    Dump to file

    [arthas@58205]$ heapdump arthas-output/dump.hprof
    +Dumping heap to arthas-output/dump.hprof ...
    +Heap dump file created
    +

    TIP

    The generated file is located in the arthas-output directory and can be downloaded through the browser at http://localhost:8563/arthas-output/

    Dump only live objects

    [arthas@58205]$ heapdump --live /tmp/dump.hprof
    +Dumping heap to /tmp/dump.hprof ...
    +Heap dump file created
    +

    Dump to tmp file

    [arthas@58205]$ heapdump
    +Dumping heap to /var/folders/my/wy7c9w9j5732xbkcyt1mb4g40000gp/T/heapdump2019-09-03-16-385121018449645518991.hprof...
    +Heap dump file created
    +
    `,9);function v(b,f){const n=o("ExternalLinkIcon");return t(),i("div",null,[r,a("p",null,[a("a",l,[u,h,d(n)])]),m])}const _=s(c,[["render",v],["__file","heapdump.html.vue"]]);export{_ as default}; diff --git a/3.x/assets/help.html.3d260e86.js b/3.x/assets/help.html.3d260e86.js new file mode 100644 index 00000000000..45432b11172 --- /dev/null +++ b/3.x/assets/help.html.3d260e86.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-7a8b0c34","path":"/en/doc/help.html","title":"help","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":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/help.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/help.html.5a1d36ec.js b/3.x/assets/help.html.5a1d36ec.js new file mode 100644 index 00000000000..57c2fce2a52 --- /dev/null +++ b/3.x/assets/help.html.5a1d36ec.js @@ -0,0 +1,66 @@ +import{_ as e,o as i,c as n,d as s}from"./app.4d248835.js";const a={},l=s(`

    help

    \u67E5\u770B\u547D\u4EE4\u5E2E\u52A9\u4FE1\u606F\uFF0C\u53EF\u4EE5\u67E5\u770B\u5F53\u524D arthas \u7248\u672C\u652F\u6301\u7684\u6307\u4EE4\uFF0C\u6216\u8005\u67E5\u770B\u5177\u4F53\u6307\u4EE4\u7684\u4F7F\u7528\u8BF4\u660E\u3002

    \u63D0\u793A

    [help \u6307\u4EE4]\u7684\u7B49\u540C\u4E8E[\u6307\u4EE4 -help]\uFF0C\u90FD\u662F\u67E5\u770B\u5177\u4F53\u6307\u4EE4\u7684\u4F7F\u7528\u8BF4\u660E\u3002

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    \u4E0D\u63A5\u53C2\u6570\u67E5\u8BE2\u5F53\u524D arthas \u7248\u672C\u652F\u6301\u7684\u6307\u4EE4\u4EE5\u53CA\u6307\u4EE4\u63CF\u8FF0
    [name:]\u67E5\u8BE2\u5177\u4F53\u6307\u4EE4\u7684\u4F7F\u7528\u8BF4\u660E

    \u4F7F\u7528\u53C2\u8003

    $ help
    + NAME         DESCRIPTION
    + help         Display Arthas Help
    + auth         Authenticates the current session
    + keymap       Display all the available keymap for the specified connection.
    + sc           Search all the classes loaded by JVM
    + sm           Search the method of classes loaded by JVM
    + classloader  Show classloader info
    + jad          Decompile class
    + getstatic    Show the static field of a class
    + monitor      Monitor method execution statistics, e.g. total/success/failure count, average rt, fail rate, etc.
    + stack        Display the stack trace for the specified class and method
    + thread       Display thread info, thread stack
    + trace        Trace the execution time of specified method invocation.
    + watch        Display the input/output parameter, return object, and thrown exception of specified method invocation
    + tt           Time Tunnel
    + jvm          Display the target JVM information
    + perfcounter  Display the perf counter information.
    + ognl         Execute ognl expression.
    + mc           Memory compiler, compiles java files into bytecode and class files in memory.
    + redefine     Redefine classes. @see Instrumentation#redefineClasses(ClassDefinition...)
    + retransform  Retransform classes. @see Instrumentation#retransformClasses(Class...)
    + dashboard    Overview of target jvm's thread, memory, gc, vm, tomcat info.
    + dump         Dump class byte array from JVM
    + heapdump     Heap dump
    + options      View and change various Arthas options
    + cls          Clear the screen
    + reset        Reset all the enhanced classes
    + version      Display Arthas version
    + session      Display current session information
    + sysprop      Display, and change the system properties.
    + sysenv       Display the system env.
    + vmoption     Display, and update the vm diagnostic options.
    + logger       Print logger info, and update the logger level
    + history      Display command history
    + cat          Concatenate and print files
    + base64       Encode and decode using Base64 representation
    + echo         write arguments to the standard output
    + pwd          Return working directory name
    + mbean        Display the mbean information
    + grep         grep command for pipes.
    + tee          tee command for pipes.
    + profiler     Async Profiler. https://github.com/jvm-profiling-tools/async-profiler
    + stop         Stop/Shutdown Arthas server and exit the console.
    +
    +
    +
     $ help dashboard
    +  USAGE:
    +   dashboard [-h] [-i <value>] [-n <value>]
    +
    + SUMMARY:
    +   Overview of target jvm's thread, memory, gc, vm, tomcat info.
    +
    + EXAMPLES:
    +   dashboard
    +   dashboard -n 10
    +   dashboard -i 2000
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/dashboard
    +
    + OPTIONS:
    + -h, --help                              this help
    + -i, --interval <value>                  The interval (in ms) between two executions, default is 5000 ms.
    + -n, --number-of-execution <value>       The number of times this command will be executed.
    +
    `,8),t=[l];function d(r,c){return i(),n("div",null,t)}const o=e(a,[["render",d],["__file","help.html.vue"]]);export{o as default}; diff --git a/3.x/assets/help.html.67ffadca.js b/3.x/assets/help.html.67ffadca.js new file mode 100644 index 00000000000..5704764ac34 --- /dev/null +++ b/3.x/assets/help.html.67ffadca.js @@ -0,0 +1,66 @@ +import{_ as n,o as s,c as e,d as a}from"./app.4d248835.js";const i={},t=a(`

    help

    show help message, the command can show all the commands that current Arthas server supports,or you can use the command to show the detail usage of another command.

    TIP

    [help command] equals [command -help],both is to show the detail usage of one command.

    Options

    NameSpecification
    show all the commands that current Arthas server supports
    [name:]show the detail usage of one command

    Usage

    $ help
    + NAME         DESCRIPTION
    + help         Display Arthas Help
    + auth         Authenticates the current session
    + keymap       Display all the available keymap for the specified connection.
    + sc           Search all the classes loaded by JVM
    + sm           Search the method of classes loaded by JVM
    + classloader  Show classloader info
    + jad          Decompile class
    + getstatic    Show the static field of a class
    + monitor      Monitor method execution statistics, e.g. total/success/failure count, average rt, fail rate, etc.
    + stack        Display the stack trace for the specified class and method
    + thread       Display thread info, thread stack
    + trace        Trace the execution time of specified method invocation.
    + watch        Display the input/output parameter, return object, and thrown exception of specified method invocation
    + tt           Time Tunnel
    + jvm          Display the target JVM information
    + perfcounter  Display the perf counter information.
    + ognl         Execute ognl expression.
    + mc           Memory compiler, compiles java files into bytecode and class files in memory.
    + redefine     Redefine classes. @see Instrumentation#redefineClasses(ClassDefinition...)
    + retransform  Retransform classes. @see Instrumentation#retransformClasses(Class...)
    + dashboard    Overview of target jvm's thread, memory, gc, vm, tomcat info.
    + dump         Dump class byte array from JVM
    + heapdump     Heap dump
    + options      View and change various Arthas options
    + cls          Clear the screen
    + reset        Reset all the enhanced classes
    + version      Display Arthas version
    + session      Display current session information
    + sysprop      Display, and change the system properties.
    + sysenv       Display the system env.
    + vmoption     Display, and update the vm diagnostic options.
    + logger       Print logger info, and update the logger level
    + history      Display command history
    + cat          Concatenate and print files
    + base64       Encode and decode using Base64 representation
    + echo         write arguments to the standard output
    + pwd          Return working directory name
    + mbean        Display the mbean information
    + grep         grep command for pipes.
    + tee          tee command for pipes.
    + profiler     Async Profiler. https://github.com/jvm-profiling-tools/async-profiler
    + stop         Stop/Shutdown Arthas server and exit the console.
    +
    +
    +
     $ help dashboard
    +  USAGE:
    +   dashboard [-h] [-i <value>] [-n <value>]
    +
    + SUMMARY:
    +   Overview of target jvm's thread, memory, gc, vm, tomcat info.
    +
    + EXAMPLES:
    +   dashboard
    +   dashboard -n 10
    +   dashboard -i 2000
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/dashboard
    +
    + OPTIONS:
    + -h, --help                              this help
    + -i, --interval <value>                  The interval (in ms) between two executions, default is 5000 ms.
    + -n, --number-of-execution <value>       The number of times this command will be executed.
    +
    `,8),l=[t];function o(c,r){return s(),e("div",null,l)}const p=n(i,[["render",o],["__file","help.html.vue"]]);export{p as default}; diff --git a/3.x/assets/help.html.7ba26453.js b/3.x/assets/help.html.7ba26453.js new file mode 100644 index 00000000000..cf3058ef098 --- /dev/null +++ b/3.x/assets/help.html.7ba26453.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-e3b34070","path":"/doc/help.html","title":"help","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":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/help.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/history.html.006cedb1.js b/3.x/assets/history.html.006cedb1.js new file mode 100644 index 00000000000..00ed9b65f57 --- /dev/null +++ b/3.x/assets/history.html.006cedb1.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-4402cd49","path":"/en/doc/history.html","title":"history","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":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/history.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/history.html.3f90631d.js b/3.x/assets/history.html.3f90631d.js new file mode 100644 index 00000000000..04b2b2e0d9b --- /dev/null +++ b/3.x/assets/history.html.3f90631d.js @@ -0,0 +1,10 @@ +import{_ as e,o as t,c as i,d as s}from"./app.4d248835.js";const a={},n=s(`

    history

    \u6253\u5370\u547D\u4EE4\u5386\u53F2\u3002

    \u63D0\u793A

    \u5386\u53F2\u6307\u4EE4\u4F1A\u901A\u8FC7\u4E00\u4E2A\u540D\u53EB history \u7684\u6587\u4EF6\u6301\u4E45\u5316\uFF0C\u6240\u4EE5 history \u6307\u4EE4\u53EF\u4EE5\u67E5\u770B\u5F53\u524D arthas \u670D\u52A1\u5668\u7684\u6240\u6709\u5386\u53F2\u547D\u4EE4\uFF0C\u800C\u4E0D\u4EC5\u53EA\u662F\u5F53\u524D\u6B21\u4F1A\u8BDD\u4F7F\u7528\u8FC7\u7684\u547D\u4EE4\u3002

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    [c:]\u6E05\u7A7A\u5386\u53F2\u6307\u4EE4
    [n:]\u663E\u793A\u6700\u8FD1\u6267\u884C\u7684 n \u6761\u6307\u4EE4

    \u4F7F\u7528\u53C2\u8003

    #\u67E5\u770B\u6700\u8FD1\u6267\u884C\u76843\u6761\u6307\u4EE4
    +$ history 3
    +  269  thread
    +  270  cls
    +  271  history 3
    +
     #\u6E05\u7A7A\u6307\u4EE4
    + $ history -c
    + $ history 3
    +  1  history 3
    +
    `,8),d=[n];function r(l,c){return t(),i("div",null,d)}const o=e(a,[["render",r],["__file","history.html.vue"]]);export{o as default}; diff --git a/3.x/assets/history.html.5c8da1d4.js b/3.x/assets/history.html.5c8da1d4.js new file mode 100644 index 00000000000..e77468a7e5d --- /dev/null +++ b/3.x/assets/history.html.5c8da1d4.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-26f43d96","path":"/doc/history.html","title":"history","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":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/history.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/history.html.72971f6a.js b/3.x/assets/history.html.72971f6a.js new file mode 100644 index 00000000000..9736c9e40d4 --- /dev/null +++ b/3.x/assets/history.html.72971f6a.js @@ -0,0 +1,10 @@ +import{_ as s,o as e,c as n,d as a}from"./app.4d248835.js";const t={},i=a(`

    history

    view command history.

    TIP

    history of commands will persisted in a file named history, so the history command can show all the history commands of current Arthas server ,but not only history in current session.

    Options

    NameSpecification
    [c:]clear all the history commands
    [n:]view the nearest 5 commands

    Usage

    #view the nearest 3 commands
    +$ history 3
    +  269  thread
    +  270  cls
    +  271  history 3
    +
     #clear all the history commands
    + $ history -c
    + $ history 3
    +  1  history 3
    +
    `,8),r=[i];function l(o,c){return e(),n("div",null,r)}const h=s(t,[["render",l],["__file","history.html.vue"]]);export{h as default}; diff --git a/3.x/assets/http-api.html.1bd8ba57.js b/3.x/assets/http-api.html.1bd8ba57.js new file mode 100644 index 00000000000..0db1b4664db --- /dev/null +++ b/3.x/assets/http-api.html.1bd8ba57.js @@ -0,0 +1,344 @@ +import{_ as i}from"./arthas-web-ui.89f4fc6d.js";import{_ as c,o as l,c as u,a as s,b as a,w as r,e as n,d as t,r as o}from"./app.4d248835.js";const d={},m=s("h1",{id:"http-api",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#http-api","aria-hidden":"true"},"#"),n(" Http API")],-1),v={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=case-http-api",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"Http API",-1),b=n(" online tutorial"),h=t(`

    Overview

    Http API provides a RESTful-like interactive interface, and both requests and responses data in JSON format. Compared with Telnet/WebConsole's output unstructured text data, Http API can provide structured data and support more complex interactive functions, such as a series of diagnostic operations in specific application scenarios.

    Access address

    The Http API address is: http://ip:port/api, the request parameters must be submitted using POST. Such as POST http://127.0.0.1:8563/api.

    Note: The telnet port 3658 has compatibility issues with the Chrome browser. It is recommended to use the http port 8563 to access the http api.

    Request data format

    {
    +  "action": "exec",
    +  "requestId": "req112",
    +  "sessionId": "94766d3c-8b39-42d3-8596-98aee3ccbefb",
    +  "consumerId": "955dbd1325334a84972b0f3ac19de4f7_2",
    +  "command": "version",
    +  "execTimeout": "10000"
    +}
    +

    Request data format description:

    • action : The requested action/behavior, please refer to "Request Actions" for optional values.
    • requestId : Optional request ID, generated by the client.
    • sessionId : Arthas session ID, one-time command does not need to set the session ID.
    • consumerId : Arthas consumer ID, used for multi-person sharing sessions.
    • command : Arthas command line
    • execTimeout : Timeout for executing commands (ms), default value is 30000.

    Note: Different actions use different parameters. Set the parameters according to the specific action.

    Request Actions

    Currently supported request actions are as follows:

    • exec : The command is executed synchronously, and the command results is returned after the command execution end or interrupted.
    • async_exec : The command is executed asynchronously, and the scheduling result of the command is returned immediately. The command execution result is obtained through pull_results action.
    • interrupt_job : To interrupt the foreground command of the session, similar to the function of Telnet Ctrl + c.
    • pull_results : Get the result of the command executed asynchronously, and execute it repeatedly in http long-polling mode.
    • init_session : Create new session.
    • join_session : Join the session, used to support multiple people sharing the same Arthas session.
    • close_session : Close the session.

    Response status

    The state attribute in the response indicates the request processing state, and its value is as follows:

    • SCHEDULED: When the command is executed asynchronously, it means that the job has been created, and may not be executed yet or is being executed;
    • SUCCEEDED: The request is processed successfully (completed status);
    • FAILED: Request processing failed (completed status), usually accompanied by a message explaining the reason;
    • REFUSED: The request is rejected (completed status), usually accompanied by a message explaining the reason;

    One-time command

    Similar to executing batch commands, the one-time commands are executed synchronously. No need to create a session, no need to set the sessionId option.

    {
    +  "action": "exec",
    +  "command": "<Arthas command line>"
    +}
    +

    For example, get the Arthas version number:

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"exec",
    +  "command":"version"
    +}
    +'
    +

    The response is as follows:

    {
    +  "state": "SUCCEEDED",
    +  "sessionId": "ee3bc004-4586-43de-bac0-b69d6db7a869",
    +  "body": {
    +    "results": [
    +      {
    +        "type": "version",
    +        "version": "3.3.7",
    +        "jobId": 5
    +      },
    +      {
    +        "jobId": 5,
    +        "statusCode": 0,
    +        "type": "status"
    +      }
    +    ],
    +    "timeExpired": false,
    +    "command": "version",
    +    "jobStatus": "TERMINATED",
    +    "jobId": 5
    +  }
    +}
    +

    Response data format description:

    • state: Request processing status, refer to the description of "Response Status".
    • sessionId : Arthas session ID, one-time command to automatically create and destroy temporary sessions.
    • body.jobId: The job ID of the command, all output results of the same job are the same jobId.
    • body.jobStatus: The job status of the command.
    • body.timeExpired: Whether the job execution timed out.
    • body/results: Command execution results.

    Command result format description

    [
    +  {
    +    "type": "version",
    +    "version": "3.3.7",
    +    "jobId": 5
    +  },
    +  {
    +    "jobId": 5,
    +    "statusCode": 0,
    +    "type": "status"
    +  }
    +]
    +
    • type : The command result type, except for the special ones such as status, the others remain the same as the Arthas command name. Please refer to the section "Special command results".
    • jobId : The job ID of the command.
    • Other fields are the data of each different command.

    Note: You can also use a one-time command to execute continuous output commands such as watch/trace, but you can't interrupt the command execution, and there may be hang up for a long time. Please refer to the example in the "Make watch command output a map object" section.

    Please try to deal with it in the following way:

    • Set a reasonable execTimeout to forcibly interrupt the command execution after the timeout period is reached to avoid a long hang.
    • Use the -n parameter to specify a smaller number of executions.
    • Ensure the methods of the command matched can be successfully hit and the condition-express is written correctly. If the watch/trace does not hit, even if -n 1 is specified, it will hang and wait until the execution timeout.

    Session interaction

    Users create and manage Arthas sessions, which are suitable for complex interactive processes. The access process is as follows:

    • Create a session
    • Join the session (optional)
    • Pull command results
    • Execute a series of commands
    • Interrupt command execution
    • Close the session

    Create session

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"init_session"
    +}
    +'
    +

    Response result:

    {
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId": "5ae4e5fbab8b4e529ac404f260d4e2d1_1",
    +  "state": "SUCCEEDED"
    +}
    +

    The new session ID is: b09f1353-202c-407b-af24-701b744f971e, and consumer ID is: 5ae4e5fbab8b4e529ac404f260d4e2d1_1.

    Join session

    Specify the session ID to join, and the server will assign a new consumer ID. Multiple consumers can receive the same command results of target session. This interface is used to support multiple people sharing the same session or refreshing the page to retrieve the session history.

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"join_session",
    +  "sessionId" : "b09f1353-202c-407b-af24-701b744f971e"
    +}
    +'
    +

    Response result:

    {
    +  "consumerId": "8f7f6ad7bc2d4cb5aa57a530927a95cc_2",
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "state": "SUCCEEDED"
    +}
    +

    The new consumer ID is 8f7f6ad7bc2d4cb5aa57a530927a95cc_2 .

    Pull command results

    The action of pulling the command result message is pull_results. Please use the Http long-polling method to periodically pull the result messages. The consumer's timeout period is 5 minutes. After the timeout, you need to call join_session to allocate a new consumer.

    Each consumer is allocated a cache queue separately, and the pull order does not affect the content received by the consumer.

    The request parameters require session ID and consumer ID:

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"pull_results",
    +  "sessionId" : "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId" : "8f7f6ad7bc2d4cb5aa57a530927a95cc_2"
    +}
    +'
    +

    Use Bash scripts to regularly pull results messages:

    while true; do curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"pull_results",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +  "consumerId" : "8ecb9cb7c7804d5d92e258b23d5245cc_1"
    +}
    +' | json_pp; sleep 2; done
    +

    Note: The json_pp tool formats the output content as pretty json.

    The response content is as follows:

    {
    +  "body": {
    +    "results": [
    +      {
    +        "inputStatus": "DISABLED",
    +        "jobId": 0,
    +        "type": "input_status"
    +      },
    +      {
    +        "type": "message",
    +        "jobId": 0,
    +        "message": "Welcome to arthas!"
    +      },
    +      {
    +        "tutorials": "https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html",
    +        "time": "2020-08-06 15:56:43",
    +        "type": "welcome",
    +        "jobId": 0,
    +        "pid": "7909",
    +        "wiki": "https://arthas.aliyun.com/3.x/doc",
    +        "version": "3.3.7"
    +      },
    +      {
    +        "inputStatus": "ALLOW_INPUT",
    +        "type": "input_status",
    +        "jobId": 0
    +      }
    +    ]
    +  },
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId": "8f7f6ad7bc2d4cb5aa57a530927a95cc_2",
    +  "state": "SUCCEEDED"
    +}
    +

    Execute commands asynchronously

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"async_exec",
    +  "command":"watch demo.MathGame primeFactors \\"{params, returnObj, throwExp}\\" ",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +

    Response of async_exec:

    {
    +  "sessionId": "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +  "state": "SCHEDULED",
    +  "body": {
    +    "jobStatus": "READY",
    +    "jobId": 3,
    +    "command": "watch demo.MathGame primeFactors \\"{params, returnObj, throwExp}\\" "
    +  }
    +}
    +
    • state : The status of SCHEDULED means that the command has been parsed and generated the job, but the execution has not started.
    • body.jobId : The job id of command execution, filter the command results output in pull_results according to this job ID.
    • body.jobStatus : The job status READY means that execution has not started.

    The shell output of the script that continuously pulls the result message:

    {
    +   "body" : {
    +      "results" : [
    +         {
    +            "type" : "command",
    +            "jobId" : 3,
    +            "state" : "SCHEDULED",
    +            "command" : "watch demo.MathGame primeFactors \\"{params, returnObj, throwExp}\\" "
    +         },
    +         {
    +            "inputStatus" : "ALLOW_INTERRUPT",
    +            "jobId" : 0,
    +            "type" : "input_status"
    +         },
    +         {
    +            "success" : true,
    +            "jobId" : 3,
    +            "effect" : {
    +               "listenerId" : 3,
    +               "cost" : 24,
    +               "classCount" : 1,
    +               "methodCount" : 1
    +            },
    +            "type" : "enhancer"
    +         },
    +         {
    +            "sizeLimit" : 10485760,
    +            "expand" : 1,
    +            "jobId" : 3,
    +            "type" : "watch",
    +            "cost" : 0.071499,
    +            "ts" : 1596703453237,
    +            "value" : [
    +               [
    +                  -170365
    +               ],
    +               null,
    +               {
    +                  "stackTrace" : [
    +                     {
    +                        "className" : "demo.MathGame",
    +                        "classLoaderName" : "app",
    +                        "methodName" : "primeFactors",
    +                        "nativeMethod" : false,
    +                        "lineNumber" : 46,
    +                        "fileName" : "MathGame.java"
    +                     },
    +                     ...
    +                  ],
    +                  "localizedMessage" : "number is: -170365, need >= 2",
    +                  "@type" : "java.lang.IllegalArgumentException",
    +                  "message" : "number is: -170365, need >= 2"
    +               }
    +            ]
    +         },
    +         {
    +            "type" : "watch",
    +            "cost" : 0.033375,
    +            "jobId" : 3,
    +            "ts" : 1596703454241,
    +            "value" : [
    +               [
    +                  1
    +               ],
    +               [
    +                  2,
    +                  2,
    +                  2,
    +                  2,
    +                  13,
    +                  491
    +               ],
    +               null
    +            ],
    +            "sizeLimit" : 10485760,
    +            "expand" : 1
    +         }
    +      ]
    +   },
    +   "consumerId" : "8ecb9cb7c7804d5d92e258b23d5245cc_1",
    +   "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +   "state" : "SUCCEEDED"
    +}
    +

    The value of the watch command result is the value of watch-experss, and the above command is {params, returnObj, throwExp}, so the value of the watch result is an array of length 3, and each element corresponds to the expression in the corresponding order.

    Please refer to the section "Make watch command output a map object".

    Interrupt command execution

    Interrupt the running foreground job of the session:

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"interrupt_job",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +
    {
    +  "state": "SUCCEEDED",
    +  "body": {
    +    "jobStatus": "TERMINATED",
    +    "jobId": 3
    +  }
    +}
    +

    Close session

    Specify the session ID to close the session.

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"close_session",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +
    {
    +  "state": "SUCCEEDED"
    +}
    +

    Authentication

    `,73),q=n("Reference: "),g=n("auth"),y=s("h2",{id:"web-ui",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web-ui","aria-hidden":"true"},"#"),n(" Web UI")],-1),f=s("p",null,[s("img",{src:i,alt:"",title:"arthas web ui"})],-1),x=n("A Web UI based on Http API, visit url : "),j={href:"http://127.0.0.1:8563/ui",target:"_blank",rel:"noopener noreferrer"},_=n("http://127.0.0.1:8563/ui"),I=n(" ."),w=t(`

    Completed functions:

    • Create a session
    • Copy and open the url to join the session, share the session with multiple people
    • Continuously pull session command result messages
    • Refresh the web page or join the session to pull command messages history
    • Control input or interrupt command status

    Pending function:

    • Improve the readability of command result messages
    • Support automatic completion of input commands and command templates
    • Provide command help
    • Support personal profile settings

    Special command results

    status

    {
    +  "jobId": 5,
    +  "statusCode": 0,
    +  "type": "status"
    +}
    +

    type is status to indicate the command execution status:

    After each command is executed, there is a unique status result. If the statusCode is 0, it means the execution is successful, and the statusCode is a non-zero value that means the execution failed, similar to the process exit code.

    When the command execution fails, an error message is generally provided, such as:

    {
    +  "jobId": 3,
    +  "message": "The argument 'class-pattern' is required",
    +  "statusCode": -10,
    +  "type": "status"
    +}
    +

    input_status

    {
    +  "inputStatus": "ALLOW_INPUT",
    +  "type": "input_status",
    +  "jobId": 0
    +}
    +

    type is input_status to indicate input status:

    It is used to control user input during UI interaction, and a change message will be sent before and after each command is executed.

    Possible values \u200B\u200Bof inputStatus:

    • ALLOW_INPUT : Allow users to enter commands, which means that the session has no foreground command being executed and can accept new command.
    • ALLOW_INTERRUPT : Allow the user to interrupt the command execution, indicating that a command is currently being executed, and the user can send interrupt_job to interrupt the execution.
    • DISABLED : In the disabled state, commands cannot be entered or interrupted.

    command

    {
    +  "type": "command",
    +  "jobId": 3,
    +  "state": "SCHEDULED",
    +  "command": "watch demo.MathGame primeFactors \\"{params, returnObj, throwExp}\\" "
    +}
    +

    type is command to indicate the input command data:

    It is used for the interactive UI to echo the commands entered by the user. The pulled session command message history will contain messages of type command, which can be processed in order.

    enhancer

    {
    +  "success": true,
    +  "jobId": 3,
    +  "effect": {
    +    "listenerId": 3,
    +    "cost": 24,
    +    "classCount": 1,
    +    "methodCount": 1
    +  },
    +  "type": "enhancer"
    +}
    +

    type is enhancer to indicate the result of class enhancement:

    Commands such as trace/watch/jad/tt need to enhance the class and will receive this enhancer result. It may happen that the result of enhancer is successful, but there is no hit method. The client can prompt the user according to the result of enhancer.

    Cases

    Get classpath of Java application

    Get system properties of the Java application through Http api and extract the value of java.class.path.

    json_data=$(curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"exec",
    +  "command":"sysprop"
    +}')
    +
    • Extract value with sed:
    class_path=$(echo $json_data | tr -d '\\n' | sed 's/.*"java.class.path":"\\([^"]*\\).*/\\1/')
    +echo "classpath: $class_path"
    +
    • Extract value with json_pp/awk:
    class_path=$(echo $json_data | tr -d '\\n' | json_pp | grep java.class.path | awk -F'"' '{ print $4 }')
    +echo "classpath: $class_path"
    +

    Output:

    classpath: demo-arthas-spring-boot.jar
    +

    NOTE:

    • echo $json_data | tr -d '\\n' : Delete line breaks (the value of line.separator) to avoid affecting the processing of sed/json_pp commands.
    • awk -F'"' '{ print $4 }' : Use double quote as delimiter

    Make watch command output a map object

    `,40),E=n("The result value of "),T=s("code",null,"watch",-1),S=n(" is generated by calculating the "),C=s("code",null,"watch-express",-1),D=n(" ognl expression. You can change the ognl expression to generate the desired value, please refer to "),A={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},O=n("OGNL document"),P=n("."),L=t(`

    TIP

    Maps can also be created using a special syntax.

    #{ "foo" : "foo value", "bar" : "bar value" }

    This creates a Map initialized with mappings for "foo" and "bar".

    The following command generates values \u200B\u200Bin map format:

    watch *MathGame prime* '#{ "params" : params, "returnObj" : returnObj, "throwExp": throwExp}' -x 2 -n 5
    +

    Execute the above command in Telnet shell/WebConsole, the output result:

    ts=2020-08-06 16:57:20; [cost=0.241735ms] result=@LinkedHashMap[
    +    @String[params]:@Object[][
    +        @Integer[1],
    +    ],
    +    @String[returnObj]:@ArrayList[
    +        @Integer[2],
    +        @Integer[241],
    +        @Integer[379],
    +    ],
    +    @String[throwExp]:null,
    +]
    +

    Execute the above command with Http api, pay attention to escaping the JSON double quotes:

    curl -Ss -XPOST http://localhost:8563/api -d @- << EOF
    +{
    +  "action":"exec",
    +  "execTimeout": 30000,
    +  "command":"watch *MathGame prime* '#{ \\"params\\" : params, \\"returnObj\\" : returnObj, \\"throwExp\\": throwExp}' -n 3 "
    +}
    +EOF
    +

    Http api execution result:

    {
    +    "body": {
    +         ...
    +        "results": [
    +            ...
    +            {
    +                ...
    +                "type": "watch",
    +                "value": {
    +                    "params": [
    +                        1
    +                    ],
    +                    "returnObj": [
    +                        2,
    +                        5,
    +                        17,
    +                        23,
    +                        23
    +                    ]
    +                }
    +            },
    +            {
    +                ...
    +                "type": "watch",
    +                "value": {
    +                    "params": [
    +                        -98278
    +                    ],
    +                    "throwExp": {
    +                        "@type": "java.lang.IllegalArgumentException",
    +                        "localizedMessage": "number is: -98278, need >= 2",
    +                        "message": "number is: -98278, need >= 2",
    +                        "stackTrace": [
    +                            ...
    +                        ]
    +                    }
    +                }
    +            },
    +            ...
    +}
    +

    You can see that the value of the watch result becomes a map object, and the program can read value through a key .

    `,10);function U(R,N){const e=o("ExternalLinkIcon"),p=o("RouterLink");return l(),u("div",null,[m,s("p",null,[s("a",v,[k,b,a(e)])]),h,s("ul",null,[s("li",null,[q,a(p,{to:"/en/doc/auth.html"},{default:r(()=>[g]),_:1})])]),y,f,s("p",null,[x,s("a",j,[_,a(e)]),I]),w,s("p",null,[E,T,S,C,D,s("a",A,[O,a(e)]),P]),L])}const W=c(d,[["render",U],["__file","http-api.html.vue"]]);export{W as default}; diff --git a/3.x/assets/http-api.html.5c8cd6bc.js b/3.x/assets/http-api.html.5c8cd6bc.js new file mode 100644 index 00000000000..85cfa5e589c --- /dev/null +++ b/3.x/assets/http-api.html.5c8cd6bc.js @@ -0,0 +1,344 @@ +import{_ as l}from"./arthas-web-ui.89f4fc6d.js";import{_ as i,o as c,c as u,a as s,b as a,w as r,e as n,d as t,r as o}from"./app.4d248835.js";const d={},v=s("h1",{id:"http-api",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#http-api","aria-hidden":"true"},"#"),n(" Http API")],-1),k={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=case-http-api",target:"_blank",rel:"noopener noreferrer"},b=s("code",null,"Http API",-1),m=n("\u5728\u7EBF\u6559\u7A0B"),q=t(`

    \u6982\u89C8

    Http API \u63D0\u4F9B\u7C7B\u4F3C RESTful \u7684\u4EA4\u4E92\u63A5\u53E3\uFF0C\u8BF7\u6C42\u548C\u54CD\u5E94\u5747\u4E3A JSON \u683C\u5F0F\u7684\u6570\u636E\u3002\u76F8\u5BF9\u4E8E Telnet/WebConsole \u7684\u8F93\u51FA\u975E\u7ED3\u6784\u5316\u6587\u672C\u6570\u636E\uFF0CHttp API \u53EF\u4EE5\u63D0\u4F9B\u7ED3\u6784\u5316\u7684\u6570\u636E\uFF0C\u652F\u6301\u66F4\u590D\u6742\u7684\u4EA4\u4E92\u529F\u80FD\uFF0C\u6BD4\u5982\u7279\u5B9A\u5E94\u7528\u573A\u666F\u7684\u4E00\u7CFB\u5217\u8BCA\u65AD\u64CD\u4F5C\u3002

    \u8BBF\u95EE\u5730\u5740

    Http API \u63A5\u53E3\u5730\u5740\u4E3A\uFF1Ahttp://ip:port/api\uFF0C\u5FC5\u987B\u4F7F\u7528 POST \u65B9\u5F0F\u63D0\u4EA4\u8BF7\u6C42\u53C2\u6570\u3002\u5982 POST http://127.0.0.1:8563/api \u3002

    \u6CE8\u610F\uFF1Atelnet \u670D\u52A1\u7684 3658 \u7AEF\u53E3\u4E0E Chrome \u6D4F\u89C8\u5668\u6709\u517C\u5BB9\u6027\u95EE\u9898\uFF0C\u5EFA\u8BAE\u4F7F\u7528 http \u7AEF\u53E3 8563 \u6765\u8BBF\u95EE http \u63A5\u53E3\u3002

    \u8BF7\u6C42\u6570\u636E\u683C\u5F0F

    {
    +  "action": "exec",
    +  "requestId": "req112",
    +  "sessionId": "94766d3c-8b39-42d3-8596-98aee3ccbefb",
    +  "consumerId": "955dbd1325334a84972b0f3ac19de4f7_2",
    +  "command": "version",
    +  "execTimeout": "10000"
    +}
    +

    \u8BF7\u6C42\u6570\u636E\u683C\u5F0F\u8BF4\u660E\uFF1A

    • action : \u8BF7\u6C42\u7684\u52A8\u4F5C/\u884C\u4E3A\uFF0C\u53EF\u9009\u503C\u8BF7\u53C2\u8003"\u8BF7\u6C42 Action"\u5C0F\u8282\u3002
    • requestId : \u53EF\u9009\u8BF7\u6C42 ID\uFF0C\u7531\u5BA2\u6237\u7AEF\u751F\u6210\u3002
    • sessionId : Arthas \u4F1A\u8BDD ID\uFF0C\u4E00\u6B21\u6027\u547D\u4EE4\u4E0D\u9700\u8981\u8BBE\u7F6E\u4F1A\u8BDD ID\u3002
    • consumerId : Arthas \u6D88\u8D39\u8005 ID\uFF0C\u7528\u4E8E\u591A\u4EBA\u5171\u4EAB\u4F1A\u8BDD\u3002
    • command : Arthas command line \u3002
    • execTimeout : \u547D\u4EE4\u540C\u6B65\u6267\u884C\u7684\u8D85\u65F6\u65F6\u95F4(ms)\uFF0C\u9ED8\u8BA4\u4E3A 30000\u3002

    \u6CE8\u610F: \u4E0D\u540C\u7684 action \u4F7F\u7528\u5230\u53C2\u6570\u4E0D\u540C\uFF0C\u6839\u636E\u5177\u4F53\u7684 action \u6765\u8BBE\u7F6E\u53C2\u6570\u3002

    \u8BF7\u6C42 Action

    \u76EE\u524D\u652F\u6301\u7684\u8BF7\u6C42 Action \u5982\u4E0B\uFF1A

    • exec : \u540C\u6B65\u6267\u884C\u547D\u4EE4\uFF0C\u547D\u4EE4\u6B63\u5E38\u7ED3\u675F\u6216\u8005\u8D85\u65F6\u540E\u4E2D\u65AD\u547D\u4EE4\u6267\u884C\u540E\u8FD4\u56DE\u547D\u4EE4\u7684\u6267\u884C\u7ED3\u679C\u3002
    • async_exec : \u5F02\u6B65\u6267\u884C\u547D\u4EE4\uFF0C\u7ACB\u5373\u8FD4\u56DE\u547D\u4EE4\u7684\u8C03\u5EA6\u7ED3\u679C\uFF0C\u547D\u4EE4\u6267\u884C\u7ED3\u679C\u901A\u8FC7pull_results\u83B7\u53D6\u3002
    • interrupt_job : \u4E2D\u65AD\u4F1A\u8BDD\u5F53\u524D\u7684\u547D\u4EE4\uFF0C\u7C7B\u4F3C Telnet Ctrl + c\u7684\u529F\u80FD\u3002
    • pull_results : \u83B7\u53D6\u5F02\u6B65\u6267\u884C\u7684\u547D\u4EE4\u7684\u7ED3\u679C\uFF0C\u4EE5 http \u957F\u8F6E\u8BE2\uFF08long-polling\uFF09\u65B9\u5F0F\u91CD\u590D\u6267\u884C
    • init_session : \u521B\u5EFA\u4F1A\u8BDD
    • join_session : \u52A0\u5165\u4F1A\u8BDD\uFF0C\u7528\u4E8E\u652F\u6301\u591A\u4EBA\u5171\u4EAB\u540C\u4E00\u4E2A Arthas \u4F1A\u8BDD
    • close_session : \u5173\u95ED\u4F1A\u8BDD

    \u54CD\u5E94\u72B6\u6001

    \u54CD\u5E94\u4E2D\u7684 state \u5C5E\u6027\u8868\u793A\u8BF7\u6C42\u5904\u7406\u72B6\u6001\uFF0C\u53D6\u503C\u5982\u4E0B\uFF1A

    • SCHEDULED\uFF1A\u5F02\u6B65\u6267\u884C\u547D\u4EE4\u65F6\u8868\u793A\u5DF2\u7ECF\u521B\u5EFA job \u5E76\u5DF2\u63D0\u4EA4\u5230\u547D\u4EE4\u6267\u884C\u961F\u5217\uFF0C\u547D\u4EE4\u53EF\u80FD\u8FD8\u6CA1\u5F00\u59CB\u6267\u884C\u6216\u8005\u6267\u884C\u4E2D\uFF1B
    • SUCCEEDED\uFF1A\u8BF7\u6C42\u5904\u7406\u6210\u529F\uFF08\u5B8C\u6210\u72B6\u6001\uFF09\uFF1B
    • FAILED\uFF1A\u8BF7\u6C42\u5904\u7406\u5931\u8D25\uFF08\u5B8C\u6210\u72B6\u6001\uFF09\uFF0C\u901A\u5E38\u9644\u5E26 message \u8BF4\u660E\u539F\u56E0\uFF1B
    • REFUSED\uFF1A\u8BF7\u6C42\u88AB\u62D2\u7EDD\uFF08\u5B8C\u6210\u72B6\u6001\uFF09\uFF0C\u901A\u5E38\u9644\u5E26 message \u8BF4\u660E\u539F\u56E0\uFF1B

    \u4E00\u6B21\u6027\u547D\u4EE4

    \u4E0E\u6267\u884C\u6279\u5904\u7406\u547D\u4EE4\u7C7B\u4F3C\uFF0C\u4E00\u6B21\u6027\u547D\u4EE4\u4EE5\u540C\u6B65\u65B9\u5F0F\u6267\u884C\u3002\u4E0D\u9700\u8981\u521B\u5EFA\u4F1A\u8BDD\uFF0C\u4E0D\u9700\u8981\u8BBE\u7F6EsessionId\u9009\u9879\u3002

    {
    +  "action": "exec",
    +  "command": "<Arthas command line>"
    +}
    +

    \u6BD4\u5982\u83B7\u53D6 Arthas \u7248\u672C\u53F7\uFF1A

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"exec",
    +  "command":"version"
    +}
    +'
    +

    \u54CD\u5E94\u5185\u5BB9\u5982\u4E0B\uFF1A

    {
    +  "state": "SUCCEEDED",
    +  "sessionId": "ee3bc004-4586-43de-bac0-b69d6db7a869",
    +  "body": {
    +    "results": [
    +      {
    +        "type": "version",
    +        "version": "3.3.7",
    +        "jobId": 5
    +      },
    +      {
    +        "jobId": 5,
    +        "statusCode": 0,
    +        "type": "status"
    +      }
    +    ],
    +    "timeExpired": false,
    +    "command": "version",
    +    "jobStatus": "TERMINATED",
    +    "jobId": 5
    +  }
    +}
    +

    \u54CD\u5E94\u6570\u636E\u89E3\u6790\uFF1A

    • state: \u8BF7\u6C42\u5904\u7406\u72B6\u6001\uFF0C\u53C2\u8003\u201C\u63A5\u53E3\u54CD\u5E94\u72B6\u6001\u201D\u8BF4\u660E
    • sessionId : Arthas \u4F1A\u8BDD ID\uFF0C\u4E00\u6B21\u6027\u547D\u4EE4\u81EA\u52A8\u521B\u5EFA\u53CA\u9500\u6BC1\u4E34\u65F6\u4F1A\u8BDD
    • body.jobId: \u547D\u4EE4\u7684\u4EFB\u52A1 ID\uFF0C\u540C\u4E00\u4EFB\u52A1\u8F93\u51FA\u7684\u6240\u6709 Result \u90FD\u662F\u76F8\u540C\u7684 jobId
    • body.jobStatus: \u4EFB\u52A1\u72B6\u6001\uFF0C\u540C\u6B65\u6267\u884C\u6B63\u5E38\u7ED3\u675F\u4E3ATERMINATED
    • body.timeExpired: \u4EFB\u52A1\u6267\u884C\u662F\u5426\u8D85\u65F6
    • body/results: \u547D\u4EE4\u6267\u884C\u7684\u7ED3\u679C\u5217\u8868

    \u547D\u4EE4\u7ED3\u679C\u683C\u5F0F\u8BF4\u660E

    [
    +  {
    +    "type": "version",
    +    "version": "3.3.7",
    +    "jobId": 5
    +  },
    +  {
    +    "jobId": 5,
    +    "statusCode": 0,
    +    "type": "status"
    +  }
    +]
    +
    • type : \u547D\u4EE4\u7ED3\u679C\u7C7B\u578B\uFF0C\u9664\u4E86status\u7B49\u7279\u6B8A\u7684\u51E0\u4E2A\u5916\uFF0C\u5176\u5B83\u7684\u4FDD\u6301\u4E0E Arthas \u547D\u4EE4\u540D\u79F0\u4E00\u81F4\u3002\u8BF7\u53C2\u8003"\u7279\u6B8A\u547D\u4EE4\u7ED3\u679C"\u5C0F\u8282\u3002
    • jobId : \u5904\u7406\u547D\u4EE4\u7684\u4EFB\u52A1 ID\u3002
    • \u5176\u5B83\u5B57\u6BB5\u4E3A\u6BCF\u4E2A\u4E0D\u540C\u547D\u4EE4\u7684\u6570\u636E\u3002

    \u6CE8\u610F\uFF1A\u4E5F\u53EF\u4EE5\u4F7F\u7528\u4E00\u6B21\u6027\u547D\u4EE4\u7684\u65B9\u5F0F\u6267\u884C watch/trace \u7B49\u8FDE\u7EED\u8F93\u51FA\u7684\u547D\u4EE4\uFF0C\u4F46\u4E0D\u80FD\u4E2D\u65AD\u547D\u4EE4\u6267\u884C\uFF0C\u53EF\u80FD\u51FA\u73B0\u957F\u65F6\u95F4\u6CA1\u6709\u7ED3\u675F\u7684\u95EE\u9898\u3002\u8BF7\u53C2\u8003"watch \u547D\u4EE4\u8F93\u51FA map \u5BF9\u8C61"\u5C0F\u8282\u7684\u793A\u4F8B\u3002

    \u8BF7\u5C3D\u91CF\u6309\u7167\u4EE5\u4E0B\u65B9\u5F0F\u5904\u7406\uFF1A

    • \u8BBE\u7F6E\u5408\u7406\u7684execTimeout\uFF0C\u5230\u8FBE\u8D85\u65F6\u65F6\u95F4\u540E\u5F3A\u5236\u4E2D\u65AD\u547D\u4EE4\u6267\u884C\uFF0C\u907F\u514D\u957F\u65F6\u95F4\u6302\u8D77\u3002
    • \u901A\u8FC7-n\u53C2\u6570\u6307\u5B9A\u8F83\u5C11\u7684\u6267\u884C\u6B21\u6570\u3002
    • \u4FDD\u8BC1\u547D\u4EE4\u5339\u914D\u7684\u65B9\u6CD5\u53EF\u4EE5\u6210\u529F\u547D\u4E2D\u548C condition-express \u7F16\u5199\u6B63\u786E\uFF0C\u5982\u679C watch/trace \u6CA1\u6709\u547D\u4E2D\u5C31\u7B97\u6307\u5B9A-n 1\u4E5F\u4F1A\u6302\u8D77\u7B49\u5F85\u5230\u6267\u884C\u8D85\u65F6\u3002

    \u4F1A\u8BDD\u4EA4\u4E92

    \u7531\u7528\u6237\u521B\u5EFA\u53CA\u7BA1\u7406 Arthas \u4F1A\u8BDD\uFF0C\u9002\u7528\u4E8E\u590D\u6742\u7684\u4EA4\u4E92\u8FC7\u7A0B\u3002\u8BBF\u95EE\u6D41\u7A0B\u5982\u4E0B\uFF1A

    • \u521B\u5EFA\u4F1A\u8BDD
    • \u52A0\u5165\u4F1A\u8BDD(\u53EF\u9009\uFF09
    • \u62C9\u53D6\u547D\u4EE4\u7ED3\u679C
    • \u6267\u884C\u4E00\u7CFB\u5217\u547D\u4EE4
    • \u4E2D\u65AD\u547D\u4EE4\u6267\u884C
    • \u5173\u95ED\u4F1A\u8BDD

    \u521B\u5EFA\u4F1A\u8BDD

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"init_session"
    +}
    +'
    +

    \u54CD\u5E94\u7ED3\u679C\uFF1A

    {
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId": "5ae4e5fbab8b4e529ac404f260d4e2d1_1",
    +  "state": "SUCCEEDED"
    +}
    +

    \u5F53\u524D\u4F1A\u8BDD ID \u4E3A\uFF1A b09f1353-202c-407b-af24-701b744f971e\uFF0C \u5F53\u524D\u6D88\u8D39\u8005 ID \u4E3A\uFF1A5ae4e5fbab8b4e529ac404f260d4e2d1_1 \u3002

    \u52A0\u5165\u4F1A\u8BDD

    \u6307\u5B9A\u8981\u52A0\u5165\u7684\u4F1A\u8BDD ID\uFF0C\u670D\u52A1\u7AEF\u5C06\u5206\u914D\u4E00\u4E2A\u65B0\u7684\u6D88\u8D39\u8005 ID\u3002\u591A\u4E2A\u6D88\u8D39\u8005\u53EF\u4EE5\u63A5\u6536\u5230\u540C\u4E00\u4E2A\u4F1A\u8BDD\u7684\u547D\u4EE4\u7ED3\u679C\u3002\u672C\u63A5\u53E3\u7528\u4E8E\u652F\u6301\u591A\u4EBA\u5171\u4EAB\u540C\u4E00\u4E2A\u4F1A\u8BDD\u6216\u5237\u65B0\u9875\u9762\u540E\u91CD\u65B0\u62C9\u53D6\u4F1A\u8BDD\u5386\u53F2\u8BB0\u5F55\u3002

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"join_session",
    +  "sessionId" : "b09f1353-202c-407b-af24-701b744f971e"
    +}
    +'
    +

    \u54CD\u5E94\u7ED3\u679C\uFF1A

    {
    +  "consumerId": "8f7f6ad7bc2d4cb5aa57a530927a95cc_2",
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "state": "SUCCEEDED"
    +}
    +

    \u65B0\u7684\u6D88\u8D39\u8005 ID \u4E3A8f7f6ad7bc2d4cb5aa57a530927a95cc_2 \u3002

    \u62C9\u53D6\u547D\u4EE4\u7ED3\u679C

    \u62C9\u53D6\u547D\u4EE4\u7ED3\u679C\u6D88\u606F\u7684 action \u4E3Apull_results\u3002\u8BF7\u4F7F\u7528 Http long-polling \u65B9\u5F0F\uFF0C\u5B9A\u65F6\u5FAA\u73AF\u62C9\u53D6\u7ED3\u679C\u6D88\u606F\u3002 \u6D88\u8D39\u8005\u7684\u8D85\u65F6\u65F6\u95F4\u4E3A 5 \u5206\u949F\uFF0C\u8D85\u65F6\u540E\u9700\u8981\u8C03\u7528join_session\u5206\u914D\u65B0\u7684\u6D88\u8D39\u8005\u3002\u6BCF\u4E2A\u6D88\u8D39\u8005\u5355\u72EC\u5206\u914D\u4E00\u4E2A\u7F13\u5B58\u961F\u5217\uFF0C\u6309\u987A\u5E8F\u62C9\u53D6\u547D\u4EE4\u7ED3\u679C\uFF0C\u4E0D\u4F1A\u5F71\u54CD\u5230\u5176\u5B83\u6D88\u8D39\u8005\u3002

    \u8BF7\u6C42\u53C2\u6570\u9700\u8981\u6307\u5B9A\u4F1A\u8BDD ID \u53CA\u6D88\u8D39\u8005 ID:

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"pull_results",
    +  "sessionId" : "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId" : "8f7f6ad7bc2d4cb5aa57a530927a95cc_2"
    +}
    +'
    +

    \u7528 Bash \u811A\u672C\u5B9A\u65F6\u62C9\u53D6\u7ED3\u679C\u6D88\u606F:

    while true; do curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"pull_results",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +  "consumerId" : "8ecb9cb7c7804d5d92e258b23d5245cc_1"
    +}
    +' | json_pp; sleep 2; done
    +

    \u6CE8\uFF1A json_pp \u5DE5\u5177\u5C06\u8F93\u51FA\u5185\u5BB9\u683C\u5F0F\u5316\u4E3A pretty json\u3002

    \u54CD\u5E94\u5185\u5BB9\u5982\u4E0B\uFF1A

    {
    +  "body": {
    +    "results": [
    +      {
    +        "inputStatus": "DISABLED",
    +        "jobId": 0,
    +        "type": "input_status"
    +      },
    +      {
    +        "type": "message",
    +        "jobId": 0,
    +        "message": "Welcome to arthas!"
    +      },
    +      {
    +        "tutorials": "https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html",
    +        "time": "2020-08-06 15:56:43",
    +        "type": "welcome",
    +        "jobId": 0,
    +        "pid": "7909",
    +        "wiki": "https://arthas.aliyun.com/3.x/doc",
    +        "version": "3.3.7"
    +      },
    +      {
    +        "inputStatus": "ALLOW_INPUT",
    +        "type": "input_status",
    +        "jobId": 0
    +      }
    +    ]
    +  },
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId": "8f7f6ad7bc2d4cb5aa57a530927a95cc_2",
    +  "state": "SUCCEEDED"
    +}
    +

    \u5F02\u6B65\u6267\u884C\u547D\u4EE4

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"async_exec",
    +  "command":"watch demo.MathGame primeFactors \\"{params, returnObj, throwExp}\\" ",
    +   "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +

    async_exec \u7684\u7ED3\u679C\uFF1A

    {
    +  "sessionId": "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +  "state": "SCHEDULED",
    +  "body": {
    +    "jobStatus": "READY",
    +    "jobId": 3,
    +    "command": "watch demo.MathGame primeFactors \\"{params, returnObj, throwExp}\\" "
    +  }
    +}
    +
    • state : SCHEDULED \u72B6\u6001\u8868\u793A\u5DF2\u7ECF\u89E3\u6790\u547D\u4EE4\u751F\u6210\u4EFB\u52A1\uFF0C\u4F46\u672A\u5F00\u59CB\u6267\u884C\u3002
    • body.jobId : \u5F02\u6B65\u6267\u884C\u547D\u4EE4\u7684\u4EFB\u52A1 ID\uFF0C\u53EF\u4EE5\u6839\u636E\u6B64\u4EFB\u52A1 ID \u6765\u8FC7\u6EE4\u5728pull_results\u8F93\u51FA\u7684\u547D\u4EE4\u7ED3\u679C\u3002
    • body.jobStatus : \u4EFB\u52A1\u72B6\u6001READY\u8868\u793A\u672A\u5F00\u59CB\u6267\u884C\u3002

    \u67E5\u770B\u4E0A\u9762\u81EA\u52A8\u62C9\u53D6\u7ED3\u679C\u6D88\u606F\u811A\u672C\u7684 shell \u8F93\u51FA\uFF1A

    {
    +   "body" : {
    +      "results" : [
    +         {
    +            "type" : "command",
    +            "jobId" : 3,
    +            "state" : "SCHEDULED",
    +            "command" : "watch demo.MathGame primeFactors \\"{params, returnObj, throwExp}\\" "
    +         },
    +         {
    +            "inputStatus" : "ALLOW_INTERRUPT",
    +            "jobId" : 0,
    +            "type" : "input_status"
    +         },
    +         {
    +            "success" : true,
    +            "jobId" : 3,
    +            "effect" : {
    +               "listenerId" : 3,
    +               "cost" : 24,
    +               "classCount" : 1,
    +               "methodCount" : 1
    +            },
    +            "type" : "enhancer"
    +         },
    +         {
    +            "sizeLimit" : 10485760,
    +            "expand" : 1,
    +            "jobId" : 3,
    +            "type" : "watch",
    +            "cost" : 0.071499,
    +            "ts" : 1596703453237,
    +            "value" : [
    +               [
    +                  -170365
    +               ],
    +               null,
    +               {
    +                  "stackTrace" : [
    +                     {
    +                        "className" : "demo.MathGame",
    +                        "classLoaderName" : "app",
    +                        "methodName" : "primeFactors",
    +                        "nativeMethod" : false,
    +                        "lineNumber" : 46,
    +                        "fileName" : "MathGame.java"
    +                     },
    +                     ...
    +                  ],
    +                  "localizedMessage" : "number is: -170365, need >= 2",
    +                  "@type" : "java.lang.IllegalArgumentException",
    +                  "message" : "number is: -170365, need >= 2"
    +               }
    +            ]
    +         },
    +         {
    +            "type" : "watch",
    +            "cost" : 0.033375,
    +            "jobId" : 3,
    +            "ts" : 1596703454241,
    +            "value" : [
    +               [
    +                  1
    +               ],
    +               [
    +                  2,
    +                  2,
    +                  2,
    +                  2,
    +                  13,
    +                  491
    +               ],
    +               null
    +            ],
    +            "sizeLimit" : 10485760,
    +            "expand" : 1
    +         }
    +      ]
    +   },
    +   "consumerId" : "8ecb9cb7c7804d5d92e258b23d5245cc_1",
    +   "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +   "state" : "SUCCEEDED"
    +}
    +

    watch \u547D\u4EE4\u7ED3\u679C\u7684value\u4E3A watch-experss \u7684\u503C\uFF0C\u4E0A\u9762\u547D\u4EE4\u4E2D\u4E3A{params, returnObj, throwExp}\uFF0C\u6240\u4EE5 watch \u7ED3\u679C\u7684 value \u4E3A\u4E00\u4E2A\u957F\u5EA6\u4E3A 3 \u7684\u6570\u7EC4\uFF0C\u6BCF\u4E2A\u5143\u7D20\u5206\u522B\u5BF9\u5E94\u76F8\u5E94\u987A\u5E8F\u7684\u8868\u8FBE\u5F0F\u3002 \u8BF7\u53C2\u8003"watch \u547D\u4EE4\u8F93\u51FA map \u5BF9\u8C61"\u5C0F\u8282\u3002

    \u4E2D\u65AD\u547D\u4EE4\u6267\u884C

    \u4E2D\u65AD\u4F1A\u8BDD\u6B63\u5728\u8FD0\u884C\u7684\u524D\u53F0 Job\uFF08\u524D\u53F0\u4EFB\u52A1\uFF09\uFF1A

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"interrupt_job",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +
    {
    +   "state" : "SUCCEEDED",
    +   "body" : {
    +      "jobStatus" : "TERMINATED",
    +      "jobId" : 3
    +   }
    +}
    +

    \u5173\u95ED\u4F1A\u8BDD

    \u6307\u5B9A\u4F1A\u8BDD ID\uFF0C\u5173\u95ED\u4F1A\u8BDD\u3002

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"close_session",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +
    {
    +  "state": "SUCCEEDED"
    +}
    +

    \u9274\u6743

    `,71),h=n("\u53C2\u8003\uFF1A "),g=n("auth"),y=s("h2",{id:"web-ui",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web-ui","aria-hidden":"true"},"#"),n(" Web UI")],-1),_=s("p",null,[s("img",{src:l,alt:"",title:"arthas web ui"})],-1),j=n("\u4E00\u4E2A\u57FA\u4E8E Http API \u63A5\u53E3\u5B9E\u73B0\u7684 Web UI\uFF0C\u8BBF\u95EE\u5730\u5740\u4E3A\uFF1A "),f={href:"http://127.0.0.1:8563/ui",target:"_blank",rel:"noopener noreferrer"},x=n("http://127.0.0.1:8563/ui"),I=n(" \u3002"),E=t(`

    \u5DF2\u5B9E\u73B0\u529F\u80FD\uFF1A

    • \u521B\u5EFA\u4F1A\u8BDD
    • \u590D\u5236\u5E76\u6253\u5F00 url \u52A0\u5165\u4F1A\u8BDD\uFF0C\u591A\u4EBA\u5171\u4EAB\u4F1A\u8BDD
    • \u5468\u671F\u6027\u62C9\u53D6\u4F1A\u8BDD\u547D\u4EE4\u7ED3\u679C\u6D88\u606F
    • \u5237\u65B0\u9875\u9762\u6216\u8005\u52A0\u5165\u4F1A\u8BDD\u62C9\u53D6\u4F1A\u8BDD\u5386\u53F2\u547D\u4EE4\u6D88\u606F
    • \u8F93\u5165\u547D\u4EE4/\u4E2D\u65AD\u547D\u4EE4\u72B6\u6001\u63A7\u5236

    \u5F85\u5F00\u53D1\u529F\u80FD\uFF1A

    • \u6539\u8FDB\u5C06\u547D\u4EE4\u7ED3\u679C\u6D88\u606F\u53EF\u8BFB\u6027
    • \u547D\u4EE4\u8F93\u5165\u652F\u6301\u81EA\u52A8\u5B8C\u6210\u53CA\u547D\u4EE4\u6A21\u677F
    • \u63D0\u4F9B\u547D\u4EE4\u5E2E\u52A9
    • \u652F\u6301\u4E2A\u4EBA\u9009\u9879\u8BBE\u7F6E

    \u7279\u6B8A\u547D\u4EE4\u7ED3\u679C

    status

    {
    +  "jobId": 5,
    +  "statusCode": 0,
    +  "type": "status"
    +}
    +

    type\u4E3Astatus\u8868\u793A\u547D\u4EE4\u6267\u884C\u72B6\u6001\uFF1A

    \u6BCF\u4E2A\u547D\u4EE4\u6267\u884C\u7ED3\u675F\u540E\u90FD\u6709\u552F\u4E00\u4E00\u4E2A status \u7ED3\u679C\u3002statusCode \u4E3A 0 \u8868\u793A\u6267\u884C\u6210\u529F\uFF0CstatusCode \u4E3A\u975E 0 \u503C\u8868\u793A\u6267\u884C\u5931\u8D25\uFF0C\u7C7B\u4F3C\u8FDB\u7A0B\u9000\u51FA\u7801(exit code)\u3002

    \u547D\u4EE4\u6267\u884C\u5931\u8D25\u65F6\u4E00\u822C\u4F1A\u63D0\u4F9B\u9519\u8BEF\u6D88\u606F\uFF0C\u5982\uFF1A

    {
    +  "jobId": 3,
    +  "message": "The argument 'class-pattern' is required",
    +  "statusCode": -10,
    +  "type": "status"
    +}
    +

    input_status

    {
    +  "inputStatus": "ALLOW_INPUT",
    +  "type": "input_status",
    +  "jobId": 0
    +}
    +

    type\u4E3Ainput_status\u8868\u793A\u8F93\u5165\u72B6\u6001\uFF1A

    \u7528\u4E8E UI \u4EA4\u4E92\u65F6\u63A7\u5236\u7528\u6237\u8F93\u5165\uFF0C\u6BCF\u6B21\u6267\u884C\u547D\u4EE4\u524D\u540E\u4F1A\u53D1\u9001\u6539\u53D8\u7684\u6D88\u606F\u3002 inputStatus \u7684\u503C\u8BF4\u660E\uFF1A

    • ALLOW_INPUT : \u5141\u8BB8\u7528\u6237\u8F93\u5165\u547D\u4EE4\uFF0C\u8868\u793A\u4F1A\u8BDD\u6CA1\u6709\u5728\u6267\u884C\u7684\u524D\u53F0\u547D\u4EE4\uFF0C\u53EF\u4EE5\u63A5\u53D7\u65B0\u7684\u547D\u4EE4\u3002
    • ALLOW_INTERRUPT : \u5141\u8BB8\u7528\u6237\u4E2D\u65AD\u547D\u4EE4\u6267\u884C\uFF0C\u8868\u793A\u5F53\u524D\u6B63\u5728\u6267\u884C\u547D\u4EE4\uFF0C\u7528\u6237\u53EF\u4EE5\u53D1\u9001interrupt_job\u4E2D\u65AD\u6267\u884C\u3002
    • DISABLED : \u7981\u7528\u72B6\u6001\uFF0C\u4E0D\u80FD\u8F93\u5165\u547D\u4EE4\u4E5F\u4E0D\u80FD\u4E2D\u65AD\u547D\u4EE4\u3002

    command

    {
    +  "type": "command",
    +  "jobId": 3,
    +  "state": "SCHEDULED",
    +  "command": "watch demo.MathGame primeFactors \\"{params, returnObj, throwExp}\\" "
    +}
    +

    type \u4E3Acommand\u8868\u793A\u8F93\u5165\u7684\u547D\u4EE4\u6570\u636E\uFF1A

    \u7528\u4E8E\u4EA4\u4E92 UI \u56DE\u663E\u7528\u6237\u8F93\u5165\u7684\u547D\u4EE4\uFF0C\u62C9\u53D6\u7684\u4F1A\u8BDD\u547D\u4EE4\u6D88\u606F\u5386\u53F2\u4F1A\u5305\u542Bcommand\u7C7B\u578B\u7684\u6D88\u606F\uFF0C\u6309\u987A\u5E8F\u5904\u7406\u5373\u53EF\u3002

    enhancer

    {
    +  "success": true,
    +  "jobId": 3,
    +  "effect": {
    +    "listenerId": 3,
    +    "cost": 24,
    +    "classCount": 1,
    +    "methodCount": 1
    +  },
    +  "type": "enhancer"
    +}
    +

    type\u4E3Aenhancer\u8868\u793A\u7C7B\u589E\u5F3A\u7ED3\u679C\uFF1A

    trace/watch/jad/tt\u7B49\u547D\u4EE4\u9700\u8981\u5BF9\u7C7B\u8FDB\u884C\u589E\u5F3A\uFF0C\u4F1A\u63A5\u6536\u5230\u8FD9\u4E2Aenhancer\u7ED3\u679C\u3002\u53EF\u80FD\u51FA\u73B0enhancer\u7ED3\u679C\u6210\u529F\uFF0C\u4F46\u6CA1\u6709\u547D\u4E2D\u65B9\u6CD5\u7684\u60C5\u51B5\uFF0C\u5BA2\u6237\u7AEF\u53EF\u4EE5\u6839\u636Eenhancer\u7ED3\u679C\u63D0\u793A\u7528\u6237\u3002

    \u6848\u4F8B

    \u83B7\u53D6 Java \u5E94\u7528\u7684 Classpath

    \u901A\u8FC7 Http api \u67E5\u8BE2 Java \u5E94\u7528\u7684 System properties\uFF0C\u63D0\u53D6java.class.path\u7684\u503C\u3002

    json_data=$(curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"exec",
    +  "command":"sysprop"
    +}')
    +
    • \u4F7F\u7528sed\u63D0\u53D6\u503C\uFF1A
    class_path=$(echo $json_data | tr -d '\\n' | sed 's/.*"java.class.path":"\\([^"]*\\).*/\\1/')
    +echo "classpath: $class_path"
    +
    • \u4F7F\u7528json_pp/awk\u63D0\u53D6\u503C
    class_path=$(echo $json_data | tr -d '\\n' | json_pp | grep java.class.path | awk -F'"' '{ print $4 }')
    +echo "classpath: $class_path"
    +

    \u8F93\u51FA\u5185\u5BB9\uFF1A

    classpath: demo-arthas-spring-boot.jar
    +

    \u6CE8\u610F\uFF1A

    • echo $json_data | tr -d '\\n' : \u5220\u9664\u6362\u884C\u7B26(line.separator\u7684\u503C)\uFF0C\u907F\u514D\u5F71\u54CDsed/json_pp\u547D\u4EE4\u5904\u7406\u3002
    • awk -F'"' '{ print $4 }' : \u4F7F\u7528\u53CC\u5F15\u53F7\u4F5C\u4E3A\u5206\u9694\u7B26\u53F7

    watch \u547D\u4EE4\u8F93\u51FA map \u5BF9\u8C61

    `,39),S=n("watch \u7684\u7ED3\u679C\u503C\u7531\u8BA1\u7B97"),w=s("code",null,"watch-express",-1),D=n(" ognl \u8868\u8FBE\u5F0F\u4EA7\u751F\uFF0C\u53EF\u4EE5\u901A\u8FC7\u6539\u53D8 ognl \u8868\u8FBE\u5F0F\u6765\u751F\u6210\u60F3\u8981\u7684\u503C\uFF0C\u8BF7\u53C2\u8003"),C={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},T=n("OGNL \u6587\u6863"),A=n("\u3002"),O=t(`

    \u63D0\u793A

    Maps can also be created using a special syntax.

    #{ "foo" : "foo value", "bar" : "bar value" }

    This creates a Map initialized with mappings for "foo" and "bar".

    \u4E0B\u9762\u7684\u547D\u4EE4\u751F\u6210 map \u683C\u5F0F\u7684\u503C\uFF1A

    watch *MathGame prime* '#{ "params" : params, "returnObj" : returnObj, "throwExp": throwExp}' -x 2 -n 5
    +

    \u5728 Telnet shell/WebConsole \u4E2D\u6267\u884C\u4E0A\u9762\u7684\u547D\u4EE4\uFF0C\u8F93\u51FA\u7684\u7ED3\u679C\uFF1A

    ts=2020-08-06 16:57:20; [cost=0.241735ms] result=@LinkedHashMap[
    +    @String[params]:@Object[][
    +        @Integer[1],
    +    ],
    +    @String[returnObj]:@ArrayList[
    +        @Integer[2],
    +        @Integer[241],
    +        @Integer[379],
    +    ],
    +    @String[throwExp]:null,
    +]
    +

    \u7528 Http api \u6267\u884C\u4E0A\u9762\u7684\u547D\u4EE4\uFF0C\u6CE8\u610F\u5BF9 JSON \u53CC\u5F15\u53F7\u8F6C\u4E49\uFF1A

    curl -Ss -XPOST http://localhost:8563/api -d @- << EOF
    +{
    +  "action":"exec",
    +  "execTimeout": 30000,
    +  "command":"watch *MathGame prime* '#{ \\"params\\" : params, \\"returnObj\\" : returnObj, \\"throwExp\\": throwExp}' -n 3 "
    +}
    +EOF
    +

    Http api \u6267\u884C\u7ED3\u679C\uFF1A

    {
    +    "body": {
    +         ...
    +        "results": [
    +            ...
    +            {
    +                ...
    +                "type": "watch",
    +                "value": {
    +                    "params": [
    +                        1
    +                    ],
    +                    "returnObj": [
    +                        2,
    +                        5,
    +                        17,
    +                        23,
    +                        23
    +                    ]
    +                }
    +            },
    +            {
    +                ...
    +                "type": "watch",
    +                "value": {
    +                    "params": [
    +                        -98278
    +                    ],
    +                    "throwExp": {
    +                        "@type": "java.lang.IllegalArgumentException",
    +                        "localizedMessage": "number is: -98278, need >= 2",
    +                        "message": "number is: -98278, need >= 2",
    +                        "stackTrace": [
    +                            ...
    +                        ]
    +                    }
    +                }
    +            },
    +            ...
    +}
    +

    \u53EF\u4EE5\u770B\u5230 watch \u7ED3\u679C\u7684 value \u53D8\u6210 map \u5BF9\u8C61\uFF0C\u7A0B\u5E8F\u53EF\u4EE5\u901A\u8FC7 key \u8BFB\u53D6\u7ED3\u679C\u3002

    `,10);function L(P,U){const e=o("ExternalLinkIcon"),p=o("RouterLink");return c(),u("div",null,[v,s("p",null,[s("a",k,[b,m,a(e)])]),q,s("p",null,[h,a(p,{to:"/doc/auth.html"},{default:r(()=>[g]),_:1})]),y,_,s("p",null,[j,s("a",f,[x,a(e)]),I]),E,s("p",null,[S,w,D,s("a",C,[T,a(e)]),A]),O])}const H=i(d,[["render",L],["__file","http-api.html.vue"]]);export{H as default}; diff --git a/3.x/assets/http-api.html.a19a0b64.js b/3.x/assets/http-api.html.a19a0b64.js new file mode 100644 index 00000000000..43b66208a7a --- /dev/null +++ b/3.x/assets/http-api.html.a19a0b64.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-8b0312c0","path":"/en/doc/http-api.html","title":"Http API","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Overview","slug":"overview","link":"#overview","children":[{"level":3,"title":"Access address","slug":"access-address","link":"#access-address","children":[]},{"level":3,"title":"Request data format","slug":"request-data-format","link":"#request-data-format","children":[]},{"level":3,"title":"Request Actions","slug":"request-actions","link":"#request-actions","children":[]},{"level":3,"title":"Response status","slug":"response-status","link":"#response-status","children":[]}]},{"level":2,"title":"One-time command","slug":"one-time-command","link":"#one-time-command","children":[]},{"level":2,"title":"Session interaction","slug":"session-interaction","link":"#session-interaction","children":[{"level":3,"title":"Create session","slug":"create-session","link":"#create-session","children":[]},{"level":3,"title":"Join session","slug":"join-session","link":"#join-session","children":[]},{"level":3,"title":"Pull command results","slug":"pull-command-results","link":"#pull-command-results","children":[]},{"level":3,"title":"Execute commands asynchronously","slug":"execute-commands-asynchronously","link":"#execute-commands-asynchronously","children":[]},{"level":3,"title":"Interrupt command execution","slug":"interrupt-command-execution","link":"#interrupt-command-execution","children":[]},{"level":3,"title":"Close session","slug":"close-session","link":"#close-session","children":[]}]},{"level":2,"title":"Authentication","slug":"authentication","link":"#authentication","children":[]},{"level":2,"title":"Web UI","slug":"web-ui","link":"#web-ui","children":[]},{"level":2,"title":"Special command results","slug":"special-command-results","link":"#special-command-results","children":[{"level":3,"title":"status","slug":"status","link":"#status","children":[]},{"level":3,"title":"input_status","slug":"input-status","link":"#input-status","children":[]},{"level":3,"title":"command","slug":"command","link":"#command","children":[]},{"level":3,"title":"enhancer","slug":"enhancer","link":"#enhancer","children":[]}]},{"level":2,"title":"Cases","slug":"cases","link":"#cases","children":[{"level":3,"title":"Get classpath of Java application","slug":"get-classpath-of-java-application","link":"#get-classpath-of-java-application","children":[]},{"level":3,"title":"Make watch command output a map object","slug":"make-watch-command-output-a-map-object","link":"#make-watch-command-output-a-map-object","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/http-api.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/http-api.html.f5e81364.js b/3.x/assets/http-api.html.f5e81364.js new file mode 100644 index 00000000000..249bdbca995 --- /dev/null +++ b/3.x/assets/http-api.html.f5e81364.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-225de034","path":"/doc/http-api.html","title":"Http API","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u6982\u89C8","slug":"\u6982\u89C8","link":"#\u6982\u89C8","children":[{"level":3,"title":"\u8BBF\u95EE\u5730\u5740","slug":"\u8BBF\u95EE\u5730\u5740","link":"#\u8BBF\u95EE\u5730\u5740","children":[]},{"level":3,"title":"\u8BF7\u6C42\u6570\u636E\u683C\u5F0F","slug":"\u8BF7\u6C42\u6570\u636E\u683C\u5F0F","link":"#\u8BF7\u6C42\u6570\u636E\u683C\u5F0F","children":[]},{"level":3,"title":"\u8BF7\u6C42 Action","slug":"\u8BF7\u6C42-action","link":"#\u8BF7\u6C42-action","children":[]},{"level":3,"title":"\u54CD\u5E94\u72B6\u6001","slug":"\u54CD\u5E94\u72B6\u6001","link":"#\u54CD\u5E94\u72B6\u6001","children":[]}]},{"level":2,"title":"\u4E00\u6B21\u6027\u547D\u4EE4","slug":"\u4E00\u6B21\u6027\u547D\u4EE4","link":"#\u4E00\u6B21\u6027\u547D\u4EE4","children":[]},{"level":2,"title":"\u4F1A\u8BDD\u4EA4\u4E92","slug":"\u4F1A\u8BDD\u4EA4\u4E92","link":"#\u4F1A\u8BDD\u4EA4\u4E92","children":[{"level":3,"title":"\u521B\u5EFA\u4F1A\u8BDD","slug":"\u521B\u5EFA\u4F1A\u8BDD","link":"#\u521B\u5EFA\u4F1A\u8BDD","children":[]},{"level":3,"title":"\u52A0\u5165\u4F1A\u8BDD","slug":"\u52A0\u5165\u4F1A\u8BDD","link":"#\u52A0\u5165\u4F1A\u8BDD","children":[]},{"level":3,"title":"\u62C9\u53D6\u547D\u4EE4\u7ED3\u679C","slug":"\u62C9\u53D6\u547D\u4EE4\u7ED3\u679C","link":"#\u62C9\u53D6\u547D\u4EE4\u7ED3\u679C","children":[]},{"level":3,"title":"\u5F02\u6B65\u6267\u884C\u547D\u4EE4","slug":"\u5F02\u6B65\u6267\u884C\u547D\u4EE4","link":"#\u5F02\u6B65\u6267\u884C\u547D\u4EE4","children":[]},{"level":3,"title":"\u4E2D\u65AD\u547D\u4EE4\u6267\u884C","slug":"\u4E2D\u65AD\u547D\u4EE4\u6267\u884C","link":"#\u4E2D\u65AD\u547D\u4EE4\u6267\u884C","children":[]},{"level":3,"title":"\u5173\u95ED\u4F1A\u8BDD","slug":"\u5173\u95ED\u4F1A\u8BDD","link":"#\u5173\u95ED\u4F1A\u8BDD","children":[]}]},{"level":2,"title":"\u9274\u6743","slug":"\u9274\u6743","link":"#\u9274\u6743","children":[]},{"level":2,"title":"Web UI","slug":"web-ui","link":"#web-ui","children":[]},{"level":2,"title":"\u7279\u6B8A\u547D\u4EE4\u7ED3\u679C","slug":"\u7279\u6B8A\u547D\u4EE4\u7ED3\u679C","link":"#\u7279\u6B8A\u547D\u4EE4\u7ED3\u679C","children":[{"level":3,"title":"status","slug":"status","link":"#status","children":[]},{"level":3,"title":"input_status","slug":"input-status","link":"#input-status","children":[]},{"level":3,"title":"command","slug":"command","link":"#command","children":[]},{"level":3,"title":"enhancer","slug":"enhancer","link":"#enhancer","children":[]}]},{"level":2,"title":"\u6848\u4F8B","slug":"\u6848\u4F8B","link":"#\u6848\u4F8B","children":[{"level":3,"title":"\u83B7\u53D6 Java \u5E94\u7528\u7684 Classpath","slug":"\u83B7\u53D6-java-\u5E94\u7528\u7684-classpath","link":"#\u83B7\u53D6-java-\u5E94\u7528\u7684-classpath","children":[]},{"level":3,"title":"watch \u547D\u4EE4\u8F93\u51FA map \u5BF9\u8C61","slug":"watch-\u547D\u4EE4\u8F93\u51FA-map-\u5BF9\u8C61","link":"#watch-\u547D\u4EE4\u8F93\u51FA-map-\u5BF9\u8C61","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/http-api.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/idea-plugin.html.0961bb69.js b/3.x/assets/idea-plugin.html.0961bb69.js new file mode 100644 index 00000000000..b5b2ad13127 --- /dev/null +++ b/3.x/assets/idea-plugin.html.0961bb69.js @@ -0,0 +1 @@ +import{_ as i,o as r,c as s,a as t,b as o,d as n,e,r as l}from"./app.4d248835.js";const c="/3.x/images/alibabacloud_hotreload.png",d={},h=n('

    IDEA Plugin

    Arthas-idea\uFF08\u90E8\u5206\u547D\u4EE4\u53EF\u89C6\u5316\uFF09

    \u63D0\u793A

    \u63D2\u4EF6\u7531\u793E\u533A\u5F00\u53D1\u8005\u63D0\u4F9B\u3002

    ',3),_=e("Jetbrains \u63D2\u4EF6\u83B7\u53D6\u5730\u5740\uFF1A "),u={href:"https://plugins.jetbrains.com/plugin/13581-arthas-idea",target:"_blank",rel:"noopener noreferrer"},p=e("https://plugins.jetbrains.com/plugin/13581-arthas-idea"),m=e("\u4F7F\u7528\u6587\u6863\uFF1A"),b={href:"https://www.yuque.com/arthas-idea-plugin",target:"_blank",rel:"noopener noreferrer"},g=e("https://www.yuque.com/arthas-idea-plugin"),f=e("\u6E90\u7801\u5730\u5740\uFF1A "),k={href:"https://github.com/WangJi92/arthas-idea-plugin",target:"_blank",rel:"noopener noreferrer"},x=e("https://github.com/WangJi92/arthas-idea-plugin"),v=n('

    Alibaba Cloud Toolkit \u70ED\u90E8\u7F72\u7EC4\u4EF6\uFF08\u4E00\u952E retransform\uFF09

    \u63D0\u793A

    \u70ED\u90E8\u7F72\u7EC4\u4EF6\u652F\u6301\u4E00\u952E\u5C06\u7F16\u8F91\u5668\u4E2D\u4FEE\u6539\u7684 Java \u6E90\u7801\u5FEB\u901F\u7F16\u8BD1\uFF0C\u5E76\u66F4\u65B0\u5230\u8FDC\u7AEF\u5E94\u7528\u670D\u52A1\u4E2D\uFF0C\u514D\u53BB\u624B\u52A8 dump\u3001mc \u7684\u8FC7\u7A0B\u3002\u6B64\u5916\uFF0C\u4E5F\u53EF\u4EE5\u4E00\u952E\u8FD8\u539F retransform \u7684\u7C7B\u6587\u4EF6\u3002

    ',3),w=e("Jetbrains \u63D2\u4EF6\u83B7\u53D6\u5730\u5740\uFF1A "),J={href:"https://plugins.jetbrains.com/plugin/11386-alibaba-cloud-toolkit",target:"_blank",rel:"noopener noreferrer"},j=e("https://plugins.jetbrains.com/plugin/11386-alibaba-cloud-toolkit"),y=e("\u4F7F\u7528\u6587\u6863\uFF1A"),A={href:"https://help.aliyun.com/document_detail/381077.html",target:"_blank",rel:"noopener noreferrer"},E=e("https://help.aliyun.com/document_detail/381077.html"),N=t("li",null,[e("\u8054\u7CFB\u6211\u4EEC\uFF1A\u8BF7\u52A0 Alibaba Cloud Toolkit (\u5E94\u7528\u89C2\u6D4B\u5668) \u9489\u9489\u7528\u6237\u4EA4\u6D41\u7FA4\uFF08\u7FA4\u53F7\uFF1A"),t("strong",null,"34965379"),e("\uFF09")],-1);function V(B,C){const a=l("ExternalLinkIcon");return r(),s("div",null,[h,t("ul",null,[t("li",null,[_,t("a",u,[p,o(a)])]),t("li",null,[m,t("a",b,[g,o(a)])]),t("li",null,[f,t("a",k,[x,o(a)])])]),v,t("ul",null,[t("li",null,[w,t("a",J,[j,o(a)])]),t("li",null,[y,t("a",A,[E,o(a)])]),N])])}const T=i(d,[["render",V],["__file","idea-plugin.html.vue"]]);export{T as default}; diff --git a/3.x/assets/idea-plugin.html.32b2309e.js b/3.x/assets/idea-plugin.html.32b2309e.js new file mode 100644 index 00000000000..adc17716e17 --- /dev/null +++ b/3.x/assets/idea-plugin.html.32b2309e.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-96b07b98","path":"/en/doc/idea-plugin.html","title":"IDEA Plugin","lang":"en-US","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/idea-plugin.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/idea-plugin.html.5cd3ae1a.js b/3.x/assets/idea-plugin.html.5cd3ae1a.js new file mode 100644 index 00000000000..2cec378f94a --- /dev/null +++ b/3.x/assets/idea-plugin.html.5cd3ae1a.js @@ -0,0 +1 @@ +import{_ as o,o as a,c as s,a as e,b as i,e as t,r}from"./app.4d248835.js";const l={},c=e("h1",{id:"idea-plugin",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#idea-plugin","aria-hidden":"true"},"#"),t(" IDEA Plugin")],-1),u=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"TIP"),e("p",null,"Plugin is provided by community developers.")],-1),_=t("Jetbrains Plugin\uFF1A "),d={href:"https://plugins.jetbrains.com/plugin/13581-arthas-idea",target:"_blank",rel:"noopener noreferrer"},h=t("https://plugins.jetbrains.com/plugin/13581-arthas-idea"),p=t("Plugin Doc\uFF1A"),g={href:"https://www.yuque.com/arthas-idea-plugin",target:"_blank",rel:"noopener noreferrer"},m=t("https://www.yuque.com/arthas-idea-plugin"),f=t("Plugin Github\uFF1A "),b={href:"https://github.com/WangJi92/arthas-idea-plugin",target:"_blank",rel:"noopener noreferrer"},k=t("https://github.com/WangJi92/arthas-idea-plugin");function x(P,v){const n=r("ExternalLinkIcon");return a(),s("div",null,[c,u,e("ul",null,[e("li",null,[_,e("a",d,[h,i(n)])]),e("li",null,[p,e("a",g,[m,i(n)])]),e("li",null,[f,e("a",b,[k,i(n)])])])])}const y=o(l,[["render",x],["__file","idea-plugin.html.vue"]]);export{y as default}; diff --git a/3.x/assets/idea-plugin.html.d7acd139.js b/3.x/assets/idea-plugin.html.d7acd139.js new file mode 100644 index 00000000000..a43f28bb3b6 --- /dev/null +++ b/3.x/assets/idea-plugin.html.d7acd139.js @@ -0,0 +1 @@ +const a=JSON.parse('{"key":"v-7c670020","path":"/doc/idea-plugin.html","title":"IDEA Plugin","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Arthas-idea\uFF08\u90E8\u5206\u547D\u4EE4\u53EF\u89C6\u5316\uFF09","slug":"arthas-idea-\u90E8\u5206\u547D\u4EE4\u53EF\u89C6\u5316","link":"#arthas-idea-\u90E8\u5206\u547D\u4EE4\u53EF\u89C6\u5316","children":[]},{"level":2,"title":"Alibaba Cloud Toolkit \u70ED\u90E8\u7F72\u7EC4\u4EF6\uFF08\u4E00\u952E retransform\uFF09","slug":"alibaba-cloud-toolkit-\u70ED\u90E8\u7F72\u7EC4\u4EF6-\u4E00\u952E-retransform","link":"#alibaba-cloud-toolkit-\u70ED\u90E8\u7F72\u7EC4\u4EF6-\u4E00\u952E-retransform","children":[]}],"git":{"updatedTime":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/idea-plugin.md","version":"3.7.3"}');export{a as data}; diff --git a/3.x/assets/index.html.27b99973.js b/3.x/assets/index.html.27b99973.js new file mode 100644 index 00000000000..a4549c5a39f --- /dev/null +++ b/3.x/assets/index.html.27b99973.js @@ -0,0 +1 @@ +import{_ as e,o as c,c as t}from"./app.4d248835.js";const n={};function _(o,r){return c(),t("div")}const a=e(n,[["render",_],["__file","index.html.vue"]]);export{a as default}; diff --git a/3.x/assets/index.html.349dc4ce.js b/3.x/assets/index.html.349dc4ce.js new file mode 100644 index 00000000000..a4549c5a39f --- /dev/null +++ b/3.x/assets/index.html.349dc4ce.js @@ -0,0 +1 @@ +import{_ as e,o as c,c as t}from"./app.4d248835.js";const n={};function _(o,r){return c(),t("div")}const a=e(n,[["render",_],["__file","index.html.vue"]]);export{a as default}; diff --git a/3.x/assets/index.html.3951988f.js b/3.x/assets/index.html.3951988f.js new file mode 100644 index 00000000000..4a02da9c870 --- /dev/null +++ b/3.x/assets/index.html.3951988f.js @@ -0,0 +1 @@ +import{_ as o}from"./arthas.b23d3e5a.js";import{_ as s,o as i,c as n,a as e,b as r,d as c,e as a,r as h}from"./app.4d248835.js";const l={},d=c('

    \u7B80\u4ECB

    Arthas \u662F\u4E00\u6B3E\u7EBF\u4E0A\u76D1\u63A7\u8BCA\u65AD\u4EA7\u54C1\uFF0C\u901A\u8FC7\u5168\u5C40\u89C6\u89D2\u5B9E\u65F6\u67E5\u770B\u5E94\u7528 load\u3001\u5185\u5B58\u3001gc\u3001\u7EBF\u7A0B\u7684\u72B6\u6001\u4FE1\u606F\uFF0C\u5E76\u80FD\u5728\u4E0D\u4FEE\u6539\u5E94\u7528\u4EE3\u7801\u7684\u60C5\u51B5\u4E0B\uFF0C\u5BF9\u4E1A\u52A1\u95EE\u9898\u8FDB\u884C\u8BCA\u65AD\uFF0C\u5305\u62EC\u67E5\u770B\u65B9\u6CD5\u8C03\u7528\u7684\u51FA\u5165\u53C2\u3001\u5F02\u5E38\uFF0C\u76D1\u6D4B\u65B9\u6CD5\u6267\u884C\u8017\u65F6\uFF0C\u7C7B\u52A0\u8F7D\u4FE1\u606F\u7B49\uFF0C\u5927\u5927\u63D0\u5347\u7EBF\u4E0A\u95EE\u9898\u6392\u67E5\u6548\u7387\u3002

    \u80CC\u666F

    \u901A\u5E38\uFF0C\u672C\u5730\u5F00\u53D1\u73AF\u5883\u65E0\u6CD5\u8BBF\u95EE\u751F\u4EA7\u73AF\u5883\u3002\u5982\u679C\u5728\u751F\u4EA7\u73AF\u5883\u4E2D\u9047\u5230\u95EE\u9898\uFF0C\u5219\u65E0\u6CD5\u4F7F\u7528 IDE \u8FDC\u7A0B\u8C03\u8BD5\u3002\u66F4\u7CDF\u7CD5\u7684\u662F\uFF0C\u5728\u751F\u4EA7\u73AF\u5883\u4E2D\u8C03\u8BD5\u662F\u4E0D\u53EF\u63A5\u53D7\u7684\uFF0C\u56E0\u4E3A\u5B83\u4F1A\u6682\u505C\u6240\u6709\u7EBF\u7A0B\uFF0C\u5BFC\u81F4\u670D\u52A1\u6682\u505C\u3002

    \u5F00\u53D1\u4EBA\u5458\u53EF\u4EE5\u5C1D\u8BD5\u5728\u6D4B\u8BD5\u73AF\u5883\u6216\u8005\u9884\u53D1\u73AF\u5883\u4E2D\u590D\u73B0\u751F\u4EA7\u73AF\u5883\u4E2D\u7684\u95EE\u9898\u3002\u4F46\u662F\uFF0C\u67D0\u4E9B\u95EE\u9898\u65E0\u6CD5\u5728\u4E0D\u540C\u7684\u73AF\u5883\u4E2D\u8F7B\u677E\u590D\u73B0\uFF0C\u751A\u81F3\u5728\u91CD\u65B0\u542F\u52A8\u540E\u5C31\u6D88\u5931\u4E86\u3002

    \u5982\u679C\u60A8\u6B63\u5728\u8003\u8651\u5728\u4EE3\u7801\u4E2D\u6DFB\u52A0\u4E00\u4E9B\u65E5\u5FD7\u4EE5\u5E2E\u52A9\u89E3\u51B3\u95EE\u9898\uFF0C\u60A8\u5C06\u5FC5\u987B\u7ECF\u5386\u4EE5\u4E0B\u9636\u6BB5\uFF1A\u6D4B\u8BD5\u3001\u9884\u53D1\uFF0C\u7136\u540E\u751F\u4EA7\u3002\u8FD9\u79CD\u65B9\u6CD5\u6548\u7387\u4F4E\u4E0B\uFF0C\u66F4\u7CDF\u7CD5\u7684\u662F\uFF0C\u8BE5\u95EE\u9898\u53EF\u80FD\u65E0\u6CD5\u89E3\u51B3\uFF0C\u56E0\u4E3A\u4E00\u65E6 JVM \u91CD\u65B0\u542F\u52A8\uFF0C\u5B83\u53EF\u80FD\u65E0\u6CD5\u590D\u73B0\uFF0C\u5982\u4E0A\u6587\u6240\u8FF0\u3002

    Arthas \u65E8\u5728\u89E3\u51B3\u8FD9\u4E9B\u95EE\u9898\u3002\u5F00\u53D1\u4EBA\u5458\u53EF\u4EE5\u5728\u7EBF\u89E3\u51B3\u751F\u4EA7\u95EE\u9898\u3002\u65E0\u9700 JVM \u91CD\u542F\uFF0C\u65E0\u9700\u4EE3\u7801\u66F4\u6539\u3002 Arthas \u4F5C\u4E3A\u89C2\u5BDF\u8005\u6C38\u8FDC\u4E0D\u4F1A\u6682\u505C\u6B63\u5728\u8FD0\u884C\u7684\u7EBF\u7A0B\u3002

    Arthas\uFF08\u963F\u5C14\u8428\u65AF\uFF09\u80FD\u4E3A\u4F60\u505A\u4EC0\u4E48\uFF1F

    Arthas \u662F Alibaba \u5F00\u6E90\u7684 Java \u8BCA\u65AD\u5DE5\u5177\uFF0C\u6DF1\u53D7\u5F00\u53D1\u8005\u559C\u7231\u3002

    \u5F53\u4F60\u9047\u5230\u4EE5\u4E0B\u7C7B\u4F3C\u95EE\u9898\u800C\u675F\u624B\u65E0\u7B56\u65F6\uFF0CArthas\u53EF\u4EE5\u5E2E\u52A9\u4F60\u89E3\u51B3\uFF1A

    1. \u8FD9\u4E2A\u7C7B\u4ECE\u54EA\u4E2A jar \u5305\u52A0\u8F7D\u7684\uFF1F\u4E3A\u4EC0\u4E48\u4F1A\u62A5\u5404\u79CD\u7C7B\u76F8\u5173\u7684 Exception\uFF1F
    2. \u6211\u6539\u7684\u4EE3\u7801\u4E3A\u4EC0\u4E48\u6CA1\u6709\u6267\u884C\u5230\uFF1F\u96BE\u9053\u662F\u6211\u6CA1 commit\uFF1F\u5206\u652F\u641E\u9519\u4E86\uFF1F
    3. \u9047\u5230\u95EE\u9898\u65E0\u6CD5\u5728\u7EBF\u4E0A debug\uFF0C\u96BE\u9053\u53EA\u80FD\u901A\u8FC7\u52A0\u65E5\u5FD7\u518D\u91CD\u65B0\u53D1\u5E03\u5417\uFF1F
    4. \u7EBF\u4E0A\u9047\u5230\u67D0\u4E2A\u7528\u6237\u7684\u6570\u636E\u5904\u7406\u6709\u95EE\u9898\uFF0C\u4F46\u7EBF\u4E0A\u540C\u6837\u65E0\u6CD5 debug\uFF0C\u7EBF\u4E0B\u65E0\u6CD5\u91CD\u73B0\uFF01
    5. \u662F\u5426\u6709\u4E00\u4E2A\u5168\u5C40\u89C6\u89D2\u6765\u67E5\u770B\u7CFB\u7EDF\u7684\u8FD0\u884C\u72B6\u51B5\uFF1F
    6. \u6709\u4EC0\u4E48\u529E\u6CD5\u53EF\u4EE5\u76D1\u63A7\u5230 JVM \u7684\u5B9E\u65F6\u8FD0\u884C\u72B6\u6001\uFF1F
    7. \u600E\u4E48\u5FEB\u901F\u5B9A\u4F4D\u5E94\u7528\u7684\u70ED\u70B9\uFF0C\u751F\u6210\u706B\u7130\u56FE\uFF1F
    8. \u600E\u6837\u76F4\u63A5\u4ECE JVM \u5185\u67E5\u627E\u67D0\u4E2A\u7C7B\u7684\u5B9E\u4F8B\uFF1F

    Arthas \u652F\u6301 JDK 6+\uFF0C\u652F\u6301 Linux/Mac/Windows\uFF0C\u91C7\u7528\u547D\u4EE4\u884C\u4EA4\u4E92\u6A21\u5F0F\uFF0C\u540C\u65F6\u63D0\u4F9B\u4E30\u5BCC\u7684 Tab \u81EA\u52A8\u8865\u5168\u529F\u80FD\uFF0C\u8FDB\u4E00\u6B65\u65B9\u4FBF\u8FDB\u884C\u95EE\u9898\u7684\u5B9A\u4F4D\u548C\u8BCA\u65AD\u3002

    ',13),p=a("\u5982\u679C\u60A8\u5728\u4F7F\u7528 Arthas\uFF0C\u8BF7\u8BA9\u6211\u4EEC\u77E5\u9053\uFF0C\u60A8\u7684\u4F7F\u7528\u5BF9\u6211\u4EEC\u975E\u5E38\u91CD\u8981\uFF1A"),_={href:"https://github.com/alibaba/arthas/issues/111",target:"_blank",rel:"noopener noreferrer"},u=a("\u67E5\u770B"),b=e("h2",{id:"contributors",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contributors","aria-hidden":"true"},"#"),a(" Contributors")],-1),m={href:"https://github.com/alibaba/arthas/graphs/contributors",target:"_blank",rel:"noopener noreferrer"},f=e("img",{src:"https://opencollective.com/arthas/contributors.svg?width=890&button=false",alt:""},null,-1);function x(g,A){const t=h("ExternalLinkIcon");return i(),n("div",null,[d,e("p",null,[e("strong",null,[p,e("a",_,[u,r(t)])])]),b,e("p",null,[e("a",m,[f,r(t)])])])}const v=s(l,[["render",x],["__file","index.html.vue"]]);export{v as default}; diff --git a/3.x/assets/index.html.636fad3d.js b/3.x/assets/index.html.636fad3d.js new file mode 100644 index 00000000000..64aadb24c0a --- /dev/null +++ b/3.x/assets/index.html.636fad3d.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-7445f070","path":"/doc/","title":"\u7B80\u4ECB","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u80CC\u666F","slug":"\u80CC\u666F","link":"#\u80CC\u666F","children":[]},{"level":2,"title":"Arthas\uFF08\u963F\u5C14\u8428\u65AF\uFF09\u80FD\u4E3A\u4F60\u505A\u4EC0\u4E48\uFF1F","slug":"arthas-\u963F\u5C14\u8428\u65AF-\u80FD\u4E3A\u4F60\u505A\u4EC0\u4E48","link":"#arthas-\u963F\u5C14\u8428\u65AF-\u80FD\u4E3A\u4F60\u505A\u4EC0\u4E48","children":[]},{"level":2,"title":"Contributors","slug":"contributors","link":"#contributors","children":[]}],"git":{"updatedTime":1667789315000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":2},{"name":"changren-wcr","email":"105254603+changren-wcr@users.noreply.github.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/README.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/index.html.6c4675e2.js b/3.x/assets/index.html.6c4675e2.js new file mode 100644 index 00000000000..3bd0cfb3c65 --- /dev/null +++ b/3.x/assets/index.html.6c4675e2.js @@ -0,0 +1 @@ +const e=JSON.parse(`{"key":"v-8daa1a0e","path":"/","title":"","lang":"zh-CN","frontmatter":{"home":true,"heroImage":"/images/arthas_light.png","heroImageDark":"/images/arthas_dark.png","heroText":null,"tagline":"Java \u5E94\u7528\u8BCA\u65AD\u5229\u5668","actions":[{"text":"\u5FEB\u901F\u5165\u95E8","link":"/doc/quick-start.html","type":"primary"},{"text":"\u67E5\u770Bgithub","link":"https://github.com/alibaba/arthas","type":"secondary"}],"features":[{"icon":"\u{1F5A5}","title":"Dashboard","details":"\u5B9E\u65F6\u67E5\u770B\u7CFB\u7EDF\u7684\u8FD0\u884C\u72B6\u51B5\u3002"},{"icon":"\u{1F52C}","title":"\u67E5\u770B\u5165\u53C2/\u8FD4\u56DE\u503C/\u5F02\u5E38","details":"\u67E5\u770B\u51FD\u6570\u8C03\u7528\u7684\u53C2\u6570\uFF0C\u8FD4\u56DE\u503C\u548C\u5F02\u5E38\u3002"},{"icon":"\u{1F529}","title":"\u5728\u7EBF\u70ED\u66F4\u65B0","details":"jad/sc/redefine \u4E00\u6761\u9F99\u70ED\u66F4\u65B0\u4EE3\u7801\u3002"},{"icon":"\u{1FA7A}","title":"\u7C7B\u51B2\u7A81","details":"\u79D2\u89E3\u7C7B\u51B2\u7A81\u95EE\u9898\uFF0C\u5B9A\u4F4D\u7C7B\u52A0\u8F7D\u8DEF\u5F84\u3002"},{"icon":"\u26A1\uFE0F","title":"\u6027\u80FD\u70ED\u70B9","details":"\u5FEB\u901F\u5B9A\u4F4D\u5E94\u7528\u7684\u70ED\u70B9\uFF0C\u751F\u6210\u706B\u7130\u56FE\u3002"},{"icon":"\u{1F4E1}","title":"WebConsole","details":"\u5728\u7EBF\u8BCA\u65AD\uFF0C\u70B9\u5F00\u7F51\u9875\u8BCA\u65AD\u7EBF\u4E0A\u5E94\u7528\u3002"}],"users_title":"\u7528\u6237","users_details":"\u8BF7\u5728 Wanted: who's using arthas \u4E0A\u63D0\u4F9B\u4FE1\u606F\u6765\u5E2E\u52A9Arthas\u505A\u7684\u66F4\u597D\u3002","users":[{"name":"Alibaba Group","logo":"/images/users/users_alibaba.png"},{"name":"Didiglobal","logo":"/images/users/users_didi.png"},{"name":"Kaola","logo":"/images/users/users_kaola.png"},{"name":"Qunar","logo":"/images/users/users_qunar.png"},{"name":"Telecom","logo":"/images/users/users_telecom.png"},{"name":"Weidian","logo":"/images/users/users_weidian.png"},{"name":"ICBC","logo":"/images/users/users_icbc.png"},{"name":"Chinaums","logo":"/images/users/users_yinlian.png"}],"footer":"Apache-2.0 license | Copyright 2018-present, Alibaba Middleware Group, and contributors"},"excerpt":"","headers":[],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"README.md","version":"3.7.3"}`);export{e as data}; diff --git a/3.x/assets/index.html.72b89313.js b/3.x/assets/index.html.72b89313.js new file mode 100644 index 00000000000..5dfda6768f6 --- /dev/null +++ b/3.x/assets/index.html.72b89313.js @@ -0,0 +1 @@ +const e=JSON.parse(`{"key":"v-2d0a870d","path":"/en/","title":"Home","lang":"en-US","frontmatter":{"home":true,"title":"Home","heroImage":"/images/arthas_light.png","heroImageDark":"/images/arthas_dark.png","heroText":null,"tagline":"Java Diagnostic Tool","sidebar":false,"actions":[{"text":"Quick Start","link":"/doc/quick-start.html","type":"primary"},{"text":"View on github","link":"https://github.com/alibaba/arthas","type":"secondary"}],"features":[{"icon":"\u{1F5A5}","title":"Dashboard","details":"View the operating status of the system in real time"},{"icon":"\u{1F52C}","title":"Parameters/Return values/Exceptions","details":"View method parameters, return values and exceptions"},{"icon":"\u{1F529}","title":"Online hotswap","details":"jad/sc/redefine online hotswap"},{"icon":"\u{1FA7A}","title":"Class conflict","details":"Resolve the class conflict problem in seconds, locate the class loading path"},{"icon":"\u26A1\uFE0F","title":"Flame Graph","details":"Quickly locate application hotspots and generate flame graphs"},{"icon":"\u{1F4E1}","title":"WebConsole","details":"Online diagnosis"}],"users_title":"Users","users_details":"Providing your info on Wanted: who's using arthas to help improving arthas better","users":[{"name":"Alibaba Group","logo":"/images/users/users_alibaba.png"},{"name":"Didiglobal","logo":"/images/users/users_didi.png"},{"name":"Kaola","logo":"/images/users/users_kaola.png"},{"name":"Qunar","logo":"/images/users/users_qunar.png"},{"name":"Telecom","logo":"/images/users/users_telecom.png"},{"name":"Weidian","logo":"/images/users/users_weidian.png"},{"name":"ICBC","logo":"/images/users/users_icbc.png"},{"name":"Chinaums","logo":"/images/users/users_yinlian.png"}],"footer":"Apache-2.0 license | Copyright 2018-present, Alibaba Middleware Group, and contributors"},"excerpt":"","headers":[],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/README.md","version":"3.7.3"}`);export{e as data}; diff --git a/3.x/assets/index.html.88e6b040.js b/3.x/assets/index.html.88e6b040.js new file mode 100644 index 00000000000..3f67baf9ba7 --- /dev/null +++ b/3.x/assets/index.html.88e6b040.js @@ -0,0 +1 @@ +import{_ as i}from"./arthas.b23d3e5a.js";import{_ as a,o as r,c as n,a as e,b as s,d as l,e as t,r as c}from"./app.4d248835.js";const d={},h=l('

    Introduction

    Arthas is a Java diagnostic tool open-sourced by Alibaba middleware team. It is widely adopted and popular among the developers inside Alibaba. Arthas helps developers in trouble-shooting issues in production environment for Java based applications without modifying code or restarting servers.

    Background

    Oftentimes the production system network is inaccessible from local development environment. If issues are encountered in production systems, it is impossible to use IDE to debug the application remotely. What's even worse, debugging in production environment is unacceptable, as it will suspend all the threads, leading to services downtime.

    Developers could always try to reproduce the same issue on the test/staging environment. However, this is tricky as some issues cannot be reproduced easily in a different environment, or even disappear once restarted.

    And if you're thinking of adding some logs to your code to help trouble-shoot the issue, you will have to go through the following lifecycle: test, staging, and then to production. Time is money! This approach is inefficient! Worse still, the issue may not be fixed since it might be irreproducible once the JVM is restarted, as described above.

    Arthas is built to solve these issues. A developer can troubleshoot production issues on the fly. No JVM restart, no additional code changes. Arthas works as an observer, that is, it will never suspend your running threads.

    Key features

    • Check whether a class is loaded? Or where the class is loaded from? (Useful for trouble-shooting jar file conflicts)
    • Decompile a class to ensure the code is running as expected.
    • Check classloader statistics, e.g. the number of classloaders, the number of classes loaded per classloader, the classloader hierarchy, possible classloader leaks, etc.
    • Check the method invocation details, e.g. method parameter, returned values, exceptions and etc.
    • Check the stack trace of specified method invocation. This is useful when a developer wants to know the caller of the method.
    • Trace the method invocation to find slow sub-invocations.
    • Monitor method invocation statistics, e.g. QPS (Query Per Second), RT (Return Time), success rate and etc.
    • Monitor system metrics, thread states and CPU usage, GC statistics and etc.
    • Supports command line interactive mode, with auto-complete feature enabled.
    • Supports telnet and WebSocket, which enables both local and remote diagnostics with command line and browsers.
    • Supports profiler/Flame Graph
    • Support get objects in the heap that are instances of the specified class.
    • Supports JDK 6+
    • Supports Linux/Mac/Windows
    ',10),u=t("If you are using Arthas, please let us know. Your feedback is very important to us: "),p={href:"https://github.com/alibaba/arthas/issues/111",target:"_blank",rel:"noopener noreferrer"},m=t("View"),b=e("h2",{id:"contributors",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contributors","aria-hidden":"true"},"#"),t(" Contributors")],-1),f={href:"https://github.com/alibaba/arthas/graphs/contributors",target:"_blank",rel:"noopener noreferrer"},g=e("img",{src:"https://opencollective.com/arthas/contributors.svg?width=890&button=false",alt:""},null,-1);function v(_,w){const o=c("ExternalLinkIcon");return r(),n("div",null,[h,e("p",null,[e("strong",null,[u,e("a",p,[m,s(o)])])]),b,e("p",null,[e("a",f,[g,s(o)])])])}const x=a(d,[["render",v],["__file","index.html.vue"]]);export{x as default}; diff --git a/3.x/assets/index.html.da04bb04.js b/3.x/assets/index.html.da04bb04.js new file mode 100644 index 00000000000..fcfb480d1c6 --- /dev/null +++ b/3.x/assets/index.html.da04bb04.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-07555a84","path":"/en/doc/","title":"Introduction","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Background","slug":"background","link":"#background","children":[]},{"level":2,"title":"Key features","slug":"key-features","link":"#key-features","children":[]},{"level":2,"title":"Contributors","slug":"contributors","link":"#contributors","children":[]}],"git":{"updatedTime":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":2},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/README.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/install-detail.html.0208e8d8.js b/3.x/assets/install-detail.html.0208e8d8.js new file mode 100644 index 00000000000..3c105eedf52 --- /dev/null +++ b/3.x/assets/install-detail.html.0208e8d8.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-319f48f2","path":"/en/doc/install-detail.html","title":"Install Arthas","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Quick installation","slug":"quick-installation","link":"#quick-installation","children":[{"level":3,"title":"Use arthas-boot3(Recommended)","slug":"use-arthas-boot3-recommended","link":"#use-arthas-boot3-recommended","children":[]},{"level":3,"title":"Use as3.sh","slug":"use-as3-sh","link":"#use-as3-sh","children":[]}]},{"level":2,"title":"Full installation","slug":"full-installation","link":"#full-installation","children":[]},{"level":2,"title":"Manual Installation","slug":"manual-installation","link":"#manual-installation","children":[]},{"level":2,"title":"Installation via Packages","slug":"installation-via-packages","link":"#installation-via-packages","children":[{"level":3,"title":"Instruction for Debian based systems","slug":"instruction-for-debian-based-systems","link":"#instruction-for-debian-based-systems","children":[]},{"level":3,"title":"Instruction for Fedora based systems","slug":"instruction-for-fedora-based-systems","link":"#instruction-for-fedora-based-systems","children":[]},{"level":3,"title":"Usage","slug":"usage","link":"#usage","children":[]}]},{"level":2,"title":"Offline Help Documentation","slug":"offline-help-documentation","link":"#offline-help-documentation","children":[]},{"level":2,"title":"Uninstall","slug":"uninstall","link":"#uninstall","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/install-detail.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/install-detail.html.0c410a89.js b/3.x/assets/install-detail.html.0c410a89.js new file mode 100644 index 00000000000..2bb57b647c7 --- /dev/null +++ b/3.x/assets/install-detail.html.0c410a89.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-0cb398f4","path":"/doc/install-detail.html","title":"Arthas Install","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u5FEB\u901F\u5B89\u88C5","slug":"\u5FEB\u901F\u5B89\u88C5","link":"#\u5FEB\u901F\u5B89\u88C5","children":[{"level":3,"title":"\u4F7F\u7528arthas-boot3\uFF08\u63A8\u8350\uFF09","slug":"\u4F7F\u7528arthas-boot3-\u63A8\u8350","link":"#\u4F7F\u7528arthas-boot3-\u63A8\u8350","children":[]},{"level":3,"title":"\u4F7F\u7528as3.sh","slug":"\u4F7F\u7528as3-sh","link":"#\u4F7F\u7528as3-sh","children":[]}]},{"level":2,"title":"\u5168\u91CF\u5B89\u88C5","slug":"\u5168\u91CF\u5B89\u88C5","link":"#\u5168\u91CF\u5B89\u88C5","children":[]},{"level":2,"title":"\u624B\u52A8\u5B89\u88C5","slug":"\u624B\u52A8\u5B89\u88C5","link":"#\u624B\u52A8\u5B89\u88C5","children":[]},{"level":2,"title":"\u901A\u8FC7 rpm/deb \u6765\u5B89\u88C5","slug":"\u901A\u8FC7-rpm-deb-\u6765\u5B89\u88C5","link":"#\u901A\u8FC7-rpm-deb-\u6765\u5B89\u88C5","children":[{"level":3,"title":"\u5B89\u88C5 deb","slug":"\u5B89\u88C5-deb","link":"#\u5B89\u88C5-deb","children":[]},{"level":3,"title":"\u5B89\u88C5 rpm","slug":"\u5B89\u88C5-rpm","link":"#\u5B89\u88C5-rpm","children":[]},{"level":3,"title":"deb/rpm \u5B89\u88C5\u7684\u7528\u6CD5","slug":"deb-rpm-\u5B89\u88C5\u7684\u7528\u6CD5","link":"#deb-rpm-\u5B89\u88C5\u7684\u7528\u6CD5","children":[]}]},{"level":2,"title":"\u901A\u8FC7 Cloud Toolkit \u63D2\u4EF6\u4F7F\u7528 Arthas","slug":"\u901A\u8FC7-cloud-toolkit-\u63D2\u4EF6\u4F7F\u7528-arthas","link":"#\u901A\u8FC7-cloud-toolkit-\u63D2\u4EF6\u4F7F\u7528-arthas","children":[]},{"level":2,"title":"\u5378\u8F7D","slug":"\u5378\u8F7D","link":"#\u5378\u8F7D","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/install-detail.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/install-detail.html.50cfaa59.js b/3.x/assets/install-detail.html.50cfaa59.js new file mode 100644 index 00000000000..680fbc4a242 --- /dev/null +++ b/3.x/assets/install-detail.html.50cfaa59.js @@ -0,0 +1,13 @@ +import{_ as t,o as l,c as o,a,b as s,w as c,d as e,e as n,r as i}from"./app.4d248835.js";const h={},p=e(`

    Arthas Install

    \u5FEB\u901F\u5B89\u88C5

    \u4F7F\u7528arthas-boot3\uFF08\u63A8\u8350\uFF09

    \u4E0B\u8F7Darthas-boot3.jar\uFF0C\u7136\u540E\u7528java -jar\u7684\u65B9\u5F0F\u542F\u52A8\uFF1A

    curl -O https://arthas.aliyun.com/arthas-boot3.jar
    +java -jar arthas-boot3.jar
    +

    \u6253\u5370\u5E2E\u52A9\u4FE1\u606F\uFF1A

    java -jar arthas-boot3.jar -h
    +
    • \u5982\u679C\u4E0B\u8F7D\u901F\u5EA6\u6BD4\u8F83\u6162\uFF0C\u53EF\u4EE5\u4F7F\u7528 aliyun \u7684\u955C\u50CF\uFF1A

      java -jar arthas-boot3.jar --repo-mirror aliyun --use-http
      +

    \u4F7F\u7528as3.sh

    Arthas \u652F\u6301\u5728 Linux/Unix/Mac \u7B49\u5E73\u53F0\u4E0A\u4E00\u952E\u5B89\u88C5\uFF0C\u8BF7\u590D\u5236\u4EE5\u4E0B\u5185\u5BB9\uFF0C\u5E76\u7C98\u8D34\u5230\u547D\u4EE4\u884C\u4E2D\uFF0C\u6572 \u56DE\u8F66 \u6267\u884C\u5373\u53EF\uFF1A

    curl -L https://arthas.aliyun.com/install3.sh | sh
    +

    \u4E0A\u8FF0\u547D\u4EE4\u4F1A\u4E0B\u8F7D\u542F\u52A8\u811A\u672C\u6587\u4EF6 as3.sh \u5230\u5F53\u524D\u76EE\u5F55\uFF0C\u4F60\u53EF\u4EE5\u653E\u5728\u4EFB\u4F55\u5730\u65B9\u6216\u5C06\u5176\u52A0\u5165\u5230 $PATH \u4E2D\u3002

    \u76F4\u63A5\u5728 shell \u4E0B\u9762\u6267\u884C./as3.sh\uFF0C\u5C31\u4F1A\u8FDB\u5165\u4EA4\u4E92\u754C\u9762\u3002

    \u4E5F\u53EF\u4EE5\u6267\u884C./as3.sh -h\u6765\u83B7\u53D6\u66F4\u591A\u53C2\u6570\u4FE1\u606F\u3002

    \u5168\u91CF\u5B89\u88C5

    \u4ECE Github Releases \u9875\u4E0B\u8F7D

    `,16),u={href:"https://github.com/alibaba/arthas/releases",target:"_blank",rel:"noopener noreferrer"},b=n("https://github.com/alibaba/arthas/releases"),m=e(`

    \u89E3\u538B\u540E\uFF0C\u5728\u6587\u4EF6\u5939\u91CC\u6709arthas-boot3.jar\uFF0C\u76F4\u63A5\u7528java -jar\u7684\u65B9\u5F0F\u542F\u52A8\uFF1A

    java -jar arthas-boot3.jar
    +

    \u6253\u5370\u5E2E\u52A9\u4FE1\u606F\uFF1A

    java -jar arthas-boot3.jar -h
    +

    \u624B\u52A8\u5B89\u88C5

    `,5),v=n("\u624B\u52A8\u5B89\u88C5"),g=e(`

    \u901A\u8FC7 rpm/deb \u6765\u5B89\u88C5

    \u5728 releases \u9875\u9762\u4E0B\u8F7D rpm/deb \u5305\uFF1A https://github.com/alibaba/arthas/releases

    \u5B89\u88C5 deb

    sudo dpkg -i arthas*.deb
    +

    \u5B89\u88C5 rpm

    sudo rpm -i arthas*.rpm
    +

    deb/rpm \u5B89\u88C5\u7684\u7528\u6CD5

    \u5728\u5B89\u88C5\u540E\uFF0C\u53EF\u4EE5\u76F4\u63A5\u6267\u884C\uFF1A

    as3.sh
    +

    \u901A\u8FC7 Cloud Toolkit \u63D2\u4EF6\u4F7F\u7528 Arthas

    `,10),k={href:"https://github.com/alibaba/arthas/issues/570",target:"_blank",rel:"noopener noreferrer"},f=n("\u901A\u8FC7 Cloud Toolkit \u63D2\u4EF6\u4F7F\u7528 Arthas \u4E00\u952E\u8BCA\u65AD\u8FDC\u7A0B\u670D\u52A1\u5668"),_=e(`

    \u5378\u8F7D

    • \u5728 Linux/Unix/Mac \u5E73\u53F0

      \u5220\u9664\u4E0B\u9762\u6587\u4EF6\uFF1A

      rm -rf ~/.arthas/
      +rm -rf ~/logs/arthas
      +
    • Windows \u5E73\u53F0\u76F4\u63A5\u5220\u9664 user home \u4E0B\u9762\u7684.arthas\u548Clogs/arthas\u76EE\u5F55

    `,2);function x(j,L){const r=i("ExternalLinkIcon"),d=i("RouterLink");return l(),o("div",null,[p,a("p",null,[a("a",u,[b,s(r)])]),m,a("p",null,[s(d,{to:"/doc/manual-install.html"},{default:c(()=>[v]),_:1})]),g,a("ul",null,[a("li",null,[a("a",k,[f,s(r)])])]),_])}const y=t(h,[["render",x],["__file","install-detail.html.vue"]]);export{y as default}; diff --git a/3.x/assets/install-detail.html.cbd1e77a.js b/3.x/assets/install-detail.html.cbd1e77a.js new file mode 100644 index 00000000000..cc592fc3eee --- /dev/null +++ b/3.x/assets/install-detail.html.cbd1e77a.js @@ -0,0 +1,12 @@ +import{_ as o,o as l,c as d,a,b as s,w as c,d as e,e as n,r as i}from"./app.4d248835.js";const h={},u=e(`

    Install Arthas

    Quick installation

    Downloadarthas-boot3.jar\uFF0CStart with java command:

    curl -O https://arthas.aliyun.com/arthas-boot3.jar
    +java -jar arthas-boot3.jar
    +

    Print usage:

    java -jar arthas-boot3.jar -h
    +

    Use as3.sh

    You can install Arthas with one single line command on Linux, Unix, and Mac. Pls. copy the following command and paste it into the command line, then press Enter to run:

    curl -L https://arthas.aliyun.com/install3.sh | sh
    +

    The command above will download the bootstrap script as3.sh to the current directory. You can move it to any other place you want, or put its location in $PATH.

    You can enter its interactive interface by executing as3.sh, or execute as3.sh -h for more help information.

    Full installation

    Download from Github Releases

    `,14),p={href:"https://github.com/alibaba/arthas/releases",target:"_blank",rel:"noopener noreferrer"},m=n("https://github.com/alibaba/arthas/releases"),b=e(`

    Download and unzip, find arthas-boot3.jar in the directory. Start with java command:

    java -jar arthas-boot3.jar
    +

    Print usage:

    java -jar arthas-boot3.jar -h
    +

    Manual Installation

    `,5),v=n("Manual Installation"),f=e(`

    Installation via Packages

    Arthas has packages for Debian and Fedora based systems. you can get them from the github releases page https://github.com/alibaba/arthas/releases.

    Instruction for Debian based systems

    sudo dpkg -i arthas*.deb
    +

    Instruction for Fedora based systems

    sudo rpm -i arthas*.rpm
    +

    Usage

    After the installation of packages, execute

    as3.sh
    +

    Offline Help Documentation

    `,10),g=n("Latest Version Documentation, Click To Download:"),k={href:"https://arthas.aliyun.com/download/doc/latest_version",target:"_blank",rel:"noopener noreferrer"},_=a("img",{src:"https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square",alt:"",title:"Arthas"},null,-1),x=e(`

    Uninstall

    • On Linux/Unix/Mac, delete the files with the following command:

      rm -rf ~/.arthas/
      +rm -rf ~/logs/arthas/
      +
    • On Windows, delete .arthas and logs/arthas directory under user home.

    `,2);function y(j,w){const t=i("ExternalLinkIcon"),r=i("RouterLink");return l(),d("div",null,[u,a("p",null,[a("a",p,[m,s(t)])]),b,a("p",null,[s(r,{to:"/en/doc/manual-install.html"},{default:c(()=>[v]),_:1})]),f,a("p",null,[g,a("a",k,[_,s(t)])]),x])}const I=o(h,[["render",y],["__file","install-detail.html.vue"]]);export{I as default}; diff --git a/3.x/assets/jad.html.01fefda3.js b/3.x/assets/jad.html.01fefda3.js new file mode 100644 index 00000000000..7fa13b3ef2b --- /dev/null +++ b/3.x/assets/jad.html.01fefda3.js @@ -0,0 +1,119 @@ +import{_ as l,o as i,c as u,a as s,b as a,w as t,e as n,d as o,r as p}from"./app.4d248835.js";const r={},d=s("h1",{id:"jad",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#jad","aria-hidden":"true"},"#"),n(" jad")],-1),k={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=en&id=command-jad",target:"_blank",rel:"noopener noreferrer"},m=s("code",null,"jad",-1),v=n(" online tutorial"),h=s("div",{class:"custom-container tip"},[s("p",{class:"custom-container-title"},"TIP"),s("p",null,"Decompile the specified classes.")],-1),b=s("code",null,"jad",-1),g=n(" helps to decompile the byte code running in JVM to the source code to assist you to understand the logic behind better. If you need to download the bytecode of classes in a specific package directory in bulk, you can refer to the "),y=n("dump"),w=n(" tool for assistance."),f=o(`
    • The decompiled code is syntax highlighted for better readability in Arthas console.
    • It is possible that there's grammar error in the decompiled code, but it should not affect your interpretation.

    Options

    NameSpecification
    class-patternpattern for the class name
    [c:]hashcode of the class loader that loads the class
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.
    [E]turn on regex match while the default is wildcard match

    Usage

    Decompile java.lang.String

    $ jad java.lang.String
    +
    +ClassLoader:
    +
    +Location:
    +
    +
    +        /*
    +         * Decompiled with CFR.
    +         */
    +        package java.lang;
    +
    +        import java.io.ObjectStreamField;
    +        import java.io.Serializable;
    +...
    +        public final class String
    +        implements Serializable,
    +        Comparable<String>,
    +        CharSequence {
    +            private final char[] value;
    +            private int hash;
    +            private static final long serialVersionUID = -6849794470754667710L;
    +            private static final ObjectStreamField[] serialPersistentFields = new ObjectStreamField[0];
    +            public static final Comparator<String> CASE_INSENSITIVE_ORDER = new CaseInsensitiveComparator();
    +...
    +            public String(byte[] byArray, int n, int n2, Charset charset) {
    +/*460*/         if (charset == null) {
    +                    throw new NullPointerException("charset");
    +                }
    +/*462*/         String.checkBounds(byArray, n, n2);
    +/*463*/         this.value = StringCoding.decode(charset, byArray, n, n2);
    +            }
    +...
    +
    `,7),_=n("By default, the decompile result will have the "),j=s("code",null,"ClassLoader",-1),L=n(" information. With the "),x=s("code",null,"--source-only",-1),C=n(" option, you can print only the source code. Conveniently used with the "),S=n("mc"),E=n("/"),I=n("retransform"),A=n(" commands."),D=o(`
    $ jad --source-only demo.MathGame
    +/*
    + * Decompiled with CFR 0_132.
    + */
    +package demo;
    +
    +import java.io.PrintStream;
    +import java.util.ArrayList;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.Random;
    +import java.util.concurrent.TimeUnit;
    +
    +public class MathGame {
    +    private static Random random = new Random();
    +    public int illegalArgumentCount = 0;
    +...
    +

    Decompile the specified method

    $ jad demo.MathGame main
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@232204a1
    +  +-sun.misc.Launcher$ExtClassLoader@7f31245a
    +
    +Location:
    +/private/tmp/math-game.jar
    +
    +       public static void main(String[] args) throws InterruptedException {
    +           MathGame game = new MathGame();
    +           while (true) {
    +/*16*/         game.run();
    +/*17*/         TimeUnit.SECONDS.sleep(1L);
    +           }
    +       }
    +

    Do not print line numbers

    • --lineNumber: Output source code contins line numbers, default value true
    $ jad demo.MathGame main --lineNumber false
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@232204a1
    +  +-sun.misc.Launcher$ExtClassLoader@7f31245a
    +
    +Location:
    +/private/tmp/math-game.jar
    +
    +public static void main(String[] args) throws InterruptedException {
    +    MathGame game = new MathGame();
    +    while (true) {
    +        game.run();
    +        TimeUnit.SECONDS.sleep(1L);
    +    }
    +}
    +

    Decompile with specified classLoader

    TIP

    If the target class is loaded by multiple classloaders, jad outputs the hashcode of the corresponding classloaders, then you can re-run jad and specify -c <hashcode> to decompile the target class from the specified classloader.

    $ jad org.apache.log4j.Logger
    +
    +Found more than one class for: org.apache.log4j.Logger, Please use jad -c hashcode org.apache.log4j.Logger
    +HASHCODE  CLASSLOADER
    +69dcaba4  +-monitor's ModuleClassLoader
    +6e51ad67  +-java.net.URLClassLoader@6e51ad67
    +            +-sun.misc.Launcher$AppClassLoader@6951a712
    +            +-sun.misc.Launcher$ExtClassLoader@6fafc4c2
    +2bdd9114  +-pandora-qos-service's ModuleClassLoader
    +4c0df5f8  +-pandora-framework's ModuleClassLoader
    +
    +Affect(row-cnt:0) cost in 38 ms.
    +$ jad org.apache.log4j.Logger -c 69dcaba4
    +
    +ClassLoader:
    ++-monitor's ModuleClassLoader
    +
    +Location:
    +/Users/admin/app/log4j-1.2.14.jar
    +
    +package org.apache.log4j;
    +
    +import org.apache.log4j.spi.*;
    +
    +public class Logger extends Category
    +{
    +    private static final String FQCN;
    +
    +    protected Logger(String name)
    +    {
    +        super(name);
    +    }
    +
    +...
    +
    +Affect(row-cnt:1) cost in 190 ms.
    +

    For classloader with only one instance, it can be specified by --classLoaderClass using class name, which is more convenient to use.

    The value of --classloaderclass 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, -c <hashcode> is dynamic.

    `,11);function M(N,$){const c=p("ExternalLinkIcon"),e=p("RouterLink");return i(),u("div",null,[d,s("p",null,[s("a",k,[m,v,a(c)])]),h,s("p",null,[b,g,a(e,{to:"/en/doc/dump.html"},{default:t(()=>[y]),_:1}),w]),f,s("p",null,[_,j,L,x,C,a(e,{to:"/en/doc/mc.html"},{default:t(()=>[S]),_:1}),E,a(e,{to:"/en/doc/retransform.html"},{default:t(()=>[I]),_:1}),A]),D])}const T=l(r,[["render",M],["__file","jad.html.vue"]]);export{T as default}; diff --git a/3.x/assets/jad.html.67f11a53.js b/3.x/assets/jad.html.67f11a53.js new file mode 100644 index 00000000000..19c433d7ac2 --- /dev/null +++ b/3.x/assets/jad.html.67f11a53.js @@ -0,0 +1,119 @@ +import{_ as l,o as i,c as u,a as s,b as a,w as p,e as n,d as o,r as t}from"./app.4d248835.js";const r={},k=s("h1",{id:"jad",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#jad","aria-hidden":"true"},"#"),n(" jad")],-1),d={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=cn&id=command-jad",target:"_blank",rel:"noopener noreferrer"},m=s("code",null,"jad",-1),v=n("\u5728\u7EBF\u6559\u7A0B"),b=s("div",{class:"custom-container tip"},[s("p",{class:"custom-container-title"},"\u63D0\u793A"),s("p",null,"\u53CD\u7F16\u8BD1\u6307\u5B9A\u5DF2\u52A0\u8F7D\u7C7B\u7684\u6E90\u7801")],-1),h=s("code",null,"jad",-1),g=n(" \u547D\u4EE4\u5C06 JVM \u4E2D\u5B9E\u9645\u8FD0\u884C\u7684 class \u7684 byte code \u53CD\u7F16\u8BD1\u6210 java \u4EE3\u7801\uFF0C\u4FBF\u4E8E\u4F60\u7406\u89E3\u4E1A\u52A1\u903B\u8F91\uFF1B\u5982\u9700\u6279\u91CF\u4E0B\u8F7D\u6307\u5B9A\u5305\u7684\u76EE\u5F55\u7684 class \u5B57\u8282\u7801\u53EF\u4EE5\u53C2\u8003 "),y=n("dump"),w=n("\u3002"),_=o(`
    • \u5728 Arthas Console \u4E0A\uFF0C\u53CD\u7F16\u8BD1\u51FA\u6765\u7684\u6E90\u7801\u662F\u5E26\u8BED\u6CD5\u9AD8\u4EAE\u7684\uFF0C\u9605\u8BFB\u66F4\u65B9\u4FBF
    • \u5F53\u7136\uFF0C\u53CD\u7F16\u8BD1\u51FA\u6765\u7684 java \u4EE3\u7801\u53EF\u80FD\u4F1A\u5B58\u5728\u8BED\u6CD5\u9519\u8BEF\uFF0C\u4F46\u4E0D\u5F71\u54CD\u4F60\u8FDB\u884C\u9605\u8BFB\u7406\u89E3

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    class-pattern\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    [c:]\u7C7B\u6240\u5C5E ClassLoader \u7684 hashcode
    [classLoaderClass:]\u6307\u5B9A\u6267\u884C\u8868\u8FBE\u5F0F\u7684 ClassLoader \u7684 class name
    [E]\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D

    \u4F7F\u7528\u53C2\u8003

    \u53CD\u7F16\u8BD1java.lang.String

    $ jad java.lang.String
    +
    +ClassLoader:
    +
    +Location:
    +
    +
    +        /*
    +         * Decompiled with CFR.
    +         */
    +        package java.lang;
    +
    +        import java.io.ObjectStreamField;
    +        import java.io.Serializable;
    +...
    +        public final class String
    +        implements Serializable,
    +        Comparable<String>,
    +        CharSequence {
    +            private final char[] value;
    +            private int hash;
    +            private static final long serialVersionUID = -6849794470754667710L;
    +            private static final ObjectStreamField[] serialPersistentFields = new ObjectStreamField[0];
    +            public static final Comparator<String> CASE_INSENSITIVE_ORDER = new CaseInsensitiveComparator();
    +...
    +            public String(byte[] byArray, int n, int n2, Charset charset) {
    +/*460*/         if (charset == null) {
    +                    throw new NullPointerException("charset");
    +                }
    +/*462*/         String.checkBounds(byArray, n, n2);
    +/*463*/         this.value = StringCoding.decode(charset, byArray, n, n2);
    +            }
    +...
    +

    \u53CD\u7F16\u8BD1\u65F6\u53EA\u663E\u793A\u6E90\u4EE3\u7801

    `,7),j=n("\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u53CD\u7F16\u8BD1\u7ED3\u679C\u91CC\u4F1A\u5E26\u6709"),f=s("code",null,"ClassLoader",-1),L=n("\u4FE1\u606F\uFF0C\u901A\u8FC7"),C=s("code",null,"--source-only",-1),x=n("\u9009\u9879\uFF0C\u53EF\u4EE5\u53EA\u6253\u5370\u6E90\u4EE3\u7801\u3002\u65B9\u4FBF\u548C"),S=n("mc"),E=n("/"),A=n("retransform"),M=n("\u547D\u4EE4\u7ED3\u5408\u4F7F\u7528\u3002"),N=o(`
    $ jad --source-only demo.MathGame
    +/*
    + * Decompiled with CFR 0_132.
    + */
    +package demo;
    +
    +import java.io.PrintStream;
    +import java.util.ArrayList;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.Random;
    +import java.util.concurrent.TimeUnit;
    +
    +public class MathGame {
    +    private static Random random = new Random();
    +    public int illegalArgumentCount = 0;
    +...
    +

    \u53CD\u7F16\u8BD1\u6307\u5B9A\u7684\u51FD\u6570

    $ jad demo.MathGame main
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@232204a1
    +  +-sun.misc.Launcher$ExtClassLoader@7f31245a
    +
    +Location:
    +/private/tmp/math-game.jar
    +
    +       public static void main(String[] args) throws InterruptedException {
    +           MathGame game = new MathGame();
    +           while (true) {
    +/*16*/         game.run();
    +/*17*/         TimeUnit.SECONDS.sleep(1L);
    +           }
    +       }
    +

    \u53CD\u7F16\u8BD1\u65F6\u4E0D\u663E\u793A\u884C\u53F7

    --lineNumber \u53C2\u6570\u9ED8\u8BA4\u503C\u4E3A true\uFF0C\u663E\u793A\u6307\u5B9A\u4E3A false \u5219\u4E0D\u6253\u5370\u884C\u53F7\u3002

    $ jad demo.MathGame main --lineNumber false
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@232204a1
    +  +-sun.misc.Launcher$ExtClassLoader@7f31245a
    +
    +Location:
    +/private/tmp/math-game.jar
    +
    +public static void main(String[] args) throws InterruptedException {
    +    MathGame game = new MathGame();
    +    while (true) {
    +        game.run();
    +        TimeUnit.SECONDS.sleep(1L);
    +    }
    +}
    +

    \u53CD\u7F16\u8BD1\u65F6\u6307\u5B9A ClassLoader

    \u63D0\u793A

    \u5F53\u6709\u591A\u4E2A ClassLoader \u90FD\u52A0\u8F7D\u4E86\u8FD9\u4E2A\u7C7B\u65F6\uFF0Cjad \u547D\u4EE4\u4F1A\u8F93\u51FA\u5BF9\u5E94 ClassLoader \u5B9E\u4F8B\u7684 hashcode\uFF0C\u7136\u540E\u4F60\u53EA\u9700\u8981\u91CD\u65B0\u6267\u884C jad \u547D\u4EE4\uFF0C\u5E76\u4F7F\u7528\u53C2\u6570 -c <hashcode> \u5C31\u53EF\u4EE5\u53CD\u7F16\u8BD1\u6307\u5B9A ClassLoader \u52A0\u8F7D\u7684\u90A3\u4E2A\u7C7B\u4E86\uFF1B

    $ jad org.apache.log4j.Logger
    +
    +Found more than one class for: org.apache.log4j.Logger, Please use jad -c hashcode org.apache.log4j.Logger
    +HASHCODE  CLASSLOADER
    +69dcaba4  +-monitor's ModuleClassLoader
    +6e51ad67  +-java.net.URLClassLoader@6e51ad67
    +            +-sun.misc.Launcher$AppClassLoader@6951a712
    +            +-sun.misc.Launcher$ExtClassLoader@6fafc4c2
    +2bdd9114  +-pandora-qos-service's ModuleClassLoader
    +4c0df5f8  +-pandora-framework's ModuleClassLoader
    +
    +Affect(row-cnt:0) cost in 38 ms.
    +$ jad org.apache.log4j.Logger -c 69dcaba4
    +
    +ClassLoader:
    ++-monitor's ModuleClassLoader
    +
    +Location:
    +/Users/admin/app/log4j-1.2.14.jar
    +
    +package org.apache.log4j;
    +
    +import org.apache.log4j.spi.*;
    +
    +public class Logger extends Category
    +{
    +    private static final String FQCN;
    +
    +    protected Logger(String name)
    +    {
    +        super(name);
    +    }
    +
    +...
    +
    +Affect(row-cnt:1) cost in 190 ms.
    +

    \u5BF9\u4E8E\u53EA\u6709\u552F\u4E00\u5B9E\u4F8B\u7684 ClassLoader \u8FD8\u53EF\u4EE5\u901A\u8FC7--classLoaderClass\u6307\u5B9A class name\uFF0C\u4F7F\u7528\u8D77\u6765\u66F4\u52A0\u65B9\u4FBF\uFF1A

    --classLoaderClass \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-c <hashcode>\u662F\u52A8\u6001\u53D8\u5316\u7684\u3002

    `,11);function $(R,I){const c=t("ExternalLinkIcon"),e=t("RouterLink");return i(),u("div",null,[k,s("p",null,[s("a",d,[m,v,a(c)])]),b,s("p",null,[h,g,a(e,{to:"/doc/dump.html"},{default:p(()=>[y]),_:1}),w]),_,s("p",null,[j,f,L,C,x,a(e,{to:"/doc/mc.html"},{default:p(()=>[S]),_:1}),E,a(e,{to:"/doc/retransform.html"},{default:p(()=>[A]),_:1}),M]),N])}const F=l(r,[["render",$],["__file","jad.html.vue"]]);export{F as default}; diff --git a/3.x/assets/jad.html.d639a8bb.js b/3.x/assets/jad.html.d639a8bb.js new file mode 100644 index 00000000000..b4beb6ccbda --- /dev/null +++ b/3.x/assets/jad.html.d639a8bb.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-211d675c","path":"/doc/jad.html","title":"jad","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":"\u53CD\u7F16\u8BD1java.lang.String","slug":"\u53CD\u7F16\u8BD1java-lang-string","link":"#\u53CD\u7F16\u8BD1java-lang-string","children":[]},{"level":3,"title":"\u53CD\u7F16\u8BD1\u65F6\u53EA\u663E\u793A\u6E90\u4EE3\u7801","slug":"\u53CD\u7F16\u8BD1\u65F6\u53EA\u663E\u793A\u6E90\u4EE3\u7801","link":"#\u53CD\u7F16\u8BD1\u65F6\u53EA\u663E\u793A\u6E90\u4EE3\u7801","children":[]},{"level":3,"title":"\u53CD\u7F16\u8BD1\u6307\u5B9A\u7684\u51FD\u6570","slug":"\u53CD\u7F16\u8BD1\u6307\u5B9A\u7684\u51FD\u6570","link":"#\u53CD\u7F16\u8BD1\u6307\u5B9A\u7684\u51FD\u6570","children":[]},{"level":3,"title":"\u53CD\u7F16\u8BD1\u65F6\u4E0D\u663E\u793A\u884C\u53F7","slug":"\u53CD\u7F16\u8BD1\u65F6\u4E0D\u663E\u793A\u884C\u53F7","link":"#\u53CD\u7F16\u8BD1\u65F6\u4E0D\u663E\u793A\u884C\u53F7","children":[]},{"level":3,"title":"\u53CD\u7F16\u8BD1\u65F6\u6307\u5B9A ClassLoader","slug":"\u53CD\u7F16\u8BD1\u65F6\u6307\u5B9A-classloader","link":"#\u53CD\u7F16\u8BD1\u65F6\u6307\u5B9A-classloader","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/jad.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/jad.html.e520a68e.js b/3.x/assets/jad.html.e520a68e.js new file mode 100644 index 00000000000..9f14a323d2f --- /dev/null +++ b/3.x/assets/jad.html.e520a68e.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-207b7d70","path":"/en/doc/jad.html","title":"jad","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":"Decompile java.lang.String","slug":"decompile-java-lang-string","link":"#decompile-java-lang-string","children":[]},{"level":3,"title":"Print source only","slug":"print-source-only","link":"#print-source-only","children":[]},{"level":3,"title":"Decompile the specified method","slug":"decompile-the-specified-method","link":"#decompile-the-specified-method","children":[]},{"level":3,"title":"Do not print line numbers","slug":"do-not-print-line-numbers","link":"#do-not-print-line-numbers","children":[]},{"level":3,"title":"Decompile with specified classLoader","slug":"decompile-with-specified-classloader","link":"#decompile-with-specified-classloader","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/jad.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/jfr.html.57a326e6.js b/3.x/assets/jfr.html.57a326e6.js new file mode 100644 index 00000000000..74a0cd1987c --- /dev/null +++ b/3.x/assets/jfr.html.57a326e6.js @@ -0,0 +1 @@ +const r=JSON.parse('{"key":"v-40de7e67","path":"/en/doc/jfr.html","title":"jfr","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":3,"title":"Supported Options","slug":"supported-options","link":"#supported-options","children":[]},{"level":2,"title":"Start jfr recording","slug":"start-jfr-recording","link":"#start-jfr-recording","children":[]},{"level":2,"title":"dump jfr recording","slug":"dump-jfr-recording","link":"#dump-jfr-recording","children":[]},{"level":2,"title":"Stop jfr recording","slug":"stop-jfr-recording","link":"#stop-jfr-recording","children":[]},{"level":2,"title":"View JFR recording results under arthas-output via browser","slug":"view-jfr-recording-results-under-arthas-output-via-browser","link":"#view-jfr-recording-results-under-arthas-output-via-browser","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"longxu0509","email":"108991596+longxu0509@users.noreply.github.com","commits":1}]},"filePathRelative":"en/doc/jfr.md","version":"3.7.3"}');export{r as data}; diff --git a/3.x/assets/jfr.html.63d78e12.js b/3.x/assets/jfr.html.63d78e12.js new file mode 100644 index 00000000000..f5f591b5cb8 --- /dev/null +++ b/3.x/assets/jfr.html.63d78e12.js @@ -0,0 +1,22 @@ +import{_ as r}from"./arthas-output-recording.5e4ef7bc.js";import{_ as i,o,c as d,a as e,b as s,e as t,t as l,d as n,r as c}from"./app.4d248835.js";const p={},u=e("h1",{id:"jfr",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jfr","aria-hidden":"true"},"#"),t(" jfr")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-jfr",target:"_blank",rel:"noopener noreferrer"},g=e("code",null,"jfr",-1),m=t(" online tutorial"),f=n(`

    TIP

    Java Flight Recorder (JFR) is a tool for collecting diagnostic and profiling data about a running Java application. It is integrated into the Java Virtual Machine (JVM) and causes almost no performance overhead, so it can be used even in heavily loaded production environments.

    The jfr command supports starting and stopping JFR recordings during dynamic program running. Recording collects data about events. Events occur in the JVM or the Java application at a specific point in time. Each event has a name, a time stamp, and an optional payload. The payload is the data associated with an event, for example, the CPU usage, the Java heap size before and after the event, the thread ID of the lock holder, and so on.

    The basic usage of the jfr command isjfr cmd [actionArg]

    Note: jfr is supported only after the 8u262 version of jdk8

    Supported Options

    NameSpecification
    cmdCommand to execute, support\u3010start\uFF0Cstatus\uFF0Cdump\uFF0Cstop\u3011
    actionArgAttribute name pattern
    [n:]Name of recording
    [r:]Recording id
    [dumponexit:]When the program exits, whether to dump the .jfr file. (boolean false)
    [d:]Duration of recording, i.e. 60s, 2m, 5h, 3d. default no delay
    [duration:]Duration of recording, default forever.
    [s:]Server-side template, The default is default.jfc located at $JAVA_HOME/lib/jfr/default.jfc
    [f:]Resulting recording filename
    [maxage:]Maximum age of buffer data
    [maxsize:]Maximum size of buffers in bytes
    [state:]Recording state

    Start jfr recording

    $ jfr start
    +Started recording 1. No limit specified, using maxsize=250MB as default.
    +

    TIP

    The default JFR record is started.

    Start the JFR recording, specify the recording name, duration, file saving path.

    $ jfr start -n myRecording --duration 60s -f /tmp/myRecording.jfr
    +Started recording 2. The result will be written to:
    +/tmp/myRecording.jfr
    +

    ##View jfr recordings status

    The default is to view all JFR recordings.

    $ jfr status
    +Recording: recording=1 name=Recording-1 (running)
    +Recording: recording=2 name=myRecording duration=PT1M (closed)
    +

    View the records of the specified recording ID.

    $ jfr status -r 1
    +Recording: recording=1 name=Recording-1 (running)
    +

    View recordings in a specified state.

    $ jfr status --state closed
    +Recording: recording=2 name=myRecording duration=PT1M (closed)
    +

    dump jfr recording

    `,19),v=t("The "),b=e("code",null,"jfr dump",-1),x=e("br",null,null,-1),k=t(" Specifies the record output path."),_=n(`
    $ jfr dump -r 1 -f /tmp/myRecording1.jfr
    +Dump recording 1, The result will be written to:
    +/tmp/myRecording1.jfr
    +

    The file output path is not specified. By default, it is saved to the arthas-output directory

    $ jfr dump -r 1
    +Dump recording 1, The result will be written to:
    +/tmp/test/arthas-output/20220819-200915.jfr
    +

    Stop jfr recording

    No recording output path is specified, default is saved to arthas-output directory.

    $ jfr stop -r 1
    +Stop recording 1, The result will be written to:
    +/tmp/test/arthas-output/20220819-202049.jfr
    +

    notice: A recording can only be stopped once.

    You can also specify the record output path.

    View JFR recording results under arthas-output via browser

    `,9),y=t("By default, arthas uses http port 8563 , which can be opened:"),j={href:"http://localhost:8563/arthas-output/",target:"_blank",rel:"noopener noreferrer"},w=t("http://localhost:8563/arthas-output/"),R=t(" View the "),J=e("code",null,"arthas-output",-1),T=t(" directory below JFR recording results:"),S=e("p",null,[e("img",{src:r,alt:""})],-1),V=e("p",null,"The resulting results can be viewed with tools that support the JFR format. Such as:",-1),F=e("ul",null,[e("li",null,"JDK Mission Control \uFF1A https://github.com/openjdk/jmc")],-1);function M(N,$){const a=c("ExternalLinkIcon");return o(),d("div",null,[u,e("p",null,[e("a",h,[g,m,s(a)])]),f,e("p",null,[v,b,t(l()+" command will output the recordings from the start until the execution of the command to a JFR file, without stopping the recording.",1),x,k]),_,e("p",null,[y,e("a",j,[w,s(a)]),R,J,T]),S,V,F])}const A=i(p,[["render",M],["__file","jfr.html.vue"]]);export{A as default}; diff --git a/3.x/assets/jfr.html.bb7f02ab.js b/3.x/assets/jfr.html.bb7f02ab.js new file mode 100644 index 00000000000..b0b5eedbdbb --- /dev/null +++ b/3.x/assets/jfr.html.bb7f02ab.js @@ -0,0 +1,22 @@ +import{_ as l}from"./arthas-output-recording.5e4ef7bc.js";import{_ as i,o as d,c as o,a as e,b as s,e as t,t as n,d as r,r as c}from"./app.4d248835.js";const p={},u=e("h1",{id:"jfr",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jfr","aria-hidden":"true"},"#"),t(" jfr")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-jfr",target:"_blank",rel:"noopener noreferrer"},m=e("code",null,"jfr",-1),g=t("\u5728\u7EBF\u6559\u7A0B"),v=r(`

    \u63D0\u793A

    Java Flight Recorder (JFR) \u662F\u4E00\u79CD\u7528\u4E8E\u6536\u96C6\u6709\u5173\u6B63\u5728\u8FD0\u884C\u7684 Java \u5E94\u7528\u7A0B\u5E8F\u7684\u8BCA\u65AD\u548C\u5206\u6790\u6570\u636E\u7684\u5DE5\u5177\u3002\u5B83\u96C6\u6210\u5230 Java \u865A\u62DF\u673A (JVM) \u4E2D\uFF0C\u51E0\u4E4E\u4E0D\u4F1A\u9020\u6210\u6027\u80FD\u5F00\u9500\uFF0C\u56E0\u6B64\u5373\u4F7F\u5728\u8D1F\u8F7D\u8F83\u91CD\u7684\u751F\u4EA7\u73AF\u5883\u4E2D\u4E5F\u53EF\u4EE5\u4F7F\u7528\u3002

    jfr \u547D\u4EE4\u652F\u6301\u5728\u7A0B\u5E8F\u52A8\u6001\u8FD0\u884C\u8FC7\u7A0B\u4E2D\u5F00\u542F\u548C\u5173\u95ED JFR \u8BB0\u5F55\u3002 \u8BB0\u5F55\u6536\u96C6\u6709\u5173 event \u7684\u6570\u636E\u3002\u4E8B\u4EF6\u5728\u7279\u5B9A\u65F6\u95F4\u70B9\u53D1\u751F\u5728 JVM \u6216 Java \u5E94\u7528\u7A0B\u5E8F\u4E2D\u3002\u6BCF\u4E2A\u4E8B\u4EF6\u90FD\u6709\u4E00\u4E2A\u540D\u79F0\u3001\u4E00\u4E2A\u65F6\u95F4\u6233\u548C\u4E00\u4E2A\u53EF\u9009\u7684\u6709\u6548\u8D1F\u8F7D\u3002\u8D1F\u8F7D\u662F\u4E0E\u4E8B\u4EF6\u76F8\u5173\u7684\u6570\u636E\uFF0C\u4F8B\u5982 CPU \u4F7F\u7528\u7387\u3001\u4E8B\u4EF6\u524D\u540E\u7684 Java \u5806\u5927\u5C0F\u3001\u9501\u6301\u6709\u8005\u7684\u7EBF\u7A0B ID \u7B49\u3002

    jfr \u547D\u4EE4\u57FA\u672C\u8FD0\u884C\u7ED3\u6784\u662F jfr cmd [actionArg]

    \u6CE8\u610F\uFF1A JDK8 \u7684 8u262 \u7248\u672C\u4E4B\u540E\u624D\u652F\u6301 jfr

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    cmd\u8981\u6267\u884C\u7684\u64CD\u4F5C \u652F\u6301\u7684\u547D\u4EE4\u3010start\uFF0Cstatus\uFF0Cdump\uFF0Cstop\u3011
    actionArg\u5C5E\u6027\u540D\u6A21\u5F0F
    [n:]\u8BB0\u5F55\u540D\u79F0
    [r:]\u8BB0\u5F55 id \u503C
    [dumponexit:]\u7A0B\u5E8F\u9000\u51FA\u65F6\uFF0C\u662F\u5426\u8981 dump \u51FA .jfr \u6587\u4EF6\uFF0C\u9ED8\u8BA4\u4E3A false
    [d:]\u5EF6\u8FDF\u591A\u4E45\u540E\u542F\u52A8 JFR \u8BB0\u5F55\uFF0C\u652F\u6301\u5E26\u5355\u4F4D\u914D\u7F6E\uFF0Ceg: 60s, 2m, 5h, 3d. \u4E0D\u5E26\u5355\u4F4D\u5C31\u662F\u79D2\uFF0C\u9ED8\u8BA4\u65E0\u5EF6\u8FDF
    [duration:]JFR \u8BB0\u5F55\u6301\u7EED\u65F6\u95F4\uFF0C\u652F\u6301\u5355\u4F4D\u914D\u7F6E\uFF0C\u4E0D\u5E26\u5355\u4F4D\u5C31\u662F\u79D2\uFF0C\u9ED8\u8BA4\u4E00\u76F4\u8BB0\u5F55
    [s:]\u91C7\u96C6 Event \u7684\u8BE6\u7EC6\u914D\u7F6E\u6587\u4EF6\uFF0C\u9ED8\u8BA4\u662F default.jfc \u4F4D\u4E8E $JAVA_HOME/lib/jfr/default.jfc
    [f:]\u5C06\u8F93\u51FA\u8F6C\u50A8\u5230\u6307\u5B9A\u8DEF\u5F84
    [maxage:]\u7F13\u51B2\u533A\u6570\u636E\u6700\u5927\u6587\u4EF6\u8BB0\u5F55\u4FDD\u5B58\u65F6\u95F4\uFF0C\u652F\u6301\u5355\u4F4D\u914D\u7F6E\uFF0C\u4E0D\u5E26\u5355\u4F4D\u5C31\u662F\u79D2\uFF0C\u9ED8\u8BA4\u662F\u4E0D\u9650\u5236
    [maxsize:]\u7F13\u51B2\u533A\u7684\u6700\u5927\u6587\u4EF6\u5927\u5C0F\uFF0C\u652F\u6301\u5355\u4F4D\u914D\u7F6E\uFF0C \u4E0D\u5E26\u5355\u4F4D\u662F\u5B57\u8282\uFF0Cm \u6216\u8005 M \u4EE3\u8868 MB\uFF0Cg \u6216\u8005 G \u4EE3\u8868 GB\u3002
    [state:]jfr \u8BB0\u5F55\u72B6\u6001

    \u542F\u52A8 JFR \u8BB0\u5F55

    $ jfr start
    +Started recording 1. No limit specified, using maxsize=250MB as default.
    +

    \u63D0\u793A

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u5F00\u542F\u7684\u662F\u9ED8\u8BA4\u53C2\u6570\u7684 jfr \u8BB0\u5F55

    \u542F\u52A8 jfr \u8BB0\u5F55\uFF0C\u6307\u5B9A\u8BB0\u5F55\u540D\uFF0C\u8BB0\u5F55\u6301\u7EED\u65F6\u95F4\uFF0C\u8BB0\u5F55\u6587\u4EF6\u4FDD\u5B58\u8DEF\u5F84\u3002

    $ jfr start -n myRecording --duration 60s -f /tmp/myRecording.jfr
    +Started recording 2. The result will be written to:
    +/tmp/myRecording.jfr
    +

    \u67E5\u770B JFR \u8BB0\u5F55\u72B6\u6001

    \u9ED8\u8BA4\u662F\u67E5\u770B\u6240\u6709 JFR \u8BB0\u5F55\u4FE1\u606F

    $ jfr status
    +Recording: recording=1 name=Recording-1 (running)
    +Recording: recording=2 name=myRecording duration=PT1M (closed)
    +

    \u67E5\u770B\u6307\u5B9A\u8BB0\u5F55 id \u7684\u8BB0\u5F55\u4FE1\u606F

    $ jfr status -r 1
    +Recording: recording=1 name=Recording-1 (running)
    +

    \u67E5\u770B\u6307\u5B9A\u72B6\u6001\u7684\u8BB0\u5F55\u4FE1\u606F

    $ jfr status --state closed
    +Recording: recording=2 name=myRecording duration=PT1M (closed)
    +

    dump jfr \u8BB0\u5F55

    `,19),b=e("code",null,"jfr dump",-1),f=e("code",null,"jfr",-1),x=e("br",null,null,-1),_=t(" \u6307\u5B9A\u8BB0\u5F55\u8F93\u51FA\u8DEF\u5F84"),k=r(`
    $ jfr dump -r 1 -f /tmp/myRecording1.jfr
    +Dump recording 1, The result will be written to:
    +/tmp/myRecording1.jfr
    +

    \u4E0D\u6307\u5B9A\u6587\u4EF6\u8F93\u51FA\u8DEF\u5F84\uFF0C\u9ED8\u8BA4\u662F\u4FDD\u5B58\u5230arthas-output\u76EE\u5F55\u4E0B

    $ jfr dump -r 1
    +Dump recording 1, The result will be written to:
    +/tmp/test/arthas-output/20220819-200915.jfr
    +

    \u505C\u6B62 jfr \u8BB0\u5F55

    \u4E0D\u6307\u5B9A\u8BB0\u5F55\u8F93\u51FA\u8DEF\u5F84\uFF0C\u9ED8\u8BA4\u662F\u4FDD\u5B58\u5230arthas-output\u76EE\u5F55\u4E0B

    $ jfr stop -r 1
    +Stop recording 1, The result will be written to:
    +/tmp/test/arthas-output/20220819-202049.jfr
    +

    \u6CE8\u610F\u4E00\u6761\u8BB0\u5F55\u53EA\u80FD\u505C\u6B62\u4E00\u6B21\u3002

    \u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BB0\u5F55\u8F93\u51FA\u8DEF\u5F84\u3002

    \u901A\u8FC7\u6D4F\u89C8\u5668\u67E5\u770B arthas-output \u4E0B\u9762 JFR \u8BB0\u5F55\u7684\u7ED3\u679C

    `,9),j=t("\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0Carthas \u4F7F\u7528 8563 \u7AEF\u53E3\uFF0C\u5219\u53EF\u4EE5\u6253\u5F00\uFF1A "),y={href:"http://localhost:8563/arthas-output/",target:"_blank",rel:"noopener noreferrer"},R=t("http://localhost:8563/arthas-output/"),J=t(" \u67E5\u770B\u5230"),F=e("code",null,"arthas-output",-1),M=t("\u76EE\u5F55\u4E0B\u9762\u7684 JFR \u8BB0\u5F55\u7ED3\u679C\uFF1A"),$=e("p",null,[e("img",{src:l,alt:""})],-1),w=e("p",null,"\u751F\u6210\u7684\u7ED3\u679C\u53EF\u4EE5\u7528\u652F\u6301 jfr \u683C\u5F0F\u7684\u5DE5\u5177\u6765\u67E5\u770B\u3002\u6BD4\u5982\uFF1A",-1),T=e("ul",null,[e("li",null,"JDK Mission Control \uFF1A https://github.com/openjdk/jmc")],-1);function V(B,D){const a=c("ExternalLinkIcon");return d(),o("div",null,[u,e("p",null,[e("a",h,[m,g,s(a)])]),v,e("p",null,[b,t(n()+" \u4F1A\u8F93\u51FA\u4ECE\u5F00\u59CB\u5230\u8FD0\u884C\u8BE5\u547D\u4EE4\u8FD9\u6BB5\u65F6\u95F4\u5185\u7684\u8BB0\u5F55\u5230 JFR \u6587\u4EF6\uFF0C\u4E14\u4E0D\u4F1A\u505C\u6B62 ",1),f,t(n()+" \u7684\u8BB0\u5F55",1),x,_]),k,e("p",null,[j,e("a",y,[R,s(a)]),J,F,M]),$,w,T])}const S=i(p,[["render",V],["__file","jfr.html.vue"]]);export{S as default}; diff --git a/3.x/assets/jfr.html.e858c4d3.js b/3.x/assets/jfr.html.e858c4d3.js new file mode 100644 index 00000000000..7c225f4334c --- /dev/null +++ b/3.x/assets/jfr.html.e858c4d3.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-41806853","path":"/doc/jfr.html","title":"jfr","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":"\u542F\u52A8 JFR \u8BB0\u5F55","slug":"\u542F\u52A8-jfr-\u8BB0\u5F55","link":"#\u542F\u52A8-jfr-\u8BB0\u5F55","children":[]},{"level":2,"title":"\u67E5\u770B JFR \u8BB0\u5F55\u72B6\u6001","slug":"\u67E5\u770B-jfr-\u8BB0\u5F55\u72B6\u6001","link":"#\u67E5\u770B-jfr-\u8BB0\u5F55\u72B6\u6001","children":[]},{"level":2,"title":"dump jfr \u8BB0\u5F55","slug":"dump-jfr-\u8BB0\u5F55","link":"#dump-jfr-\u8BB0\u5F55","children":[]},{"level":2,"title":"\u505C\u6B62 jfr \u8BB0\u5F55","slug":"\u505C\u6B62-jfr-\u8BB0\u5F55","link":"#\u505C\u6B62-jfr-\u8BB0\u5F55","children":[]},{"level":2,"title":"\u901A\u8FC7\u6D4F\u89C8\u5668\u67E5\u770B arthas-output \u4E0B\u9762 JFR \u8BB0\u5F55\u7684\u7ED3\u679C","slug":"\u901A\u8FC7\u6D4F\u89C8\u5668\u67E5\u770B-arthas-output-\u4E0B\u9762-jfr-\u8BB0\u5F55\u7684\u7ED3\u679C","link":"#\u901A\u8FC7\u6D4F\u89C8\u5668\u67E5\u770B-arthas-output-\u4E0B\u9762-jfr-\u8BB0\u5F55\u7684\u7ED3\u679C","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"longxu0509","email":"108991596+longxu0509@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/jfr.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/jvm.html.4efee18b.js b/3.x/assets/jvm.html.4efee18b.js new file mode 100644 index 00000000000..f94171472de --- /dev/null +++ b/3.x/assets/jvm.html.4efee18b.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-f28c1148","path":"/en/doc/jvm.html","title":"jvm","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]},{"level":2,"title":"Thread related","slug":"thread-related","link":"#thread-related","children":[]},{"level":2,"title":"File descriptor related","slug":"file-descriptor-related","link":"#file-descriptor-related","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/jvm.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/jvm.html.5fd9778c.js b/3.x/assets/jvm.html.5fd9778c.js new file mode 100644 index 00000000000..71ba41dcb40 --- /dev/null +++ b/3.x/assets/jvm.html.5fd9778c.js @@ -0,0 +1,100 @@ +import{_ as s,o as l,c as a,a as e,b as d,e as i,d as r,r as v}from"./app.4d248835.js";const c={},m=e("h1",{id:"jvm",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jvm","aria-hidden":"true"},"#"),i(" jvm")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-jvm",target:"_blank",rel:"noopener noreferrer"},t=e("code",null,"jvm",-1),b=i(" online tutorial"),o=r(`

    TIP

    Check the current JVM's info

    Usage

    $ jvm
    +RUNTIME
    +--------------------------------------------------------------------------------------------------------------
    + MACHINE-NAME                   37@ff267334bb65
    + JVM-START-TIME                 2020-07-23 07:50:36
    + MANAGEMENT-SPEC-VERSION        1.2
    + SPEC-NAME                      Java Virtual Machine Specification
    + SPEC-VENDOR                    Oracle Corporation
    + SPEC-VERSION                   1.8
    + VM-NAME                        Java HotSpot(TM) 64-Bit Server VM
    + VM-VENDOR                      Oracle Corporation
    + VM-VERSION                     25.201-b09
    + INPUT-ARGUMENTS                []
    + CLASS-PATH                     demo-arthas-spring-boot.jar
    + BOOT-CLASS-PATH                /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/j
    +                                re/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/
    +                                java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/us
    +                                r/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/l
    +                                ib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes
    + LIBRARY-PATH                   /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
    +
    +--------------------------------------------------------------------------------------------------------------
    + CLASS-LOADING
    +--------------------------------------------------------------------------------------------------------------
    + LOADED-CLASS-COUNT             7529
    + TOTAL-LOADED-CLASS-COUNT       7529
    + UNLOADED-CLASS-COUNT           0
    + IS-VERBOSE                     false
    +
    +--------------------------------------------------------------------------------------------------------------
    + COMPILATION
    +--------------------------------------------------------------------------------------------------------------
    + NAME                           HotSpot 64-Bit Tiered Compilers
    + TOTAL-COMPILE-TIME             14921(ms)
    +
    +--------------------------------------------------------------------------------------------------------------
    + GARBAGE-COLLECTORS
    +--------------------------------------------------------------------------------------------------------------
    + PS Scavenge                            name : PS Scavenge
    + [count/time (ms)]                      collectionCount : 7
    +                                        collectionTime : 68
    +
    + PS MarkSweep                           name : PS MarkSweep
    + [count/time (ms)]                      collectionCount : 1
    +                                        collectionTime : 47
    +
    +--------------------------------------------------------------------------------------------------------------
    + MEMORY-MANAGERS
    +--------------------------------------------------------------------------------------------------------------
    + CodeCacheManager               Code Cache
    +
    + Metaspace Manager              Metaspace
    +                                Compressed Class Space
    +
    + Copy                           Eden Space
    +                                Survivor Space
    +
    + MarkSweepCompact               Eden Space
    +                                Survivor Space
    +                                Tenured Gen
    +
    +
    +--------------------------------------------------------------------------------------------------------------
    + MEMORY
    +--------------------------------------------------------------------------------------------------------------
    + HEAP-MEMORY-USAGE                      init : 268435456(256.0 MiB)
    + [memory in bytes]                      used : 18039504(17.2 MiB)
    +                                        committed : 181403648(173.0 MiB)
    +                                        max : 3817865216(3.6 GiB)
    +
    + NO-HEAP-MEMORY-USAGE                   init : 2555904(2.4 MiB)
    + [memory in bytes]                      used : 33926216(32.4 MiB)
    +                                        committed : 35176448(33.5 MiB)
    +                                        max : -1(-1 B)
    +
    +--------------------------------------------------------------------------------------------------------------
    + OPERATING-SYSTEM
    +--------------------------------------------------------------------------------------------------------------
    + OS                             Linux
    + ARCH                           amd64
    + PROCESSORS-COUNT               3
    + LOAD-AVERAGE                   29.53
    + VERSION                        4.15.0-52-generic
    +
    +--------------------------------------------------------------------------------------------------------------
    + THREAD
    +--------------------------------------------------------------------------------------------------------------
    + COUNT                          30
    + DAEMON-COUNT                   24
    + PEAK-COUNT                     31
    + STARTED-COUNT                  36
    + DEADLOCK-COUNT                 0
    +
    +--------------------------------------------------------------------------------------------------------------
    + FILE-DESCRIPTOR
    +--------------------------------------------------------------------------------------------------------------
    + MAX-FILE-DESCRIPTOR-COUNT      1048576
    + OPEN-FILE-DESCRIPTOR-COUNT     100
    +Affect(row-cnt:0) cost in 88 ms.
    +
    • COUNT: the count of active threads
    • DAEMON-COUNT: the count of active daemon threads
    • PEAK-COUNT: the maximum count of the live threads since JVM starts
    • STARTED-COUNT: the total count of the created threads since JVM starts
    • DEADLOCK-COUNT: the count of deadlocked threads
    • MAX-FILE-DESCRIPTOR-COUNT\uFF1Athe count of max file descriptor JVM process can open
    • OPEN-FILE-DESCRIPTOR-COUNT\uFF1Athe current count of file descriptor JVM process open
    `,7);function E(S,h){const n=v("ExternalLinkIcon");return l(),a("div",null,[m,e("p",null,[e("a",u,[t,b,d(n)])]),o])}const C=s(c,[["render",E],["__file","jvm.html.vue"]]);export{C as default}; diff --git a/3.x/assets/jvm.html.a00151a5.js b/3.x/assets/jvm.html.a00151a5.js new file mode 100644 index 00000000000..c300d511115 --- /dev/null +++ b/3.x/assets/jvm.html.a00151a5.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-f1483d70","path":"/doc/jvm.html","title":"jvm","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[]},{"level":2,"title":"THREAD \u76F8\u5173","slug":"thread-\u76F8\u5173","link":"#thread-\u76F8\u5173","children":[]},{"level":2,"title":"\u6587\u4EF6\u63CF\u8FF0\u7B26\u76F8\u5173","slug":"\u6587\u4EF6\u63CF\u8FF0\u7B26\u76F8\u5173","link":"#\u6587\u4EF6\u63CF\u8FF0\u7B26\u76F8\u5173","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/jvm.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/jvm.html.b5bfa365.js b/3.x/assets/jvm.html.b5bfa365.js new file mode 100644 index 00000000000..7a6e4ef12bf --- /dev/null +++ b/3.x/assets/jvm.html.b5bfa365.js @@ -0,0 +1,100 @@ +import{_ as l,o as s,c as d,a as i,b as a,e as n,d as v,r}from"./app.4d248835.js";const c={},m=i("h1",{id:"jvm",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#jvm","aria-hidden":"true"},"#"),n(" jvm")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-jvm",target:"_blank",rel:"noopener noreferrer"},b=i("code",null,"jvm",-1),t=n("\u5728\u7EBF\u6559\u7A0B"),o=v(`

    \u63D0\u793A

    \u67E5\u770B\u5F53\u524D JVM \u4FE1\u606F

    \u4F7F\u7528\u53C2\u8003

    $ jvm
    +RUNTIME
    +--------------------------------------------------------------------------------------------------------------
    + MACHINE-NAME                   37@ff267334bb65
    + JVM-START-TIME                 2020-07-23 07:50:36
    + MANAGEMENT-SPEC-VERSION        1.2
    + SPEC-NAME                      Java Virtual Machine Specification
    + SPEC-VENDOR                    Oracle Corporation
    + SPEC-VERSION                   1.8
    + VM-NAME                        Java HotSpot(TM) 64-Bit Server VM
    + VM-VENDOR                      Oracle Corporation
    + VM-VERSION                     25.201-b09
    + INPUT-ARGUMENTS                []
    + CLASS-PATH                     demo-arthas-spring-boot.jar
    + BOOT-CLASS-PATH                /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/j
    +                                re/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/
    +                                java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/us
    +                                r/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/l
    +                                ib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes
    + LIBRARY-PATH                   /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
    +
    +--------------------------------------------------------------------------------------------------------------
    + CLASS-LOADING
    +--------------------------------------------------------------------------------------------------------------
    + LOADED-CLASS-COUNT             7529
    + TOTAL-LOADED-CLASS-COUNT       7529
    + UNLOADED-CLASS-COUNT           0
    + IS-VERBOSE                     false
    +
    +--------------------------------------------------------------------------------------------------------------
    + COMPILATION
    +--------------------------------------------------------------------------------------------------------------
    + NAME                           HotSpot 64-Bit Tiered Compilers
    + TOTAL-COMPILE-TIME             14921(ms)
    +
    +--------------------------------------------------------------------------------------------------------------
    + GARBAGE-COLLECTORS
    +--------------------------------------------------------------------------------------------------------------
    + PS Scavenge                            name : PS Scavenge
    + [count/time (ms)]                      collectionCount : 7
    +                                        collectionTime : 68
    +
    + PS MarkSweep                           name : PS MarkSweep
    + [count/time (ms)]                      collectionCount : 1
    +                                        collectionTime : 47
    +
    +--------------------------------------------------------------------------------------------------------------
    + MEMORY-MANAGERS
    +--------------------------------------------------------------------------------------------------------------
    + CodeCacheManager               Code Cache
    +
    + Metaspace Manager              Metaspace
    +                                Compressed Class Space
    +
    + Copy                           Eden Space
    +                                Survivor Space
    +
    + MarkSweepCompact               Eden Space
    +                                Survivor Space
    +                                Tenured Gen
    +
    +
    +--------------------------------------------------------------------------------------------------------------
    + MEMORY
    +--------------------------------------------------------------------------------------------------------------
    + HEAP-MEMORY-USAGE                      init : 268435456(256.0 MiB)
    + [memory in bytes]                      used : 18039504(17.2 MiB)
    +                                        committed : 181403648(173.0 MiB)
    +                                        max : 3817865216(3.6 GiB)
    +
    + NO-HEAP-MEMORY-USAGE                   init : 2555904(2.4 MiB)
    + [memory in bytes]                      used : 33926216(32.4 MiB)
    +                                        committed : 35176448(33.5 MiB)
    +                                        max : -1(-1 B)
    +
    +--------------------------------------------------------------------------------------------------------------
    + OPERATING-SYSTEM
    +--------------------------------------------------------------------------------------------------------------
    + OS                             Linux
    + ARCH                           amd64
    + PROCESSORS-COUNT               3
    + LOAD-AVERAGE                   29.53
    + VERSION                        4.15.0-52-generic
    +
    +--------------------------------------------------------------------------------------------------------------
    + THREAD
    +--------------------------------------------------------------------------------------------------------------
    + COUNT                          30
    + DAEMON-COUNT                   24
    + PEAK-COUNT                     31
    + STARTED-COUNT                  36
    + DEADLOCK-COUNT                 0
    +
    +--------------------------------------------------------------------------------------------------------------
    + FILE-DESCRIPTOR
    +--------------------------------------------------------------------------------------------------------------
    + MAX-FILE-DESCRIPTOR-COUNT      1048576
    + OPEN-FILE-DESCRIPTOR-COUNT     100
    +Affect(row-cnt:0) cost in 88 ms.
    +

    THREAD \u76F8\u5173

    • COUNT: JVM \u5F53\u524D\u6D3B\u8DC3\u7684\u7EBF\u7A0B\u6570
    • DAEMON-COUNT: JVM \u5F53\u524D\u6D3B\u8DC3\u7684\u5B88\u62A4\u7EBF\u7A0B\u6570
    • PEAK-COUNT: \u4ECE JVM \u542F\u52A8\u5F00\u59CB\u66FE\u7ECF\u6D3B\u7740\u7684\u6700\u5927\u7EBF\u7A0B\u6570
    • STARTED-COUNT: \u4ECE JVM \u542F\u52A8\u5F00\u59CB\u603B\u5171\u542F\u52A8\u8FC7\u7684\u7EBF\u7A0B\u6B21\u6570
    • DEADLOCK-COUNT: JVM \u5F53\u524D\u6B7B\u9501\u7684\u7EBF\u7A0B\u6570

    \u6587\u4EF6\u63CF\u8FF0\u7B26\u76F8\u5173

    • MAX-FILE-DESCRIPTOR-COUNT\uFF1AJVM \u8FDB\u7A0B\u6700\u5927\u53EF\u4EE5\u6253\u5F00\u7684\u6587\u4EF6\u63CF\u8FF0\u7B26\u6570
    • OPEN-FILE-DESCRIPTOR-COUNT\uFF1AJVM \u5F53\u524D\u6253\u5F00\u7684\u6587\u4EF6\u63CF\u8FF0\u7B26\u6570
    `,7);function E(S,O){const e=r("ExternalLinkIcon");return s(),d("div",null,[m,i("p",null,[i("a",u,[b,t,a(e)])]),o])}const M=l(c,[["render",E],["__file","jvm.html.vue"]]);export{M as default}; diff --git a/3.x/assets/keymap.html.35ecd977.js b/3.x/assets/keymap.html.35ecd977.js new file mode 100644 index 00000000000..925b974f3d4 --- /dev/null +++ b/3.x/assets/keymap.html.35ecd977.js @@ -0,0 +1,20 @@ +import{_ as o,o as r,c,a as t,b as a,e,d as n,r as i}from"./app.4d248835.js";const l={},u=t("h1",{id:"keymap",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#keymap","aria-hidden":"true"},"#"),e(" keymap")],-1),s={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-keymap",target:"_blank",rel:"noopener noreferrer"},h=t("code",null,"keymap",-1),m=e(" online tutorial"),q=n(`

    Use keymap command to print the current keymap:

    The default keymap is:

    ShortcutShortcut DescriptionCommand NameCommand Description
    "\\C-a"ctrl + abeginning-of-linego to the beginning of the line
    "\\C-e"ctrl + eend-of-linego to the end of the line
    "\\C-f"ctrl + fforward-wordforward a word
    "\\C-b"ctrl + bbackward-wordbackward a word
    "\\e[D"left arrowbackward-charbackward a character
    "\\e[C"right arrowforward-charforward a character
    "\\e[B"down arrownext-historyshow next history command
    "\\e[A"up arrowprevious-historyshow previous history command
    "\\C-h"ctrl + hbackward-delete-charbackward delete a character
    "\\C-?"ctrl + shift + /backward-delete-charbackward delete a character
    "\\C-u"ctrl + uundoclear current line
    "\\C-d"ctrl + ddelete-chardelete the character of the current cursor
    "\\C-k"ctrl + kkill-linedelete all characters from the current cursor to the end of the line
    "\\C-i"ctrl + icompleteAuto completion, equivalent to TAB
    "\\C-j"ctrl + jaccept-lineend the current line, equivalent to enter
    "\\C-m"ctrl + maccept-lineend the current line, equivalent to enter
    "\\C-w"backward-delete-word
    "\\C-x\\e[3~"backward-kill-line
    "\\e\\C-?"backward-kill-word
    • Press tab to enable auto-completion prompt at any time.
    • Enter command and - or --, then press tab to display the concrete options for the current command.

    Custom shortcuts

    Specify customization in $USER_HOME/.arthas/conf/inputrc file in the current user home directory.

    Vim user may want to map ctrl+h to moving the cursor forward one character. To achieve this, copy the default configuration first,

    "\\C-a": beginning-of-line
    +"\\C-e": end-of-line
    +"\\C-f": forward-word
    +"\\C-b": backward-word
    +"\\e[D": backward-char
    +"\\e[C": forward-char
    +"\\e[B": next-history
    +"\\e[A": previous-history
    +"\\C-h": backward-delete-char
    +"\\C-?": backward-delete-char
    +"\\C-u": undo
    +"\\C-d": delete-char
    +"\\C-k": kill-line
    +"\\C-i": complete
    +"\\C-j": accept-line
    +"\\C-m": accept-line
    +"\\C-w": backward-delete-word
    +"\\C-x\\e[3~": backward-kill-line
    +"\\e\\C-?": backward-kill-word
    +

    then replace "\\C-h": backward-delete-char with "\\C-h": backward-char, then reconnect to Arthas console to take effect.

    Shortcuts for jobs

    • ctrl + c: Terminates current command
    • ctrl + z: Suspends the current command, you can restore this command with bg/fg, or kill it.
    • ctrl + a: Go to the beginning the line
    • ctrl + e: Go to the end of the line
    `,11);function b(p,v){const d=i("ExternalLinkIcon");return r(),c("div",null,[u,t("p",null,[t("a",s,[h,m,a(d)])]),q])}const f=o(l,[["render",b],["__file","keymap.html.vue"]]);export{f as default}; diff --git a/3.x/assets/keymap.html.6e72672f.js b/3.x/assets/keymap.html.6e72672f.js new file mode 100644 index 00000000000..4515f3682b6 --- /dev/null +++ b/3.x/assets/keymap.html.6e72672f.js @@ -0,0 +1,20 @@ +import{_ as o,o as r,c,a as t,b as a,e as d,d as l,r as i}from"./app.4d248835.js";const n={},u=t("h1",{id:"keymap",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#keymap","aria-hidden":"true"},"#"),d(" keymap")],-1),s={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-keymap",target:"_blank",rel:"noopener noreferrer"},q=t("code",null,"keymap",-1),h=d("\u5728\u7EBF\u6559\u7A0B"),b=l(`

    keymap\u547D\u4EE4\u8F93\u51FA\u5F53\u524D\u7684\u5FEB\u6377\u952E\u6620\u5C04\u8868\uFF1A

    \u9ED8\u8BA4\u7684\u5FEB\u6377\u952E\u5982\u4E0B\uFF1A

    \u5FEB\u6377\u952E\u5FEB\u6377\u952E\u8BF4\u660E\u547D\u4EE4\u540D\u79F0\u547D\u4EE4\u8BF4\u660E
    "\\C-a"ctrl + abeginning-of-line\u8DF3\u5230\u884C\u9996
    "\\C-e"ctrl + eend-of-line\u8DF3\u5230\u884C\u5C3E
    "\\C-f"ctrl + fforward-word\u5411\u524D\u79FB\u52A8\u4E00\u4E2A\u5355\u8BCD
    "\\C-b"ctrl + bbackward-word\u5411\u540E\u79FB\u52A8\u4E00\u4E2A\u5355\u8BCD
    "\\e[D"\u952E\u76D8\u5DE6\u65B9\u5411\u952Ebackward-char\u5149\u6807\u5411\u524D\u79FB\u52A8\u4E00\u4E2A\u5B57\u7B26
    "\\e[C"\u952E\u76D8\u53F3\u65B9\u5411\u952Eforward-char\u5149\u6807\u5411\u540E\u79FB\u52A8\u4E00\u4E2A\u5B57\u7B26
    "\\e[B"\u952E\u76D8\u4E0B\u65B9\u5411\u952Enext-history\u4E0B\u7FFB\u663E\u793A\u4E0B\u4E00\u4E2A\u547D\u4EE4
    "\\e[A"\u952E\u76D8\u4E0A\u65B9\u5411\u952Eprevious-history\u4E0A\u7FFB\u663E\u793A\u4E0A\u4E00\u4E2A\u547D\u4EE4
    "\\C-h"ctrl + hbackward-delete-char\u5411\u540E\u5220\u9664\u4E00\u4E2A\u5B57\u7B26
    "\\C-?"ctrl + shift + /backward-delete-char\u5411\u540E\u5220\u9664\u4E00\u4E2A\u5B57\u7B26
    "\\C-u"ctrl + uundo\u64A4\u9500\u4E0A\u4E00\u4E2A\u547D\u4EE4\uFF0C\u76F8\u5F53\u4E8E\u6E05\u7A7A\u5F53\u524D\u884C
    "\\C-d"ctrl + ddelete-char\u5220\u9664\u5F53\u524D\u5149\u6807\u6240\u5728\u5B57\u7B26
    "\\C-k"ctrl + kkill-line\u5220\u9664\u5F53\u524D\u5149\u6807\u5230\u884C\u5C3E\u7684\u6240\u6709\u5B57\u7B26
    "\\C-i"ctrl + icomplete\u81EA\u52A8\u8865\u5168\uFF0C\u76F8\u5F53\u4E8E\u6572TAB
    "\\C-j"ctrl + jaccept-line\u7ED3\u675F\u5F53\u524D\u884C\uFF0C\u76F8\u5F53\u4E8E\u6572\u56DE\u8F66
    "\\C-m"ctrl + maccept-line\u7ED3\u675F\u5F53\u524D\u884C\uFF0C\u76F8\u5F53\u4E8E\u6572\u56DE\u8F66
    "\\C-w"backward-delete-word
    "\\C-x\\e[3~"backward-kill-line
    "\\e\\C-?"backward-kill-word
    • \u4EFB\u4F55\u65F6\u5019 tab \u952E\uFF0C\u4F1A\u6839\u636E\u5F53\u524D\u7684\u8F93\u5165\u7ED9\u51FA\u63D0\u793A
    • \u547D\u4EE4\u540E\u6572 - \u6216 -- \uFF0C\u7136\u540E\u6309 tab \u952E\uFF0C\u53EF\u4EE5\u5C55\u793A\u51FA\u6B64\u547D\u4EE4\u5177\u4F53\u7684\u9009\u9879

    \u81EA\u5B9A\u4E49\u5FEB\u6377\u952E

    \u5728\u5F53\u524D\u7528\u6237\u76EE\u5F55\u4E0B\u65B0\u5EFA$USER_HOME/.arthas/conf/inputrc\u6587\u4EF6\uFF0C\u52A0\u5165\u81EA\u5B9A\u4E49\u914D\u7F6E\u3002

    \u5047\u8BBE\u6211\u662F vim \u7684\u91CD\u5EA6\u7528\u6237\uFF0C\u6211\u8981\u628Actrl+h\u8BBE\u7F6E\u4E3A\u5149\u6807\u5411\u524D\u4E00\u4E2A\u5B57\u7B26\uFF0C\u5219\u8BBE\u7F6E\u5982\u4E0B\uFF0C\u9996\u5148\u62F7\u8D1D\u9ED8\u8BA4\u914D\u7F6E

    "\\C-a": beginning-of-line
    +"\\C-e": end-of-line
    +"\\C-f": forward-word
    +"\\C-b": backward-word
    +"\\e[D": backward-char
    +"\\e[C": forward-char
    +"\\e[B": next-history
    +"\\e[A": previous-history
    +"\\C-h": backward-delete-char
    +"\\C-?": backward-delete-char
    +"\\C-u": undo
    +"\\C-d": delete-char
    +"\\C-k": kill-line
    +"\\C-i": complete
    +"\\C-j": accept-line
    +"\\C-m": accept-line
    +"\\C-w": backward-delete-word
    +"\\C-x\\e[3~": backward-kill-line
    +"\\e\\C-?": backward-kill-word
    +

    \u7136\u540E\u628A"\\C-h": backward-delete-char\u6362\u6210"\\C-h": backward-char\uFF0C\u7136\u540E\u91CD\u65B0\u8FDE\u63A5\u5373\u53EF\u3002

    \u540E\u53F0\u5F02\u6B65\u547D\u4EE4\u76F8\u5173\u5FEB\u6377\u952E

    • ctrl + c: \u7EC8\u6B62\u5F53\u524D\u547D\u4EE4
    • ctrl + z: \u6302\u8D77\u5F53\u524D\u547D\u4EE4\uFF0C\u540E\u7EED\u53EF\u4EE5 bg/fg \u91CD\u65B0\u652F\u6301\u6B64\u547D\u4EE4\uFF0C\u6216 kill \u6389
    • ctrl + a: \u56DE\u5230\u884C\u9996
    • ctrl + e: \u56DE\u5230\u884C\u5C3E
    `,11);function m(v,k){const e=i("ExternalLinkIcon");return r(),c("div",null,[u,t("p",null,[t("a",s,[q,h,a(e)])]),b])}const C=o(n,[["render",m],["__file","keymap.html.vue"]]);export{C as default}; diff --git a/3.x/assets/keymap.html.e3647cfd.js b/3.x/assets/keymap.html.e3647cfd.js new file mode 100644 index 00000000000..e7e50ac939c --- /dev/null +++ b/3.x/assets/keymap.html.e3647cfd.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-4039cdec","path":"/doc/keymap.html","title":"keymap","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E","slug":"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E","link":"#\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E","children":[]},{"level":2,"title":"\u540E\u53F0\u5F02\u6B65\u547D\u4EE4\u76F8\u5173\u5FEB\u6377\u952E","slug":"\u540E\u53F0\u5F02\u6B65\u547D\u4EE4\u76F8\u5173\u5FEB\u6377\u952E","link":"#\u540E\u53F0\u5F02\u6B65\u547D\u4EE4\u76F8\u5173\u5FEB\u6377\u952E","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/keymap.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/keymap.html.e94a5d53.js b/3.x/assets/keymap.html.e94a5d53.js new file mode 100644 index 00000000000..8bba21e78dd --- /dev/null +++ b/3.x/assets/keymap.html.e94a5d53.js @@ -0,0 +1 @@ +const t=JSON.parse('{"key":"v-b3b5e150","path":"/en/doc/keymap.html","title":"keymap","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Custom shortcuts","slug":"custom-shortcuts","link":"#custom-shortcuts","children":[]},{"level":2,"title":"Shortcuts for jobs","slug":"shortcuts-for-jobs","link":"#shortcuts-for-jobs","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/keymap.md","version":"3.7.3"}');export{t as data}; diff --git a/3.x/assets/logger.html.3230d5ce.js b/3.x/assets/logger.html.3230d5ce.js new file mode 100644 index 00000000000..05bfe642b87 --- /dev/null +++ b/3.x/assets/logger.html.3230d5ce.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-7e581f76","path":"/en/doc/logger.html","title":"logger","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"Print the logger information","slug":"print-the-logger-information","link":"#print-the-logger-information","children":[]},{"level":3,"title":"View logger information for the special name","slug":"view-logger-information-for-the-special-name","link":"#view-logger-information-for-the-special-name","children":[]},{"level":3,"title":"View logger information for the special classloader","slug":"view-logger-information-for-the-special-classloader","link":"#view-logger-information-for-the-special-classloader","children":[]},{"level":3,"title":"Update logger level","slug":"update-logger-level","link":"#update-logger-level","children":[]},{"level":3,"title":"Speecify classloader to update logger level","slug":"speecify-classloader-to-update-logger-level","link":"#speecify-classloader-to-update-logger-level","children":[]},{"level":3,"title":"View the logger information without appenders","slug":"view-the-logger-information-without-appenders","link":"#view-the-logger-information-without-appenders","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/logger.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/logger.html.7a983455.js b/3.x/assets/logger.html.7a983455.js new file mode 100644 index 00000000000..a1820c6f782 --- /dev/null +++ b/3.x/assets/logger.html.7a983455.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-5ae8aed9","path":"/doc/logger.html","title":"logger","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[{"level":3,"title":"\u67E5\u770B\u6240\u6709 logger \u4FE1\u606F","slug":"\u67E5\u770B\u6240\u6709-logger-\u4FE1\u606F","link":"#\u67E5\u770B\u6240\u6709-logger-\u4FE1\u606F","children":[]},{"level":3,"title":"\u67E5\u770B\u6307\u5B9A\u540D\u5B57\u7684 logger \u4FE1\u606F","slug":"\u67E5\u770B\u6307\u5B9A\u540D\u5B57\u7684-logger-\u4FE1\u606F","link":"#\u67E5\u770B\u6307\u5B9A\u540D\u5B57\u7684-logger-\u4FE1\u606F","children":[]},{"level":3,"title":"\u67E5\u770B\u6307\u5B9A classloader \u7684 logger \u4FE1\u606F","slug":"\u67E5\u770B\u6307\u5B9A-classloader-\u7684-logger-\u4FE1\u606F","link":"#\u67E5\u770B\u6307\u5B9A-classloader-\u7684-logger-\u4FE1\u606F","children":[]},{"level":3,"title":"\u66F4\u65B0 logger level","slug":"\u66F4\u65B0-logger-level","link":"#\u66F4\u65B0-logger-level","children":[]},{"level":3,"title":"\u6307\u5B9A classloader \u66F4\u65B0 logger level","slug":"\u6307\u5B9A-classloader-\u66F4\u65B0-logger-level","link":"#\u6307\u5B9A-classloader-\u66F4\u65B0-logger-level","children":[]},{"level":3,"title":"\u67E5\u770B\u6CA1\u6709 appender \u7684 logger \u7684\u4FE1\u606F","slug":"\u67E5\u770B\u6CA1\u6709-appender-\u7684-logger-\u7684\u4FE1\u606F","link":"#\u67E5\u770B\u6CA1\u6709-appender-\u7684-logger-\u7684\u4FE1\u606F","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/logger.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/logger.html.7de7427f.js b/3.x/assets/logger.html.7de7427f.js new file mode 100644 index 00000000000..be7e993b063 --- /dev/null +++ b/3.x/assets/logger.html.7de7427f.js @@ -0,0 +1,136 @@ +import{_ as e,o as l,c as t,a,b as c,e as s,d as i,r as o}from"./app.4d248835.js";const p={},r=a("h1",{id:"logger",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#logger","aria-hidden":"true"},"#"),s(" logger")],-1),d={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=en&id=command-logger",target:"_blank",rel:"noopener noreferrer"},u=a("code",null,"logger",-1),v=s(" online tutorial"),g=i(`

    TIP

    Print the logger information, update the logger level

    Usage

    Take the following logback.xml as an example:

    <?xml version="1.0" encoding="UTF-8"?>
    +<configuration>
    +    <appender name="APPLICATION" class="ch.qos.logback.core.rolling.RollingFileAppender">
    +        <file>app.log</file>
    +        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
    +            <fileNamePattern>mylog-%d{yyyy-MM-dd}.%i.txt</fileNamePattern>
    +            <maxFileSize>100MB</maxFileSize>
    +            <maxHistory>60</maxHistory>
    +            <totalSizeCap>2GB</totalSizeCap>
    +        </rollingPolicy>
    +        <encoder>
    +            <pattern>%logger{35} - %msg%n</pattern>
    +        </encoder>
    +    </appender>
    +
    +    <appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
    +        <appender-ref ref="APPLICATION" />
    +    </appender>
    +
    +    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
    +        <encoder>
    +            <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n
    +            </pattern>
    +            <charset>utf8</charset>
    +        </encoder>
    +    </appender>
    +
    +    <root level="INFO">
    +        <appender-ref ref="CONSOLE" />
    +        <appender-ref ref="ASYNC" />
    +    </root>
    +</configuration>
    +

    The result of the logger command:

    [arthas@2062]$ logger
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  INFO
    + effectiveLevel                         INFO
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +

    In the appenders section:

    • The target of CONSOLE logger is System.out
    • APPLICATION logger is RollingFileAppender, the file is app.log
    • ASYNC its appenderRef is APPLICATION, which means asynchronous output to the file

    View logger information for the special name

    [arthas@2062]$ logger -n org.springframework.web
    + name                                   org.springframework.web
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         INFO
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +

    View logger information for the special classloader

    Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader.

    if you use-c, you have to manually type hashcode by -c <hashcode>.

    [arthas@2062]$ logger -c 2a139a55
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  DEBUG
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +

    For classloader with only one instance, it can be specified by --classLoaderClass using class name, which is more convenient to use.

    logger --classLoaderClass sun.misc.Launcher$AppClassLoader

    • PS: Here the classLoaderClass in java 8 is sun.misc.Launcher$AppClassLoader, while in java 11 it's jdk.internal.loader.ClassLoaders$AppClassLoader.

    The value of --classloaderclass 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, -c <hashcode> is dynamic.

    Update logger level

    [arthas@2062]$ logger --name ROOT --level debug
    +update logger level success.
    +

    Speecify classloader to update logger level

    By default\uFF0Clogger command will be executed under SystemClassloader, if the application is a traditional war, or using spring boot fat jar, then it needs to specify classloader\u3002

    You can first use sc -d yourClassName to check specified classloader hashcode\uFF0Cthen specify classloader when updating logger level:

    [arthas@2062]$ logger -c 2a139a55 --name ROOT --level debug
    +

    View the logger information without appenders

    By default, the logger command only prints information about the logger with appenders. If you want to see information about loggers without appender, you can use the parameter --include-no-appender.

    Note that the output will usually be very long.

    [arthas@2062]$ logger --include-no-appender
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  DEBUG
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +
    + name                                   com
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +
    + name                                   com.alibaba
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +...
    +
    `,29);function k(m,b){const n=o("ExternalLinkIcon");return l(),t("div",null,[r,a("p",null,[a("a",d,[u,v,c(n)])]),g])}const f=e(p,[["render",k],["__file","logger.html.vue"]]);export{f as default}; diff --git a/3.x/assets/logger.html.cdea0f90.js b/3.x/assets/logger.html.cdea0f90.js new file mode 100644 index 00000000000..04cf77854cf --- /dev/null +++ b/3.x/assets/logger.html.cdea0f90.js @@ -0,0 +1,136 @@ +import{_ as e,o as l,c,a,b as t,e as s,d as o,r as p}from"./app.4d248835.js";const i={},r=a("h1",{id:"logger",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#logger","aria-hidden":"true"},"#"),s(" logger")],-1),d={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=cn&id=command-logger",target:"_blank",rel:"noopener noreferrer"},u=a("code",null,"logger",-1),v=s("\u5728\u7EBF\u6559\u7A0B"),g=o(`

    \u63D0\u793A

    \u67E5\u770B logger \u4FE1\u606F\uFF0C\u66F4\u65B0 logger level

    \u4F7F\u7528\u53C2\u8003

    \u67E5\u770B\u6240\u6709 logger \u4FE1\u606F

    \u4EE5\u4E0B\u9762\u7684logback.xml\u4E3A\u4F8B\uFF1A

    <?xml version="1.0" encoding="UTF-8"?>
    +<configuration>
    +    <appender name="APPLICATION" class="ch.qos.logback.core.rolling.RollingFileAppender">
    +        <file>app.log</file>
    +        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
    +            <fileNamePattern>mylog-%d{yyyy-MM-dd}.%i.txt</fileNamePattern>
    +            <maxFileSize>100MB</maxFileSize>
    +            <maxHistory>60</maxHistory>
    +            <totalSizeCap>2GB</totalSizeCap>
    +        </rollingPolicy>
    +        <encoder>
    +            <pattern>%logger{35} - %msg%n</pattern>
    +        </encoder>
    +    </appender>
    +
    +    <appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
    +        <appender-ref ref="APPLICATION" />
    +    </appender>
    +
    +    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
    +        <encoder>
    +            <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n
    +            </pattern>
    +            <charset>utf8</charset>
    +        </encoder>
    +    </appender>
    +
    +    <root level="INFO">
    +        <appender-ref ref="CONSOLE" />
    +        <appender-ref ref="ASYNC" />
    +    </root>
    +</configuration>
    +

    \u4F7F\u7528logger\u547D\u4EE4\u6253\u5370\u7684\u7ED3\u679C\u662F\uFF1A

    [arthas@2062]$ logger
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  INFO
    + effectiveLevel                         INFO
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +

    \u4ECEappenders\u7684\u4FE1\u606F\u91CC\uFF0C\u53EF\u4EE5\u770B\u5230

    • CONSOLE logger \u7684 target \u662FSystem.out
    • APPLICATION logger \u662FRollingFileAppender\uFF0C\u5B83\u7684 file \u662Fapp.log
    • ASYNC\u5B83\u7684appenderRef\u662FAPPLICATION\uFF0C\u5373\u5F02\u6B65\u8F93\u51FA\u5230\u6587\u4EF6\u91CC

    \u67E5\u770B\u6307\u5B9A\u540D\u5B57\u7684 logger \u4FE1\u606F

    [arthas@2062]$ logger -n org.springframework.web
    + name                                   org.springframework.web
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         INFO
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +

    \u67E5\u770B\u6307\u5B9A classloader \u7684 logger \u4FE1\u606F

    \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

    \u5982\u679C\u4F60\u4F7F\u7528-c\uFF0C\u4F60\u9700\u8981\u624B\u52A8\u8F93\u5165 hashcode\uFF1A-c <hashcode>

    [arthas@2062]$ logger -c 2a139a55
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  DEBUG
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +

    \u5BF9\u4E8E\u53EA\u6709\u552F\u4E00\u5B9E\u4F8B\u7684 ClassLoader \u53EF\u4EE5\u901A\u8FC7--classLoaderClass\u6307\u5B9A class name\uFF0C\u4F7F\u7528\u8D77\u6765\u66F4\u52A0\u65B9\u4FBF\uFF1A

    logger --classLoaderClass sun.misc.Launcher$AppClassLoader

    • \u6CE8: \u8FD9\u91CC classLoaderClass \u5728 java 8 \u662F sun.misc.Launcher$AppClassLoader\uFF0C\u800Cjava 11\u7684classloader\u662Fjdk.internal.loader.ClassLoaders$AppClassLoader\u3002

    --classLoaderClass \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-c <hashcode>\u662F\u52A8\u6001\u53D8\u5316\u7684\u3002

    \u66F4\u65B0 logger level

    [arthas@2062]$ logger --name ROOT --level debug
    +update logger level success.
    +

    \u6307\u5B9A classloader \u66F4\u65B0 logger level

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0Clogger \u547D\u4EE4\u4F1A\u5728 SystemClassloader \u4E0B\u6267\u884C\uFF0C\u5982\u679C\u5E94\u7528\u662F\u4F20\u7EDF\u7684war\u5E94\u7528\uFF0C\u6216\u8005 spring boot fat jar \u542F\u52A8\u7684\u5E94\u7528\uFF0C\u90A3\u4E48\u9700\u8981\u6307\u5B9A classloader\u3002

    \u53EF\u4EE5\u5148\u7528 sc -d yourClassName \u6765\u67E5\u770B\u5177\u4F53\u7684 classloader hashcode\uFF0C\u7136\u540E\u5728\u66F4\u65B0 level \u65F6\u6307\u5B9A classloader\uFF1A

    [arthas@2062]$ logger -c 2a139a55 --name ROOT --level debug
    +

    \u67E5\u770B\u6CA1\u6709 appender \u7684 logger \u7684\u4FE1\u606F

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0Clogger\u547D\u4EE4\u53EA\u6253\u5370\u6709 appender \u7684 logger \u7684\u4FE1\u606F\u3002\u5982\u679C\u60F3\u67E5\u770B\u6CA1\u6709appender\u7684 logger \u7684\u4FE1\u606F\uFF0C\u53EF\u4EE5\u52A0\u4E0A\u53C2\u6570--include-no-appender\u3002

    \u6CE8\u610F\uFF0C\u901A\u5E38\u8F93\u51FA\u7ED3\u679C\u4F1A\u5F88\u957F\u3002

    [arthas@2062]$ logger --include-no-appender
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  DEBUG
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +
    + name                                   com
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +
    + name                                   com.alibaba
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +...
    +
    `,29);function k(m,b){const n=p("ExternalLinkIcon");return l(),c("div",null,[r,a("p",null,[a("a",d,[u,v,t(n)])]),g])}const L=e(i,[["render",k],["__file","logger.html.vue"]]);export{L as default}; diff --git a/3.x/assets/manual-install.html.09d3b86a.js b/3.x/assets/manual-install.html.09d3b86a.js new file mode 100644 index 00000000000..bcc092348c9 --- /dev/null +++ b/3.x/assets/manual-install.html.09d3b86a.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-6a31cc55","path":"/doc/manual-install.html","title":"\u624B\u52A8\u5B89\u88C5 Arthas","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4EE5\u811A\u672C\u7684\u65B9\u5F0F\u542F\u52A8 as3.sh/as.bat","slug":"\u4EE5\u811A\u672C\u7684\u65B9\u5F0F\u542F\u52A8-as3-sh-as-bat","link":"#\u4EE5\u811A\u672C\u7684\u65B9\u5F0F\u542F\u52A8-as3-sh-as-bat","children":[{"level":3,"title":"Linux/Unix/Mac","slug":"linux-unix-mac","link":"#linux-unix-mac","children":[]},{"level":3,"title":"Windows","slug":"windows","link":"#windows","children":[]}]},{"level":2,"title":"\u624B\u52A8\u62FC\u63A5\u547D\u4EE4\u884C\u542F\u52A8","slug":"\u624B\u52A8\u62FC\u63A5\u547D\u4EE4\u884C\u542F\u52A8","link":"#\u624B\u52A8\u62FC\u63A5\u547D\u4EE4\u884C\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/manual-install.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/manual-install.html.42509750.js b/3.x/assets/manual-install.html.42509750.js new file mode 100644 index 00000000000..71dbebdc67f --- /dev/null +++ b/3.x/assets/manual-install.html.42509750.js @@ -0,0 +1 @@ +const a=JSON.parse('{"key":"v-bbaa3c7e","path":"/en/doc/manual-install.html","title":"Manually Install Arthas","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Startup with as3.sh/as.bat","slug":"startup-with-as3-sh-as-bat","link":"#startup-with-as3-sh-as-bat","children":[{"level":3,"title":"Linux/Unix/Mac","slug":"linux-unix-mac","link":"#linux-unix-mac","children":[]},{"level":3,"title":"Windows","slug":"windows","link":"#windows","children":[]}]},{"level":2,"title":"Manual command line startup","slug":"manual-command-line-startup","link":"#manual-command-line-startup","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/manual-install.md","version":"3.7.3"}');export{a as data}; diff --git a/3.x/assets/manual-install.html.aba050db.js b/3.x/assets/manual-install.html.aba050db.js new file mode 100644 index 00000000000..0f6f64885b0 --- /dev/null +++ b/3.x/assets/manual-install.html.aba050db.js @@ -0,0 +1,20 @@ +import{_ as o,o as i,c as r,a,b as n,e,d as t,r as l}from"./app.4d248835.js";const c={},d=a("h1",{id:"manually-install-arthas",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#manually-install-arthas","aria-hidden":"true"},"#"),e(" Manually Install Arthas")],-1),p=a("ol",null,[a("li",null,"Download the latest version")],-1),h=a("p",null,"Download from Github Releases",-1),u={href:"https://github.com/alibaba/arthas/releases",target:"_blank",rel:"noopener noreferrer"},m=e("https://github.com/alibaba/arthas/releases"),b=t(`
    1. Unzip zip file

      unzip arthas-packaging-bin.zip
      +
    2. Install Arthas

      It is recommended to completely remove all old versions of Arthas before installation.

      sudo su admin
      +rm -rf /home/admin/.arthas/lib/* # remove all the leftover of the old outdated Arthas
      +cd arthas
      +./install-local3.sh # switch the user based on the owner of the target Java process.
      +
    3. Start Arthas

      Make sure stop the old Arthas server before start.

      ./as3.sh
      +

    Startup with as3.sh/as.bat

    Linux/Unix/Mac

    You can install Arthas with one single line command on Linux, Unix, and Mac. Pls. copy the following command and paste it into the command line, then press Enter to run:

    curl -L https://arthas.aliyun.com/install3.sh | sh
    +

    The command above will download the bootstrap script as3.sh to the current directory. You can move it the any other place you want, or put its location in $PATH.

    You can enter its interactive interface by executing as3.sh, or execute as3.sh -h for more help information.

    Windows

    `,8),v=e("Latest Version, Click To Download: "),g={href:"https://arthas.aliyun.com/download/latest_version",target:"_blank",rel:"noopener noreferrer"},k=a("img",{src:"https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square",alt:"",title:"Arthas"},null,-1),f=t(`

    Download and unzip, then find as.bat from 'bin' directory. For now this script will only take one argument pid, which means you can only diagnose the local Java process. (Welcome any bat script expert to make it better \u2764\uFE0F)

    as.bat <pid>
    +

    If you want to diagnose Java process run as windows service, try these commands:

    as-service.bat -port <port>
    +as-service.bat -pid <pid>
    +as-service.bat -pid <pid> --interact
    +

    Use this command to remove arthas service:

    as-service.bat -remove
    +

    Manual command line startup

    If you fail to boot Arthas with the provided batch file, you could try to assemble the bootstrap command in the following way.

    1. Locate java in the target JVM:

      • Linux/Unix/Mac: ps aux | grep java
      • Windows: open the Process Monitor to search java
    2. Assemble bootstrap command:

      Let's suppose we are using /opt/jdk1.8/bin/java, then the command should be:

      /opt/jdk1.8/bin/java -Xbootclasspath/a:/opt/jdk1.8/lib/tools.jar \\
      +    -jar /tmp/arthas-packaging/arthas-core.jar \\
      +    -pid 15146 \\
      +    -target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 \\
      +    -core /tmp/arthas-packaging/arthas-core.jar \\
      +    -agent /tmp/arthas-packaging/arthas/arthas-agent.jar
      +

      Note:

      • -Xbootclasspath adds tools.jar
      • -jar /tmp/arthas-packaging/arthas-core.jar specifies main entry
      • -pid 15146 specifies the target java process PID
      • -target-ip 127.0.0.1 specifies the IP
      • -telnet-port 3658 -http-port 8563 specifies telnet and HTTP ports for remote access
      • -core /tmp/arthas-packaging/arthas-core.jar -agent /tmp/arthas-packaging/arthas/arthas-agent.jar specifies core/agent jar package

      If you are running on JDK 1.9 or above\uFF0Cthen it's unnecessary to add tools.jar in option -Xbootclasspath.

      You can find the logs from ~/logs/arthas/arthas.log.

    3. Use telnet to connect once attaching to the target JVM (in step 2) succeeds

      telnet 127.0.0.1 3658
      +
    `,9);function _(x,w){const s=l("ExternalLinkIcon");return i(),r("div",null,[d,p,h,a("p",null,[a("a",u,[m,n(s)])]),b,a("p",null,[v,a("a",g,[k,n(s)])]),f])}const j=o(c,[["render",_],["__file","manual-install.html.vue"]]);export{j as default}; diff --git a/3.x/assets/manual-install.html.d729afcd.js b/3.x/assets/manual-install.html.d729afcd.js new file mode 100644 index 00000000000..b60d6ffe004 --- /dev/null +++ b/3.x/assets/manual-install.html.d729afcd.js @@ -0,0 +1,20 @@ +import{_ as i,o as l,c as r,a,b as n,e,d as t,r as d}from"./app.4d248835.js";const c={},o=a("h1",{id:"\u624B\u52A8\u5B89\u88C5-arthas",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u624B\u52A8\u5B89\u88C5-arthas","aria-hidden":"true"},"#"),e(" \u624B\u52A8\u5B89\u88C5 Arthas")],-1),p=a("ol",null,[a("li",null,"\u4E0B\u8F7D\u6700\u65B0\u7248\u672C")],-1),h=a("p",null,"\u4ECE Github Releases \u9875\u4E0B\u8F7D",-1),u={href:"https://github.com/alibaba/arthas/releases",target:"_blank",rel:"noopener noreferrer"},v=e("https://github.com/alibaba/arthas/releases"),m=t(`
    1. \u89E3\u538B\u7F29 arthas \u7684\u538B\u7F29\u5305

      unzip arthas-packaging-bin.zip
      +
    2. \u5B89\u88C5 Arthas

      \u5B89\u88C5\u4E4B\u524D\u6700\u597D\u628A\u6240\u6709\u8001\u7248\u672C\u7684 Arthas \u5168\u90FD\u5220\u6389

      sudo su admin
      +rm -rf /home/admin/.arthas/lib/*
      +cd arthas
      +./install-local3.sh
      +

      \u6CE8\u610F

      \u6CE8\u610F\uFF0C\u8FD9\u91CC\u6839\u636E\u4F60\u9700\u8981\u8BCA\u65AD\u7684 Java \u8FDB\u7A0B\u7684\u6240\u5C5E\u7528\u6237\u8FDB\u884C\u5207\u6362

    3. \u542F\u52A8 Arthas

      \u542F\u52A8\u4E4B\u524D\uFF0C\u8BF7\u786E\u4FDD\u8001\u7248\u672C\u7684 Arthas \u5DF2\u7ECFstop.

      ./as3.sh
      +

    \u4EE5\u811A\u672C\u7684\u65B9\u5F0F\u542F\u52A8 as3.sh/as.bat

    Linux/Unix/Mac

    Arthas \u652F\u6301\u5728 Linux/Unix/Mac \u7B49\u5E73\u53F0\u4E0A\u4E00\u952E\u5B89\u88C5\uFF0C\u8BF7\u590D\u5236\u4EE5\u4E0B\u5185\u5BB9\uFF0C\u5E76\u7C98\u8D34\u5230\u547D\u4EE4\u884C\u4E2D\uFF0C\u6572 \u56DE\u8F66 \u6267\u884C\u5373\u53EF\uFF1A

    curl -L https://arthas.aliyun.com/install3.sh | sh
    +

    \u4E0A\u8FF0\u547D\u4EE4\u4F1A\u4E0B\u8F7D\u542F\u52A8\u811A\u672C\u6587\u4EF6 as3.sh \u5230\u5F53\u524D\u76EE\u5F55\uFF0C\u4F60\u53EF\u4EE5\u653E\u5728\u4EFB\u4F55\u5730\u65B9\u6216\u5C06\u5176\u52A0\u5165\u5230 $PATH \u4E2D\u3002

    \u76F4\u63A5\u5728 shell \u4E0B\u9762\u6267\u884C./as3.sh\uFF0C\u5C31\u4F1A\u8FDB\u5165\u4EA4\u4E92\u754C\u9762\u3002

    \u4E5F\u53EF\u4EE5\u6267\u884C./as3.sh -h\u6765\u83B7\u53D6\u66F4\u591A\u53C2\u6570\u4FE1\u606F\u3002

    Windows

    `,9),b=e("\u6700\u65B0\u7248\u672C\uFF0C\u70B9\u51FB\u4E0B\u8F7D\uFF1A"),g={href:"https://arthas.aliyun.com/download/latest_version?mirror=aliyun",target:"_blank",rel:"noopener noreferrer"},x=a("img",{src:"https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square",alt:"",title:"Arthas"},null,-1),k=t(`

    \u4E0B\u8F7D\u89E3\u538B\u540E\u5728 bin \u76EE\u5F55\u6709 as.bat\u3002\u6B64\u811A\u672C\u6682\u65F6\u53EA\u63A5\u53D7\u4E00\u4E2A\u53C2\u6570 pid\uFF0C\u5373\u53EA\u80FD\u8BCA\u65AD\u672C\u673A\u4E0A\u7684 Java \u8FDB\u7A0B\u3002\uFF08\u6B22\u8FCE\u7CBE\u901A bat \u811A\u672C\u7684\u5F00\u53D1\u8005\u6539\u8FDB\uFF09

    as.bat <pid>
    +

    \u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4\u8BCA\u65AD windows \u670D\u52A1\u6A21\u5F0F\u8FD0\u884C\u7684 Java \u8FDB\u7A0B (--interact \u6253\u5F00\u670D\u52A1 UI \u4EA4\u4E92\u6A21\u5F0F\uFF0C\u65B9\u4FBF\u8BCA\u65AD\u95EE\u9898)\uFF1A

    as-service.bat -port <port>
    +as-service.bat -pid <pid>
    +as-service.bat -pid <pid> --interact
    +

    \u6E05\u7406 arthas windows \u670D\u52A1\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\uFF1A

    as-service.bat -remove
    +

    \u624B\u52A8\u62FC\u63A5\u547D\u4EE4\u884C\u542F\u52A8

    \u5982\u679C\u542F\u52A8\u9047\u5230\u95EE\u9898\uFF0C\u53EF\u4EE5\u5C1D\u8BD5\u624B\u52A8\u62FC\u63A5\u51FA\u547D\u4EE4\u884C\u53C2\u6570\u6765\u542F\u52A8\u3002

    1. \u67E5\u627E\u76EE\u5F55 jvm \u7684 java \u6587\u4EF6\u8DEF\u5F84\u3002

      \u5728 linux/mac \u4E0A\u6267\u884Cps aux | grep java\uFF0C\u5728 windows \u4E0A\u53EF\u4EE5\u901A\u8FC7\u8FDB\u7A0B\u7BA1\u7406\u5668\u6765\u67E5\u770B\u3002\u5047\u8BBE\u662F/opt/jdk1.8/bin/java\u3002

    2. \u62FC\u63A5\u51FA\u547D\u4EE4\u884C

      /opt/jdk1.8/bin/java -Xbootclasspath/a:/opt/jdk1.8/lib/tools.jar \\
      + -jar /tmp/arthas-packaging/arthas-core.jar \\
      + -pid 15146 \\
      + -target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 \\
      + -core /tmp/arthas-packaging/arthas-core.jar \\
      + -agent /tmp/arthas-packaging/arthas/arthas-agent.jar
      +

      \u547D\u4EE4\u884C\u5206\u51E0\u90E8\u5206\u7EC4\u6210\uFF1A

      • -Xbootclasspath \u589E\u52A0 tools.jar
      • -jar /tmp/arthas-packaging/arthas-core.jar \u6307\u5B9A main \u51FD\u6570\u5165\u53E3
      • -pid 15146 \u6307\u5B9A\u76EE\u6807 java \u8FDB\u7A0B ID
      • -target-ip 127.0.0.1 \u6307\u5B9A IP
      • -telnet-port 3658 -http-port 8563 \u6307\u5B9A telnet \u548C http \u7AEF\u53E3
      • -core /tmp/arthas-packaging/arthas-core.jar -agent /tmp/arthas-packaging/arthas/arthas-agent.jar \u6307\u5B9A core/agent jar \u5305

      \u5982\u679C\u662Fjdk > 9\uFF0C\u5373 9/10/11 \u4EE5\u4E0A\u7684\u7248\u672C\uFF0C\u4E0D\u9700\u8981\u6307\u5B9Atools.jar\uFF0C\u76F4\u63A5\u53BB\u6389-Xbootclasspath \u7684\u914D\u7F6E\u5373\u53EF\u3002

      \u542F\u52A8\u76EE\u5FD7\u8F93\u51FA\u5728~/logs/arthas/arthas.log\u91CC\u3002

    3. attach \u6210\u529F\u4E4B\u540E\uFF0C\u4F7F\u7528 telnet \u8FDE\u63A5

      telnet 127.0.0.1 3658
      +
    `,9);function _(j,f){const s=d("ExternalLinkIcon");return l(),r("div",null,[o,p,h,a("p",null,[a("a",u,[v,n(s)])]),m,a("p",null,[b,a("a",g,[x,n(s)])]),k])}const A=i(c,[["render",_],["__file","manual-install.html.vue"]]);export{A as default}; diff --git a/3.x/assets/mbean.html.26631030.js b/3.x/assets/mbean.html.26631030.js new file mode 100644 index 00000000000..c40ea1737cb --- /dev/null +++ b/3.x/assets/mbean.html.26631030.js @@ -0,0 +1,9 @@ +import{_ as r,o as d,c as l,a as e,b as t,e as a,d as s,r as i}from"./app.4d248835.js";const o={},c=e("h1",{id:"mbean",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#mbean","aria-hidden":"true"},"#"),a(" mbean")],-1),p={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-mbean",target:"_blank",rel:"noopener noreferrer"},h=e("code",null,"mbean",-1),m=a("\u5728\u7EBF\u6559\u7A0B"),b=s(`

    \u63D0\u793A

    \u67E5\u770B Mbean \u7684\u4FE1\u606F

    \u8FD9\u4E2A\u547D\u4EE4\u53EF\u4EE5\u4FBF\u6377\u7684\u67E5\u770B\u6216\u76D1\u63A7 Mbean \u7684\u5C5E\u6027\u4FE1\u606F\u3002

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    name-pattern\u540D\u79F0\u8868\u8FBE\u5F0F\u5339\u914D
    attribute-pattern\u5C5E\u6027\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    [m]\u67E5\u770B\u5143\u4FE1\u606F
    [i:]\u5237\u65B0\u5C5E\u6027\u503C\u7684\u65F6\u95F4\u95F4\u9694 (ms)
    [n:]\u5237\u65B0\u5C5E\u6027\u503C\u7684\u6B21\u6570
    [E]\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D\u3002\u4EC5\u5BF9\u5C5E\u6027\u540D\u6709\u6548

    \u4F7F\u7528\u53C2\u8003

    \u5217\u51FA\u6240\u6709 Mbean \u7684\u540D\u79F0\uFF1A

    mbean
    +

    \u67E5\u770B Mbean \u7684\u5143\u4FE1\u606F\uFF1A

    mbean -m java.lang:type=Threading
    +

    \u67E5\u770B mbean \u5C5E\u6027\u4FE1\u606F\uFF1A

    mbean java.lang:type=Threading
    +

    mbean \u7684 name \u652F\u6301\u901A\u914D\u7B26\u5339\u914D\uFF1A

    mbean java.lang:type=Th*
    +
    `,13),u={class:"custom-container warning"},g=e("p",{class:"custom-container-title"},"\u6CE8\u610F",-1),v=a("\u6CE8\u610F\uFF1AObjectName \u7684\u5339\u914D\u89C4\u5219\u4E0E\u6B63\u5E38\u7684\u901A\u914D\u7B26\u5B58\u5728\u5DEE\u5F02\uFF0C\u8BE6\u7EC6\u53C2\u89C1\uFF1A"),_={href:"https://docs.oracle.com/javase/8/docs/api/javax/management/ObjectName.html?is-external=true",target:"_blank",rel:"noopener noreferrer"},x=a("javax.management.ObjectName"),k=s(`

    \u901A\u914D\u7B26\u5339\u914D\u7279\u5B9A\u7684\u5C5E\u6027\u5B57\u6BB5\uFF1A

    mbean java.lang:type=Threading *Count
    +

    \u4F7F\u7528-E\u547D\u4EE4\u5207\u6362\u4E3A\u6B63\u5219\u5339\u914D\uFF1A

    mbean -E java.lang:type=Threading PeakThreadCount|ThreadCount|DaemonThreadCount
    +

    \u4F7F\u7528-i\u547D\u4EE4\u5B9E\u65F6\u76D1\u63A7\uFF1A

    mbean -i 1000 java.lang:type=Threading *Count
    +

    \u5B9E\u65F6\u76D1\u63A7\u4F7F\u7528-i\uFF0C\u4F7F\u7528-n\u547D\u4EE4\u6267\u884C\u547D\u4EE4\u7684\u6B21\u6570\uFF08\u9ED8\u8BA4\u4E3A 100 \u6B21\uFF09\uFF1A

    mbean -i 1000 -n 50 java.lang:type=Threading *Count
    +
    `,8);function y(f,j){const n=i("ExternalLinkIcon");return d(),l("div",null,[c,e("p",null,[e("a",p,[h,m,t(n)])]),b,e("div",u,[g,e("p",null,[v,e("a",_,[x,t(n)])])]),k])}const C=r(o,[["render",y],["__file","mbean.html.vue"]]);export{C as default}; diff --git a/3.x/assets/mbean.html.405141c1.js b/3.x/assets/mbean.html.405141c1.js new file mode 100644 index 00000000000..3d48ba34268 --- /dev/null +++ b/3.x/assets/mbean.html.405141c1.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-58d22ae0","path":"/en/doc/mbean.html","title":"mbean","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Parameters","slug":"parameters","link":"#parameters","children":[]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Almas Abdrazak","email":"almas337519@gmail.com","commits":1},{"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/mbean.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/mbean.html.555cb2c7.js b/3.x/assets/mbean.html.555cb2c7.js new file mode 100644 index 00000000000..a8ea76dd3c2 --- /dev/null +++ b/3.x/assets/mbean.html.555cb2c7.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-8ebd6c68","path":"/doc/mbean.html","title":"mbean","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":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/mbean.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/mbean.html.7437cca3.js b/3.x/assets/mbean.html.7437cca3.js new file mode 100644 index 00000000000..b77321c7b59 --- /dev/null +++ b/3.x/assets/mbean.html.7437cca3.js @@ -0,0 +1,9 @@ +import{_ as r,o as i,c as l,a as e,b as n,e as a,d as s,r as d}from"./app.4d248835.js";const o={},c=e("h1",{id:"mbean",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#mbean","aria-hidden":"true"},"#"),a(" mbean")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-mbean",target:"_blank",rel:"noopener noreferrer"},p=e("code",null,"mbean",-1),h=a(" online tutorial"),u=s(`

    TIP

    show Mbean information

    This command can show or monitor Mbean attribute information.

    Parameters

    NameSpecification
    name-patternpattern for the Mbean name
    attribute-patternpattern for the attribute name
    [m]show meta information
    [i:]specify the interval to refresh attribute value (ms)
    [n:]execution times
    [E]turn on regex matching while the default mode is wildcard matching. Only effect on the attribute name

    Usage

    show all Mbean names:

    mbean
    +

    show meta data of Mbean:

    mbean -m java.lang:type=Threading
    +

    show attributes of Mbean:

    mbean java.lang:type=Threading
    +

    Mbean name support wildcard matcher:

    mbean java.lang:type=Th*
    +
    `,13),b={class:"custom-container warning"},g=e("p",{class:"custom-container-title"},"WARNING",-1),v=a("Notes\uFF1AObjectName matching rules differ from normal wildcards, Reference resources\uFF1A"),f={href:"https://docs.oracle.com/javase/8/docs/api/javax/management/ObjectName.html?is-external=true",target:"_blank",rel:"noopener noreferrer"},x=a("javax.management.ObjectName"),_=s(`

    Wildcards match specific attributes:

    mbean java.lang:type=Threading *Count
    +

    Switch to regular matching using the -E command:

    mbean -E java.lang:type=Threading PeakThreadCount|ThreadCount|DaemonThreadCount
    +

    Real-time monitoring using -i command:

    mbean -i 1000 java.lang:type=Threading *Count
    +

    Real-time monitoring using -i with number of times the command will be executed using -n command (100 times by default):

    mbean -i 1000 -n 50 java.lang:type=Threading *Count
    +
    `,8);function y(k,w){const t=d("ExternalLinkIcon");return i(),l("div",null,[c,e("p",null,[e("a",m,[p,h,n(t)])]),u,e("div",b,[g,e("p",null,[v,e("a",f,[x,n(t)])])]),_])}const T=r(o,[["render",y],["__file","mbean.html.vue"]]);export{T as default}; diff --git a/3.x/assets/mc.html.19c82f53.js b/3.x/assets/mc.html.19c82f53.js new file mode 100644 index 00000000000..6de4e0dc591 --- /dev/null +++ b/3.x/assets/mc.html.19c82f53.js @@ -0,0 +1,8 @@ +import{_ as r,o as d,c as l,a as e,b as a,w as o,e as s,d as i,r as t}from"./app.4d248835.js";const m={},p=e("h1",{id:"mc",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#mc","aria-hidden":"true"},"#"),s(" mc")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=cn&id=command-mc-retransform",target:"_blank",rel:"noopener noreferrer"},h=e("code",null,"mc-retransform",-1),_=s("\u5728\u7EBF\u6559\u7A0B"),v=i(`

    \u4F7F\u7528\u53C2\u8003

    \u63D0\u793A

    Memory Compiler/\u5185\u5B58\u7F16\u8BD1\u5668\uFF0C\u7F16\u8BD1.java\u6587\u4EF6\u751F\u6210.class\u3002

    mc /tmp/Test.java
    +

    \u53EF\u4EE5\u901A\u8FC7-c\u53C2\u6570\u6307\u5B9A classloader\uFF1A

    mc -c 327a647b /tmp/Test.java
    +

    \u4E5F\u53EF\u4EE5\u901A\u8FC7--classLoaderClass\u53C2\u6570\u6307\u5B9A ClassLoader\uFF1A

    $ mc --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader /tmp/UserController.java -d /tmp
    +Memory compiler output:
    +/tmp/com/example/demo/arthas/user/UserController.class
    +Affect(row-cnt:1) cost in 346 ms
    +

    \u53EF\u4EE5\u901A\u8FC7-d\u547D\u4EE4\u6307\u5B9A\u8F93\u51FA\u76EE\u5F55\uFF1A

    mc -d /tmp/output /tmp/ClassA.java /tmp/ClassB.java
    +
    `,9),b=s("\u7F16\u8BD1\u751F\u6210"),f=e("code",null,".class",-1),g=s("\u6587\u4EF6\u4E4B\u540E\uFF0C\u53EF\u4EE5\u7ED3\u5408"),k=s("retransform"),x=s("\u547D\u4EE4\u5B9E\u73B0\u70ED\u66F4\u65B0\u4EE3\u7801\u3002"),C={class:"custom-container warning"},L=e("p",{class:"custom-container-title"},"\u6CE8\u610F",-1),j=s("\u6CE8\u610F\uFF0Cmc \u547D\u4EE4\u6709\u53EF\u80FD\u5931\u8D25\u3002\u5982\u679C\u7F16\u8BD1\u5931\u8D25\u53EF\u4EE5\u5728\u672C\u5730\u7F16\u8BD1\u597D"),w=e("code",null,".class",-1),y=s("\u6587\u4EF6\uFF0C\u518D\u4E0A\u4F20\u5230\u670D\u52A1\u5668\u3002\u5177\u4F53\u53C2\u8003"),B=s("retransform"),N=s("\u547D\u4EE4\u8BF4\u660E\u3002");function V(E,R){const c=t("ExternalLinkIcon"),n=t("RouterLink");return d(),l("div",null,[p,e("p",null,[e("a",u,[h,_,a(c)])]),v,e("p",null,[b,f,g,a(n,{to:"/doc/retransform.html"},{default:o(()=>[k]),_:1}),x]),e("div",C,[L,e("p",null,[j,w,y,a(n,{to:"/doc/retransform.html"},{default:o(()=>[B]),_:1}),N])])])}const U=r(m,[["render",V],["__file","mc.html.vue"]]);export{U as default}; diff --git a/3.x/assets/mc.html.70645c5e.js b/3.x/assets/mc.html.70645c5e.js new file mode 100644 index 00000000000..f03b6632795 --- /dev/null +++ b/3.x/assets/mc.html.70645c5e.js @@ -0,0 +1 @@ +const a=JSON.parse('{"key":"v-3b401ada","path":"/doc/mc.html","title":"mc","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/mc.md","version":"3.7.3"}');export{a as data}; diff --git a/3.x/assets/mc.html.89ccac82.js b/3.x/assets/mc.html.89ccac82.js new file mode 100644 index 00000000000..2a81ebde688 --- /dev/null +++ b/3.x/assets/mc.html.89ccac82.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-2ac66c02","path":"/en/doc/mc.html","title":"mc","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/mc.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/mc.html.ac459852.js b/3.x/assets/mc.html.ac459852.js new file mode 100644 index 00000000000..0be4750a15f --- /dev/null +++ b/3.x/assets/mc.html.ac459852.js @@ -0,0 +1,8 @@ +import{_ as i,o as r,c as l,a as e,b as a,w as o,e as s,d,r as t}from"./app.4d248835.js";const m={},p=e("h1",{id:"mc",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#mc","aria-hidden":"true"},"#"),s(" mc")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=en&id=command-mc-retransform",target:"_blank",rel:"noopener noreferrer"},h=e("code",null,"mc-retransform",-1),_=s(" online tutorial"),v=d(`

    Usage

    TIP

    Memory compiler, compiles .java files into .class files in memory.

    mc /tmp/Test.java
    +

    The classloader can be specified with the -c option:

    mc -c 327a647b /tmp/Test.java
    +

    You can also specify the ClassLoader with the --classLoaderClass option:

    $ mc --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader /tmp/UserController.java -d /tmp
    +Memory compiler output:
    +/tmp/com/example/demo/arthas/user/UserController.class
    +Affect(row-cnt:1) cost in 346 ms
    +

    The output directory can be specified with the -d option:

    mc -d /tmp/output /tmp/ClassA.java /tmp/ClassB.java
    +
    `,9),f=s("After compiling the "),b=e("code",null,".class",-1),g=s(" file, you can use the "),k=s("retransform"),x=s(" command to re-define the loaded classes in JVM."),y={class:"custom-container warning"},C=e("p",{class:"custom-container-title"},"WARNING",-1),L=s("Note that the mc command may fail. If the compilation fails, the "),w=e("code",null,".class",-1),N=s(" file can be compiled locally and uploaded to the server. Refer to the "),j=s("retransform"),T=s(" command description for details.");function I(R,V){const c=t("ExternalLinkIcon"),n=t("RouterLink");return r(),l("div",null,[p,e("p",null,[e("a",u,[h,_,a(c)])]),v,e("p",null,[f,b,g,a(n,{to:"/en/doc/retransform.html"},{default:o(()=>[k]),_:1}),x]),e("div",y,[C,e("p",null,[L,w,N,a(n,{to:"/en/doc/retransform.html"},{default:o(()=>[j]),_:1}),T])])])}const B=i(m,[["render",I],["__file","mc.html.vue"]]);export{B as default}; diff --git a/3.x/assets/memory.html.078c4658.js b/3.x/assets/memory.html.078c4658.js new file mode 100644 index 00000000000..dc85382efc0 --- /dev/null +++ b/3.x/assets/memory.html.078c4658.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-4d9433f0","path":"/doc/memory.html","title":"memory","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":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/memory.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/memory.html.7bfef615.js b/3.x/assets/memory.html.7bfef615.js new file mode 100644 index 00000000000..2a23d53cefa --- /dev/null +++ b/3.x/assets/memory.html.7bfef615.js @@ -0,0 +1,15 @@ +import{_ as e,o as n,c as s,d as a}from"./app.4d248835.js";const r={},i=a(`

    memory

    View the JVM memory information.

    Usage

    $ memory
    +Memory                           used      total      max        usage
    +heap                             32M       256M       4096M      0.79%
    +g1_eden_space                    11M       68M        -1         16.18%
    +g1_old_gen                       17M       184M       4096M      0.43%
    +g1_survivor_space                4M        4M         -1         100.00%
    +nonheap                          35M       39M        -1         89.55%
    +codeheap_'non-nmethods'          1M        2M         5M         20.53%
    +metaspace                        26M       27M        -1         96.88%
    +codeheap_'profiled_nmethods'     4M        4M         117M       3.57%
    +compressed_class_space           2M        3M         1024M      0.29%
    +codeheap_'non-profiled_nmethods' 685K      2496K      120032K    0.57%
    +mapped                           0K        0K         -          0.00%
    +direct                           48M       48M        -          100.00%
    +
    `,4),l=[i];function c(d,o){return n(),s("div",null,l)}const m=e(r,[["render",c],["__file","memory.html.vue"]]);export{m as default}; diff --git a/3.x/assets/memory.html.9926de30.js b/3.x/assets/memory.html.9926de30.js new file mode 100644 index 00000000000..1f919e1c546 --- /dev/null +++ b/3.x/assets/memory.html.9926de30.js @@ -0,0 +1,15 @@ +import{_ as e,o as n,c as i,d}from"./app.4d248835.js";const s={},a=d(`

    memory

    \u67E5\u770B JVM \u5185\u5B58\u4FE1\u606F\u3002

    \u4F7F\u7528\u53C2\u8003

    $ memory
    +Memory                           used      total      max        usage
    +heap                             32M       256M       4096M      0.79%
    +g1_eden_space                    11M       68M        -1         16.18%
    +g1_old_gen                       17M       184M       4096M      0.43%
    +g1_survivor_space                4M        4M         -1         100.00%
    +nonheap                          35M       39M        -1         89.55%
    +codeheap_'non-nmethods'          1M        2M         5M         20.53%
    +metaspace                        26M       27M        -1         96.88%
    +codeheap_'profiled_nmethods'     4M        4M         117M       3.57%
    +compressed_class_space           2M        3M         1024M      0.29%
    +codeheap_'non-profiled_nmethods' 685K      2496K      120032K    0.57%
    +mapped                           0K        0K         -          0.00%
    +direct                           48M       48M        -          100.00%
    +
    `,4),r=[a];function l(c,m){return n(),i("div",null,r)}const t=e(s,[["render",l],["__file","memory.html.vue"]]);export{t as default}; diff --git a/3.x/assets/memory.html.e3c4914e.js b/3.x/assets/memory.html.e3c4914e.js new file mode 100644 index 00000000000..162dd253be9 --- /dev/null +++ b/3.x/assets/memory.html.e3c4914e.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-3f212774","path":"/en/doc/memory.html","title":"memory","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]}],"git":{"updatedTime":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/memory.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/monitor.html.0b324722.js b/3.x/assets/monitor.html.0b324722.js new file mode 100644 index 00000000000..465e64e095d --- /dev/null +++ b/3.x/assets/monitor.html.0b324722.js @@ -0,0 +1,81 @@ +import{_ as e,o as t,c as l,a as s,b as i,e as n,d as r,r as o}from"./app.4d248835.js";const c={},p=s("h1",{id:"monitor",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#monitor","aria-hidden":"true"},"#"),n(" monitor")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-monitor",target:"_blank",rel:"noopener noreferrer"},d=s("code",null,"monitor",-1),u=n(" online tutorial"),b=r(`

    TIP

    Monitor method invocation.

    Monitor invocation for the method matched with class-pattern and method-pattern and filter by condition-expression.

    monitor is not a command returning immediately.

    A command returning immediately is a command immediately returns with the result after the command is input, while a non-immediate returning command will keep outputting the information from the target JVM process until user presses Ctrl+C.

    On Arthas's server side, the command is running as a background job, but the weaved code will not take further effect once the job is terminated, therefore, it will not impact the performance after the job quits. Furthermore, Arthas is designed to have no side effect to the business logic.

    Items to monitor

    ItemSpecification
    timestamptimestamp
    classJava class
    methodmethod (constructor and regular methods)
    totalcalling times
    successsuccess count
    failfailure count
    rtaverage RT
    fail-ratefailure ratio

    Parameters

    Parameter [c:] stands for cycles of statistics. Its value is an integer value in seconds.

    NameSpecification
    class-patternpattern for the class name
    method-patternpattern for the method name
    condition-expressioncondition expression for filtering method calls
    [E]turn on regex matching while the default is wildcard matching
    [c:]cycle of statistics, the default value: 120s
    [b]evaluate the condition-expression before method invoke
    [m <arg>]Specify the max number of matched Classes, the default value is 50. Long format is [maxMatch <arg>].

    Usage

    $ monitor -c 5 demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 94 ms.
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:38  demo.MathGame  primeFactors  5      1        4     1.15        80.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:43  demo.MathGame  primeFactors  5      3        2     42.29       40.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:48  demo.MathGame  primeFactors  5      3        2     67.92       40.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:53  demo.MathGame  primeFactors  5      2        3     0.25        60.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:58  demo.MathGame  primeFactors  1      1        0     0.45        0.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:07:03  demo.MathGame  primeFactors  2      2        0     3182.72     0.00%
    +

    Specify the max number of matched Classes

    $ monitor -c 1 -m 1 demo.MathGame primeFactors
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 384 ms, listenerId: 6.
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2022-12-25 21:12:58  demo.MathGame  primeFactors  1      1        0     0.18        0.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2022-12-25 21:12:59  demo.MathGame  primeFactors  0      0        0     0.00       0.00%
    +

    Evaluate condition-express to filter method (after method call)

    monitor -c 5 demo.MathGame primeFactors "params[0] <= 2"
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 19 ms, listenerId: 5
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:36  demo.MathGame  primeFactors    5       3       2      0.09       40.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:41  demo.MathGame  primeFactors    5       2       3      0.11       60.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:46  demo.MathGame  primeFactors    5       1       4      0.06       80.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:51  demo.MathGame  primeFactors    5       1       4      0.12       80.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:56  demo.MathGame  primeFactors    5       3       2      0.15       40.00%
    +

    Evaluate condition-express to filter method (before method call)

    monitor -b -c 5 com.test.testes.MathGame primeFactors "params[0] <= 2"
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 21 ms, listenerId: 4
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:41:57  demo.MathGame  primeFactors    1       0        1      0.10      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:02  demo.MathGame  primeFactors    3       0        3      0.06      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:07  demo.MathGame  primeFactors    2       0        2      0.06      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:12  demo.MathGame  primeFactors    1       0        1      0.05      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:17  demo.MathGame  primeFactors    2       0        2      0.10      100.00%
    +
    `,18);function v(h,k){const a=o("ExternalLinkIcon");return t(),l("div",null,[p,s("p",null,[s("a",m,[d,u,i(a)])]),b])}const g=e(c,[["render",v],["__file","monitor.html.vue"]]);export{g as default}; diff --git a/3.x/assets/monitor.html.30828325.js b/3.x/assets/monitor.html.30828325.js new file mode 100644 index 00000000000..d84aa663312 --- /dev/null +++ b/3.x/assets/monitor.html.30828325.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-20388043","path":"/en/doc/monitor.html","title":"monitor","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Items to monitor","slug":"items-to-monitor","link":"#items-to-monitor","children":[]},{"level":2,"title":"Parameters","slug":"parameters","link":"#parameters","children":[]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"Specify the max number of matched Classes","slug":"specify-the-max-number-of-matched-classes","link":"#specify-the-max-number-of-matched-classes","children":[]},{"level":3,"title":"Evaluate condition-express to filter method (after method call)","slug":"evaluate-condition-express-to-filter-method-after-method-call","link":"#evaluate-condition-express-to-filter-method-after-method-call","children":[]},{"level":3,"title":"Evaluate condition-express to filter method (before method call)","slug":"evaluate-condition-express-to-filter-method-before-method-call","link":"#evaluate-condition-express-to-filter-method-before-method-call","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},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"en/doc/monitor.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/monitor.html.5f496a09.js b/3.x/assets/monitor.html.5f496a09.js new file mode 100644 index 00000000000..8a2ef72d0aa --- /dev/null +++ b/3.x/assets/monitor.html.5f496a09.js @@ -0,0 +1,81 @@ +import{_ as e,o as t,c as l,a as s,b as i,e as n,d as c,r as p}from"./app.4d248835.js";const r={},o=s("h1",{id:"monitor",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#monitor","aria-hidden":"true"},"#"),n(" monitor")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-monitor",target:"_blank",rel:"noopener noreferrer"},d=s("code",null,"monitor",-1),u=n("\u5728\u7EBF\u6559\u7A0B"),b=c(`

    \u63D0\u793A

    \u65B9\u6CD5\u6267\u884C\u76D1\u63A7

    \u5BF9\u5339\u914D class-pattern\uFF0Fmethod-pattern\uFF0Fcondition-express\u7684\u7C7B\u3001\u65B9\u6CD5\u7684\u8C03\u7528\u8FDB\u884C\u76D1\u63A7\u3002

    monitor \u547D\u4EE4\u662F\u4E00\u4E2A\u975E\u5B9E\u65F6\u8FD4\u56DE\u547D\u4EE4.

    \u5B9E\u65F6\u8FD4\u56DE\u547D\u4EE4\u662F\u8F93\u5165\u4E4B\u540E\u7ACB\u5373\u8FD4\u56DE\uFF0C\u800C\u975E\u5B9E\u65F6\u8FD4\u56DE\u7684\u547D\u4EE4\uFF0C\u5219\u662F\u4E0D\u65AD\u7684\u7B49\u5F85\u76EE\u6807 Java \u8FDB\u7A0B\u8FD4\u56DE\u4FE1\u606F\uFF0C\u76F4\u5230\u7528\u6237\u8F93\u5165 Ctrl+C \u4E3A\u6B62\u3002

    \u670D\u52A1\u7AEF\u662F\u4EE5\u4EFB\u52A1\u7684\u5F62\u5F0F\u5728\u540E\u53F0\u8DD1\u4EFB\u52A1\uFF0C\u690D\u5165\u7684\u4EE3\u7801\u968F\u7740\u4EFB\u52A1\u7684\u4E2D\u6B62\u800C\u4E0D\u4F1A\u88AB\u6267\u884C\uFF0C\u6240\u4EE5\u4EFB\u52A1\u5173\u95ED\u540E\uFF0C\u4E0D\u4F1A\u5BF9\u539F\u6709\u6027\u80FD\u4EA7\u751F\u592A\u5927\u5F71\u54CD\uFF0C\u800C\u4E14\u539F\u5219\u4E0A\uFF0C\u4EFB\u4F55 Arthas \u547D\u4EE4\u4E0D\u4F1A\u5F15\u8D77\u539F\u6709\u4E1A\u52A1\u903B\u8F91\u7684\u6539\u53D8\u3002

    \u76D1\u63A7\u7684\u7EF4\u5EA6\u8BF4\u660E

    \u76D1\u63A7\u9879\u8BF4\u660E
    timestamp\u65F6\u95F4\u6233
    classJava \u7C7B
    method\u65B9\u6CD5\uFF08\u6784\u9020\u65B9\u6CD5\u3001\u666E\u901A\u65B9\u6CD5\uFF09
    total\u8C03\u7528\u6B21\u6570
    success\u6210\u529F\u6B21\u6570
    fail\u5931\u8D25\u6B21\u6570
    rt\u5E73\u5747 RT
    fail-rate\u5931\u8D25\u7387

    \u53C2\u6570\u8BF4\u660E

    \u65B9\u6CD5\u62E5\u6709\u4E00\u4E2A\u547D\u540D\u53C2\u6570 [c:]\uFF0C\u610F\u601D\u662F\u7EDF\u8BA1\u5468\u671F\uFF08cycle of output\uFF09\uFF0C\u62E5\u6709\u4E00\u4E2A\u6574\u578B\u7684\u53C2\u6570\u503C

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    class-pattern\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    method-pattern\u65B9\u6CD5\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    condition-express\u6761\u4EF6\u8868\u8FBE\u5F0F
    [E]\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D
    [c:]\u7EDF\u8BA1\u5468\u671F\uFF0C\u9ED8\u8BA4\u503C\u4E3A 120 \u79D2
    [b]\u5728\u65B9\u6CD5\u8C03\u7528\u4E4B\u524D\u8BA1\u7B97 condition-express
    [m <arg>]\u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF\uFF0C\u9ED8\u8BA4\u503C\u4E3A 50\u3002\u957F\u683C\u5F0F\u4E3A[maxMatch <arg>]\u3002

    \u4F7F\u7528\u53C2\u8003

    $ monitor -c 5 demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 94 ms.
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:38  demo.MathGame  primeFactors  5      1        4     1.15        80.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:43  demo.MathGame  primeFactors  5      3        2     42.29       40.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:48  demo.MathGame  primeFactors  5      3        2     67.92       40.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:53  demo.MathGame  primeFactors  5      2        3     0.25        60.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:58  demo.MathGame  primeFactors  1      1        0     0.45        0.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:07:03  demo.MathGame  primeFactors  2      2        0     3182.72     0.00%
    +

    \u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF

    $ monitor -c 1 -m 1 demo.MathGame primeFactors
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 384 ms, listenerId: 6.
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2022-12-25 21:12:58  demo.MathGame  primeFactors  1      1        0     0.18        0.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2022-12-25 21:12:59  demo.MathGame  primeFactors  0      0        0     0.00       0.00%
    +

    \u8BA1\u7B97\u6761\u4EF6\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u7EDF\u8BA1\u7ED3\u679C(\u65B9\u6CD5\u6267\u884C\u5B8C\u6BD5\u4E4B\u540E)

    monitor -c 5 demo.MathGame primeFactors "params[0] <= 2"
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 19 ms, listenerId: 5
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:36  demo.MathGame  primeFactors    5       3       2      0.09       40.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:41  demo.MathGame  primeFactors    5       2       3      0.11       60.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:46  demo.MathGame  primeFactors    5       1       4      0.06       80.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:51  demo.MathGame  primeFactors    5       1       4      0.12       80.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:56  demo.MathGame  primeFactors    5       3       2      0.15       40.00%
    +

    \u8BA1\u7B97\u6761\u4EF6\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u7EDF\u8BA1\u7ED3\u679C(\u65B9\u6CD5\u6267\u884C\u5B8C\u6BD5\u4E4B\u524D)

    monitor -b -c 5 com.test.testes.MathGame primeFactors "params[0] <= 2"
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 21 ms, listenerId: 4
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:41:57  demo.MathGame  primeFactors    1       0        1      0.10      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:02  demo.MathGame  primeFactors    3       0        3      0.06      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:07  demo.MathGame  primeFactors    2       0        2      0.06      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:12  demo.MathGame  primeFactors    1       0        1      0.05      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:17  demo.MathGame  primeFactors    2       0        2      0.10      100.00%
    +
    `,18);function v(k,h){const a=p("ExternalLinkIcon");return t(),l("div",null,[o,s("p",null,[s("a",m,[d,u,i(a)])]),b])}const f=e(r,[["render",v],["__file","monitor.html.vue"]]);export{f as default}; diff --git a/3.x/assets/monitor.html.d6717549.js b/3.x/assets/monitor.html.d6717549.js new file mode 100644 index 00000000000..3f39903e3ac --- /dev/null +++ b/3.x/assets/monitor.html.d6717549.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-6e88d7a2","path":"/doc/monitor.html","title":"monitor","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u76D1\u63A7\u7684\u7EF4\u5EA6\u8BF4\u660E","slug":"\u76D1\u63A7\u7684\u7EF4\u5EA6\u8BF4\u660E","link":"#\u76D1\u63A7\u7684\u7EF4\u5EA6\u8BF4\u660E","children":[]},{"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":"\u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF","slug":"\u6307\u5B9A-class-\u6700\u5927\u5339\u914D\u6570\u91CF","link":"#\u6307\u5B9A-class-\u6700\u5927\u5339\u914D\u6570\u91CF","children":[]},{"level":3,"title":"\u8BA1\u7B97\u6761\u4EF6\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u7EDF\u8BA1\u7ED3\u679C(\u65B9\u6CD5\u6267\u884C\u5B8C\u6BD5\u4E4B\u540E)","slug":"\u8BA1\u7B97\u6761\u4EF6\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u7EDF\u8BA1\u7ED3\u679C-\u65B9\u6CD5\u6267\u884C\u5B8C\u6BD5\u4E4B\u540E","link":"#\u8BA1\u7B97\u6761\u4EF6\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u7EDF\u8BA1\u7ED3\u679C-\u65B9\u6CD5\u6267\u884C\u5B8C\u6BD5\u4E4B\u540E","children":[]},{"level":3,"title":"\u8BA1\u7B97\u6761\u4EF6\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u7EDF\u8BA1\u7ED3\u679C(\u65B9\u6CD5\u6267\u884C\u5B8C\u6BD5\u4E4B\u524D)","slug":"\u8BA1\u7B97\u6761\u4EF6\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u7EDF\u8BA1\u7ED3\u679C-\u65B9\u6CD5\u6267\u884C\u5B8C\u6BD5\u4E4B\u524D","link":"#\u8BA1\u7B97\u6761\u4EF6\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u7EDF\u8BA1\u7ED3\u679C-\u65B9\u6CD5\u6267\u884C\u5B8C\u6BD5\u4E4B\u524D","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},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/monitor.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/ognl.html.59679ee9.js b/3.x/assets/ognl.html.59679ee9.js new file mode 100644 index 00000000000..05c69595e4b --- /dev/null +++ b/3.x/assets/ognl.html.59679ee9.js @@ -0,0 +1,46 @@ +import{_ as o,o as l,c as i,a as n,b as e,e as a,d as t,r as p}from"./app.4d248835.js";const r={},c=n("h1",{id:"ognl",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#ognl","aria-hidden":"true"},"#"),a(" ognl")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=cn&id=command-ognl",target:"_blank",rel:"noopener noreferrer"},d=n("code",null,"ognl",-1),g=a("\u5728\u7EBF\u6559\u7A0B"),v=t('

    \u63D0\u793A

    \u6267\u884C ognl \u8868\u8FBE\u5F0F

    \u4ECE 3.0.5 \u7248\u672C\u589E\u52A0

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    express\u6267\u884C\u7684\u8868\u8FBE\u5F0F
    [c:]\u6267\u884C\u8868\u8FBE\u5F0F\u7684 ClassLoader \u7684 hashcode\uFF0C\u9ED8\u8BA4\u503C\u662F SystemClassLoader
    [classLoaderClass:]\u6307\u5B9A\u6267\u884C\u8868\u8FBE\u5F0F\u7684 ClassLoader \u7684 class name
    [x]\u7ED3\u679C\u5BF9\u8C61\u7684\u5C55\u5F00\u5C42\u6B21\uFF0C\u9ED8\u8BA4\u503C 1

    \u4F7F\u7528\u53C2\u8003

    ',5),k=a("OGNL \u7279\u6B8A\u7528\u6CD5\u8BF7\u53C2\u8003\uFF1A"),m={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},b=a("https://github.com/alibaba/arthas/issues/71"),h=a("OGNL \u8868\u8FBE\u5F0F\u5B98\u65B9\u6307\u5357\uFF1A"),f={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},L=a("https://commons.apache.org/proper/commons-ognl/language-guide.html"),_=t(`

    \u8C03\u7528\u9759\u6001\u51FD\u6570\uFF1A

    $ ognl '@java.lang.System@out.println("hello")'
    +null
    +

    \u83B7\u53D6\u9759\u6001\u7C7B\u7684\u9759\u6001\u5B57\u6BB5\uFF1A

    $ ognl '@demo.MathGame@random'
    +@Random[
    +    serialVersionUID=@Long[3905348978240129619],
    +    seed=@AtomicLong[125451474443703],
    +    multiplier=@Long[25214903917],
    +    addend=@Long[11],
    +    mask=@Long[281474976710655],
    +    DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +    BadBound=@String[bound must be positive],
    +    BadRange=@String[bound must be greater than origin],
    +    BadSize=@String[size must be non-negative],
    +    seedUniquifier=@AtomicLong[-3282039941672302964],
    +    nextNextGaussian=@Double[0.0],
    +    haveNextNextGaussian=@Boolean[false],
    +    serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +    unsafe=@Unsafe[sun.misc.Unsafe@28ea5898],
    +    seedOffset=@Long[24],
    +]
    +

    \u901A\u8FC7 hashcode \u6307\u5B9A ClassLoader\uFF1A

    $ classloader -t
    ++-BootstrapClassLoader
    ++-jdk.internal.loader.ClassLoaders$PlatformClassLoader@301ec38b
    +  +-com.taobao.arthas.agent.ArthasClassloader@472067c7
    +  +-jdk.internal.loader.ClassLoaders$AppClassLoader@4b85612c
    +    +-org.springframework.boot.loader.LaunchedURLClassLoader@7f9a81e8
    +
    +$ ognl -c 7f9a81e8 @org.springframework.boot.SpringApplication@logger
    +@Slf4jLocationAwareLog[
    +    FQCN=@String[org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog],
    +    name=@String[org.springframework.boot.SpringApplication],
    +    logger=@Logger[Logger[org.springframework.boot.SpringApplication]],
    +]
    +$
    +

    \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

    \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

    $ ognl --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader  @org.springframework.boot.SpringApplication@logger
    +@Slf4jLocationAwareLog[
    +    FQCN=@String[org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog],
    +    name=@String[org.springframework.boot.SpringApplication],
    +    logger=@Logger[Logger[org.springframework.boot.SpringApplication]],
    +]
    +

    \u6267\u884C\u591A\u884C\u8868\u8FBE\u5F0F\uFF0C\u8D4B\u503C\u7ED9\u4E34\u65F6\u53D8\u91CF\uFF0C\u8FD4\u56DE\u4E00\u4E2A List\uFF1A

    $ ognl '#value1=@System@getProperty("java.home"), #value2=@System@getProperty("java.runtime.name"), {#value1, #value2}'
    +@ArrayList[
    +    @String[/opt/java/8.0.181-zulu/jre],
    +    @String[OpenJDK Runtime Environment],
    +]
    +
    `,11);function x(S,y){const s=p("ExternalLinkIcon");return l(),i("div",null,[c,n("p",null,[n("a",u,[d,g,e(s)])]),v,n("ul",null,[n("li",null,[k,n("a",m,[b,e(s)])]),n("li",null,[h,n("a",f,[L,e(s)])])]),_])}const A=o(r,[["render",x],["__file","ognl.html.vue"]]);export{A as default}; diff --git a/3.x/assets/ognl.html.a04123af.js b/3.x/assets/ognl.html.a04123af.js new file mode 100644 index 00000000000..b91409ca54c --- /dev/null +++ b/3.x/assets/ognl.html.a04123af.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-627e52da","path":"/doc/ognl.html","title":"ognl","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":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/ognl.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/ognl.html.a2f5b795.js b/3.x/assets/ognl.html.a2f5b795.js new file mode 100644 index 00000000000..eabea0262e6 --- /dev/null +++ b/3.x/assets/ognl.html.a2f5b795.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-89b4fa02","path":"/en/doc/ognl.html","title":"ognl","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Parameters","slug":"parameters","link":"#parameters","children":[]},{"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/ognl.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/ognl.html.c5956d1f.js b/3.x/assets/ognl.html.c5956d1f.js new file mode 100644 index 00000000000..4069e19d402 --- /dev/null +++ b/3.x/assets/ognl.html.c5956d1f.js @@ -0,0 +1,46 @@ +import{_ as o,o as l,c as i,a as n,b as e,e as a,d as t,r as p}from"./app.4d248835.js";const r={},c=n("h1",{id:"ognl",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#ognl","aria-hidden":"true"},"#"),a(" ognl")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=en&id=command-ognl",target:"_blank",rel:"noopener noreferrer"},d=n("code",null,"ognl",-1),g=a(" online tutorial"),v=t('

    TIP

    Execute ognl expression.

    Since 3.0.5.

    Parameters

    NameSpecification
    expressexpression to be executed
    [c:]The hashcode of the ClassLoader that executes the expression, default ClassLoader is SystemClassLoader.
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.
    [x]Expand level of object (1 by default).

    Usage

    ',5),k={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},b=a("Special usages"),m={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},h=a("OGNL official guide"),f=t(`

    Call static method:

    $ ognl '@java.lang.System@out.println("hello")'
    +null
    +

    Get static field:

    $ ognl '@demo.MathGame@random'
    +@Random[
    +    serialVersionUID=@Long[3905348978240129619],
    +    seed=@AtomicLong[125451474443703],
    +    multiplier=@Long[25214903917],
    +    addend=@Long[11],
    +    mask=@Long[281474976710655],
    +    DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +    BadBound=@String[bound must be positive],
    +    BadRange=@String[bound must be greater than origin],
    +    BadSize=@String[size must be non-negative],
    +    seedUniquifier=@AtomicLong[-3282039941672302964],
    +    nextNextGaussian=@Double[0.0],
    +    haveNextNextGaussian=@Boolean[false],
    +    serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +    unsafe=@Unsafe[sun.misc.Unsafe@28ea5898],
    +    seedOffset=@Long[24],
    +]
    +

    Specify ClassLoader by hashcode:

    $ classloader -t
    ++-BootstrapClassLoader
    ++-jdk.internal.loader.ClassLoaders$PlatformClassLoader@301ec38b
    +  +-com.taobao.arthas.agent.ArthasClassloader@472067c7
    +  +-jdk.internal.loader.ClassLoaders$AppClassLoader@4b85612c
    +    +-org.springframework.boot.loader.LaunchedURLClassLoader@7f9a81e8
    +
    +$ ognl -c 7f9a81e8 @org.springframework.boot.SpringApplication@logger
    +@Slf4jLocationAwareLog[
    +    FQCN=@String[org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog],
    +    name=@String[org.springframework.boot.SpringApplication],
    +    logger=@Logger[Logger[org.springframework.boot.SpringApplication]],
    +]
    +$
    +

    Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader.

    For ClassLoader with only unique instance, it can be specified by class name, which is more convenient to use:

    $ ognl --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader  @org.springframework.boot.SpringApplication@logger
    +@Slf4jLocationAwareLog[
    +    FQCN=@String[org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog],
    +    name=@String[org.springframework.boot.SpringApplication],
    +    logger=@Logger[Logger[org.springframework.boot.SpringApplication]],
    +]
    +

    Execute a multi-line expression, and return a list:

    $ ognl '#value1=@System@getProperty("java.home"), #value2=@System@getProperty("java.runtime.name"), {#value1, #value2}'
    +@ArrayList[
    +    @String[/opt/java/8.0.181-zulu/jre],
    +    @String[OpenJDK Runtime Environment],
    +]
    +
    `,11);function L(x,_){const s=p("ExternalLinkIcon");return l(),i("div",null,[c,n("p",null,[n("a",u,[d,g,e(s)])]),v,n("ul",null,[n("li",null,[n("a",k,[b,e(s)])]),n("li",null,[n("a",m,[h,e(s)])])]),f])}const y=o(r,[["render",L],["__file","ognl.html.vue"]]);export{y as default}; diff --git a/3.x/assets/options.html.39ae73d3.js b/3.x/assets/options.html.39ae73d3.js new file mode 100644 index 00000000000..00bf042c3e7 --- /dev/null +++ b/3.x/assets/options.html.39ae73d3.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-43a1e17f","path":"/en/doc/options.html","title":"options","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"View all options","slug":"view-all-options","link":"#view-all-options","children":[]},{"level":2,"title":"Get special option value","slug":"get-special-option-value","link":"#get-special-option-value","children":[]},{"level":2,"title":"Set special option value","slug":"set-special-option-value","link":"#set-special-option-value","children":[]},{"level":2,"title":"Set unsafe to true to enhance the classes under the java.* package","slug":"set-unsafe-to-true-to-enhance-the-classes-under-the-java-package","link":"#set-unsafe-to-true-to-enhance-the-classes-under-the-java-package","children":[]},{"level":2,"title":"Turn off strict mode, allow setting object properties in ognl expressions","slug":"turn-off-strict-mode-allow-setting-object-properties-in-ognl-expressions","link":"#turn-off-strict-mode-allow-setting-object-properties-in-ognl-expressions","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/options.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/options.html.6ca60b92.js b/3.x/assets/options.html.6ca60b92.js new file mode 100644 index 00000000000..3eb2c000832 --- /dev/null +++ b/3.x/assets/options.html.6ca60b92.js @@ -0,0 +1,61 @@ +import{_ as a,o,c as l,a as e,b as t,e as n,d as i,r as c}from"./app.4d248835.js";const r={},d=e("h1",{id:"options",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#options","aria-hidden":"true"},"#"),n(" options")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-options",target:"_blank",rel:"noopener noreferrer"},p=e("code",null,"options",-1),h=n(" online tutorial"),m=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"TIP"),e("p",null,"Global options")],-1),b=e("thead",null,[e("tr",null,[e("th",null,"Name"),e("th",null,"Default Value"),e("th",null,"Description")])],-1),v=e("tr",null,[e("td",null,"unsafe"),e("td",null,"false"),e("td",null,"whether to enhance to system-level class. Use it with caution since JVM may hang")],-1),f=e("tr",null,[e("td",null,"dump"),e("td",null,"false"),e("td",null,[n("whether to dump enhanced class to the external files. If it's on, enhanced class will be dumped into "),e("code",null,"/${application dir}/arthas-class-dump/"),n(", the specific output path will be output in the console")])],-1),g=e("tr",null,[e("td",null,"batch-re-transform"),e("td",null,"true"),e("td",null,"whether to re-transform matched classes in batch")],-1),k=e("tr",null,[e("td",null,"json-format"),e("td",null,"false"),e("td",null,"whether to output in JSON format")],-1),_=e("tr",null,[e("td",null,"disable-sub-class"),e("td",null,"false"),e("td",null,[n("whether to enable matching child classes. The default value is "),e("code",null,"true"),n(". If exact match is desire, turn off this flag")])],-1),w=e("td",null,"support-default-method",-1),x=e("td",null,"true",-1),j=n("whether to enable matching default method in interface. The default value is "),y=e("code",null,"true",-1),T=n(". Refer to "),E={href:"https://github.com/alibaba/arthas/issues/1105",target:"_blank",rel:"noopener noreferrer"},O=n("#1105"),A=e("tr",null,[e("td",null,"save-result"),e("td",null,"false"),e("td",null,[n("whether to save execution result. All execution results will be saved to "),e("code",null,"~/logs/arthas-cache/result.log"),n(" when it's turned on")])],-1),V=e("tr",null,[e("td",null,"job-timeout"),e("td",null,"1d"),e("td",null,"default timeout for background jobs. Background job will be terminated once it's timed out (i.e. 1d, 2h, 3m, 25s)")],-1),I=e("tr",null,[e("td",null,"print-parent-fields"),e("td",null,"true"),e("td",null,"This option enables print files in parent class, default value true.")],-1),N=e("tr",null,[e("td",null,"verbose"),e("td",null,"false"),e("td",null,"This option enables print verbose information")],-1),S=e("tr",null,[e("td",null,"strict"),e("td",null,"true"),e("td",null,"whether to enable strict mode")],-1),M=i(`

    View all options

    $ options
    + LEVEL  TYPE    NAME          VALUE   SUMMARY               DESCRIPTION
    +-------------------------------------------------------------------------------------------------------
    + 0      boolea  unsafe        false   Option to support sy  This option enables to proxy functionality
    +        n                             stem-level class       of JVM classes. Due to serious security r
    +                                                            isk a JVM crash is possibly be introduced.
    +                                                             Do not activate it unless you are able to
    +                                                             manage.
    + 1      boolea  dump          false   Option to dump the e  This option enables the enhanced classes t
    +        n                             nhanced classes       o be dumped to external file for further d
    +                                                            e-compilation and analysis.
    + 1      boolea  batch-re-tra  true    Option to support ba  This options enables to reTransform classe
    +        n       nsform                tch reTransform Clas  s with batch mode.
    +                                      s
    + 2      boolea  json-format   false   Option to support JS  This option enables to format object outpu
    +        n                             ON format of object   t with JSON when -x option selected.
    +                                      output
    + 1      boolea  disable-sub-  false   Option to control in  This option disable to include sub class w
    +        n       class                 clude sub class when  hen matching class.
    +                                       class matching
    + 1      boolea  support-defa  true    Option to control in  This option disable to include default met
    +        n       ult-method            clude default method  hod in interface when matching class.
    +                                       in interface when c
    +                                      lass matching
    + 1      boolea  save-result   false   Option to print comm  This option enables to save each command's
    +        n                             and's result to log    result to log file, which path is \${user.
    +                                      file                  home}/logs/arthas-cache/result.log.
    + 2      String  job-timeout   1d      Option to job timeou  This option setting job timeout,The unit c
    +                                      t                     an be d, h, m, s for day, hour, minute, se
    +                                                            cond. 1d is one day in default
    + 1      boolea  print-parent  true    Option to print all   This option enables print files in parent
    +        n       -fields               fileds in parent cla  class, default value true.
    +                                      ss
    + 1      boolea  verbose       false   Option to print verb  This option enables print verbose informat
    +        n                             ose information       ion, default value false.
    + 1      boolea  strict        true    Option to strict mod  By default, strict mode is true, not allow
    +        n                             e                     ed to set object properties. Want to set o
    +                                                            bject properties, execute \`options strict
    +                                                            false\`
    +

    Get special option value

    $ options json-format
    + LEVEL  TYPE  NAME         VALUE  SUMMARY             DESCRIPTION
    +--------------------------------------------------------------------------------------------
    + 2      bool  json-format  false  Option to support   This option enables to format object
    +        ean                       JSON format of obj  output with JSON when -x option selec
    +                                  ect output          ted.
    +

    TIP

    By default, json-format is false. When set json-format to true, commands like wathc/tt will print result with json format.

    Set special option value

    For example, to enable saving command execution result, input the command below:

    $ options save-result true
    + NAME         BEFORE-VALUE  AFTER-VALUE
    +----------------------------------------
    + save-result  false         true
    +

    Set unsafe to true to enhance the classes under the java.* package

    By default, watch/trace/tt/trace/monitor command do not support classes under java.* package. You can set unsafe to true to enhance the classes under the java.* package.

    $ options unsafe true
    + NAME    BEFORE-VALUE  AFTER-VALUE
    +-----------------------------------
    + unsafe  false         true
    +
    $ watch java.lang.invoke.Invokers callSiteForm
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 61 ms, listenerId: 1
    +

    Turn off strict mode, allow setting object properties in ognl expressions

    TIP

    since 3.6.0

    For new users, there may be misuses when writing ognl expressions.

    For example, for Student, when judging the age is equal to 18, the conditional expression may be mistakenly written as target.age=18, which actually sets the age of the current object to 18. The correct spelling is target.age==18.

    In order to prevent misuse like the above, Arthas enables strict mode by default, in ognl expressions, it is forbidden to update the property of the object or call the setter method.

    Take MathGame as an example, the following error message will appear.

    $ watch demo.MathGame primeFactors 'target' 'target.illegalArgumentCount=1'
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 206 ms, listenerId: 1
    +watch failed, condition is: target.illegalArgumentCount=1, express is: target, By default, strict mode is true, not allowed to set object properties. Want to set object properties, execute \`options strict false\`, visit /Users/admin/logs/arthas/arthas.log for more details.
    +

    If the user want to change the object properties in the ognl expression, you can execute options strict false to turn off the strict mode.

    • For more information, please refer to: https://github.com/alibaba/arthas/issues/2128
    `,21);function L(B,C){const s=c("ExternalLinkIcon");return o(),l("div",null,[d,e("p",null,[e("a",u,[p,h,t(s)])]),m,e("table",null,[b,e("tbody",null,[v,f,g,k,_,e("tr",null,[w,x,e("td",null,[j,y,T,e("a",E,[O,t(s)])])]),A,V,I,N,S])]),M])}const U=a(r,[["render",L],["__file","options.html.vue"]]);export{U as default}; diff --git a/3.x/assets/options.html.76f0ad11.js b/3.x/assets/options.html.76f0ad11.js new file mode 100644 index 00000000000..4c27c593c9d --- /dev/null +++ b/3.x/assets/options.html.76f0ad11.js @@ -0,0 +1 @@ +const t=JSON.parse('{"key":"v-27b6152a","path":"/doc/options.html","title":"options","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u67E5\u770B\u6240\u6709\u7684 options","slug":"\u67E5\u770B\u6240\u6709\u7684-options","link":"#\u67E5\u770B\u6240\u6709\u7684-options","children":[]},{"level":2,"title":"\u83B7\u53D6 option \u7684\u503C","slug":"\u83B7\u53D6-option-\u7684\u503C","link":"#\u83B7\u53D6-option-\u7684\u503C","children":[]},{"level":2,"title":"\u8BBE\u7F6E\u6307\u5B9A\u7684 option","slug":"\u8BBE\u7F6E\u6307\u5B9A\u7684-option","link":"#\u8BBE\u7F6E\u6307\u5B9A\u7684-option","children":[]},{"level":2,"title":"\u6253\u5F00 unsafe \u5F00\u5173\uFF0C\u652F\u6301 jdk package \u4E0B\u7684\u7C7B","slug":"\u6253\u5F00-unsafe-\u5F00\u5173-\u652F\u6301-jdk-package-\u4E0B\u7684\u7C7B","link":"#\u6253\u5F00-unsafe-\u5F00\u5173-\u652F\u6301-jdk-package-\u4E0B\u7684\u7C7B","children":[]},{"level":2,"title":"\u5173\u95ED strict \u6A21\u5F0F\uFF0C\u5141\u8BB8\u5728 ognl \u8868\u8FBE\u5F0F\u91CC\u8BBE\u7F6E\u5BF9\u8C61\u5C5E\u6027","slug":"\u5173\u95ED-strict-\u6A21\u5F0F-\u5141\u8BB8\u5728-ognl-\u8868\u8FBE\u5F0F\u91CC\u8BBE\u7F6E\u5BF9\u8C61\u5C5E\u6027","link":"#\u5173\u95ED-strict-\u6A21\u5F0F-\u5141\u8BB8\u5728-ognl-\u8868\u8FBE\u5F0F\u91CC\u8BBE\u7F6E\u5BF9\u8C61\u5C5E\u6027","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/options.md","version":"3.7.3"}');export{t as data}; diff --git a/3.x/assets/options.html.b8b42168.js b/3.x/assets/options.html.b8b42168.js new file mode 100644 index 00000000000..27ed307e323 --- /dev/null +++ b/3.x/assets/options.html.b8b42168.js @@ -0,0 +1,61 @@ +import{_ as t,o as l,c as o,a as e,b as a,e as n,d as i,r as d}from"./app.4d248835.js";const c={},r=e("h1",{id:"options",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#options","aria-hidden":"true"},"#"),n(" options")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-options",target:"_blank",rel:"noopener noreferrer"},p=e("code",null,"options",-1),b=n("\u5728\u7EBF\u6559\u7A0B"),m=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"\u63D0\u793A"),e("p",null,"\u5168\u5C40\u5F00\u5173")],-1),v=e("thead",null,[e("tr",null,[e("th",null,"\u540D\u79F0"),e("th",null,"\u9ED8\u8BA4\u503C"),e("th",null,"\u63CF\u8FF0")])],-1),h=e("tr",null,[e("td",null,"unsafe"),e("td",null,"false"),e("td",null,"\u662F\u5426\u652F\u6301\u5BF9\u7CFB\u7EDF\u7EA7\u522B\u7684\u7C7B\u8FDB\u884C\u589E\u5F3A\uFF0C\u6253\u5F00\u8BE5\u5F00\u5173\u53EF\u80FD\u5BFC\u81F4\u628A JVM \u641E\u6302\uFF0C\u8BF7\u614E\u91CD\u9009\u62E9\uFF01")],-1),f=e("tr",null,[e("td",null,"dump"),e("td",null,"false"),e("td",null,[n("\u662F\u5426\u652F\u6301\u88AB\u589E\u5F3A\u4E86\u7684\u7C7B dump \u5230\u5916\u90E8\u6587\u4EF6\u4E2D\uFF0C\u5982\u679C\u6253\u5F00\u5F00\u5173\uFF0Cclass \u6587\u4EF6\u4F1A\u88AB dump \u5230"),e("code",null,"/${application working dir}/arthas-class-dump/"),n("\u76EE\u5F55\u4E0B\uFF0C\u5177\u4F53\u4F4D\u7F6E\u8BE6\u89C1\u63A7\u5236\u53F0\u8F93\u51FA")])],-1),k=e("tr",null,[e("td",null,"batch-re-transform"),e("td",null,"true"),e("td",null,"\u662F\u5426\u652F\u6301\u6279\u91CF\u5BF9\u5339\u914D\u5230\u7684\u7C7B\u6267\u884C retransform \u64CD\u4F5C")],-1),g=e("tr",null,[e("td",null,"json-format"),e("td",null,"false"),e("td",null,"\u662F\u5426\u652F\u6301 json \u5316\u7684\u8F93\u51FA")],-1),_=e("tr",null,[e("td",null,"disable-sub-class"),e("td",null,"false"),e("td",null,"\u662F\u5426\u7981\u7528\u5B50\u7C7B\u5339\u914D\uFF0C\u9ED8\u8BA4\u5728\u5339\u914D\u76EE\u6807\u7C7B\u7684\u65F6\u5019\u4F1A\u9ED8\u8BA4\u5339\u914D\u5230\u5176\u5B50\u7C7B\uFF0C\u5982\u679C\u60F3\u7CBE\u786E\u5339\u914D\uFF0C\u53EF\u4EE5\u5173\u95ED\u6B64\u5F00\u5173")],-1),x=e("td",null,"support-default-method",-1),w=e("td",null,"true",-1),E=n("\u662F\u5426\u652F\u6301\u5339\u914D\u5230 default method\uFF0C \u9ED8\u8BA4\u4F1A\u67E5\u627E interface\uFF0C\u5339\u914D\u91CC\u9762\u7684 default method\u3002\u53C2\u8003 "),j={href:"https://github.com/alibaba/arthas/issues/1105",target:"_blank",rel:"noopener noreferrer"},y=n("#1105"),T=e("tr",null,[e("td",null,"save-result"),e("td",null,"false"),e("td",null,[n("\u662F\u5426\u6253\u5F00\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7\u529F\u80FD\uFF0C\u6253\u5F00\u4E4B\u540E\u6240\u6709\u547D\u4EE4\u7684\u8FD0\u884C\u7ED3\u679C\u90FD\u5C06\u4FDD\u5B58\u5230"),e("code",null,"~/logs/arthas-cache/result.log"),n("\u4E2D")])],-1),O=e("tr",null,[e("td",null,"job-timeout"),e("td",null,"1d"),e("td",null,"\u5F02\u6B65\u540E\u53F0\u4EFB\u52A1\u7684\u9ED8\u8BA4\u8D85\u65F6\u65F6\u95F4\uFF0C\u8D85\u8FC7\u8FD9\u4E2A\u65F6\u95F4\uFF0C\u4EFB\u52A1\u81EA\u52A8\u505C\u6B62\uFF1B\u6BD4\u5982\u8BBE\u7F6E 1d, 2h, 3m, 25s\uFF0C\u5206\u522B\u4EE3\u8868\u5929\u3001\u5C0F\u65F6\u3001\u5206\u3001\u79D2")],-1),A=e("tr",null,[e("td",null,"print-parent-fields"),e("td",null,"true"),e("td",null,"\u662F\u5426\u6253\u5370\u5728 parent class \u91CC\u7684 filed")],-1),V=e("tr",null,[e("td",null,"verbose"),e("td",null,"false"),e("td",null,"\u662F\u5426\u6253\u5370\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F")],-1),N=e("tr",null,[e("td",null,"strict"),e("td",null,"true"),e("td",null,"\u662F\u5426\u542F\u7528 strict \u6A21\u5F0F")],-1),M=i(`

    \u67E5\u770B\u6240\u6709\u7684 options

    $ options
    + LEVEL  TYPE    NAME          VALUE   SUMMARY               DESCRIPTION
    +-------------------------------------------------------------------------------------------------------
    + 0      boolea  unsafe        false   Option to support sy  This option enables to proxy functionality
    +        n                             stem-level class       of JVM classes. Due to serious security r
    +                                                            isk a JVM crash is possibly be introduced.
    +                                                             Do not activate it unless you are able to
    +                                                             manage.
    + 1      boolea  dump          false   Option to dump the e  This option enables the enhanced classes t
    +        n                             nhanced classes       o be dumped to external file for further d
    +                                                            e-compilation and analysis.
    + 1      boolea  batch-re-tra  true    Option to support ba  This options enables to reTransform classe
    +        n       nsform                tch reTransform Clas  s with batch mode.
    +                                      s
    + 2      boolea  json-format   false   Option to support JS  This option enables to format object outpu
    +        n                             ON format of object   t with JSON when -x option selected.
    +                                      output
    + 1      boolea  disable-sub-  false   Option to control in  This option disable to include sub class w
    +        n       class                 clude sub class when  hen matching class.
    +                                       class matching
    + 1      boolea  support-defa  true    Option to control in  This option disable to include default met
    +        n       ult-method            clude default method  hod in interface when matching class.
    +                                       in interface when c
    +                                      lass matching
    + 1      boolea  save-result   false   Option to print comm  This option enables to save each command's
    +        n                             and's result to log    result to log file, which path is \${user.
    +                                      file                  home}/logs/arthas-cache/result.log.
    + 2      String  job-timeout   1d      Option to job timeou  This option setting job timeout,The unit c
    +                                      t                     an be d, h, m, s for day, hour, minute, se
    +                                                            cond. 1d is one day in default
    + 1      boolea  print-parent  true    Option to print all   This option enables print files in parent
    +        n       -fields               fileds in parent cla  class, default value true.
    +                                      ss
    + 1      boolea  verbose       false   Option to print verb  This option enables print verbose informat
    +        n                             ose information       ion, default value false.
    + 1      boolea  strict        true    Option to strict mod  By default, strict mode is true, not allow
    +        n                             e                     ed to set object properties. Want to set o
    +                                                            bject properties, execute \`options strict
    +                                                            false\`
    +

    \u83B7\u53D6 option \u7684\u503C

    $ options json-format
    + LEVEL  TYPE  NAME         VALUE  SUMMARY             DESCRIPTION
    +--------------------------------------------------------------------------------------------
    + 2      bool  json-format  false  Option to support   This option enables to format object
    +        ean                       JSON format of obj  output with JSON when -x option selec
    +                                  ect output          ted.
    +

    \u63D0\u793A

    \u9ED8\u8BA4\u60C5\u51B5\u4E0Bjson-format\u4E3A false\uFF0C\u5982\u679C\u5E0C\u671Bwatch/tt\u7B49\u547D\u4EE4\u7ED3\u679C\u4EE5 json \u683C\u5F0F\u8F93\u51FA\uFF0C\u5219\u53EF\u4EE5\u8BBE\u7F6Ejson-format\u4E3A true\u3002

    \u8BBE\u7F6E\u6307\u5B9A\u7684 option

    \u4F8B\u5982\uFF0C\u60F3\u6253\u5F00\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7\u529F\u80FD\uFF0C\u8F93\u5165\u5982\u4E0B\u547D\u4EE4\u5373\u53EF\uFF1A

    $ options save-result true
    + NAME         BEFORE-VALUE  AFTER-VALUE
    +----------------------------------------
    + save-result  false         true
    +

    \u6253\u5F00 unsafe \u5F00\u5173\uFF0C\u652F\u6301 jdk package \u4E0B\u7684\u7C7B

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0Cwatch/trace/tt/trace/monitor\u7B49\u547D\u4EE4\u4E0D\u652F\u6301java.* package \u4E0B\u7684\u7C7B\u3002\u53EF\u4EE5\u8BBE\u7F6Eunsafe\u4E3A true\uFF0C\u5219\u53EF\u4EE5\u589E\u5F3A\u3002

    $ options unsafe true
    + NAME    BEFORE-VALUE  AFTER-VALUE
    +-----------------------------------
    + unsafe  false         true
    +
    $ watch java.lang.invoke.Invokers callSiteForm
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 61 ms, listenerId: 1
    +

    \u5173\u95ED strict \u6A21\u5F0F\uFF0C\u5141\u8BB8\u5728 ognl \u8868\u8FBE\u5F0F\u91CC\u8BBE\u7F6E\u5BF9\u8C61\u5C5E\u6027

    \u63D0\u793A

    since 3.6.0

    \u5BF9\u4E8E\u65B0\u7528\u6237\uFF0C\u5728\u7F16\u5199 ognl \u8868\u8FBE\u5F0F\u65F6\uFF0C\u53EF\u80FD\u4F1A\u51FA\u73B0\u8BEF\u7528\u3002

    \u6BD4\u5982\u5BF9\u4E8EStudent\uFF0C\u5224\u65AD\u5E74\u9F84\u7B49\u4E8E 18 \u65F6\uFF0C\u53EF\u80FD\u6761\u4EF6\u8868\u8FBE\u5F0F\u4F1A\u8BEF\u5199\u4E3Atarget.age=18\uFF0C\u8FD9\u4E2A\u8868\u8FBE\u5F0F\u5B9E\u9645\u4E0A\u662F\u628A\u5F53\u524D\u5BF9\u8C61\u7684age\u8BBE\u7F6E\u4E3A 18 \u4E86\u3002\u6B63\u786E\u7684\u5199\u6CD5\u662Ftarget.age==18\u3002

    \u4E3A\u4E86\u9632\u6B62\u51FA\u73B0\u7C7B\u4F3C\u4E0A\u9762\u7684\u8BEF\u7528\uFF0CArthas \u9ED8\u8BA4\u542F\u7528strict\u6A21\u5F0F\uFF0C\u5728ognl\u8868\u8FBE\u5F0F\u91CC\uFF0C\u7981\u6B62\u66F4\u65B0\u5BF9\u8C61\u7684 Property \u6216\u8005\u8C03\u7528setter\u51FD\u6570\u3002

    \u4EE5MathGame\u4E3A\u4F8B\uFF0C\u4F1A\u51FA\u73B0\u4EE5\u4E0B\u7684\u9519\u8BEF\u63D0\u793A\u3002

    $ watch demo.MathGame primeFactors 'target' 'target.illegalArgumentCount=1'
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 206 ms, listenerId: 1
    +watch failed, condition is: target.illegalArgumentCount=1, express is: target, By default, strict mode is true, not allowed to set object properties. Want to set object properties, execute \`options strict false\`, visit /Users/admin/logs/arthas/arthas.log for more details.
    +

    \u7528\u6237\u5982\u679C\u786E\u5B9A\u8981\u5728ognl\u8868\u8FBE\u5F0F\u91CC\u66F4\u65B0\u5BF9\u8C61\uFF0C\u53EF\u4EE5\u6267\u884Coptions strict false\uFF0C\u5173\u95EDstrict\u6A21\u5F0F\u3002

    • \u66F4\u591A\u4FE1\u606F\u53C2\u8003\uFF1A https://github.com/alibaba/arthas/issues/2128
    `,21);function L(S,C){const s=d("ExternalLinkIcon");return l(),o("div",null,[r,e("p",null,[e("a",u,[p,b,a(s)])]),m,e("table",null,[v,e("tbody",null,[h,f,k,g,_,e("tr",null,[x,w,e("td",null,[E,e("a",j,[y,a(s)])])]),T,O,A,V,N])]),M])}const U=t(c,[["render",L],["__file","options.html.vue"]]);export{U as default}; diff --git a/3.x/assets/perfcounter.html.04486209.js b/3.x/assets/perfcounter.html.04486209.js new file mode 100644 index 00000000000..6698f23ae42 --- /dev/null +++ b/3.x/assets/perfcounter.html.04486209.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-6746784a","path":"/en/doc/perfcounter.html","title":"perfcounter","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]},{"level":2,"title":"JVM above JDK9","slug":"jvm-above-jdk9","link":"#jvm-above-jdk9","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"GGGGGHT","email":"wz9712203617@gmail.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/perfcounter.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/perfcounter.html.3794d77f.js b/3.x/assets/perfcounter.html.3794d77f.js new file mode 100644 index 00000000000..bcc31922fcc --- /dev/null +++ b/3.x/assets/perfcounter.html.3794d77f.js @@ -0,0 +1,20 @@ +import{_ as s,o as d,c as i,a as e,b as r,e as a,d as t,r as l}from"./app.4d248835.js";const c={},o=e("h1",{id:"perfcounter",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#perfcounter","aria-hidden":"true"},"#"),a(" perfcounter")],-1),v={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-perfcounter",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"perfcounter",-1),m=a("\u5728\u7EBF\u6559\u7A0B"),p=t(`

    \u63D0\u793A

    \u67E5\u770B\u5F53\u524D JVM \u7684 Perf Counter \u4FE1\u606F

    \u4F7F\u7528\u53C2\u8003

    $ perfcounter
    + java.ci.totalTime                            2325637411
    + java.cls.loadedClasses                       3403
    + java.cls.sharedLoadedClasses                 0
    + java.cls.sharedUnloadedClasses               0
    + java.cls.unloadedClasses                     0
    + java.property.java.version                   11.0.4
    + java.property.java.vm.info                   mixed mode
    + java.property.java.vm.name                   OpenJDK 64-Bit Server VM
    +...
    +

    \u53EF\u4EE5\u7528-d\u53C2\u6570\u6253\u5370\u66F4\u591A\u4FE1\u606F\uFF1A

    $ perfcounter -d
    + Name                                   Variability   Units        Value
    +---------------------------------------------------------------------------------
    + java.ci.totalTime                      Monotonic     Ticks        3242526906
    + java.cls.loadedClasses                 Monotonic     Events       3404
    + java.cls.sharedLoadedClasses           Monotonic     Events       0
    + java.cls.sharedUnloadedClasses         Monotonic     Events       0
    + java.cls.unloadedClasses               Monotonic     Events       0
    +

    jdk9 \u4EE5\u4E0A\u7684\u5E94\u7528

    \u5982\u679C\u6CA1\u6709\u6253\u5370\u51FA\u4FE1\u606F\uFF0C\u5E94\u7528\u5728\u542F\u52A8\u65F6\uFF0C\u52A0\u4E0B\u9762\u7684\u53C2\u6570\uFF1A

    --add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter=ALL-UNNAMED
    +
    `,8);function h(b,f){const n=l("ExternalLinkIcon");return d(),i("div",null,[o,e("p",null,[e("a",v,[u,m,r(n)])]),p])}const _=s(c,[["render",h],["__file","perfcounter.html.vue"]]);export{_ as default}; diff --git a/3.x/assets/perfcounter.html.a2008d46.js b/3.x/assets/perfcounter.html.a2008d46.js new file mode 100644 index 00000000000..1ee4613112f --- /dev/null +++ b/3.x/assets/perfcounter.html.a2008d46.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-2f05b636","path":"/doc/perfcounter.html","title":"perfcounter","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[]},{"level":2,"title":"jdk9 \u4EE5\u4E0A\u7684\u5E94\u7528","slug":"jdk9-\u4EE5\u4E0A\u7684\u5E94\u7528","link":"#jdk9-\u4EE5\u4E0A\u7684\u5E94\u7528","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"GGGGGHT","email":"wz9712203617@gmail.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/perfcounter.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/perfcounter.html.c8d6f07e.js b/3.x/assets/perfcounter.html.c8d6f07e.js new file mode 100644 index 00000000000..2e5b1d78ce7 --- /dev/null +++ b/3.x/assets/perfcounter.html.c8d6f07e.js @@ -0,0 +1,20 @@ +import{_ as s,o as i,c as d,a as e,b as t,e as a,d as r,r as o}from"./app.4d248835.js";const l={},c=e("h1",{id:"perfcounter",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#perfcounter","aria-hidden":"true"},"#"),a(" perfcounter")],-1),v={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-perfcounter",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"perfcounter",-1),m=a(" online tutorial"),p=r(`

    TIP

    Check the current JVM Perf Counter information.

    Usage

    $ perfcounter
    + java.ci.totalTime                            2325637411
    + java.cls.loadedClasses                       3403
    + java.cls.sharedLoadedClasses                 0
    + java.cls.sharedUnloadedClasses               0
    + java.cls.unloadedClasses                     0
    + java.property.java.version                   11.0.4
    + java.property.java.vm.info                   mixed mode
    + java.property.java.vm.name                   OpenJDK 64-Bit Server VM
    +...
    +

    Print more information with the -d option:

    $ perfcounter -d
    + Name                                   Variability   Units        Value
    +---------------------------------------------------------------------------------
    + java.ci.totalTime                      Monotonic     Ticks        3242526906
    + java.cls.loadedClasses                 Monotonic     Events       3404
    + java.cls.sharedLoadedClasses           Monotonic     Events       0
    + java.cls.sharedUnloadedClasses         Monotonic     Events       0
    + java.cls.unloadedClasses               Monotonic     Events       0
    +

    JVM above JDK9

    If the information is not printed, when the application starts, add the following parameters:

    --add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter=ALL-UNNAMED
    +
    `,8);function h(b,f){const n=o("ExternalLinkIcon");return i(),d("div",null,[c,e("p",null,[e("a",v,[u,m,t(n)])]),p])}const _=s(l,[["render",h],["__file","perfcounter.html.vue"]]);export{_ as default}; diff --git a/3.x/assets/profiler.html.2fe5463f.js b/3.x/assets/profiler.html.2fe5463f.js new file mode 100644 index 00000000000..4ed7b140777 --- /dev/null +++ b/3.x/assets/profiler.html.2fe5463f.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-13eae420","path":"/doc/profiler.html","title":"profiler","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":"\u542F\u52A8 profiler","slug":"\u542F\u52A8-profiler","link":"#\u542F\u52A8-profiler","children":[]},{"level":2,"title":"\u83B7\u53D6\u5DF2\u91C7\u96C6\u7684 sample \u7684\u6570\u91CF","slug":"\u83B7\u53D6\u5DF2\u91C7\u96C6\u7684-sample-\u7684\u6570\u91CF","link":"#\u83B7\u53D6\u5DF2\u91C7\u96C6\u7684-sample-\u7684\u6570\u91CF","children":[]},{"level":2,"title":"\u67E5\u770B profiler \u72B6\u6001","slug":"\u67E5\u770B-profiler-\u72B6\u6001","link":"#\u67E5\u770B-profiler-\u72B6\u6001","children":[]},{"level":2,"title":"\u505C\u6B62 profiler","slug":"\u505C\u6B62-profiler","link":"#\u505C\u6B62-profiler","children":[{"level":3,"title":"\u751F\u6210 html \u683C\u5F0F\u7ED3\u679C","slug":"\u751F\u6210-html-\u683C\u5F0F\u7ED3\u679C","link":"#\u751F\u6210-html-\u683C\u5F0F\u7ED3\u679C","children":[]}]},{"level":2,"title":"\u901A\u8FC7\u6D4F\u89C8\u5668\u67E5\u770B arthas-output \u4E0B\u9762\u7684 profiler \u7ED3\u679C","slug":"\u901A\u8FC7\u6D4F\u89C8\u5668\u67E5\u770B-arthas-output-\u4E0B\u9762\u7684-profiler-\u7ED3\u679C","link":"#\u901A\u8FC7\u6D4F\u89C8\u5668\u67E5\u770B-arthas-output-\u4E0B\u9762\u7684-profiler-\u7ED3\u679C","children":[]},{"level":2,"title":"profiler \u652F\u6301\u7684 events","slug":"profiler-\u652F\u6301\u7684-events","link":"#profiler-\u652F\u6301\u7684-events","children":[]},{"level":2,"title":"\u6062\u590D\u91C7\u6837","slug":"\u6062\u590D\u91C7\u6837","link":"#\u6062\u590D\u91C7\u6837","children":[]},{"level":2,"title":"\u4F7F\u7528execute\u6765\u6267\u884C\u590D\u6742\u7684\u547D\u4EE4","slug":"\u4F7F\u7528execute\u6765\u6267\u884C\u590D\u6742\u7684\u547D\u4EE4","link":"#\u4F7F\u7528execute\u6765\u6267\u884C\u590D\u6742\u7684\u547D\u4EE4","children":[]},{"level":2,"title":"\u67E5\u770B\u6240\u6709\u652F\u6301\u7684 action","slug":"\u67E5\u770B\u6240\u6709\u652F\u6301\u7684-action","link":"#\u67E5\u770B\u6240\u6709\u652F\u6301\u7684-action","children":[]},{"level":2,"title":"\u67E5\u770B\u7248\u672C","slug":"\u67E5\u770B\u7248\u672C","link":"#\u67E5\u770B\u7248\u672C","children":[]},{"level":2,"title":"\u914D\u7F6E framebuf \u53C2\u6570","slug":"\u914D\u7F6E-framebuf-\u53C2\u6570","link":"#\u914D\u7F6E-framebuf-\u53C2\u6570","children":[]},{"level":2,"title":"\u914D\u7F6E include/exclude \u6765\u8FC7\u6EE4\u6570\u636E","slug":"\u914D\u7F6E-include-exclude-\u6765\u8FC7\u6EE4\u6570\u636E","link":"#\u914D\u7F6E-include-exclude-\u6765\u8FC7\u6EE4\u6570\u636E","children":[]},{"level":2,"title":"\u6307\u5B9A\u6267\u884C\u65F6\u95F4","slug":"\u6307\u5B9A\u6267\u884C\u65F6\u95F4","link":"#\u6307\u5B9A\u6267\u884C\u65F6\u95F4","children":[]},{"level":2,"title":"\u751F\u6210 jfr \u683C\u5F0F\u7ED3\u679C","slug":"\u751F\u6210-jfr-\u683C\u5F0F\u7ED3\u679C","link":"#\u751F\u6210-jfr-\u683C\u5F0F\u7ED3\u679C","children":[]},{"level":2,"title":"\u751F\u6210\u7684\u706B\u7130\u56FE\u91CC\u7684 unknown","slug":"\u751F\u6210\u7684\u706B\u7130\u56FE\u91CC\u7684-unknown","link":"#\u751F\u6210\u7684\u706B\u7130\u56FE\u91CC\u7684-unknown","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/profiler.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/profiler.html.95a82517.js b/3.x/assets/profiler.html.95a82517.js new file mode 100644 index 00000000000..aece792378b --- /dev/null +++ b/3.x/assets/profiler.html.95a82517.js @@ -0,0 +1,53 @@ +import{_ as n,a as r}from"./arthas-output-svg.30f64f53.js";import{_ as l,o,c as d,a as e,b as t,e as s,d as i,r as c}from"./app.4d248835.js";const u={},p=e("h1",{id:"profiler",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#profiler","aria-hidden":"true"},"#"),s(" profiler")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-profiler",target:"_blank",rel:"noopener noreferrer"},m=e("code",null,"profiler",-1),f=s(" online tutorial"),v={class:"custom-container tip"},b=e("p",{class:"custom-container-title"},"TIP",-1),g=s("Generate a flame graph using "),x={href:"https://github.com/jvm-profiling-tools/async-profiler",target:"_blank",rel:"noopener noreferrer"},_=s("async-profiler"),y=i(`

    The profiler command supports generate flame graph for application hotspots.

    The basic usage of the profiler command is profiler action [actionArg]

    Supported Options

    NameSpecification
    actionAction to execute
    actionArgAttribute name pattern
    [i:]sampling interval in ns (default: 10'000'000, i.e. 10 ms)
    [f:]dump output to specified directory
    [d:]run profiling for specified seconds
    [e:]which event to trace (cpu, alloc, lock, cache-misses etc.), default value is cpu

    Start profiler

    $ profiler start
    +Started [cpu] profiling
    +

    TIP

    By default, the sample event is cpu. Can be specified with the --event parameter.

    Get the number of samples collected

    $ profiler getSamples
    +23
    +

    View profiler status

    $ profiler status
    +[cpu] profiling is running for 4 seconds
    +

    Can view which event and sampling time.

    Stop profiler

    Generating html format results

    By default, the result file is html format. You can also specify it with the --format parameter:

    $ profiler stop --format html
    +profiler output file: /tmp/test/arthas-output/20211207-111550.html
    +OK
    +

    Or use the file name name format in the --file parameter. For example, --file /tmp/result.html.

    View profiler results under arthas-output via browser

    `,18),k=s("By default, arthas uses port 3658, which can be opened: "),w={href:"http://localhost:3658/arthas-output/",target:"_blank",rel:"noopener noreferrer"},S=s("http://localhost:3658/arthas-output/"),j=s(" View the "),T=e("code",null,"arthas-output",-1),I=s(" directory below Profiler results:"),B=i('

    Click to view specific results:

    TIP

    If using the chrome browser, may need to be refreshed multiple times.

    Profiler supported events

    Under different platforms and different OSs, the supported events are different. For example, under macos:

    $ profiler list
    +Basic events:
    +  cpu
    +  alloc
    +  lock
    +  wall
    +  itimer
    +

    Under linux

    $ profiler list
    +Basic events:
    +  cpu
    +  alloc
    +  lock
    +  wall
    +  itimer
    +Perf events:
    +  page-faults
    +  context-switches
    +  cycles
    +  instructions
    +  cache-references
    +  cache-misses
    +  branches
    +  branch-misses
    +  bus-cycles
    +  L1-dcache-load-misses
    +  LLC-load-misses
    +  dTLB-load-misses
    +  mem:breakpoint
    +  trace:tracepoint
    +
    `,9),C=s("If you encounter the permissions/configuration issues of the OS itself and then missing some events, you can refer to the "),P={href:"https://github.com/jvm-profiling-tools/async-profiler",target:"_blank",rel:"noopener noreferrer"},$=s("async-profiler"),V=s(" documentation."),A=i(`

    You can use the --event parameter to specify the event to sample, such as sampling the alloc event:

    $ profiler start --event alloc
    +

    Resume sampling

    $ profiler resume
    +Started [cpu] profiling
    +

    The difference between start and resume is: start is the new start sampling, resume will retain the data of the last stop.

    You can verify the number of samples by executing profiler getSamples.

    Use execute action to execute complex commands

    For example, start sampling:

    profiler execute 'start,framebuf=5000000'
    +

    Stop sampling and save to the specified file:

    profiler execute 'stop,file=/tmp/result.html'
    +
    `,11),L=s("Specific format reference: "),N={href:"https://github.com/jvm-profiling-tools/async-profiler/blob/v2.5/src/arguments.cpp#L50",target:"_blank",rel:"noopener noreferrer"},F=s("arguments.cpp"),O=i(`

    View all supported actions

    $ profiler actions
    +Supported Actions: [resume, dumpCollapsed, getSamples, start, list, execute, version, stop, load, dumpFlat, actions, dumpTraces, status]
    +

    View version

    $ profiler version
    +Async-profiler 1.6 built on Sep  9 2019
    +Copyright 2019 Andrei Pangin
    +

    Configure framebuf option

    TIP

    you encounter [frame_buffer_overflow] in the generated result, you need to increase the framebuf (the default value is 1'000'000), which can be configured explicitly, such as:

    profiler start --framebuf 5000000
    +

    Configure include/exclude to filter data

    If the application is complex and generates a lot of content, and you want to focus on only part of the data, you can filter by include/exclude. such as

    profiler start --include'java/*' --include'demo/*' --exclude'*Unsafe.park*'
    +

    Both include/exclude support setting multiple values, but need to be configured at the end of the command line.

    Specify execution time

    For example, if you want the profiler to automatically end after 300 seconds, you can specify it with the -d/--duration parameter:

    profiler start --duration 300
    +

    Generate jfr format result

    Note that jfr only supports configuration at start. If it is specified at stop, it will not take effect.

    profiler start --file /tmp/test.jfr
    +

    The file parameter supports some variables:

    • Timestamp: --file /tmp/test-%t.jfr
    • Process ID: --file /tmp/test-%p.jfr

    The generated results can be viewed with tools that support the jfr format. such as:

    • JDK Mission Control: https://github.com/openjdk/jmc
    • JProfiler: https://github.com/alibaba/arthas/issues/1416

    The 'unknown' in profiler result

    • https://github.com/jvm-profiling-tools/async-profiler/discussions/409
    `,23);function q(G,U){const a=c("ExternalLinkIcon");return o(),d("div",null,[p,e("p",null,[e("a",h,[m,f,t(a)])]),e("div",v,[b,e("p",null,[g,e("a",x,[_,t(a)])])]),y,e("p",null,[k,e("a",w,[S,t(a)]),j,T,I]),B,e("p",null,[C,e("a",P,[$,t(a)]),V]),A,e("p",null,[L,e("a",N,[F,t(a)])]),O])}const D=l(u,[["render",q],["__file","profiler.html.vue"]]);export{D as default}; diff --git a/3.x/assets/profiler.html.e7f88019.js b/3.x/assets/profiler.html.e7f88019.js new file mode 100644 index 00000000000..305024c3050 --- /dev/null +++ b/3.x/assets/profiler.html.e7f88019.js @@ -0,0 +1,53 @@ +import{_ as r,a as t}from"./arthas-output-svg.30f64f53.js";import{_ as l,o as d,c,a as e,b as n,e as a,d as i,r as o}from"./app.4d248835.js";const p={},u=e("h1",{id:"profiler",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#profiler","aria-hidden":"true"},"#"),a(" profiler")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-profiler",target:"_blank",rel:"noopener noreferrer"},m=e("code",null,"profiler",-1),v=a("\u5728\u7EBF\u6559\u7A0B"),b={class:"custom-container tip"},f=e("p",{class:"custom-container-title"},"\u63D0\u793A",-1),g=a("\u4F7F\u7528"),_={href:"https://github.com/jvm-profiling-tools/async-profiler",target:"_blank",rel:"noopener noreferrer"},x=a("async-profiler"),k=a("\u751F\u6210\u706B\u7130\u56FE"),y=i(`

    profiler \u547D\u4EE4\u652F\u6301\u751F\u6210\u5E94\u7528\u70ED\u70B9\u7684\u706B\u7130\u56FE\u3002\u672C\u8D28\u4E0A\u662F\u901A\u8FC7\u4E0D\u65AD\u7684\u91C7\u6837\uFF0C\u7136\u540E\u628A\u6536\u96C6\u5230\u7684\u91C7\u6837\u7ED3\u679C\u751F\u6210\u706B\u7130\u56FE\u3002

    profiler \u547D\u4EE4\u57FA\u672C\u8FD0\u884C\u7ED3\u6784\u662F profiler action [actionArg]

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    action\u8981\u6267\u884C\u7684\u64CD\u4F5C
    actionArg\u5C5E\u6027\u540D\u6A21\u5F0F
    [i:]\u91C7\u6837\u95F4\u9694\uFF08\u5355\u4F4D\uFF1Ans\uFF09\uFF08\u9ED8\u8BA4\u503C\uFF1A10'000'000\uFF0C\u5373 10 ms\uFF09
    [f:]\u5C06\u8F93\u51FA\u8F6C\u50A8\u5230\u6307\u5B9A\u8DEF\u5F84
    [d:]\u8FD0\u884C\u8BC4\u6D4B\u6307\u5B9A\u79D2
    [e:]\u8981\u8DDF\u8E2A\u54EA\u4E2A\u4E8B\u4EF6\uFF08cpu, alloc, lock, cache-misses \u7B49\uFF09\uFF0C\u9ED8\u8BA4\u662F cpu

    \u542F\u52A8 profiler

    $ profiler start
    +Started [cpu] profiling
    +

    \u63D0\u793A

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u751F\u6210\u7684\u662F cpu \u7684\u706B\u7130\u56FE\uFF0C\u5373 event \u4E3Acpu\u3002\u53EF\u4EE5\u7528--event\u53C2\u6570\u6765\u6307\u5B9A\u3002

    \u83B7\u53D6\u5DF2\u91C7\u96C6\u7684 sample \u7684\u6570\u91CF

    $ profiler getSamples
    +23
    +

    \u67E5\u770B profiler \u72B6\u6001

    $ profiler status
    +[cpu] profiling is running for 4 seconds
    +

    \u53EF\u4EE5\u67E5\u770B\u5F53\u524D profiler \u5728\u91C7\u6837\u54EA\u79CDevent\u548C\u91C7\u6837\u65F6\u95F4\u3002

    \u505C\u6B62 profiler

    \u751F\u6210 html \u683C\u5F0F\u7ED3\u679C

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u7ED3\u679C\u6587\u4EF6\u662Fhtml\u683C\u5F0F\uFF0C\u4E5F\u53EF\u4EE5\u7528--format\u53C2\u6570\u6307\u5B9A\uFF1A

    $ profiler stop --format html
    +profiler output file: /tmp/test/arthas-output/20211207-111550.html
    +OK
    +

    \u6216\u8005\u5728--file\u53C2\u6570\u91CC\u7528\u6587\u4EF6\u540D\u6307\u540D\u683C\u5F0F\u3002\u6BD4\u5982--file /tmp/result.html \u3002

    \u901A\u8FC7\u6D4F\u89C8\u5668\u67E5\u770B arthas-output \u4E0B\u9762\u7684 profiler \u7ED3\u679C

    `,18),j=a("\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0Carthas \u4F7F\u7528 3658 \u7AEF\u53E3\uFF0C\u5219\u53EF\u4EE5\u6253\u5F00\uFF1A "),S={href:"http://localhost:3658/arthas-output/",target:"_blank",rel:"noopener noreferrer"},$=a("http://localhost:3658/arthas-output/"),w=a(" \u67E5\u770B\u5230"),L=e("code",null,"arthas-output",-1),q=a("\u76EE\u5F55\u4E0B\u9762\u7684 profiler \u7ED3\u679C\uFF1A"),B=i('

    \u70B9\u51FB\u53EF\u4EE5\u67E5\u770B\u5177\u4F53\u7684\u7ED3\u679C\uFF1A

    \u63D0\u793A

    \u5982\u679C\u662F chrome \u6D4F\u89C8\u5668\uFF0C\u53EF\u80FD\u9700\u8981\u591A\u6B21\u5237\u65B0\u3002

    profiler \u652F\u6301\u7684 events

    \u5728\u4E0D\u540C\u7684\u5E73\u53F0\uFF0C\u4E0D\u540C\u7684 OS \u4E0B\u9762\uFF0C\u652F\u6301\u7684 events \u5404\u6709\u4E0D\u540C\u3002\u6BD4\u5982\u5728 macos \u4E0B\u9762\uFF1A

    $ profiler list
    +Basic events:
    +  cpu
    +  alloc
    +  lock
    +  wall
    +  itimer
    +

    \u5728 linux \u4E0B\u9762

    $ profiler list
    +Basic events:
    +  cpu
    +  alloc
    +  lock
    +  wall
    +  itimer
    +Perf events:
    +  page-faults
    +  context-switches
    +  cycles
    +  instructions
    +  cache-references
    +  cache-misses
    +  branches
    +  branch-misses
    +  bus-cycles
    +  L1-dcache-load-misses
    +  LLC-load-misses
    +  dTLB-load-misses
    +  mem:breakpoint
    +  trace:tracepoint
    +
    `,9),A=a("\u5982\u679C\u9047\u5230 OS \u672C\u8EAB\u7684\u6743\u9650/\u914D\u7F6E\u95EE\u9898\uFF0C\u7136\u540E \b \u7F3A\u5C11\u90E8\u5206 event\uFF0C\u53EF\u4EE5\u53C2\u8003"),C=e("code",null,"async-profiler",-1),N=a("\u672C\u8EAB\u6587\u6863\uFF1A"),V={href:"https://github.com/jvm-profiling-tools/async-profiler",target:"_blank",rel:"noopener noreferrer"},E=a("async-profiler"),I=i(`

    \u53EF\u4EE5\u7528--event\u53C2\u6570\u6307\u5B9A\u8981\u91C7\u6837\u7684\u4E8B\u4EF6\uFF0C\u6BD4\u5982\u5BF9alloc\u4E8B\u4EF6\u8FDB\u5165\u91C7\u6837\uFF1A

    $ profiler start --event alloc
    +

    \u6062\u590D\u91C7\u6837

    $ profiler resume
    +Started [cpu] profiling
    +

    start\u548Cresume\u7684\u533A\u522B\u662F\uFF1Astart\u662F\u65B0\u5F00\u59CB\u91C7\u6837\uFF0Cresume\u4F1A\u4FDD\u7559\u4E0A\u6B21stop\u65F6\u7684\u6570\u636E\u3002

    \u901A\u8FC7\u6267\u884Cprofiler getSamples\u53EF\u4EE5\u67E5\u770B samples \u7684\u6570\u91CF\u6765\u9A8C\u8BC1\u3002

    \u4F7F\u7528execute\u6765\u6267\u884C\u590D\u6742\u7684\u547D\u4EE4

    \u6BD4\u5982\u5F00\u59CB\u91C7\u6837\uFF1A

    profiler execute 'start,framebuf=5000000'
    +

    \u505C\u6B62\u91C7\u6837\uFF0C\u5E76\u4FDD\u5B58\u5230\u6307\u5B9A\u6587\u4EF6\u91CC\uFF1A

    profiler execute 'stop,file=/tmp/result.html'
    +
    `,11),O=a("\u5177\u4F53\u7684\u683C\u5F0F\u53C2\u8003\uFF1A "),P={href:"https://github.com/jvm-profiling-tools/async-profiler/blob/v2.5/src/arguments.cpp#L50",target:"_blank",rel:"noopener noreferrer"},T=a("arguments.cpp"),D=i(`

    \u67E5\u770B\u6240\u6709\u652F\u6301\u7684 action

    $ profiler actions
    +Supported Actions: [resume, dumpCollapsed, getSamples, start, list, execute, version, stop, load, dumpFlat, actions, dumpTraces, status]
    +

    \u67E5\u770B\u7248\u672C

    $ profiler version
    +Async-profiler 1.6 built on Sep  9 2019
    +Copyright 2019 Andrei Pangin
    +

    \u914D\u7F6E framebuf \u53C2\u6570

    \u5982\u679C\u9047\u5230\u751F\u6210\u7684\u706B\u7130\u56FE\u6709 [frame_buffer_overflow]\uFF0C\u5219\u9700\u8981\u589E\u5927 framebuf\uFF08\u9ED8\u8BA4\u503C\u662F 1'000'000\uFF09\uFF0C\u53EF\u4EE5\u663E\u5F0F\u914D\u7F6E\uFF0C\u6BD4\u5982\uFF1A

    profiler start --framebuf 5000000
    +

    \u914D\u7F6E include/exclude \u6765\u8FC7\u6EE4\u6570\u636E

    \u5982\u679C\u5E94\u7528\u6BD4\u8F83\u590D\u6742\uFF0C\u751F\u6210\u7684\u5185\u5BB9\u5F88\u591A\uFF0C\u60F3\u53EA\u5173\u6CE8\u90E8\u5206\u6570\u636E\uFF0C\u53EF\u4EE5\u901A\u8FC7 include/exclude \u6765\u8FC7\u6EE4\u3002\u6BD4\u5982

    profiler start --include 'java/*' --include 'demo/*' --exclude '*Unsafe.park*'
    +

    include/exclude \u90FD\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u503C \uFF0C\u4F46\u662F\u9700\u8981\u914D\u7F6E\u5728\u547D\u4EE4\u884C\u7684\u6700\u540E\u3002

    \u6307\u5B9A\u6267\u884C\u65F6\u95F4

    \u6BD4\u5982\uFF0C\u5E0C\u671B profiler \u6267\u884C 300 \u79D2\u81EA\u52A8\u7ED3\u675F\uFF0C\u53EF\u4EE5\u7528 -d/--duration \u53C2\u6570\u6307\u5B9A\uFF1A

    profiler start --duration 300
    +

    \u751F\u6210 jfr \u683C\u5F0F\u7ED3\u679C

    \u6CE8\u610F\uFF0Cjfr \u53EA\u652F\u6301\u5728 start\u65F6\u914D\u7F6E\u3002\u5982\u679C\u662F\u5728stop\u65F6\u6307\u5B9A\uFF0C\u5219\u4E0D\u4F1A\u751F\u6548\u3002

    profiler start --file /tmp/test.jfr
    +

    file\u53C2\u6570\u652F\u6301\u4E00\u4E9B\u53D8\u91CF\uFF1A

    • \u65F6\u95F4\u6233\uFF1A --file /tmp/test-%t.jfr
    • \u8FDB\u7A0B ID\uFF1A --file /tmp/test-%p.jfr

    \u751F\u6210\u7684\u7ED3\u679C\u53EF\u4EE5\u7528\u652F\u6301 jfr \u683C\u5F0F\u7684\u5DE5\u5177\u6765\u67E5\u770B\u3002\u6BD4\u5982\uFF1A

    • JDK Mission Control \uFF1A https://github.com/openjdk/jmc
    • JProfiler \uFF1A https://github.com/alibaba/arthas/issues/1416

    \u751F\u6210\u7684\u706B\u7130\u56FE\u91CC\u7684 unknown

    • https://github.com/jvm-profiling-tools/async-profiler/discussions/409
    `,23);function J(K,F){const s=o("ExternalLinkIcon");return d(),c("div",null,[u,e("p",null,[e("a",h,[m,v,n(s)])]),e("div",b,[f,e("p",null,[g,e("a",_,[x,n(s)]),k])]),y,e("p",null,[j,e("a",S,[$,n(s)]),w,L,q]),B,e("p",null,[A,C,N,e("a",V,[E,n(s)])]),I,e("p",null,[O,e("a",P,[T,n(s)])]),D])}const z=l(p,[["render",J],["__file","profiler.html.vue"]]);export{z as default}; diff --git a/3.x/assets/profiler.html.ecb6c417.js b/3.x/assets/profiler.html.ecb6c417.js new file mode 100644 index 00000000000..cf75eacd443 --- /dev/null +++ b/3.x/assets/profiler.html.ecb6c417.js @@ -0,0 +1 @@ +const e=JSON.parse(`{"key":"v-a7e90ae8","path":"/en/doc/profiler.html","title":"profiler","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Supported Options","slug":"supported-options","link":"#supported-options","children":[]},{"level":2,"title":"Start profiler","slug":"start-profiler","link":"#start-profiler","children":[]},{"level":2,"title":"Get the number of samples collected","slug":"get-the-number-of-samples-collected","link":"#get-the-number-of-samples-collected","children":[]},{"level":2,"title":"View profiler status","slug":"view-profiler-status","link":"#view-profiler-status","children":[]},{"level":2,"title":"Stop profiler","slug":"stop-profiler","link":"#stop-profiler","children":[{"level":3,"title":"Generating html format results","slug":"generating-html-format-results","link":"#generating-html-format-results","children":[]}]},{"level":2,"title":"View profiler results under arthas-output via browser","slug":"view-profiler-results-under-arthas-output-via-browser","link":"#view-profiler-results-under-arthas-output-via-browser","children":[]},{"level":2,"title":"Profiler supported events","slug":"profiler-supported-events","link":"#profiler-supported-events","children":[]},{"level":2,"title":"Resume sampling","slug":"resume-sampling","link":"#resume-sampling","children":[]},{"level":2,"title":"Use execute action to execute complex commands","slug":"use-execute-action-to-execute-complex-commands","link":"#use-execute-action-to-execute-complex-commands","children":[]},{"level":2,"title":"View all supported actions","slug":"view-all-supported-actions","link":"#view-all-supported-actions","children":[]},{"level":2,"title":"View version","slug":"view-version","link":"#view-version","children":[]},{"level":2,"title":"Configure framebuf option","slug":"configure-framebuf-option","link":"#configure-framebuf-option","children":[]},{"level":2,"title":"Configure include/exclude to filter data","slug":"configure-include-exclude-to-filter-data","link":"#configure-include-exclude-to-filter-data","children":[]},{"level":2,"title":"Specify execution time","slug":"specify-execution-time","link":"#specify-execution-time","children":[]},{"level":2,"title":"Generate jfr format result","slug":"generate-jfr-format-result","link":"#generate-jfr-format-result","children":[]},{"level":2,"title":"The 'unknown' in profiler result","slug":"the-unknown-in-profiler-result","link":"#the-unknown-in-profiler-result","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/profiler.md","version":"3.7.3"}`);export{e as data}; diff --git a/3.x/assets/pwd.html.4f686509.js b/3.x/assets/pwd.html.4f686509.js new file mode 100644 index 00000000000..cc6045d9917 --- /dev/null +++ b/3.x/assets/pwd.html.4f686509.js @@ -0,0 +1,2 @@ +import{_ as s,o as t,c as o,a as e,b as r,e as a,d as c,r as d}from"./app.4d248835.js";const i={},l=e("h1",{id:"pwd",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#pwd","aria-hidden":"true"},"#"),a(" pwd")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-pwd",target:"_blank",rel:"noopener noreferrer"},p=e("code",null,"pwd",-1),u=a(" online tutorial"),_=c(`

    TIP

    Return working directory name

    Usage

    $ pwd
    +
    `,3);function m(f,g){const n=d("ExternalLinkIcon");return t(),o("div",null,[l,e("p",null,[e("a",h,[p,u,r(n)])]),_])}const b=s(i,[["render",m],["__file","pwd.html.vue"]]);export{b as default}; diff --git a/3.x/assets/pwd.html.5c70637d.js b/3.x/assets/pwd.html.5c70637d.js new file mode 100644 index 00000000000..a5916b31ffa --- /dev/null +++ b/3.x/assets/pwd.html.5c70637d.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-1b8ba240","path":"/en/doc/pwd.html","title":"pwd","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/pwd.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/pwd.html.b8813280.js b/3.x/assets/pwd.html.b8813280.js new file mode 100644 index 00000000000..33deb797ce0 --- /dev/null +++ b/3.x/assets/pwd.html.b8813280.js @@ -0,0 +1 @@ +const a=JSON.parse('{"key":"v-1c2d8c2c","path":"/doc/pwd.html","title":"pwd","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/pwd.md","version":"3.7.3"}');export{a as data}; diff --git a/3.x/assets/pwd.html.d34432c3.js b/3.x/assets/pwd.html.d34432c3.js new file mode 100644 index 00000000000..04c3ffa6259 --- /dev/null +++ b/3.x/assets/pwd.html.d34432c3.js @@ -0,0 +1,2 @@ +import{_ as s,o as t,c as o,a as e,b as c,e as a,d,r}from"./app.4d248835.js";const i={},l=e("h1",{id:"pwd",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#pwd","aria-hidden":"true"},"#"),a(" pwd")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-pwd",target:"_blank",rel:"noopener noreferrer"},p=e("code",null,"pwd",-1),_=a("\u5728\u7EBF\u6559\u7A0B"),u=d(`

    \u63D0\u793A

    \u8FD4\u56DE\u5F53\u524D\u7684\u5DE5\u4F5C\u76EE\u5F55\uFF0C\u548C linux \u547D\u4EE4\u7C7B\u4F3C

    \u4F7F\u7528\u53C2\u8003

    $ pwd
    +
    `,3);function m(f,v){const n=r("ExternalLinkIcon");return t(),o("div",null,[l,e("p",null,[e("a",h,[p,_,c(n)])]),u])}const b=s(i,[["render",m],["__file","pwd.html.vue"]]);export{b as default}; diff --git a/3.x/assets/qqgroup3_qr.f82e3fd0.js b/3.x/assets/qqgroup3_qr.f82e3fd0.js new file mode 100644 index 00000000000..7d9c67f70be --- /dev/null +++ b/3.x/assets/qqgroup3_qr.f82e3fd0.js @@ -0,0 +1 @@ +const s="/3.x/images/dingding_qr.jpg",g="/3.x/images/dingding2_qr.jpg",i="/3.x/images/dingding3_qr.jpg",_="/3.x/images/qqgroup_qr.jpg",o="/3.x/images/qqgroup3_qr.jpg";export{s as _,g as a,i as b,_ as c,o as d}; diff --git a/3.x/assets/quick-start.html.2afac43e.js b/3.x/assets/quick-start.html.2afac43e.js new file mode 100644 index 00000000000..1770609f2dc --- /dev/null +++ b/3.x/assets/quick-start.html.2afac43e.js @@ -0,0 +1 @@ +const t=JSON.parse('{"key":"v-d98607ca","path":"/en/doc/quick-start.html","title":"Quick Start","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"1. Start math-game","slug":"_1-start-math-game","link":"#_1-start-math-game","children":[]},{"level":2,"title":"2. Start Arthas","slug":"_2-start-arthas","link":"#_2-start-arthas","children":[{"level":3,"title":"Linux/Unix/Mac","slug":"linux-unix-mac","link":"#linux-unix-mac","children":[]}]},{"level":2,"title":"3. Check the Dashboard","slug":"_3-check-the-dashboard","link":"#_3-check-the-dashboard","children":[]},{"level":2,"title":"4. Get the Main Class of the math-game process with the thread command","slug":"_4-get-the-main-class-of-the-math-game-process-with-the-thread-command","link":"#_4-get-the-main-class-of-the-math-game-process-with-the-thread-command","children":[]},{"level":2,"title":"5. Decompile Main Class with jad command","slug":"_5-decompile-main-class-with-jad-command","link":"#_5-decompile-main-class-with-jad-command","children":[]},{"level":2,"title":"6. watch","slug":"_6-watch","link":"#_6-watch","children":[]},{"level":2,"title":"7. Exit Arthas","slug":"_7-exit-arthas","link":"#_7-exit-arthas","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/quick-start.md","version":"3.7.3"}');export{t as data}; diff --git a/3.x/assets/quick-start.html.463266ab.js b/3.x/assets/quick-start.html.463266ab.js new file mode 100644 index 00000000000..931a202758b --- /dev/null +++ b/3.x/assets/quick-start.html.463266ab.js @@ -0,0 +1 @@ +const a=JSON.parse('{"key":"v-5afc3a07","path":"/doc/quick-start.html","title":"\u5FEB\u901F\u5165\u95E8","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"1. \u542F\u52A8 math-game","slug":"_1-\u542F\u52A8-math-game","link":"#_1-\u542F\u52A8-math-game","children":[]},{"level":2,"title":"2. \u542F\u52A8 arthas","slug":"_2-\u542F\u52A8-arthas","link":"#_2-\u542F\u52A8-arthas","children":[]},{"level":2,"title":"3. \u67E5\u770B dashboard","slug":"_3-\u67E5\u770B-dashboard","link":"#_3-\u67E5\u770B-dashboard","children":[]},{"level":2,"title":"4. \u901A\u8FC7 thread \u547D\u4EE4\u6765\u83B7\u53D6\u5230math-game\u8FDB\u7A0B\u7684 Main Class","slug":"_4-\u901A\u8FC7-thread-\u547D\u4EE4\u6765\u83B7\u53D6\u5230math-game\u8FDB\u7A0B\u7684-main-class","link":"#_4-\u901A\u8FC7-thread-\u547D\u4EE4\u6765\u83B7\u53D6\u5230math-game\u8FDB\u7A0B\u7684-main-class","children":[]},{"level":2,"title":"5. \u901A\u8FC7 jad \u6765\u53CD\u7F16\u8BD1 Main Class","slug":"_5-\u901A\u8FC7-jad-\u6765\u53CD\u7F16\u8BD1-main-class","link":"#_5-\u901A\u8FC7-jad-\u6765\u53CD\u7F16\u8BD1-main-class","children":[]},{"level":2,"title":"6. watch","slug":"_6-watch","link":"#_6-watch","children":[]},{"level":2,"title":"7. \u9000\u51FA arthas","slug":"_7-\u9000\u51FA-arthas","link":"#_7-\u9000\u51FA-arthas","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/quick-start.md","version":"3.7.3"}');export{a as data}; diff --git a/3.x/assets/quick-start.html.70301235.js b/3.x/assets/quick-start.html.70301235.js new file mode 100644 index 00000000000..f8c497d88ac --- /dev/null +++ b/3.x/assets/quick-start.html.70301235.js @@ -0,0 +1,165 @@ +import{_ as l,o as i,c as u,a as s,b as a,w as o,e as n,d as e,r as c}from"./app.4d248835.js";const r={},k=s("h1",{id:"quick-start",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#quick-start","aria-hidden":"true"},"#"),n(" Quick Start")],-1),d=n("You can practice it yourself by following the instructions below, or you can use our "),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=arthas-basics",target:"_blank",rel:"noopener noreferrer"},b=n("online tutorials"),v=n(" to get started quickly."),h=e(`

    1. Start math-game

    curl -O https://arthas.aliyun.com/math-game.jar
    +java -jar math-game.jar
    +

    math-game is a simple program that generates a random number every second, then it finds all prime factors of that number.

    `,3),g=n("The source code of "),f=s("code",null,"math-game",-1),_=n(": "),w={href:"https://github.com/alibaba/arthas/blob/master/math-game/src/main/java/demo/MathGame.java",target:"_blank",rel:"noopener noreferrer"},y=n("View"),I=e(`

    2. Start Arthas

    Linux/Unix/Mac

    Execute the following command in the command line:

    curl -O https://arthas.aliyun.com/arthas-boot3.jar
    +java -jar arthas-boot3.jar
    +
    • The user to run this command MUST have the same privilege as the owner of the target process, as a simple example you can try the following command if the target process is managed by user admin: sudo su admin && java -jar arthas-boot3.jar or sudo -u admin -EH java -jar arthas-boot3.jar
    • If you cannot be able to attach to the target process, please check the logs under ~/logs/arthas for troubleshooting.
    • java -jar arthas-boot3.jar -h print usage.

    Select the target Java process to attach:

    $ $ java -jar arthas-boot3.jar
    +* [1]: 35542
    +  [2]: 71560 math-game.jar
    +

    The math-game process is the second as shown above, press '2' then 'Enter'. Arthas will attach to the target process, and start to output:

    [INFO] Try to attach process 71560
    +[INFO] Attach process 71560 success.
    +[INFO] arthas-client connect 127.0.0.1 3658
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
    +|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
    +\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
    +
    +
    +wiki: https://arthas.aliyun.com/3.x/doc
    +version: 3.0.5.20181127201536
    +pid: 71560
    +time: 2018-11-28 19:16:24
    +
    +$
    +

    3. Check the Dashboard

    `,10),x=n("Type '"),j=n("dashboard"),A=n("' and hit 'ENTER', a brief report on the current process will be shown as below, pls. "),M=s("code",null,"Ctrl+C",-1),N=n(" to stop:"),L=e(`
    $ dashboard
    +ID     NAME                   GROUP          PRIORI STATE  %CPU    TIME   INTERRU DAEMON
    +17     pool-2-thread-1        system         5      WAITIN 67      0:0    false   false
    +27     Timer-for-arthas-dashb system         10     RUNNAB 32      0:0    false   true
    +11     AsyncAppender-Worker-a system         9      WAITIN 0       0:0    false   true
    +9      Attach Listener        system         9      RUNNAB 0       0:0    false   true
    +3      Finalizer              system         8      WAITIN 0       0:0    false   true
    +2      Reference Handler      system         10     WAITIN 0       0:0    false   true
    +4      Signal Dispatcher      system         9      RUNNAB 0       0:0    false   true
    +26     as-command-execute-dae system         10     TIMED_ 0       0:0    false   true
    +13     job-timeout            system         9      TIMED_ 0       0:0    false   true
    +1      main                   main           5      TIMED_ 0       0:0    false   false
    +14     nioEventLoopGroup-2-1  system         10     RUNNAB 0       0:0    false   false
    +18     nioEventLoopGroup-2-2  system         10     RUNNAB 0       0:0    false   false
    +23     nioEventLoopGroup-2-3  system         10     RUNNAB 0       0:0    false   false
    +15     nioEventLoopGroup-3-1  system         10     RUNNAB 0       0:0    false   false
    +Memory             used   total max    usage GC
    +heap               32M    155M  1820M  1.77% gc.ps_scavenge.count  4
    +ps_eden_space      14M    65M   672M   2.21% gc.ps_scavenge.time(m 166
    +ps_survivor_space  4M     5M    5M           s)
    +ps_old_gen         12M    85M   1365M  0.91% gc.ps_marksweep.count 0
    +nonheap            20M    23M   -1           gc.ps_marksweep.time( 0
    +code_cache         3M     5M    240M   1.32% ms )
    +Runtime
    +os.name                Mac OS X
    +os.version             10.13.4
    +java.version           1.8.0_162
    +java.home              /Library/Java/JavaVir
    +                       tualMachines/jdk1.8.0
    +                       _162.jdk/Contents/Hom
    +                       e/jre
    +

    4. Get the Main Class of the math-game process with the thread command

    thread 1 will print the stack of the thread with ID 1, which usually the main function thread.

    $ thread 1 | grep 'main('
    +    at demo.MathGame.main(MathGame.java:17)
    +

    5. Decompile Main Class with jad command

    $ jad demo.MathGame
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@3d4eac69
    +  +-sun.misc.Launcher$ExtClassLoader@66350f69
    +
    +Location:
    +/tmp/math-game.jar
    +
    +/*
    + * Decompiled with CFR 0_132.
    + */
    +package demo;
    +
    +import java.io.PrintStream;
    +import java.util.ArrayList;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.Random;
    +import java.util.concurrent.TimeUnit;
    +
    +public class MathGame {
    +    private static Random random = new Random();
    +    private int illegalArgumentCount = 0;
    +
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        do {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1L);
    +        } while (true);
    +    }
    +
    +    public void run() throws InterruptedException {
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = this.primeFactors(number);
    +            MathGame.print(number, primeFactors);
    +        }
    +        catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", this.illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +
    +    public static void print(int number, List<Integer> primeFactors) {
    +        StringBuffer sb = new StringBuffer("" + number + "=");
    +        Iterator<Integer> iterator = primeFactors.iterator();
    +        while (iterator.hasNext()) {
    +            int factor = iterator.next();
    +            sb.append(factor).append('*');
    +        }
    +        if (sb.charAt(sb.length() - 1) == '*') {
    +            sb.deleteCharAt(sb.length() - 1);
    +        }
    +        System.out.println(sb);
    +    }
    +
    +    public List<Integer> primeFactors(int number) {
    +        if (number < 2) {
    +            ++this.illegalArgumentCount;
    +            throw new IllegalArgumentException("number is: " + number + ", need >= 2");
    +        }
    +        ArrayList<Integer> result = new ArrayList<Integer>();
    +        int i = 2;
    +        while (i <= number) {
    +            if (number % i == 0) {
    +                result.add(i);
    +                number /= i;
    +                i = 2;
    +                continue;
    +            }
    +            ++i;
    +        }
    +        return result;
    +    }
    +}
    +
    +Affect(row-cnt:1) cost in 970 ms.
    +

    6. watch

    `,7),E=n("Use '"),T=n("watch"),C=n("' to view the return object of "),R=s("code",null,"demo.MathGame#primeFactors",-1),S=n(":"),q=e(`
    $ watch demo.MathGame primeFactors returnObj
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 107 ms.
    +ts=2018-11-28 19:22:30; [cost=1.715367ms] result=null
    +ts=2018-11-28 19:22:31; [cost=0.185203ms] result=null
    +ts=2018-11-28 19:22:32; [cost=19.012416ms] result=@ArrayList[
    +    @Integer[5],
    +    @Integer[47],
    +    @Integer[2675531],
    +]
    +ts=2018-11-28 19:22:33; [cost=0.311395ms] result=@ArrayList[
    +    @Integer[2],
    +    @Integer[5],
    +    @Integer[317],
    +    @Integer[503],
    +    @Integer[887],
    +]
    +ts=2018-11-28 19:22:34; [cost=10.136007ms] result=@ArrayList[
    +    @Integer[2],
    +    @Integer[2],
    +    @Integer[3],
    +    @Integer[3],
    +    @Integer[31],
    +    @Integer[717593],
    +]
    +ts=2018-11-28 19:22:35; [cost=29.969732ms] result=@ArrayList[
    +    @Integer[5],
    +    @Integer[29],
    +    @Integer[7651739],
    +]
    +
    `,1),G=n("Pls. refer to "),U={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=arthas-advanced",target:"_blank",rel:"noopener noreferrer"},F=n("Arthas advanced"),O=n(" for more information."),B=s("h2",{id:"_7-exit-arthas",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#_7-exit-arthas","aria-hidden":"true"},"#"),n(" 7. Exit Arthas")],-1),D=s("p",null,[n("Use "),s("code",null,"quit"),n(" or "),s("code",null,"exit"),n(" to disconnect from the current process. The Arthas instance attached to the target process continues to live inside the process, and its port is standby for further connection.")],-1),$=s("p",null,[n("Use "),s("code",null,"stop"),n(" command to have Arthas completely quit from the target process.")],-1);function P(V,W){const t=c("ExternalLinkIcon"),p=c("RouterLink");return i(),u("div",null,[k,s("p",null,[d,s("a",m,[b,a(t)]),v]),h,s("p",null,[g,f,_,s("a",w,[y,a(t)])]),I,s("p",null,[x,a(p,{to:"/en/doc/dashboard.html"},{default:o(()=>[j]),_:1}),A,M,N]),L,s("p",null,[E,a(p,{to:"/en/doc/watch.html"},{default:o(()=>[T]),_:1}),C,R,S]),q,s("p",null,[G,s("a",U,[F,a(t)]),O]),B,D,$])}const J=l(r,[["render",P],["__file","quick-start.html.vue"]]);export{J as default}; diff --git a/3.x/assets/quick-start.html.cbab3d30.js b/3.x/assets/quick-start.html.cbab3d30.js new file mode 100644 index 00000000000..f629bc926c4 --- /dev/null +++ b/3.x/assets/quick-start.html.cbab3d30.js @@ -0,0 +1,165 @@ +import{_ as l,o as i,c as u,a as s,b as a,w as o,e as n,d as e,r as c}from"./app.4d248835.js";const r={},k=s("h1",{id:"\u5FEB\u901F\u5165\u95E8",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u5FEB\u901F\u5165\u95E8","aria-hidden":"true"},"#"),n(" \u5FEB\u901F\u5165\u95E8")],-1),d=n("\u53EF\u4EE5\u901A\u8FC7\u4E0B\u9762\u7684\u65B9\u5F0F\u81EA\u5DF1\u52A8\u624B\u5B9E\u8DF5\uFF0C\u4E5F\u53EF\u4EE5\u901A\u8FC7\u6211\u4EEC\u7684"),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=arthas-basics",target:"_blank",rel:"noopener noreferrer"},b=n("\u5728\u7EBF\u6559\u7A0B"),v=n("\uFF0C\u8DDF\u968F\u6559\u7A0B\u5FEB\u901F\u5165\u95E8\u3002"),h=e(`

    1. \u542F\u52A8 math-game

    curl -O https://arthas.aliyun.com/math-game.jar
    +java -jar math-game.jar
    +

    math-game\u662F\u4E00\u4E2A\u7B80\u5355\u7684\u7A0B\u5E8F\uFF0C\u6BCF\u9694\u4E00\u79D2\u751F\u6210\u4E00\u4E2A\u968F\u673A\u6570\uFF0C\u518D\u6267\u884C\u8D28\u56E0\u6570\u5206\u89E3\uFF0C\u5E76\u6253\u5370\u51FA\u5206\u89E3\u7ED3\u679C\u3002

    `,3),g=s("code",null,"math-game",-1),_=n("\u6E90\u4EE3\u7801\uFF1A"),f={href:"https://github.com/alibaba/arthas/blob/master/math-game/src/main/java/demo/MathGame.java",target:"_blank",rel:"noopener noreferrer"},y=n("\u67E5\u770B"),w=e(`

    2. \u542F\u52A8 arthas

    \u5728\u547D\u4EE4\u884C\u4E0B\u9762\u6267\u884C\uFF08\u4F7F\u7528\u548C\u76EE\u6807\u8FDB\u7A0B\u4E00\u81F4\u7684\u7528\u6237\u542F\u52A8\uFF0C\u5426\u5219\u53EF\u80FD attach \u5931\u8D25\uFF09\uFF1A

    curl -O https://arthas.aliyun.com/arthas-boot3.jar
    +java -jar arthas-boot3.jar
    +
    • \u6267\u884C\u8BE5\u7A0B\u5E8F\u7684\u7528\u6237\u9700\u8981\u548C\u76EE\u6807\u8FDB\u7A0B\u5177\u6709\u76F8\u540C\u7684\u6743\u9650\u3002\u6BD4\u5982\u4EE5admin\u7528\u6237\u6765\u6267\u884C\uFF1Asudo su admin && java -jar arthas-boot3.jar \u6216 sudo -u admin -EH java -jar arthas-boot3.jar\u3002
    • \u5982\u679C attach \u4E0D\u4E0A\u76EE\u6807\u8FDB\u7A0B\uFF0C\u53EF\u4EE5\u67E5\u770B~/logs/arthas/ \u76EE\u5F55\u4E0B\u7684\u65E5\u5FD7\u3002
    • \u5982\u679C\u4E0B\u8F7D\u901F\u5EA6\u6BD4\u8F83\u6162\uFF0C\u53EF\u4EE5\u4F7F\u7528 aliyun \u7684\u955C\u50CF\uFF1Ajava -jar arthas-boot3.jar --repo-mirror aliyun --use-http
    • java -jar arthas-boot3.jar -h \u6253\u5370\u66F4\u591A\u53C2\u6570\u4FE1\u606F\u3002

    \u9009\u62E9\u5E94\u7528 java \u8FDB\u7A0B\uFF1A

    $ $ java -jar arthas-boot3.jar
    +* [1]: 35542
    +  [2]: 71560 math-game.jar
    +

    math-game\u8FDB\u7A0B\u662F\u7B2C 2 \u4E2A\uFF0C\u5219\u8F93\u5165 2\uFF0C\u518D\u8F93\u5165\u56DE\u8F66/enter\u3002Arthas \u4F1A attach \u5230\u76EE\u6807\u8FDB\u7A0B\u4E0A\uFF0C\u5E76\u8F93\u51FA\u65E5\u5FD7\uFF1A

    [INFO] Try to attach process 71560
    +[INFO] Attach process 71560 success.
    +[INFO] arthas-client connect 127.0.0.1 3658
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
    +|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
    +\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
    +
    +
    +wiki: https://arthas.aliyun.com/3.x/doc
    +version: 3.0.5.20181127201536
    +pid: 71560
    +time: 2018-11-28 19:16:24
    +
    +$
    +

    3. \u67E5\u770B dashboard

    `,9),I=n("\u8F93\u5165"),j=n("dashboard"),M=n("\uFF0C\u6309"),x=s("code",null,"\u56DE\u8F66/enter",-1),A=n("\uFF0C\u4F1A\u5C55\u793A\u5F53\u524D\u8FDB\u7A0B\u7684\u4FE1\u606F\uFF0C\u6309"),N=s("code",null,"ctrl+c",-1),L=n("\u53EF\u4EE5\u4E2D\u65AD\u6267\u884C\u3002"),E=e(`
    $ dashboard
    +ID     NAME                   GROUP          PRIORI STATE  %CPU    TIME   INTERRU DAEMON
    +17     pool-2-thread-1        system         5      WAITIN 67      0:0    false   false
    +27     Timer-for-arthas-dashb system         10     RUNNAB 32      0:0    false   true
    +11     AsyncAppender-Worker-a system         9      WAITIN 0       0:0    false   true
    +9      Attach Listener        system         9      RUNNAB 0       0:0    false   true
    +3      Finalizer              system         8      WAITIN 0       0:0    false   true
    +2      Reference Handler      system         10     WAITIN 0       0:0    false   true
    +4      Signal Dispatcher      system         9      RUNNAB 0       0:0    false   true
    +26     as-command-execute-dae system         10     TIMED_ 0       0:0    false   true
    +13     job-timeout            system         9      TIMED_ 0       0:0    false   true
    +1      main                   main           5      TIMED_ 0       0:0    false   false
    +14     nioEventLoopGroup-2-1  system         10     RUNNAB 0       0:0    false   false
    +18     nioEventLoopGroup-2-2  system         10     RUNNAB 0       0:0    false   false
    +23     nioEventLoopGroup-2-3  system         10     RUNNAB 0       0:0    false   false
    +15     nioEventLoopGroup-3-1  system         10     RUNNAB 0       0:0    false   false
    +Memory             used   total max    usage GC
    +heap               32M    155M  1820M  1.77% gc.ps_scavenge.count  4
    +ps_eden_space      14M    65M   672M   2.21% gc.ps_scavenge.time(m 166
    +ps_survivor_space  4M     5M    5M           s)
    +ps_old_gen         12M    85M   1365M  0.91% gc.ps_marksweep.count 0
    +nonheap            20M    23M   -1           gc.ps_marksweep.time( 0
    +code_cache         3M     5M    240M   1.32% ms)
    +Runtime
    +os.name                Mac OS X
    +os.version             10.13.4
    +java.version           1.8.0_162
    +java.home              /Library/Java/JavaVir
    +                       tualMachines/jdk1.8.0
    +                       _162.jdk/Contents/Hom
    +                       e/jre
    +

    4. \u901A\u8FC7 thread \u547D\u4EE4\u6765\u83B7\u53D6\u5230math-game\u8FDB\u7A0B\u7684 Main Class

    thread 1\u4F1A\u6253\u5370\u7EBF\u7A0B ID 1 \u7684\u6808\uFF0C\u901A\u5E38\u662F main \u51FD\u6570\u7684\u7EBF\u7A0B\u3002

    $ thread 1 | grep 'main('
    +    at demo.MathGame.main(MathGame.java:17)
    +

    5. \u901A\u8FC7 jad \u6765\u53CD\u7F16\u8BD1 Main Class

    $ jad demo.MathGame
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@3d4eac69
    +  +-sun.misc.Launcher$ExtClassLoader@66350f69
    +
    +Location:
    +/tmp/math-game.jar
    +
    +/*
    + * Decompiled with CFR 0_132.
    + */
    +package demo;
    +
    +import java.io.PrintStream;
    +import java.util.ArrayList;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.Random;
    +import java.util.concurrent.TimeUnit;
    +
    +public class MathGame {
    +    private static Random random = new Random();
    +    private int illegalArgumentCount = 0;
    +
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        do {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1L);
    +        } while (true);
    +    }
    +
    +    public void run() throws InterruptedException {
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = this.primeFactors(number);
    +            MathGame.print(number, primeFactors);
    +        }
    +        catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", this.illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +
    +    public static void print(int number, List<Integer> primeFactors) {
    +        StringBuffer sb = new StringBuffer("" + number + "=");
    +        Iterator<Integer> iterator = primeFactors.iterator();
    +        while (iterator.hasNext()) {
    +            int factor = iterator.next();
    +            sb.append(factor).append('*');
    +        }
    +        if (sb.charAt(sb.length() - 1) == '*') {
    +            sb.deleteCharAt(sb.length() - 1);
    +        }
    +        System.out.println(sb);
    +    }
    +
    +    public List<Integer> primeFactors(int number) {
    +        if (number < 2) {
    +            ++this.illegalArgumentCount;
    +            throw new IllegalArgumentException("number is: " + number + ", need >= 2");
    +        }
    +        ArrayList<Integer> result = new ArrayList<Integer>();
    +        int i = 2;
    +        while (i <= number) {
    +            if (number % i == 0) {
    +                result.add(i);
    +                number /= i;
    +                i = 2;
    +                continue;
    +            }
    +            ++i;
    +        }
    +        return result;
    +    }
    +}
    +
    +Affect(row-cnt:1) cost in 970 ms.
    +

    6. watch

    `,7),R=n("\u901A\u8FC7"),C=n("watch"),G=n("\u547D\u4EE4\u6765\u67E5\u770B"),T=s("code",null,"demo.MathGame#primeFactors",-1),S=n("\u51FD\u6570\u7684\u8FD4\u56DE\u503C\uFF1A"),q=e(`
    $ watch demo.MathGame primeFactors returnObj
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 107 ms.
    +ts=2018-11-28 19:22:30; [cost=1.715367ms] result=null
    +ts=2018-11-28 19:22:31; [cost=0.185203ms] result=null
    +ts=2018-11-28 19:22:32; [cost=19.012416ms] result=@ArrayList[
    +    @Integer[5],
    +    @Integer[47],
    +    @Integer[2675531],
    +]
    +ts=2018-11-28 19:22:33; [cost=0.311395ms] result=@ArrayList[
    +    @Integer[2],
    +    @Integer[5],
    +    @Integer[317],
    +    @Integer[503],
    +    @Integer[887],
    +]
    +ts=2018-11-28 19:22:34; [cost=10.136007ms] result=@ArrayList[
    +    @Integer[2],
    +    @Integer[2],
    +    @Integer[3],
    +    @Integer[3],
    +    @Integer[31],
    +    @Integer[717593],
    +]
    +ts=2018-11-28 19:22:35; [cost=29.969732ms] result=@ArrayList[
    +    @Integer[5],
    +    @Integer[29],
    +    @Integer[7651739],
    +]
    +
    `,1),F=n("\u66F4\u591A\u7684\u529F\u80FD\u53EF\u4EE5\u67E5\u770B"),O={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=arthas-advanced",target:"_blank",rel:"noopener noreferrer"},B=n("\u8FDB\u9636\u6559\u7A0B"),U=n("\u3002"),D=s("h2",{id:"_7-\u9000\u51FA-arthas",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#_7-\u9000\u51FA-arthas","aria-hidden":"true"},"#"),n(" 7. \u9000\u51FA arthas")],-1),$=s("p",null,[n("\u5982\u679C\u53EA\u662F\u9000\u51FA\u5F53\u524D\u7684\u8FDE\u63A5\uFF0C\u53EF\u4EE5\u7528"),s("code",null,"quit"),n("\u6216\u8005"),s("code",null,"exit"),n("\u547D\u4EE4\u3002Attach \u5230\u76EE\u6807\u8FDB\u7A0B\u4E0A\u7684 arthas \u8FD8\u4F1A\u7EE7\u7EED\u8FD0\u884C\uFF0C\u7AEF\u53E3\u4F1A\u4FDD\u6301\u5F00\u653E\uFF0C\u4E0B\u6B21\u8FDE\u63A5\u65F6\u53EF\u4EE5\u76F4\u63A5\u8FDE\u63A5\u4E0A\u3002")],-1),P=s("p",null,[n("\u5982\u679C\u60F3\u5B8C\u5168\u9000\u51FA arthas\uFF0C\u53EF\u4EE5\u6267\u884C"),s("code",null,"stop"),n("\u547D\u4EE4\u3002")],-1);function V(W,H){const t=c("ExternalLinkIcon"),p=c("RouterLink");return i(),u("div",null,[k,s("p",null,[d,s("a",m,[b,a(t)]),v]),h,s("p",null,[g,_,s("a",f,[y,a(t)])]),w,s("p",null,[I,a(p,{to:"/doc/dashboard.html"},{default:o(()=>[j]),_:1}),M,x,A,N,L]),E,s("p",null,[R,a(p,{to:"/doc/watch.html"},{default:o(()=>[C]),_:1}),G,T,S]),q,s("p",null,[F,s("a",O,[B,a(t)]),U]),D,$,P])}const z=l(r,[["render",V],["__file","quick-start.html.vue"]]);export{z as default}; diff --git a/3.x/assets/quit.html.052c6b91.js b/3.x/assets/quit.html.052c6b91.js new file mode 100644 index 00000000000..72e92273d97 --- /dev/null +++ b/3.x/assets/quit.html.052c6b91.js @@ -0,0 +1 @@ +const t=JSON.parse('{"key":"v-aa7c750c","path":"/doc/quit.html","title":"quit","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/quit.md","version":"3.7.3"}');export{t as data}; diff --git a/3.x/assets/quit.html.125451fe.js b/3.x/assets/quit.html.125451fe.js new file mode 100644 index 00000000000..2dcdf2d03be --- /dev/null +++ b/3.x/assets/quit.html.125451fe.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-d1b31c34","path":"/en/doc/quit.html","title":"quit","lang":"en-US","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/quit.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/quit.html.64b41fb3.js b/3.x/assets/quit.html.64b41fb3.js new file mode 100644 index 00000000000..874503f37f5 --- /dev/null +++ b/3.x/assets/quit.html.64b41fb3.js @@ -0,0 +1 @@ +import{_ as t,o as s,c as e,d as o}from"./app.4d248835.js";const r={},a=o('

    quit

    \u9000\u51FA\u5F53\u524D Arthas \u5BA2\u6237\u7AEF\uFF0C\u5176\u4ED6 Arthas \u5BA2\u6237\u7AEF\u4E0D\u53D7\u5F71\u54CD\u3002\u7B49\u540C\u4E8Eexit\u3001logout\u3001q\u4E09\u4E2A\u6307\u4EE4\u3002

    \u63D0\u793A

    \u53EA\u662F\u9000\u51FA\u5F53\u524D Arthas \u5BA2\u6237\u7AEF\uFF0CArthas \u7684\u670D\u52A1\u5668\u7AEF\u5E76\u6CA1\u6709\u5173\u95ED\uFF0C\u6240\u505A\u7684\u4FEE\u6539\u4E5F\u4E0D\u4F1A\u88AB\u91CD\u7F6E\u3002

    ',3),n=[a];function c(i,_){return s(),e("div",null,n)}const h=t(r,[["render",c],["__file","quit.html.vue"]]);export{h as default}; diff --git a/3.x/assets/quit.html.adcbca9c.js b/3.x/assets/quit.html.adcbca9c.js new file mode 100644 index 00000000000..80079e9dc38 --- /dev/null +++ b/3.x/assets/quit.html.adcbca9c.js @@ -0,0 +1 @@ +import{_ as t,o as e,c as s,d as o}from"./app.4d248835.js";const n={},i=o('

    quit

    exit the current Arthas client without affecting other clients. equals exit\u3001logout\u3001q command.

    TIP

    just exit Arthas client,it means Arthas server is not closed,so the changes you do will not be reseted.

    ',3),r=[i];function c(a,l){return e(),s("div",null,r)}const h=t(n,[["render",c],["__file","quit.html.vue"]]);export{h as default}; diff --git a/3.x/assets/redefine.html.2e16ab41.js b/3.x/assets/redefine.html.2e16ab41.js new file mode 100644 index 00000000000..9e25584e7ff --- /dev/null +++ b/3.x/assets/redefine.html.2e16ab41.js @@ -0,0 +1,35 @@ +import{_ as l,o as p,c as i,a as n,b as a,w as c,e as s,d,r as o}from"./app.4d248835.js";const r={},u=n("h1",{id:"redefine",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#redefine","aria-hidden":"true"},"#"),s(" redefine")],-1),m={class:"custom-container tip"},k=n("p",{class:"custom-container-title"},"\u63D0\u793A",-1),v=s("\u63A8\u8350\u4F7F\u7528 "),h=s("retransform"),b=s(" \u547D\u4EE4"),f={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=cn&id=command-mc-redefine",target:"_blank",rel:"noopener noreferrer"},_=n("code",null,"mc-redefine",-1),g=s("\u5728\u7EBF\u6559\u7A0B"),x=n("div",{class:"custom-container tip"},[n("p",{class:"custom-container-title"},"\u63D0\u793A"),n("p",null,[s("\u52A0\u8F7D\u5916\u90E8\u7684"),n("code",null,".class"),s("\u6587\u4EF6\uFF0Credefine jvm \u5DF2\u52A0\u8F7D\u7684\u7C7B\u3002")])],-1),y=s("\u53C2\u8003\uFF1A"),w={href:"https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/Instrumentation.html#redefineClasses-java.lang.instrument.ClassDefinition...-",target:"_blank",rel:"noopener noreferrer"},j=s("Instrumentation#redefineClasses"),C=n("h2",{id:"\u5E38\u89C1\u95EE\u9898",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5E38\u89C1\u95EE\u9898","aria-hidden":"true"},"#"),s(" \u5E38\u89C1\u95EE\u9898")],-1),L={class:"custom-container tip"},I=n("p",{class:"custom-container-title"},"\u63D0\u793A",-1),S=s("\u63A8\u8350\u4F7F\u7528 "),T=s("retransform"),E=s(" \u547D\u4EE4"),q=d(`
    • redefine \u7684 class \u4E0D\u80FD\u4FEE\u6539\u3001\u6DFB\u52A0\u3001\u5220\u9664\u7C7B\u7684 field \u548C method\uFF0C\u5305\u62EC\u65B9\u6CD5\u53C2\u6570\u3001\u65B9\u6CD5\u540D\u79F0\u53CA\u8FD4\u56DE\u503C

    • \u5982\u679C mc \u5931\u8D25\uFF0C\u53EF\u4EE5\u5728\u672C\u5730\u5F00\u53D1\u73AF\u5883\u7F16\u8BD1\u597D class \u6587\u4EF6\uFF0C\u4E0A\u4F20\u5230\u76EE\u6807\u7CFB\u7EDF\uFF0C\u4F7F\u7528 redefine \u70ED\u52A0\u8F7D class

    • \u76EE\u524D redefine \u548C watch/trace/jad/tt \u7B49\u547D\u4EE4\u51B2\u7A81\uFF0C\u4EE5\u540E\u91CD\u65B0\u5B9E\u73B0 redefine \u529F\u80FD\u4F1A\u89E3\u51B3\u6B64\u95EE\u9898

    \u6CE8\u610F

    \u6CE8\u610F\uFF0C redefine \u540E\u7684\u539F\u6765\u7684\u7C7B\u4E0D\u80FD\u6062\u590D\uFF0Credefine \u6709\u53EF\u80FD\u5931\u8D25\uFF08\u6BD4\u5982\u589E\u52A0\u4E86\u65B0\u7684 field\uFF09\uFF0C\u53C2\u8003 jdk \u672C\u8EAB\u7684\u6587\u6863\u3002

    \u63D0\u793A

    reset\u547D\u4EE4\u5BF9redefine\u7684\u7C7B\u65E0\u6548\u3002\u5982\u679C\u60F3\u91CD\u7F6E\uFF0C\u9700\u8981redefine\u539F\u59CB\u7684\u5B57\u8282\u7801\u3002

    \u63D0\u793A

    redefine\u547D\u4EE4\u548Cjad/watch/trace/monitor/tt\u7B49\u547D\u4EE4\u4F1A\u51B2\u7A81\u3002\u6267\u884C\u5B8Credefine\u4E4B\u540E\uFF0C\u5982\u679C\u518D\u6267\u884C\u4E0A\u9762\u63D0\u5230\u7684\u547D\u4EE4\uFF0C\u5219\u4F1A\u628Aredefine\u7684\u5B57\u8282\u7801\u91CD\u7F6E\u3002 \u539F\u56E0\u662F jdk \u672C\u8EAB redefine \u548C Retransform \u662F\u4E0D\u540C\u7684\u673A\u5236\uFF0C\u540C\u65F6\u4F7F\u7528\u4E24\u79CD\u673A\u5236\u6765\u66F4\u65B0\u5B57\u8282\u7801\uFF0C\u53EA\u6709\u6700\u540E\u4FEE\u6539\u7684\u4F1A\u751F\u6548\u3002

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    [c:]ClassLoader \u7684 hashcode
    [classLoaderClass:]\u6307\u5B9A\u6267\u884C\u8868\u8FBE\u5F0F\u7684 ClassLoader \u7684 class name

    \u4F7F\u7528\u53C2\u8003

       redefine /tmp/Test.class
    +   redefine -c 327a647b /tmp/Test.class /tmp/Test\\$Inner.class
    +   redefine --classLoaderClass sun.misc.Launcher$AppClassLoader /tmp/Test.class /tmp/Test\\$Inner.class
    +

    \u7ED3\u5408 jad/mc \u547D\u4EE4\u4F7F\u7528

    jad --source-only com.example.demo.arthas.user.UserController > /tmp/UserController.java
    +
    +mc /tmp/UserController.java -d /tmp
    +
    +redefine /tmp/com/example/demo/arthas/user/UserController.class
    +
    • jad \u547D\u4EE4\u53CD\u7F16\u8BD1\uFF0C\u7136\u540E\u53EF\u4EE5\u7528\u5176\u5B83\u7F16\u8BD1\u5668\uFF0C\u6BD4\u5982 vim \u6765\u4FEE\u6539\u6E90\u7801
    • mc \u547D\u4EE4\u6765\u5185\u5B58\u7F16\u8BD1\u4FEE\u6539\u8FC7\u7684\u4EE3\u7801
    • \u7528 redefine \u547D\u4EE4\u52A0\u8F7D\u65B0\u7684\u5B57\u8282\u7801

    \u4E0A\u4F20 .class \u6587\u4EF6\u5230\u670D\u52A1\u5668\u7684\u6280\u5DE7

    \u4F7F\u7528mc\u547D\u4EE4\u6765\u7F16\u8BD1jad\u7684\u53CD\u7F16\u8BD1\u7684\u4EE3\u7801\u6709\u53EF\u80FD\u5931\u8D25\u3002\u53EF\u4EE5\u5728\u672C\u5730\u4FEE\u6539\u4EE3\u7801\uFF0C\u7F16\u8BD1\u597D\u540E\u518D\u4E0A\u4F20\u5230\u670D\u52A1\u5668\u4E0A\u3002\u6709\u7684\u670D\u52A1\u5668\u4E0D\u5141\u8BB8\u76F4\u63A5\u4E0A\u4F20\u6587\u4EF6\uFF0C\u53EF\u4EE5\u4F7F\u7528base64\u547D\u4EE4\u6765\u7ED5\u8FC7\u3002

    1. \u5728\u672C\u5730\u5148\u8F6C\u6362.class\u6587\u4EF6\u4E3A base64\uFF0C\u518D\u4FDD\u5B58\u4E3A result.txt

      base64 < Test.class > result.txt
      +
    2. \u5230\u670D\u52A1\u5668\u4E0A\uFF0C\u65B0\u5EFA\u5E76\u7F16\u8F91result.txt\uFF0C\u590D\u5236\u672C\u5730\u7684\u5185\u5BB9\uFF0C\u7C98\u8D34\u518D\u4FDD\u5B58

    3. \u628A\u670D\u52A1\u5668\u4E0A\u7684 result.txt\u8FD8\u539F\u4E3A.class

      base64 -d < result.txt > Test.class
      +
    4. \u7528 md5 \u547D\u4EE4\u8BA1\u7B97\u54C8\u5E0C\u503C\uFF0C\u6821\u9A8C\u662F\u5426\u4E00\u81F4

    redefine \u7684\u9650\u5236

    • \u4E0D\u5141\u8BB8\u65B0\u589E\u52A0 field/method
    • \u6B63\u5728\u8DD1\u7684\u51FD\u6570\uFF0C\u6CA1\u6709\u9000\u51FA\u4E0D\u80FD\u751F\u6548\uFF0C\u6BD4\u5982\u4E0B\u9762\u65B0\u589E\u52A0\u7684System.out.println\uFF0C\u53EA\u6709run()\u51FD\u6570\u91CC\u7684\u4F1A\u751F\u6548
    public class MathGame {
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        while (true) {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1);
    +            // \u8FD9\u4E2A\u4E0D\u751F\u6548\uFF0C\u56E0\u4E3A\u4EE3\u7801\u4E00\u76F4\u8DD1\u5728 while\u91CC
    +            System.out.println("in loop");
    +        }
    +    }
    +
    +    public void run() throws InterruptedException {
    +        // \u8FD9\u4E2A\u751F\u6548\uFF0C\u56E0\u4E3Arun()\u51FD\u6570\u6BCF\u6B21\u90FD\u53EF\u4EE5\u5B8C\u6574\u7ED3\u675F
    +        System.out.println("call run()");
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = primeFactors(number);
    +            print(number, primeFactors);
    +
    +        } catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +}
    +
    `,17);function N(U,M){const e=o("RouterLink"),t=o("ExternalLinkIcon");return p(),i("div",null,[u,n("div",m,[k,n("p",null,[v,a(e,{to:"/doc/retransform.html"},{default:c(()=>[h]),_:1}),b])]),n("p",null,[n("a",f,[_,g,a(t)])]),x,n("p",null,[y,n("a",w,[j,a(t)])]),C,n("div",L,[I,n("p",null,[S,a(e,{to:"/doc/retransform.html"},{default:c(()=>[T]),_:1}),E])]),q])}const A=l(r,[["render",N],["__file","redefine.html.vue"]]);export{A as default}; diff --git a/3.x/assets/redefine.html.4f4236c3.js b/3.x/assets/redefine.html.4f4236c3.js new file mode 100644 index 00000000000..c2f0e74175f --- /dev/null +++ b/3.x/assets/redefine.html.4f4236c3.js @@ -0,0 +1,35 @@ +import{_ as i,o as l,c as p,a as n,b as e,w as o,e as s,d,r as c}from"./app.4d248835.js";const r={},u=n("h1",{id:"redefine",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#redefine","aria-hidden":"true"},"#"),s(" redefine")],-1),m={class:"custom-container tip"},h=n("p",{class:"custom-container-title"},"TIP",-1),k=s("Recommend to use the "),v=s("retransform"),f=s(" command."),b={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=en&id=command-mc-redefine",target:"_blank",rel:"noopener noreferrer"},g=n("code",null,"mc-redefine",-1),_=s(" online tutorial"),y=n("div",{class:"custom-container tip"},[n("p",{class:"custom-container-title"},"TIP"),n("p",null,[s("Load the external "),n("code",null,"*.class"),s(" files to re-define the loaded classes in JVM.")])],-1),w=s("Reference: "),x={href:"https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/Instrumentation.html#redefineClasses-java.lang.instrument.ClassDefinition...-",target:"_blank",rel:"noopener noreferrer"},T=s("Instrumentation#redefineClasses"),I=n("h2",{id:"frequently-asked-questions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#frequently-asked-questions","aria-hidden":"true"},"#"),s(" Frequently asked questions")],-1),C={class:"custom-container tip"},j=n("p",{class:"custom-container-title"},"TIP",-1),L=s("Recommend to use the "),q=s("retransform"),S=s(" command."),N=d(`
    • The class of redefine cannot modify, add or delete the field and method of the class, including method parameters, method names and return values.

    • If mc fails, you can compile the class file in the local development environment, upload it to the target system, and use redefine to hot load the class.

    • At present, redefine conflicts with watch / trace / jad / tt commands. Reimplementing redefine function in the future will solve this problem.

    WARNING

    Notes: Re-defined classes cannot be restored. There are chances that redefining may fail due to some reasons, for example: there's new field introduced in the new version of the class, pls. refer to JDK's documentation for the limitations.

    TIP

    The reset command is not valid for classes that have been processed by redefine. If you want to reset, you need redefine the original bytecode.

    TIP

    The redefine command will conflict with the jad/watch/trace/monitor/tt commands. After executing redefine, if you execute the above mentioned command, the bytecode of the class will be reset. The reason is that in the JDK redefine and retransform are different mechanisms. When two mechanisms are both used to update the bytecode, only the last modified will take effect.

    Options

    NameSpecification
    [c:]hashcode of the class loader
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.

    Usage

    redefine /tmp/Test.class
    +redefine -c 327a647b /tmp/Test.class /tmp/Test\\$Inner.class
    +redefine --classLoaderClass sun.misc.Launcher$AppClassLoader /tmp/Test.class /tmp/Test\\$Inner.class
    +

    Use with the jad/mc command

    jad --source-only com.example.demo.arthas.user.UserController > /tmp/UserController.java
    +
    +mc /tmp/UserController.java -d /tmp
    +
    +redefine /tmp/com/example/demo/arthas/user/UserController.class
    +
    • Use jad command to decompile bytecode, and then you can use other editors, such as vim to modify the source code.
    • mc command to compile the modified code
    • Load new bytecode with redefine command

    Tips for uploading .class files to the server

    The mc command may fail. You can modify the code locally, compile it, and upload it to the server. Some servers do not allow direct uploading files, you can use the base64 command to bypass.

    1. Convert the .class file to base64 first, then save it as result.txt

      Base64 < Test.class > result.txt
      +
    2. Login the server, create and edit result.txt, copy the local content, paste and save

    3. Restore result.txt on the server to .class

      Base64 -d < result.txt > Test.class
      +
    4. Use the md5 command to verify that the .class files are consistent.

    Restrictions of the redefine command

    • New field/method is not allowed
    • The function that is running, no exit can not take effect, such as the new System.out.println added below, only the run() function will take effect.
    public class MathGame {
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        while (true) {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1);
    +            // This doesn't work because the code keeps running in while
    +            System.out.println("in loop");
    +        }
    +    }
    +
    +    public void run() throws InterruptedException {
    +        // This works because the run() function ends completely every time
    +        System.out.println("call run()");
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = primeFactors(number);
    +            print(number, primeFactors);
    +
    +        } catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +}
    +
    `,17);function R(U,E){const a=c("RouterLink"),t=c("ExternalLinkIcon");return l(),p("div",null,[u,n("div",m,[h,n("p",null,[k,e(a,{to:"/en/doc/retransform.html"},{default:o(()=>[v]),_:1}),f])]),n("p",null,[n("a",b,[g,_,e(t)])]),y,n("p",null,[w,n("a",x,[T,e(t)])]),I,n("div",C,[j,n("p",null,[L,e(a,{to:"/en/doc/retransform.html"},{default:o(()=>[q]),_:1}),S])]),N])}const B=i(r,[["render",R],["__file","redefine.html.vue"]]);export{B as default}; diff --git a/3.x/assets/redefine.html.a2b54a14.js b/3.x/assets/redefine.html.a2b54a14.js new file mode 100644 index 00000000000..f204f7adc67 --- /dev/null +++ b/3.x/assets/redefine.html.a2b54a14.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-0446ad7b","path":"/doc/redefine.html","title":"redefine","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u5E38\u89C1\u95EE\u9898","slug":"\u5E38\u89C1\u95EE\u9898","link":"#\u5E38\u89C1\u95EE\u9898","children":[]},{"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":"\u7ED3\u5408 jad/mc \u547D\u4EE4\u4F7F\u7528","slug":"\u7ED3\u5408-jad-mc-\u547D\u4EE4\u4F7F\u7528","link":"#\u7ED3\u5408-jad-mc-\u547D\u4EE4\u4F7F\u7528","children":[]},{"level":2,"title":"\u4E0A\u4F20 .class \u6587\u4EF6\u5230\u670D\u52A1\u5668\u7684\u6280\u5DE7","slug":"\u4E0A\u4F20-class-\u6587\u4EF6\u5230\u670D\u52A1\u5668\u7684\u6280\u5DE7","link":"#\u4E0A\u4F20-class-\u6587\u4EF6\u5230\u670D\u52A1\u5668\u7684\u6280\u5DE7","children":[]},{"level":2,"title":"redefine \u7684\u9650\u5236","slug":"redefine-\u7684\u9650\u5236","link":"#redefine-\u7684\u9650\u5236","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/redefine.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/redefine.html.ee728e3e.js b/3.x/assets/redefine.html.ee728e3e.js new file mode 100644 index 00000000000..64d82f3e3b9 --- /dev/null +++ b/3.x/assets/redefine.html.ee728e3e.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-c7317832","path":"/en/doc/redefine.html","title":"redefine","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Frequently asked questions","slug":"frequently-asked-questions","link":"#frequently-asked-questions","children":[]},{"level":2,"title":"Options","slug":"options","link":"#options","children":[]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]},{"level":2,"title":"Use with the jad/mc command","slug":"use-with-the-jad-mc-command","link":"#use-with-the-jad-mc-command","children":[]},{"level":2,"title":"Tips for uploading .class files to the server","slug":"tips-for-uploading-class-files-to-the-server","link":"#tips-for-uploading-class-files-to-the-server","children":[]},{"level":2,"title":"Restrictions of the redefine command","slug":"restrictions-of-the-redefine-command","link":"#restrictions-of-the-redefine-command","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/redefine.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/release-notes.html.5e40eac1.js b/3.x/assets/release-notes.html.5e40eac1.js new file mode 100644 index 00000000000..7ebd618f4a5 --- /dev/null +++ b/3.x/assets/release-notes.html.5e40eac1.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-e0bde47c","path":"/en/doc/release-notes.html","title":"Release Notes","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"v3.1.1","slug":"v3-1-1","link":"#v3-1-1","children":[]},{"level":2,"title":"v3.1.0","slug":"v3-1-0","link":"#v3-1-0","children":[]},{"level":2,"title":"v3.0.5","slug":"v3-0-5","link":"#v3-0-5","children":[]},{"level":2,"title":"v3.0.4","slug":"v3-0-4","link":"#v3-0-4","children":[]},{"level":2,"title":"v2017-11-03","slug":"v2017-11-03","link":"#v2017-11-03","children":[]},{"level":2,"title":"v2017-09-22","slug":"v2017-09-22","link":"#v2017-09-22","children":[]},{"level":2,"title":"v2017-09-11","slug":"v2017-09-11","link":"#v2017-09-11","children":[]},{"level":2,"title":"v2017-05-11","slug":"v2017-05-11","link":"#v2017-05-11","children":[]},{"level":2,"title":"v2017-05-12","slug":"v2017-05-12","link":"#v2017-05-12","children":[]},{"level":2,"title":"v2016-12-09","slug":"v2016-12-09","link":"#v2016-12-09","children":[]},{"level":2,"title":"v2016-06-07","slug":"v2016-06-07","link":"#v2016-06-07","children":[]},{"level":2,"title":"v2016-04-08","slug":"v2016-04-08","link":"#v2016-04-08","children":[]},{"level":2,"title":"v2016-03-07","slug":"v2016-03-07","link":"#v2016-03-07","children":[]},{"level":2,"title":"v2016-01-18","slug":"v2016-01-18","link":"#v2016-01-18","children":[]},{"level":2,"title":"v2016-01-08","slug":"v2016-01-08","link":"#v2016-01-08","children":[]},{"level":2,"title":"v2015-12-29","slug":"v2015-12-29","link":"#v2015-12-29","children":[]}],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/release-notes.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/release-notes.html.79040020.js b/3.x/assets/release-notes.html.79040020.js new file mode 100644 index 00000000000..f30f37ab362 --- /dev/null +++ b/3.x/assets/release-notes.html.79040020.js @@ -0,0 +1 @@ +import{_ as d,o as r,c,a as e,b as o,w as i,e as t,d as l,r as a}from"./app.4d248835.js";const h={},_=e("h1",{id:"release-notes",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#release-notes","aria-hidden":"true"},"#"),t(" Release Notes")],-1),u=e("h2",{id:"v3-1-1",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v3-1-1","aria-hidden":"true"},"#"),t(" v3.1.1")],-1),m={href:"https://github.com/alibaba/arthas/releases/tag/arthas-all-3.1.1",target:"_blank",rel:"noopener noreferrer"},f=t("https://github.com/alibaba/arthas/releases/tag/arthas-all-3.1.1"),g=e("h2",{id:"v3-1-0",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v3-1-0","aria-hidden":"true"},"#"),t(" v3.1.0")],-1),p={href:"https://github.com/alibaba/arthas/releases/tag/3.1.0",target:"_blank",rel:"noopener noreferrer"},b=t("https://github.com/alibaba/arthas/releases/tag/3.1.0"),v=e("h2",{id:"v3-0-5",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v3-0-5","aria-hidden":"true"},"#"),t(" v3.0.5")],-1),x={href:"https://github.com/alibaba/arthas/releases/tag/arthas-all-3.0.5",target:"_blank",rel:"noopener noreferrer"},k=t("https://github.com/alibaba/arthas/releases/tag/arthas-all-3.0.5"),w=e("h2",{id:"v3-0-4",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v3-0-4","aria-hidden":"true"},"#"),t(" v3.0.4")],-1),y={href:"https://github.com/alibaba/arthas/releases/tag/arthas-all-3.0.4",target:"_blank",rel:"noopener noreferrer"},N=t("https://github.com/alibaba/arthas/releases/tag/arthas-all-3.0.4"),A=e("h2",{id:"v2017-11-03",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v2017-11-03","aria-hidden":"true"},"#"),t(" v2017-11-03")],-1),j=t("[improvement] add "),L=e("code",null,"getstatic",-1),C=e("li",null,"[bug] fix Arthas class loader logs loading issues",-1),E=t("[improvement] introduce "),z={href:"https://en.wikipedia.org/wiki/OGNL",target:"_blank",rel:"noopener noreferrer"},B=t("OGNL"),O=t(" to customize "),q=e("code",null,"classloader",-1),D=t(" to invoke static methods"),G=l("
  • [improvement] optimise termd uppercase output performance
  • [improvement] classloader compile in class loader category by default
  • [bug] fix wc counting issue
  • [improvement] disable certain JDK classes e.g. Classloader, Method, Integer and the lik
  • ",4),I=t("[improvement] quit directly when encountering incorrect "),J={href:"https://en.wikipedia.org/wiki/OGNL",target:"_blank",rel:"noopener noreferrer"},P=t("OGNL"),V=t(" expression"),K=e("li",null,[t("[bug] fix "),e("code",null,"pipe"),t(" issues")],-1),R=e("li",null,"[improvement] optimize command re-direct features using asynchronous log",-1),U=t("[improvement] "),S=e("code",null,"trace",-1),T=t(" can filter JDK method calls"),X=e("h2",{id:"v2017-09-22",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v2017-09-22","aria-hidden":"true"},"#"),t(" v2017-09-22")],-1),M=e("ul",null,[e("li",null,"[improvement] improve the error message when starting agent and server fails"),e("li",null,"[bug] fix some asynchronous issues")],-1),F=e("h2",{id:"v2017-09-11",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v2017-09-11","aria-hidden":"true"},"#"),t(" v2017-09-11")],-1),H=t("[improvement] "),Q=e("code",null,"async",-1),W=t(" supported"),Y=t("[improvement] optimize "),Z=e("code",null,"jad",-1),$=t(" support JDK 8 and inner class"),ee=e("li",null,"[bug] fix Chinese encoding issues",-1),te=e("h2",{id:"v2017-05-11",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v2017-05-11","aria-hidden":"true"},"#"),t(" v2017-05-11")],-1),oe=t("[improvement] "),se=e("code",null,"tt",-1),ie=t(" investigating/recording level one to avoid too much performance overhead"),ne=e("li",null,"[bug] fix Chinese characters can not be presented issue",-1),le=e("h2",{id:"v2017-05-12",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v2017-05-12","aria-hidden":"true"},"#"),t(" v2017-05-12")],-1),ae=e("ul",null,[e("li",null,"Arthas 3.0 release \u{1F38A}")],-1),de=e("h2",{id:"v2016-12-09",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v2016-12-09","aria-hidden":"true"},"#"),t(" v2016-12-09")],-1),re=t("[feature] "),ce={href:"https://github.com/alibaba/arthas/blob/master/bin/as.sh",target:"_blank",rel:"noopener noreferrer"},he=e("code",null,"as.sh",-1),_e=t(" support "),ue=e("code",null,"-h",-1),me=t(" to print help info"),fe=e("li",null,"[bug] [#121] fix leftover temp files causing Arthas cannot start issue",-1),ge=e("li",null,[t("[bug] [#123] fix "),e("code",null,"attach/shutdown"),t(" repeatedly causing Arthas classloader leakage issue")],-1),pe=e("li",null,"[improvement] make the help info more readable",-1),be=e("li",null,"[bug] [#126] fix the documents links issues",-1),ve=t("[bug] [#122] fix the "),xe=e("code",null,"classloader",-1),ke=t(" filtering out "),we=e("code",null,"sun.reflect.DelegatingClassLoader",-1),ye=t(" issue"),Ne=t("[bug] [#129] fix "),Ae=e("code",null,"classloader",-1),je=t(" presenting structure issues"),Le=e("li",null,"[improvement] [#125] make the Arthas log output more readable",-1),Ce=t("[improvement] [#96] "),Ee=e("code",null,"sc",-1),ze=t(" and more commands are supporting format as "),Be=e("code",null,"com/taobao/xxx/TestClass",-1),Oe=t("[bug] [#124] fix the negative values of "),qe=e("code",null,"trace",-1),De=t("[improvement] [#128] the output of "),Ge=e("code",null,"tt",-1),Ie=t(" will auto-expand now"),Je=e("li",null,"[bug] [#130] providing more meaningful error messages when port conflicts",-1),Pe=e("li",null,"[bug] [#98] fix Arthas starting issue: when updating/downloading failed, Arthas will fail to start",-1),Ve=e("li",null,"[bug] [#139] fix agent attaching fails under some scenarios issues",-1),Ke=e("li",null,[t("[improvement] [#156] delay "),e("code",null,"jd-core-java"),t(" initialization to avoid Arthas starting failure")],-1),Re=e("li",null,"[bug] avoid thread names duplicate issue",-1),Ue=t("[improvement] [#150] filtering by total time cost in "),Se=e("code",null,"trace",-1),Te=t("[bug] fix "),Xe=e("code",null,"sc",-1),Me=t(),Fe=e("code",null,"NPE",-1),He=t(" issue when searching "),Qe=e("code",null,"SystemClassloader",-1),We=e("li",null,"[bug] [#180] fix attach fails issues: attaching succeed at the first time, delete the Arthas installer, re-compile and package => attaching fails",-1),Ye=l('

    v2016-06-07

    • [bug] fix NPE when loading spy as resource
    • [improvement] locating the blocking thread
    • [improvement] print out thread in name order
    • [improvement] specify the refreshing interval when checking topN busiest threads

    v2016-04-08

    ',3),Ze=t("[feature] specify refreshing interval and execution times in "),$e=e("code",null,"dashboard",-1),et=l("
  • [feature] log the command execution result
  • [feature] speed up the booting and attaching while the first attaching is even quicker by 100% than before
  • [feature] batch supported; script supported
  • [feature] interactive mode used in Arthas
  • [feature] inheritance relation included in class searching; global option disable-sub-class can be used to turn it off
  • [feature] colorful and plain text modes both supported
  • [improvement] merge exit and quit commands
  • [improvement] help info enclosed with wiki links
  • ",8),tt=t("[improvement] optimize "),ot=e("code",null,"watch",-1),st=t(" using flow for better UX"),it=t("[improvement] add examples to "),nt=e("code",null,"thread",-1),lt=e("li",null,"[improvement] auto-completion ignores character case",-1),at=e("li",null,"[improvement] make the UI more beautiful/friendly",-1),dt=t("[bug] fix "),rt=e("code",null,"trace",-1),ct=t(" printing too much encountering loop issues"),ht=t("[bug] fix "),_t=e("code",null,"trace",-1),ut=t(" node twisting issues when method throwing exceptions"),mt=e("li",null,[t("[bug] fix injected/enhanced "),e("code",null,"BootstrapClassLoader"),t(" cannot locate "),e("code",null,"spy"),t(" issues")],-1),ft=e("h2",{id:"v2016-03-07",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v2016-03-07","aria-hidden":"true"},"#"),t(" v2016-03-07")],-1),gt=e("li",null,"[feature] checking the topN thread and related stack traces",-1),pt=t("[bug] fix Arthas starting failure in OpenJdk issues (requiring to reinstall "),bt={href:"https://github.com/alibaba/arthas/blob/master/bin/as.sh",target:"_blank",rel:"noopener noreferrer"},vt=t("as.sh"),xt=t(")"),kt=e("li",null,"[improvement] optimize UX",-1),wt=e("h2",{id:"v2016-01-18",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v2016-01-18","aria-hidden":"true"},"#"),t(" v2016-01-18")],-1),yt=t("[improvement] optimise "),Nt=e("code",null,"jad",-1),At=t("; dump memory byte array in real time; using "),jt=e("code",null,"jd-core-java",-1),Lt=t(" to decompile; line number presented;"),Ct=t("[bug] fix checking/re-producing issues when "),Et=e("code",null,"tt",-1),zt=t(" is watching thread-context related methods invoking"),Bt=e("h2",{id:"v2016-01-08",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v2016-01-08","aria-hidden":"true"},"#"),t(" v2016-01-08")],-1),Ot=e("li",null,"[bug] jad NPE",-1),qt=e("li",null,"[bug] watch/monitor NPE",-1),Dt=e("li",null,"[bug] wrong escaping issues",-1),Gt=e("li",null,"[bug] wrong statistics",-1),It=t("[bug] "),Jt=e("code",null,"sc",-1),Pt=t(" checking internal structure issues"),Vt=e("h2",{id:"v2015-12-29",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#v2015-12-29","aria-hidden":"true"},"#"),t(" v2015-12-29")],-1),Kt=e("ul",null,[e("li",null,"Arthas 2.0 Beta \u{1F4A5}\uFF01")],-1);function Rt(Ut,St){const n=a("ExternalLinkIcon"),s=a("RouterLink");return r(),c("div",null,[_,u,e("ul",null,[e("li",null,[e("a",m,[f,o(n)])])]),g,e("ul",null,[e("li",null,[e("a",p,[b,o(n)])])]),v,e("ul",null,[e("li",null,[e("a",x,[k,o(n)])])]),w,e("ul",null,[e("li",null,[e("a",y,[N,o(n)])])]),A,e("ul",null,[e("li",null,[j,o(s,{to:"/en/doc/getstatic.html"},{default:i(()=>[L]),_:1})]),C,e("li",null,[E,e("a",z,[B,o(n)]),O,q,D]),G,e("li",null,[I,e("a",J,[P,o(n)]),V]),K,R,e("li",null,[U,o(s,{to:"/en/doc/trace.html"},{default:i(()=>[S]),_:1}),T])]),X,M,F,e("ul",null,[e("li",null,[H,o(s,{to:"/en/doc/async.html"},{default:i(()=>[Q]),_:1}),W]),e("li",null,[Y,o(s,{to:"/en/doc/jad.html"},{default:i(()=>[Z]),_:1}),$]),ee]),te,e("ul",null,[e("li",null,[oe,o(s,{to:"/en/doc/tt.html"},{default:i(()=>[se]),_:1}),ie]),ne]),le,ae,de,e("ul",null,[e("li",null,[re,e("a",ce,[he,o(n)]),_e,ue,me]),fe,ge,pe,be,e("li",null,[ve,o(s,{to:"/en/doc/classloader.html"},{default:i(()=>[xe]),_:1}),ke,we,ye]),e("li",null,[Ne,o(s,{to:"/en/doc/classloader.html"},{default:i(()=>[Ae]),_:1}),je]),Le,e("li",null,[Ce,o(s,{to:"/en/doc/sc.html"},{default:i(()=>[Ee]),_:1}),ze,Be]),e("li",null,[Oe,o(s,{to:"/en/doc/trace.html"},{default:i(()=>[qe]),_:1})]),e("li",null,[De,o(s,{to:"/en/doc/tt.html"},{default:i(()=>[Ge]),_:1}),Ie]),Je,Pe,Ve,Ke,Re,e("li",null,[Ue,o(s,{to:"/en/doc/trace.html"},{default:i(()=>[Se]),_:1})]),e("li",null,[Te,o(s,{to:"/en/doc/sc.html"},{default:i(()=>[Xe]),_:1}),Me,Fe,He,Qe]),We]),Ye,e("ul",null,[e("li",null,[Ze,o(s,{to:"/en/doc/dashboard.html"},{default:i(()=>[$e]),_:1})]),et,e("li",null,[tt,o(s,{to:"/en/doc/watch.html"},{default:i(()=>[ot]),_:1}),st]),e("li",null,[it,o(s,{to:"/en/doc/thread.html"},{default:i(()=>[nt]),_:1})]),lt,at,e("li",null,[dt,o(s,{to:"/en/doc/trace.html"},{default:i(()=>[rt]),_:1}),ct]),e("li",null,[ht,o(s,{to:"/en/doc/trace.html"},{default:i(()=>[_t]),_:1}),ut]),mt]),ft,e("ul",null,[gt,e("li",null,[pt,e("a",bt,[vt,o(n)]),xt]),kt]),wt,e("ul",null,[e("li",null,[yt,o(s,{to:"/en/doc/jad.html"},{default:i(()=>[Nt]),_:1}),At,jt,Lt]),e("li",null,[Ct,o(s,{to:"/en/doc/tt.html"},{default:i(()=>[Et]),_:1}),zt])]),Bt,e("ul",null,[Ot,qt,Dt,Gt,e("li",null,[It,o(s,{to:"/en/doc/sc.html"},{default:i(()=>[Jt]),_:1}),Pt])]),Vt,Kt])}const Xt=d(h,[["render",Rt],["__file","release-notes.html.vue"]]);export{Xt as default}; diff --git a/3.x/assets/release-notes.html.8810e03d.js b/3.x/assets/release-notes.html.8810e03d.js new file mode 100644 index 00000000000..8b7d9f3273d --- /dev/null +++ b/3.x/assets/release-notes.html.8810e03d.js @@ -0,0 +1 @@ +import{_ as h,o as d,c as o,a,b as e,w as n,e as l,d as r,r as t}from"./app.4d248835.js";const c={},u=a("h1",{id:"release-notes",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#release-notes","aria-hidden":"true"},"#"),l(" Release Notes")],-1),_=a("h2",{id:"v3-1-1",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#v3-1-1","aria-hidden":"true"},"#"),l(" v3.1.1")],-1),b={href:"https://github.com/alibaba/arthas/releases/tag/arthas-all-3.1.1",target:"_blank",rel:"noopener noreferrer"},v=l("https://github.com/alibaba/arthas/releases/tag/arthas-all-3.1.1"),f=a("h2",{id:"v3-1-0",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#v3-1-0","aria-hidden":"true"},"#"),l(" v3.1.0")],-1),p={href:"https://github.com/alibaba/arthas/releases/tag/3.1.0",target:"_blank",rel:"noopener noreferrer"},g=l("https://github.com/alibaba/arthas/releases/tag/3.1.0"),x=a("h2",{id:"v3-0-5",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#v3-0-5","aria-hidden":"true"},"#"),l(" v3.0.5")],-1),m={href:"https://github.com/alibaba/arthas/releases/tag/arthas-all-3.0.5",target:"_blank",rel:"noopener noreferrer"},N=l("https://github.com/alibaba/arthas/releases/tag/arthas-all-3.0.5"),k=a("h2",{id:"v3-0-4",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#v3-0-4","aria-hidden":"true"},"#"),l(" v3.0.4")],-1),j={href:"https://github.com/alibaba/arthas/releases/tag/arthas-all-3.0.4",target:"_blank",rel:"noopener noreferrer"},w=l("https://github.com/alibaba/arthas/releases/tag/arthas-all-3.0.4"),C=r('

    v2017-11-03

    • \u589E\u52A0 getstatic \u65B9\u6CD5\u83B7\u53D6\u9759\u6001\u53D8\u91CF
    • \u4FEE\u590D arthas classloader \u52A0\u8F7D\u5230\u5E94\u7528\u65E5\u5FD7\u7684\u95EE\u9898
    • \u589E\u52A0 ognl custom classloader \u4FBF\u4E8E\u8C03\u7528\u9759\u6001\u65B9\u6CD5
    • \u4F18\u5316 termd \u8F93\u51FA\u5927\u5B57\u7B26\u4E32\u7684\u6027\u80FD\u95EE\u9898
    • classloader \u547D\u4EE4\u9ED8\u8BA4\u6309\u7C7B\u52A0\u8F7D\u5668\u7C7B\u578B\u5206\u7C7B\u7F16\u8BD1
    • \u4FEE\u590D wc \u547D\u4EE4\u7EDF\u8BA1\u9519\u8BEF\u7684\u95EE\u9898
    • \u7981\u6B62\u589E\u5F3A\u7279\u5B9A JDK \u7C7B\uFF0C\u5982 Classloader, Method, Integer \u7B49
    • \u652F\u6301 OGNL \u8868\u8FBE\u5F0F\u51FA\u9519\u76F4\u63A5\u9000\u51FA\u547D\u4EE4
    • \u4FEE\u590D\u7BA1\u9053\u7C7B\u547D\u4EE4\u5355\u72EC\u51FA\u9519\u7684\u95EE\u9898
    • \u4F18\u5316\u547D\u4EE4\u91CD\u5B9A\u5411\u529F\u80FD\uFF0C\u4F7F\u7528\u5F02\u6B65\u65E5\u5FD7\u8F93\u51FA\u7ED3\u679C
    • trace \u547D\u4EE4\u589E\u52A0\u8FC7\u6EE4 jdk \u65B9\u6CD5\u8C03\u7528\u7684\u529F\u80FD

    v2017-09-22

    • \u4F18\u5316 agent server\b \u542F\u52A8\u65F6\u7684\u5F02\u5E38\u4FE1\u606F
    • \u4FEE\u590D\u5F02\u6B65\u547D\u4EE4\u7684\u4E00\u4E9B bug

    v2017-09-11

    ',5),E=l("\u652F\u6301"),L=l("\u5F02\u6B65\u540E\u540E\u547D\u4EE4"),y=a("li",null,"jad \u547D\u4EE4\u4F18\u5316\uFF0C\u652F\u6301 JDK8 \u53CA\u5185\u90E8\u7C7B",-1),A=a("li",null,"\u4FEE\u590D\u4E2D\u6587\u4E71\u7801\u95EE\u9898",-1),B=r('

    v2017-05-11

    • tt \u547D\u4EE4\u9ED8\u8BA4\u53EA\u5C55\u5F00 1 \u5C42\uFF0C\u9632\u6B62\u5BF9\u8C61\u8FC7\u5927\u9020\u6210\u5361\u987F
    • \u4FEE\u590D\u4E2D\u6587\u65E0\u6CD5\u5C55\u793A\u7684\u95EE\u9898

    v2017-05-12

    • Arthas 3.0 release

    v2016-12-09

    • as.sh \u652F\u6301-h \u8F93\u51FA\u5E2E\u52A9
    • [#121] \u4FEE\u590D\u6B8B\u7559\u7684\u4E34\u65F6\u6587\u4EF6\u5BFC\u81F4 arthas \u542F\u52A8\u5931\u8D25\u7684\u95EE\u9898
    • [#123] \u4FEE\u590D\u53CD\u590D attach/shutdown \u9020\u6210 classloader \u6CC4\u9732\u7684\u95EE\u9898
    • \u4F18\u5316\u547D\u4EE4\u4E2D\u7684\u5E2E\u52A9\u63D0\u793A\u4FE1\u606F
    • [#126] \u4FEE\u590D tm \u547D\u4EE4\u6587\u6863\u94FE\u63A5\u9519\u4E71\u7684\u95EE\u9898
    • [#122] classloader \u547D\u4EE4\u4E2D\u8FC7\u6EE4\u6389sun.reflect.DelegatingClassLoader
    • [#129] \u4FEE\u590D classloader \u5C42\u6B21\u5C55\u793A\u7684\u95EE\u9898
    • [#125] arthas \u8F93\u51FA\u7684 log \u4E0D\u4E3B\u52A8\u6362\u884C\uFF0C\u5BF9\u4E8E\u65E5\u5FD7\u89E3\u6790\u66F4\u52A0\u53CB\u597D
    • [#96] sc \u7B49\u547D\u4EE4\u652F\u6301 com/taobao/xxx/TestClass \u8FD9\u6837\u7684\u683C\u5F0F\uFF0C\u4EE5\u540E\u590D\u5236\u7C98\u8D34\u4E0D\u9700\u8981\u5728\u628A'/'\u66FF\u6362\u6210'.'\u5566
    • [#124] \u4FEE\u590D\u67D0\u4E9B\u60C5\u51B5\u4E0B trace \u7684\u65F6\u95F4\u4E3A\u8D1F\u503C\u7684\u95EE\u9898
    • [#128] tt \u547D\u4EE4\u7684\u7ED3\u679C\u9ED8\u8BA4\u81EA\u52A8\u5C55\u5F00\uFF0C\u4E0D\u9700\u8981\u518D\u589E\u52A0-x 2\u6765\u770B\u5230\u53C2\u6570\uFF0C\u5F02\u5E38\u7684\u8BE6\u7EC6\u4FE1\u606F\u4E86\u3002
    • [#130] \u4FEE\u590D\u5F53\u7AEF\u53E3\u51B2\u7A81\u65F6\uFF0C\u6CA1\u6709\u5F88\u597D\u5730\u6253\u5370\u9519\u8BEF\uFF0C\u800C\u662F\u8FDB\u5165\u4E86\u4E00\u4E2A\u51FA\u9519\u7684\u4EA4\u4E92\u754C\u9762\u7684\u95EE\u9898
    • [#98] \u4FEE\u590D Arthas \u542F\u52A8\u65F6\uFF0C\u5982\u679C\u4E0B\u8F7D\u66F4\u65B0\u5931\u8D25\uFF0C\u5BFC\u81F4\u542F\u52A8\u5931\u8D25\u7684\u95EE\u9898
    • [#139] \u4FEE\u590D\u67D0\u4E9B\u7279\u6B8A\u60C5\u51B5\u4E0B agent attach \u5931\u8D25\u7684\u95EE\u9898
    • [#156] jd-core-java \u5EF6\u8FDF\u521D\u59CB\u5316\uFF0C\u907F\u514D arthas \u542F\u52A8\u65F6\u51FA\u9519
    • \u4FEE\u590D\u7EBF\u7A0B\u540D\u91CD\u590D\u7684\u95EE\u9898
    • [#150] trace \u547D\u4EE4\u652F\u6301\u6309\u8FD0\u884C\u603B\u8017\u65F6\u8FC7\u6EE4
    • \u4FEE\u590D sc \u67E5\u627E SystemClassloader \u65F6\u53EF\u80FD\u51FA\u73B0\u7684 NPE
    • [#180] \u4FEE\u590D\u7B2C\u4E00\u6B21 Attach \u6210\u529F\u4E4B\u540E\uFF0C\u5220\u9664\u4E4B\u524D Arthas \u7684\u5B89\u88C5\u5305\uFF0C\u91CD\u65B0\u7F16\u8BD1\u6253\u5305\uFF0C\u518D\u6B21 attach \u5931\u8D25\u7684\u95EE\u9898

    v2016-06-07

    • \u4FEE\u590D\u4EE5\u8D44\u6E90\u65B9\u5F0F\u52A0\u8F7D spy \u7C7B\u65F6\u51FA\u73B0 NPE \u7684\u95EE\u9898
    • \u652F\u6301\u4E00\u952E\u627E\u51FA\u7EBF\u7A0B\u4E2D\u83B7\u5F97\u9501\u5E76\u963B\u585E\u4F4F\u5176\u4ED6\u7EBF\u7A0B\u7684\u7EBF\u7A0B
    • \u4F18\u5316 Thread \u8F93\u51FA\uFF0C\u6309\u7EBF\u7A0B\u540D\u6392\u5E8F
    • \u83B7\u53D6 topN \u5FD9\u7684\u7EBF\u7A0B\u65F6\uFF0C\u652F\u6301\u6307\u5B9A\u5237\u65B0\u95F4\u9694

    v2016-04-08

    • New feature\uFF1A

      • dashboard \u652F\u6301\u6307\u5B9A\u5237\u65B0\u9891\u7387\uFF0C\u652F\u6301\u6307\u5B9A\u6267\u884C\u6B21\u6570
      • \u547D\u4EE4\u6267\u884C\u7ED3\u679C\u4FDD\u5B58\u5230\u65E5\u5FD7\u6587\u4EF6\uFF0C\u65B9\u4FBF\u540E\u7EED\u67E5\u770B
      • \u542F\u52A8\u901F\u5EA6\u4F18\u5316\uFF0C\u7B2C\u4E00\u6B21 attach \u7684\u901F\u5EA6\u63D0\u5347\u4E00\u500D
      • \u652F\u6301\u6279\u5904\u7406\u529F\u80FD\uFF0C\u652F\u6301\u6267\u884C\u811A\u672C\u6587\u4EF6
      • \u4F18\u5316\u542F\u52A8\u903B\u8F91\uFF0Carthas \u811A\u672C\u542F\u52A8\u65F6\u4EA4\u4E92\u5F0F\u9009\u62E9\u8FDB\u7A0B
      • \u7C7B\u9ED8\u8BA4\u542F\u7528\u7EE7\u627F\u5173\u7CFB\u67E5\u8BE2\uFF0C\u67E5\u627E\u7C7B\u65F6\u9ED8\u8BA4\u4F1A\u67E5\u627E\u5B50\u7C7B\uFF0C\u5982\u679C\u9700\u8981\u5173\u95ED\uFF0C\u5219\u901A\u8FC7\u5168\u5C40\u5F00\u5173 Options disable-sub-class \u5173\u95ED
      • \u652F\u6301\u5728\u5F69\u8272\u6A21\u5F0F\u548C\u6587\u672C\u6A21\u5F0F\u4E2D\u5207\u6362
    • UI Improvement:

      • \u5408\u5E76 exit \u548C quit \u547D\u4EE4
      • \u547D\u4EE4\u5E2E\u52A9\u4FE1\u606F\u589E\u52A0 wiki \u94FE\u63A5
      • \u4F18\u5316 watch \u7684\u903B\u8F91\uFF0C\u66F4\u52A0\u7B26\u5408\u5927\u5BB6\u7684\u76F4\u89C9
      • thread \u547D\u4EE4\u589E\u52A0 example \u8BF4\u660E
      • \u81EA\u52A8\u8865\u5168\u7684\u65F6\u5019\uFF0C\u5FFD\u7565\u5927\u5C0F\u5199
    • Bugfix:

      • \u4FEE\u590D trace \u547D\u4EE4\u9047\u5230\u5FAA\u73AF\u9020\u6210\u8F93\u51FA\u592A\u957F
      • \u4FEE\u590D trace \u547D\u4EE4\u5728\u65B9\u6CD5\u8C03\u7528\u4E2D\u629B\u51FA\u4E86\u5F02\u5E38\uFF0C\u4F1A\u8BA9 trace \u7684\u8282\u70B9\u9519\u4F4D
      • \u4FEE\u6B63\u589E\u5F3A BootstrapClassLoader \u52A0\u8F7D\u7684\u7C7B\uFF0C\u627E\u4E0D\u5230 Spy \u7684\u95EE\u9898
      • \u4FEE\u590D\u67D0\u4E9B\u914D\u8272\u65B9\u6848\u4E0B\uFF0C\u7ED3\u679C\u663E\u793A\u4E0D\u53CB\u597D\u7684\u95EE\u9898

    v2016-03-07

    • \u652F\u6301\u4E00\u952E\u67E5\u770B\u5F53\u524D\u6700\u5FD9\u7684\u524D N \u4E2A\u7EBF\u7A0B\u53CA\u5176\u5806\u6808
    • \u4FEE\u590D openjdk \u4E0B\u542F\u52A8 arthas \u5931\u8D25\u7684\u95EE\u9898\uFF08\u9700\u8981\u91CD\u65B0\u5B89\u88C5 as.sh\uFF09
    • \u4E00\u4E9B\u4F53\u9A8C\u4F18\u5316

    v2016-01-18

    • \u4F18\u5316 jad\uFF0C\u5B9E\u65F6 dump \u5185\u5B58 byte array\uFF0C\u5E76\u4F7F\u7528 jd-core-java \u53CD\u7F16\u8BD1\uFF0C\u652F\u6301\u884C\u53F7\u663E\u793A
    • \u4FEE\u590D tt \u547D\u4EE4\u5728\u76D1\u63A7\u4E0E\u7EBF\u7A0B\u4E0A\u4E0B\u6587\u76F8\u5173\u7684\u65B9\u6CD5\u8C03\u7528\u65F6\uFF0C\u663E\u793A/\u91CD\u505A\u7B49\u573A\u666F\u4E0B\u7684 bug

    v2016-01-08

    • \u4FEE\u590D\u4E00\u4E9B bug
      • jad NPE
      • watch/monitor NPE
      • \u4E0D\u9700\u8981\u8F6C\u4E49
      • \u6570\u636E\u7EDF\u8BA1\u95EE\u9898\u4FEE\u590D
      • sc \u67E5\u770B\u9759\u6001\u53D8\u91CF\u5185\u90E8\u5C42\u6B21\u7ED3\u6784

    v2015-12-29

    • Arthas 2.0 \u6D4B\u8BD5\u7248\u672C\u53D1\u5E03\uFF01
    ',18);function I(P,V){const i=t("ExternalLinkIcon"),s=t("RouterLink");return d(),o("div",null,[u,_,a("ul",null,[a("li",null,[a("a",b,[v,e(i)])])]),f,a("ul",null,[a("li",null,[a("a",p,[g,e(i)])])]),x,a("ul",null,[a("li",null,[a("a",m,[N,e(i)])])]),k,a("ul",null,[a("li",null,[a("a",j,[w,e(i)])])]),C,a("ul",null,[a("li",null,[E,e(s,{to:"/doc/async.html"},{default:n(()=>[L]),_:1})]),y,A]),B])}const R=h(c,[["render",I],["__file","release-notes.html.vue"]]);export{R as default}; diff --git a/3.x/assets/release-notes.html.bd30f66e.js b/3.x/assets/release-notes.html.bd30f66e.js new file mode 100644 index 00000000000..9518af3f2bf --- /dev/null +++ b/3.x/assets/release-notes.html.bd30f66e.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-648880ae","path":"/doc/release-notes.html","title":"Release Notes","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"v3.1.1","slug":"v3-1-1","link":"#v3-1-1","children":[]},{"level":2,"title":"v3.1.0","slug":"v3-1-0","link":"#v3-1-0","children":[]},{"level":2,"title":"v3.0.5","slug":"v3-0-5","link":"#v3-0-5","children":[]},{"level":2,"title":"v3.0.4","slug":"v3-0-4","link":"#v3-0-4","children":[]},{"level":2,"title":"v2017-11-03","slug":"v2017-11-03","link":"#v2017-11-03","children":[]},{"level":2,"title":"v2017-09-22","slug":"v2017-09-22","link":"#v2017-09-22","children":[]},{"level":2,"title":"v2017-09-11","slug":"v2017-09-11","link":"#v2017-09-11","children":[]},{"level":2,"title":"v2017-05-11","slug":"v2017-05-11","link":"#v2017-05-11","children":[]},{"level":2,"title":"v2017-05-12","slug":"v2017-05-12","link":"#v2017-05-12","children":[]},{"level":2,"title":"v2016-12-09","slug":"v2016-12-09","link":"#v2016-12-09","children":[]},{"level":2,"title":"v2016-06-07","slug":"v2016-06-07","link":"#v2016-06-07","children":[]},{"level":2,"title":"v2016-04-08","slug":"v2016-04-08","link":"#v2016-04-08","children":[]},{"level":2,"title":"v2016-03-07","slug":"v2016-03-07","link":"#v2016-03-07","children":[]},{"level":2,"title":"v2016-01-18","slug":"v2016-01-18","link":"#v2016-01-18","children":[]},{"level":2,"title":"v2016-01-08","slug":"v2016-01-08","link":"#v2016-01-08","children":[]},{"level":2,"title":"v2015-12-29","slug":"v2015-12-29","link":"#v2015-12-29","children":[]}],"git":{"updatedTime":1658120060000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/release-notes.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/reset.html.613ce22c.js b/3.x/assets/reset.html.613ce22c.js new file mode 100644 index 00000000000..c7064bb8a51 --- /dev/null +++ b/3.x/assets/reset.html.613ce22c.js @@ -0,0 +1,36 @@ +import{_ as i,o as a,c as t,a as e,b as d,e as s,d as r,r as l}from"./app.4d248835.js";const c={},v=e("h1",{id:"reset",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#reset","aria-hidden":"true"},"#"),s(" reset")],-1),o={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-reset",target:"_blank",rel:"noopener noreferrer"},m=e("code",null,"reset",-1),u=s("\u5728\u7EBF\u6559\u7A0B"),h=r(`

    \u63D0\u793A

    \u91CD\u7F6E\u589E\u5F3A\u7C7B\uFF0C\u5C06\u88AB Arthas \u589E\u5F3A\u8FC7\u7684\u7C7B\u5168\u90E8\u8FD8\u539F\uFF0CArthas \u670D\u52A1\u7AEFstop\u65F6\u4F1A\u91CD\u7F6E\u6240\u6709\u589E\u5F3A\u8FC7\u7684\u7C7B

    \u4F7F\u7528\u53C2\u8003

    $ reset -h
    + USAGE:
    +   reset [-h] [-E] [class-pattern]
    +
    + SUMMARY:
    +   Reset all the enhanced classes
    +
    + EXAMPLES:
    +   reset
    +   reset *List
    +   reset -E .*List
    +
    + OPTIONS:
    + -h, --help                                                         this help
    + -E, --regex                                                        Enable regular expression to match (wildcard matching by default)
    + <class-pattern>                                                    Path and classname of Pattern Matching
    +

    \u8FD8\u539F\u6307\u5B9A\u7C7B

    $ trace Test test
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 57 ms.
    +\`---ts=2017-10-26 17:10:33;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    \`---[0.590102ms] Test:test()
    +
    +\`---ts=2017-10-26 17:10:34;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    \`---[0.068692ms] Test:test()
    +
    +$ reset Test
    +Affect(class-cnt:1 , method-cnt:0) cost in 11 ms.
    +

    \u8FD8\u539F\u6240\u6709\u7C7B

    $ trace Test test
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 15 ms.
    +\`---ts=2017-10-26 17:12:06;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    \`---[0.128518ms] Test:test()
    +
    +$ reset
    +Affect(class-cnt:1 , method-cnt:0) cost in 9 ms.
    +
    `,7);function b(p,_){const n=l("ExternalLinkIcon");return a(),t("div",null,[v,e("p",null,[e("a",o,[m,u,d(n)])]),h])}const x=i(c,[["render",b],["__file","reset.html.vue"]]);export{x as default}; diff --git a/3.x/assets/reset.html.6542e356.js b/3.x/assets/reset.html.6542e356.js new file mode 100644 index 00000000000..8a426318e9b --- /dev/null +++ b/3.x/assets/reset.html.6542e356.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-6735226e","path":"/en/doc/reset.html","title":"reset","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]},{"level":2,"title":"Reset specified class","slug":"reset-specified-class","link":"#reset-specified-class","children":[]},{"level":2,"title":"Reset all classes","slug":"reset-all-classes","link":"#reset-all-classes","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/reset.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/reset.html.b7ada98f.js b/3.x/assets/reset.html.b7ada98f.js new file mode 100644 index 00000000000..07cecf09e3a --- /dev/null +++ b/3.x/assets/reset.html.b7ada98f.js @@ -0,0 +1,36 @@ +import{_ as a,o as i,c as t,a as e,b as d,e as s,d as l,r}from"./app.4d248835.js";const c={},v=e("h1",{id:"reset",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#reset","aria-hidden":"true"},"#"),s(" reset")],-1),o={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-reset",target:"_blank",rel:"noopener noreferrer"},m=e("code",null,"reset",-1),u=s(" online tutorial"),h=l(`

    TIP

    Reset all classes that have been enhanced by Arthas. These enhanced classes will also be reset when Arthas server is stop.

    Usage

    $ reset -h
    + USAGE:
    +   reset [-h] [-E] [class-pattern]
    +
    + SUMMARY:
    +   Reset all the enhanced classes
    +
    + EXAMPLES:
    +   reset
    +   reset *List
    +   reset -E .*List
    +
    + OPTIONS:
    + -h, --help                                                         this help
    + -E, --regex                                                        Enable regular expression to match (wildcard matching by default)
    + <class-pattern>                                                    Path and classname of Pattern Matching
    +

    Reset specified class

    $ trace Test test
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 57 ms.
    +\`---ts=2017-10-26 17:10:33;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    \`---[0.590102ms] Test:test()
    +
    +\`---ts=2017-10-26 17:10:34;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    \`---[0.068692ms] Test:test()
    +
    +$ reset Test
    +Affect(class-cnt:1 , method-cnt:0) cost in 11 ms.
    +

    Reset all classes

    $ trace Test test
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 15 ms.
    +\`---ts=2017-10-26 17:12:06;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    \`---[0.128518ms] Test:test()
    +
    +$ reset
    +Affect(class-cnt:1 , method-cnt:0) cost in 9 ms.
    +
    `,7);function b(p,_){const n=r("ExternalLinkIcon");return i(),t("div",null,[v,e("p",null,[e("a",o,[m,u,d(n)])]),h])}const x=a(c,[["render",b],["__file","reset.html.vue"]]);export{x as default}; diff --git a/3.x/assets/reset.html.d6cfba7b.js b/3.x/assets/reset.html.d6cfba7b.js new file mode 100644 index 00000000000..551ed8e4a67 --- /dev/null +++ b/3.x/assets/reset.html.d6cfba7b.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-71f77d4c","path":"/doc/reset.html","title":"reset","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[]},{"level":2,"title":"\u8FD8\u539F\u6307\u5B9A\u7C7B","slug":"\u8FD8\u539F\u6307\u5B9A\u7C7B","link":"#\u8FD8\u539F\u6307\u5B9A\u7C7B","children":[]},{"level":2,"title":"\u8FD8\u539F\u6240\u6709\u7C7B","slug":"\u8FD8\u539F\u6240\u6709\u7C7B","link":"#\u8FD8\u539F\u6240\u6709\u7C7B","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/reset.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/retransform.html.509ca8a2.js b/3.x/assets/retransform.html.509ca8a2.js new file mode 100644 index 00000000000..5d8dd6f0a95 --- /dev/null +++ b/3.x/assets/retransform.html.509ca8a2.js @@ -0,0 +1,50 @@ +import{_ as t,o as r,c as l,a as s,b as e,e as n,d as o,r as c}from"./app.4d248835.js";const p={},i=s("h1",{id:"retransform",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#retransform","aria-hidden":"true"},"#"),n(" retransform")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=cn&id=command-mc-retransform",target:"_blank",rel:"noopener noreferrer"},d=s("code",null,"mc-retransform",-1),m=n("\u5728\u7EBF\u6559\u7A0B"),k=s("div",{class:"custom-container tip"},[s("p",{class:"custom-container-title"},"\u63D0\u793A"),s("p",null,[n("\u52A0\u8F7D\u5916\u90E8\u7684"),s("code",null,".class"),n("\u6587\u4EF6\uFF0Cretransform jvm \u5DF2\u52A0\u8F7D\u7684\u7C7B\u3002")])],-1),v=n("\u53C2\u8003\uFF1A"),h={href:"https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/Instrumentation.html#retransformClasses-java.lang.Class...-",target:"_blank",rel:"noopener noreferrer"},b=n("Instrumentation#retransformClasses"),f=o(`

    \u4F7F\u7528\u53C2\u8003

       retransform /tmp/Test.class
    +   retransform -l
    +   retransform -d 1                    # delete retransform entry
    +   retransform --deleteAll             # delete all retransform entries
    +   retransform --classPattern demo.*   # triger retransform classes
    +   retransform -c 327a647b /tmp/Test.class /tmp/Test\\$Inner.class
    +   retransform --classLoaderClass 'sun.misc.Launcher$AppClassLoader' /tmp/Test.class
    +

    retransform \u6307\u5B9A\u7684 .class \u6587\u4EF6

    $ retransform /tmp/MathGame.class
    +retransform success, size: 1, classes:
    +demo.MathGame
    +

    \u52A0\u8F7D\u6307\u5B9A\u7684 .class \u6587\u4EF6\uFF0C\u7136\u540E\u89E3\u6790\u51FA class name\uFF0C\u518D retransform jvm \u4E2D\u5DF2\u52A0\u8F7D\u7684\u5BF9\u5E94\u7684\u7C7B\u3002\u6BCF\u52A0\u8F7D\u4E00\u4E2A .class \u6587\u4EF6\uFF0C\u5219\u4F1A\u8BB0\u5F55\u4E00\u4E2A retransform entry.

    \u63D0\u793A

    \u5982\u679C\u591A\u6B21\u6267\u884C retransform \u52A0\u8F7D\u540C\u4E00\u4E2A class \u6587\u4EF6\uFF0C\u5219\u4F1A\u6709\u591A\u6761 retransform entry.

    \u67E5\u770B retransform entry

    $ retransform -l
    +Id              ClassName       TransformCount  LoaderHash      LoaderClassName
    +1               demo.MathGame   1               null            null
    +
    • TransformCount \u7EDF\u8BA1\u5728 ClassFileTransformer#transform \u51FD\u6570\u91CC\u5C1D\u8BD5\u8FD4\u56DE entry \u5BF9\u5E94\u7684 .class \u6587\u4EF6\u7684\u6B21\u6570\uFF0C\u4F46\u5E76\u4E0D\u8868\u660E transform \u4E00\u5B9A\u6210\u529F\u3002

    \u5220\u9664\u6307\u5B9A retransform entry

    \u9700\u8981\u6307\u5B9A id\uFF1A

    retransform -d 1
    +

    \u5220\u9664\u6240\u6709 retransform entry

    retransform --deleteAll
    +

    \u663E\u5F0F\u89E6\u53D1 retransform

    $ retransform --classPattern demo.MathGame
    +retransform success, size: 1, classes:
    +demo.MathGame
    +

    \u6CE8\u610F\uFF1A\u5BF9\u4E8E\u540C\u4E00\u4E2A\u7C7B\uFF0C\u5F53\u5B58\u5728\u591A\u4E2A retransform entry \u65F6\uFF0C\u5982\u679C\u663E\u5F0F\u89E6\u53D1 retransform \uFF0C\u5219\u6700\u540E\u6DFB\u52A0\u7684 entry \u751F\u6548(id \u6700\u5927\u7684)\u3002

    \u6D88\u9664 retransform \u7684\u5F71\u54CD

    \u5982\u679C\u5BF9\u67D0\u4E2A\u7C7B\u6267\u884C retransform \u4E4B\u540E\uFF0C\u60F3\u6D88\u9664\u5F71\u54CD\uFF0C\u5219\u9700\u8981\uFF1A

    • \u5220\u9664\u8FD9\u4E2A\u7C7B\u5BF9\u5E94\u7684 retransform entry
    • \u91CD\u65B0\u89E6\u53D1 retransform

    \u63D0\u793A

    \u5982\u679C\u4E0D\u6E05\u9664\u6389\u6240\u6709\u7684 retransform entry\uFF0C\u5E76\u91CD\u65B0\u89E6\u53D1 retransform \uFF0C\u5219 arthas stop \u65F6\uFF0Cretransform \u8FC7\u7684\u7C7B\u4ECD\u7136\u751F\u6548\u3002

    \u7ED3\u5408 jad/mc \u547D\u4EE4\u4F7F\u7528

    jad --source-only com.example.demo.arthas.user.UserController > /tmp/UserController.java
    +
    +mc /tmp/UserController.java -d /tmp
    +
    +retransform /tmp/com/example/demo/arthas/user/UserController.class
    +
    • jad \u547D\u4EE4\u53CD\u7F16\u8BD1\uFF0C\u7136\u540E\u53EF\u4EE5\u7528\u5176\u5B83\u7F16\u8BD1\u5668\uFF0C\u6BD4\u5982 vim \u6765\u4FEE\u6539\u6E90\u7801
    • mc \u547D\u4EE4\u6765\u5185\u5B58\u7F16\u8BD1\u4FEE\u6539\u8FC7\u7684\u4EE3\u7801
    • \u7528 retransform \u547D\u4EE4\u52A0\u8F7D\u65B0\u7684\u5B57\u8282\u7801

    \u4E0A\u4F20 .class \u6587\u4EF6\u5230\u670D\u52A1\u5668\u7684\u6280\u5DE7

    \u4F7F\u7528mc\u547D\u4EE4\u6765\u7F16\u8BD1jad\u7684\u53CD\u7F16\u8BD1\u7684\u4EE3\u7801\u6709\u53EF\u80FD\u5931\u8D25\u3002\u53EF\u4EE5\u5728\u672C\u5730\u4FEE\u6539\u4EE3\u7801\uFF0C\u7F16\u8BD1\u597D\u540E\u518D\u4E0A\u4F20\u5230\u670D\u52A1\u5668\u4E0A\u3002\u6709\u7684\u670D\u52A1\u5668\u4E0D\u5141\u8BB8\u76F4\u63A5\u4E0A\u4F20\u6587\u4EF6\uFF0C\u53EF\u4EE5\u4F7F\u7528base64\u547D\u4EE4\u6765\u7ED5\u8FC7\u3002

    1. \u5728\u672C\u5730\u5148\u8F6C\u6362.class\u6587\u4EF6\u4E3A base64\uFF0C\u518D\u4FDD\u5B58\u4E3A result.txt

      base64 < Test.class > result.txt
      +
    2. \u5230\u670D\u52A1\u5668\u4E0A\uFF0C\u65B0\u5EFA\u5E76\u7F16\u8F91result.txt\uFF0C\u590D\u5236\u672C\u5730\u7684\u5185\u5BB9\uFF0C\u7C98\u8D34\u518D\u4FDD\u5B58

    3. \u628A\u670D\u52A1\u5668\u4E0A\u7684 result.txt\u8FD8\u539F\u4E3A.class

      base64 -d < result.txt > Test.class
      +
    4. \u7528 md5 \u547D\u4EE4\u8BA1\u7B97\u54C8\u5E0C\u503C\uFF0C\u6821\u9A8C\u662F\u5426\u4E00\u81F4

    retransform \u7684\u9650\u5236

    • \u4E0D\u5141\u8BB8\u65B0\u589E\u52A0 field/method
    • \u6B63\u5728\u8DD1\u7684\u51FD\u6570\uFF0C\u6CA1\u6709\u9000\u51FA\u4E0D\u80FD\u751F\u6548\uFF0C\u6BD4\u5982\u4E0B\u9762\u65B0\u589E\u52A0\u7684System.out.println\uFF0C\u53EA\u6709run()\u51FD\u6570\u91CC\u7684\u4F1A\u751F\u6548
    public class MathGame {
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        while (true) {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1);
    +            // \u8FD9\u4E2A\u4E0D\u751F\u6548\uFF0C\u56E0\u4E3A\u4EE3\u7801\u4E00\u76F4\u8DD1\u5728 while\u91CC
    +            System.out.println("in loop");
    +        }
    +    }
    +
    +    public void run() throws InterruptedException {
    +        // \u8FD9\u4E2A\u751F\u6548\uFF0C\u56E0\u4E3Arun()\u51FD\u6570\u6BCF\u6B21\u90FD\u53EF\u4EE5\u5B8C\u6574\u7ED3\u675F
    +        System.out.println("call run()");
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = primeFactors(number);
    +            print(number, primeFactors);
    +
    +        } catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +}
    +
    `,30);function g(x,y){const a=c("ExternalLinkIcon");return r(),l("div",null,[i,s("p",null,[s("a",u,[d,m,e(a)])]),k,s("p",null,[v,s("a",h,[b,e(a)])]),f])}const w=t(p,[["render",g],["__file","retransform.html.vue"]]);export{w as default}; diff --git a/3.x/assets/retransform.html.590b7b85.js b/3.x/assets/retransform.html.590b7b85.js new file mode 100644 index 00000000000..d392cd64706 --- /dev/null +++ b/3.x/assets/retransform.html.590b7b85.js @@ -0,0 +1,50 @@ +import{_ as t,o,c as r,a as s,b as e,e as n,d as l,r as i}from"./app.4d248835.js";const c={},p=s("h1",{id:"retransform",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#retransform","aria-hidden":"true"},"#"),n(" retransform")],-1),d={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=en&id=command-mc-retransform",target:"_blank",rel:"noopener noreferrer"},u=s("code",null,"mc-retransform",-1),m=n(" online tutorial"),h=s("div",{class:"custom-container tip"},[s("p",{class:"custom-container-title"},"TIP"),s("p",null,[n("Load the external "),s("code",null,"*.class"),n(" files to retransform the loaded classes in JVM.")])],-1),v=n("Reference: "),k={href:"https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/Instrumentation.html#retransformClasses-java.lang.Class...-",target:"_blank",rel:"noopener noreferrer"},f=n("Instrumentation#retransformClasses"),b=l(`

    Usage

       retransform /tmp/Test.class
    +   retransform -l
    +   retransform -d 1                    # delete retransform entry
    +   retransform --deleteAll             # delete all retransform entries
    +   retransform --classPattern demo.*   # triger retransform classes
    +   retransform -c 327a647b /tmp/Test.class /tmp/Test\\$Inner.class
    +   retransform --classLoaderClass 'sun.misc.Launcher$AppClassLoader' /tmp/Test.class
    +

    retransform the specified .class file

    $ retransform /tmp/MathGame.class
    +retransform success, size: 1, classes:
    +demo.MathGame
    +

    Load the specified .class file, then parse out the class name, and then retransform the corresponding class loaded in the jvm. Every time a .class file is loaded, a retransform entry is recorded.

    TIP

    If retransform is executed multiple times to load the same class file, there will be multiple retransform entries.

    View retransform entry

    $ retransform -l
    +Id              ClassName       TransformCount  LoaderHash      LoaderClassName
    +1               demo.MathGame   1               null            null
    +
    • TransformCount counts the times of attempts to return the .class file corresponding to the entry in the ClassFileTransformer#transform method, but it does not mean that the transform must be successful.

    Delete the specified retransform entry

    Need to specify id:

    retransform -d 1
    +

    Delete all retransform entries

    retransform --deleteAll
    +

    Explicitly trigger retransform

    $ retransform --classPattern demo.MathGame
    +retransform success, size: 1, classes:
    +demo.MathGame
    +

    WARNING

    Note: For the same class, when there are multiple retransform entries, if retransform is explicitly triggered, the entry added last will take effect (the one with the largest id).

    Eliminate the influence of retransform

    If you want to eliminate the impact after performing retransform on a class, you need to:

    • Delete the retransform entry corresponding to this class
    • Re-trigger retransform

    TIP

    If you do not clear all retransform entries and trigger retransform again, the retransformed classes will still take effect when arthas stop.

    Use with the jad/mc command

    jad --source-only com.example.demo.arthas.user.UserController > /tmp/UserController.java
    +
    +mc /tmp/UserController.java -d /tmp
    +
    +retransform /tmp/com/example/demo/arthas/user/UserController.class
    +
    • Use jad command to decompile bytecode, and then you can use other editors, such as vim to modify the source code.
    • mc command to compile the modified code
    • Load new bytecode with retransform command

    Tips for uploading .class files to the server

    The mc command may fail. You can modify the code locally, compile it, and upload it to the server. Some servers do not allow direct uploading files, you can use the base64 command to bypass.

    1. Convert the .class file to base64 first, then save it as result.txt

      Base64 < Test.class > result.txt
      +
    2. Login the server, create and edit result.txt, copy the local content, paste and save

    3. Restore result.txt on the server to .class

      Base64 -d < result.txt > Test.class
      +
    4. Use the md5 command to verify that the .class files are consistent.

    Restrictions of the retransform command

    • New field/method is not allowed
    • The function that is running, no exit can not take effect, such as the new System.out.println added below, only the run() function will take effect.
    public class MathGame {
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        while (true) {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1);
    +            // This doesn't work because the code keeps running in while
    +            System.out.println("in loop");
    +        }
    +    }
    +
    +    public void run() throws InterruptedException {
    +        // This works because the run() function ends completely every time
    +        System.out.println("call run()");
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = primeFactors(number);
    +            print(number, primeFactors);
    +
    +        } catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +}
    +
    `,30);function g(y,x){const a=i("ExternalLinkIcon");return o(),r("div",null,[p,s("p",null,[s("a",d,[u,m,e(a)])]),h,s("p",null,[v,s("a",k,[f,e(a)])]),b])}const _=t(c,[["render",g],["__file","retransform.html.vue"]]);export{_ as default}; diff --git a/3.x/assets/retransform.html.8eba17c2.js b/3.x/assets/retransform.html.8eba17c2.js new file mode 100644 index 00000000000..1f4ffb6964e --- /dev/null +++ b/3.x/assets/retransform.html.8eba17c2.js @@ -0,0 +1 @@ +const r=JSON.parse('{"key":"v-54cde250","path":"/doc/retransform.html","title":"retransform","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[]},{"level":2,"title":"retransform \u6307\u5B9A\u7684 .class \u6587\u4EF6","slug":"retransform-\u6307\u5B9A\u7684-class-\u6587\u4EF6","link":"#retransform-\u6307\u5B9A\u7684-class-\u6587\u4EF6","children":[]},{"level":2,"title":"\u67E5\u770B retransform entry","slug":"\u67E5\u770B-retransform-entry","link":"#\u67E5\u770B-retransform-entry","children":[]},{"level":2,"title":"\u5220\u9664\u6307\u5B9A retransform entry","slug":"\u5220\u9664\u6307\u5B9A-retransform-entry","link":"#\u5220\u9664\u6307\u5B9A-retransform-entry","children":[]},{"level":2,"title":"\u5220\u9664\u6240\u6709 retransform entry","slug":"\u5220\u9664\u6240\u6709-retransform-entry","link":"#\u5220\u9664\u6240\u6709-retransform-entry","children":[]},{"level":2,"title":"\u663E\u5F0F\u89E6\u53D1 retransform","slug":"\u663E\u5F0F\u89E6\u53D1-retransform","link":"#\u663E\u5F0F\u89E6\u53D1-retransform","children":[]},{"level":2,"title":"\u6D88\u9664 retransform \u7684\u5F71\u54CD","slug":"\u6D88\u9664-retransform-\u7684\u5F71\u54CD","link":"#\u6D88\u9664-retransform-\u7684\u5F71\u54CD","children":[]},{"level":2,"title":"\u7ED3\u5408 jad/mc \u547D\u4EE4\u4F7F\u7528","slug":"\u7ED3\u5408-jad-mc-\u547D\u4EE4\u4F7F\u7528","link":"#\u7ED3\u5408-jad-mc-\u547D\u4EE4\u4F7F\u7528","children":[]},{"level":2,"title":"\u4E0A\u4F20 .class \u6587\u4EF6\u5230\u670D\u52A1\u5668\u7684\u6280\u5DE7","slug":"\u4E0A\u4F20-class-\u6587\u4EF6\u5230\u670D\u52A1\u5668\u7684\u6280\u5DE7","link":"#\u4E0A\u4F20-class-\u6587\u4EF6\u5230\u670D\u52A1\u5668\u7684\u6280\u5DE7","children":[]},{"level":2,"title":"retransform \u7684\u9650\u5236","slug":"retransform-\u7684\u9650\u5236","link":"#retransform-\u7684\u9650\u5236","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/retransform.md","version":"3.7.3"}');export{r as data}; diff --git a/3.x/assets/retransform.html.c9177e92.js b/3.x/assets/retransform.html.c9177e92.js new file mode 100644 index 00000000000..6d3ebcc3362 --- /dev/null +++ b/3.x/assets/retransform.html.c9177e92.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-e5e2b738","path":"/en/doc/retransform.html","title":"retransform","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]},{"level":2,"title":"retransform the specified .class file","slug":"retransform-the-specified-class-file","link":"#retransform-the-specified-class-file","children":[]},{"level":2,"title":"View retransform entry","slug":"view-retransform-entry","link":"#view-retransform-entry","children":[]},{"level":2,"title":"Delete the specified retransform entry","slug":"delete-the-specified-retransform-entry","link":"#delete-the-specified-retransform-entry","children":[]},{"level":2,"title":"Delete all retransform entries","slug":"delete-all-retransform-entries","link":"#delete-all-retransform-entries","children":[]},{"level":2,"title":"Explicitly trigger retransform","slug":"explicitly-trigger-retransform","link":"#explicitly-trigger-retransform","children":[]},{"level":2,"title":"Eliminate the influence of retransform","slug":"eliminate-the-influence-of-retransform","link":"#eliminate-the-influence-of-retransform","children":[]},{"level":2,"title":"Use with the jad/mc command","slug":"use-with-the-jad-mc-command","link":"#use-with-the-jad-mc-command","children":[]},{"level":2,"title":"Tips for uploading .class files to the server","slug":"tips-for-uploading-class-files-to-the-server","link":"#tips-for-uploading-class-files-to-the-server","children":[]},{"level":2,"title":"Restrictions of the retransform command","slug":"restrictions-of-the-retransform-command","link":"#restrictions-of-the-retransform-command","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/retransform.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/save-log.html.1848baa1.js b/3.x/assets/save-log.html.1848baa1.js new file mode 100644 index 00000000000..584540156c2 --- /dev/null +++ b/3.x/assets/save-log.html.1848baa1.js @@ -0,0 +1 @@ +const a=JSON.parse('{"key":"v-8e632816","path":"/doc/save-log.html","title":"\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528 Arthas \u7684\u5F02\u6B65\u540E\u53F0\u4EFB\u52A1\u5C06\u7ED3\u679C\u5B58\u65E5\u5FD7\u6587\u4EF6","slug":"\u4F7F\u7528-arthas-\u7684\u5F02\u6B65\u540E\u53F0\u4EFB\u52A1\u5C06\u7ED3\u679C\u5B58\u65E5\u5FD7\u6587\u4EF6","link":"#\u4F7F\u7528-arthas-\u7684\u5F02\u6B65\u540E\u53F0\u4EFB\u52A1\u5C06\u7ED3\u679C\u5B58\u65E5\u5FD7\u6587\u4EF6","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":2},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1}]},"filePathRelative":"doc/save-log.md","version":"3.7.3"}');export{a as data}; diff --git a/3.x/assets/save-log.html.59e37d28.js b/3.x/assets/save-log.html.59e37d28.js new file mode 100644 index 00000000000..2c24a27aa66 --- /dev/null +++ b/3.x/assets/save-log.html.59e37d28.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-50ef0261","path":"/en/doc/save-log.html","title":"Log command outputs","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Use asynchronous job to log","slug":"use-asynchronous-job-to-log","link":"#use-asynchronous-job-to-log","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":2},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1}]},"filePathRelative":"en/doc/save-log.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/save-log.html.6fa77f22.js b/3.x/assets/save-log.html.6fa77f22.js new file mode 100644 index 00000000000..29f09147aa5 --- /dev/null +++ b/3.x/assets/save-log.html.6fa77f22.js @@ -0,0 +1,6 @@ +import{_ as c,o as l,c as r,a as e,b as a,w as i,e as s,d,r as n}from"./app.4d248835.js";const u={},p=e("h1",{id:"\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7","aria-hidden":"true"},"#"),s(" \u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=save-log",target:"_blank",rel:"noopener noreferrer"},_=e("code",null,"\u6267\u884C\u7ED3\u679C\u5B58\u65E5\u5FD7",-1),m=s("\u5728\u7EBF\u6559\u7A0B"),v=d(`

    \u63D0\u793A

    \u5C06\u547D\u4EE4\u7684\u7ED3\u679C\u5B8C\u6574\u4FDD\u5B58\u5728\u65E5\u5FD7\u6587\u4EF6\u4E2D\uFF0C\u4FBF\u4E8E\u540E\u7EED\u8FDB\u884C\u5206\u6790

    • \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u8BE5\u529F\u80FD\u662F\u5173\u95ED\u7684\uFF0C\u5982\u679C\u9700\u8981\u5F00\u542F\uFF0C\u8BF7\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\uFF1A
    $ options save-result true
    + NAME         BEFORE-VALUE  AFTER-VALUE
    +----------------------------------------
    + save-result  false         true
    +Affect(row-cnt:1) cost in 3 ms.
    +

    \u770B\u5230\u4E0A\u9762\u7684\u8F93\u51FA\uFF0C\u5373\u8868\u793A\u6210\u529F\u5F00\u542F\u8BE5\u529F\u80FD\uFF1B

    • \u65E5\u5FD7\u6587\u4EF6\u8DEF\u5F84

    \u7ED3\u679C\u4F1A\u5F02\u6B65\u4FDD\u5B58\u5728\uFF1A{user.home}/logs/arthas-cache/result.log\uFF0C\u8BF7\u5B9A\u671F\u8FDB\u884C\u6E05\u7406\uFF0C\u4EE5\u514D\u5360\u636E\u78C1\u76D8\u7A7A\u95F4

    \u4F7F\u7528 Arthas \u7684\u5F02\u6B65\u540E\u53F0\u4EFB\u52A1\u5C06\u7ED3\u679C\u5B58\u65E5\u5FD7\u6587\u4EF6

    `,7),b=s("\u53C2\u8003\uFF1A"),f=s("async");function k(g,x){const t=n("ExternalLinkIcon"),o=n("RouterLink");return l(),r("div",null,[p,e("p",null,[e("a",h,[_,m,a(t)])]),v,e("p",null,[b,a(o,{to:"/doc/async.html"},{default:i(()=>[f]),_:1})])])}const L=c(u,[["render",k],["__file","save-log.html.vue"]]);export{L as default}; diff --git a/3.x/assets/save-log.html.aede14f6.js b/3.x/assets/save-log.html.aede14f6.js new file mode 100644 index 00000000000..4bc31aa83a3 --- /dev/null +++ b/3.x/assets/save-log.html.aede14f6.js @@ -0,0 +1,6 @@ +import{_ as l,o as c,c as i,a as e,b as n,w as r,e as s,d as u,r as o}from"./app.4d248835.js";const d={},p=e("h1",{id:"log-command-outputs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#log-command-outputs","aria-hidden":"true"},"#"),s(" Log command outputs")],-1),h={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=save-log",target:"_blank",rel:"noopener noreferrer"},m=e("code",null,"Log command outputs",-1),_=s(" online tutorial"),v=u(`

    TIP

    Log command outputs for later analysis

    • By default, this behavior is turned off. To enable it, execute the command below:

      $ options save-result true
      + NAME         BEFORE-VALUE  AFTER-VALUE
      +----------------------------------------
      +save-result  false         true
      +Affect(row-cnt:1) cost in 3 ms.
      +

      If the message above is output on the console, then this behavior is enabled successfully.

    • Log file path

      The command execution result will be save in {user.home}/logs/arthas-cache/result.log. Pls. clean it up regularly to save disk space.

    Use asynchronous job to log

    `,3),b=s("Reference: "),f=s("async");function g(k,x){const a=o("ExternalLinkIcon"),t=o("RouterLink");return c(),i("div",null,[p,e("p",null,[e("a",h,[m,_,n(a)])]),v,e("p",null,[b,n(t,{to:"/en/doc/async.html"},{default:r(()=>[f]),_:1})])])}const L=l(d,[["render",g],["__file","save-log.html.vue"]]);export{L as default}; diff --git a/3.x/assets/sc.html.09e2c24b.js b/3.x/assets/sc.html.09e2c24b.js new file mode 100644 index 00000000000..e5458ae3d1e --- /dev/null +++ b/3.x/assets/sc.html.09e2c24b.js @@ -0,0 +1,65 @@ +import{_ as n,o as l,c as i,a as s,b as t,e,d,r as c}from"./app.4d248835.js";const o={},r=s("h1",{id:"sc",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#sc","aria-hidden":"true"},"#"),e(" sc")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=cn&id=command-sc",target:"_blank",rel:"noopener noreferrer"},v=s("code",null,"sc",-1),p=e("\u5728\u7EBF\u6559\u7A0B"),u=d(`

    \u63D0\u793A

    \u67E5\u770B JVM \u5DF2\u52A0\u8F7D\u7684\u7C7B\u4FE1\u606F

    \u201CSearch-Class\u201D \u7684\u7B80\u5199\uFF0C\u8FD9\u4E2A\u547D\u4EE4\u80FD\u641C\u7D22\u51FA\u6240\u6709\u5DF2\u7ECF\u52A0\u8F7D\u5230 JVM \u4E2D\u7684 Class \u4FE1\u606F\uFF0C\u8FD9\u4E2A\u547D\u4EE4\u652F\u6301\u7684\u53C2\u6570\u6709 [d]\u3001[E]\u3001[f] \u548C [x:]\u3002

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    class-pattern\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    method-pattern\u65B9\u6CD5\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    [d]\u8F93\u51FA\u5F53\u524D\u7C7B\u7684\u8BE6\u7EC6\u4FE1\u606F\uFF0C\u5305\u62EC\u8FD9\u4E2A\u7C7B\u6240\u52A0\u8F7D\u7684\u539F\u59CB\u6587\u4EF6\u6765\u6E90\u3001\u7C7B\u7684\u58F0\u660E\u3001\u52A0\u8F7D\u7684 ClassLoader \u7B49\u8BE6\u7EC6\u4FE1\u606F\u3002
    \u5982\u679C\u4E00\u4E2A\u7C7B\u88AB\u591A\u4E2A ClassLoader \u6240\u52A0\u8F7D\uFF0C\u5219\u4F1A\u51FA\u73B0\u591A\u6B21
    [E]\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D
    [f]\u8F93\u51FA\u5F53\u524D\u7C7B\u7684\u6210\u5458\u53D8\u91CF\u4FE1\u606F\uFF08\u9700\u8981\u914D\u5408\u53C2\u6570-d \u4E00\u8D77\u4F7F\u7528\uFF09
    [x:]\u6307\u5B9A\u8F93\u51FA\u9759\u6001\u53D8\u91CF\u65F6\u5C5E\u6027\u7684\u904D\u5386\u6DF1\u5EA6\uFF0C\u9ED8\u8BA4\u4E3A 0\uFF0C\u5373\u76F4\u63A5\u4F7F\u7528 toString \u8F93\u51FA
    [c:]\u6307\u5B9A class \u7684 ClassLoader \u7684 hashcode
    [classLoaderClass:]\u6307\u5B9A\u6267\u884C\u8868\u8FBE\u5F0F\u7684 ClassLoader \u7684 class name
    [n:]\u5177\u6709\u8BE6\u7EC6\u4FE1\u606F\u7684\u5339\u914D\u7C7B\u7684\u6700\u5927\u6570\u91CF\uFF08\u9ED8\u8BA4\u4E3A 100\uFF09
    [cs <arg>]\u6307\u5B9A class \u7684 ClassLoader#toString() \u8FD4\u56DE\u503C\u3002\u957F\u683C\u5F0F[classLoaderStr <arg>]

    \u63D0\u793A

    class-pattern \u652F\u6301\u5168\u9650\u5B9A\u540D\uFF0C\u5982 com.taobao.test.AAA\uFF0C\u4E5F\u652F\u6301 com/taobao/test/AAA \u8FD9\u6837\u7684\u683C\u5F0F\uFF0C\u8FD9\u6837\uFF0C\u6211\u4EEC\u4ECE\u5F02\u5E38\u5806\u6808\u91CC\u9762\u628A\u7C7B\u540D\u62F7\u8D1D\u8FC7\u6765\u7684\u65F6\u5019\uFF0C\u4E0D\u9700\u8981\u5728\u624B\u52A8\u628A/\u66FF\u6362\u4E3A.\u5566\u3002

    \u63D0\u793A

    sc \u9ED8\u8BA4\u5F00\u542F\u4E86\u5B50\u7C7B\u5339\u914D\u529F\u80FD\uFF0C\u4E5F\u5C31\u662F\u8BF4\u6240\u6709\u5F53\u524D\u7C7B\u7684\u5B50\u7C7B\u4E5F\u4F1A\u88AB\u641C\u7D22\u51FA\u6765\uFF0C\u60F3\u8981\u7CBE\u786E\u7684\u5339\u914D\uFF0C\u8BF7\u6253\u5F00options disable-sub-class true\u5F00\u5173

    \u4F7F\u7528\u53C2\u8003

    • \u6A21\u7CCA\u641C\u7D22

      $ sc demo.*
      +demo.MathGame
      +Affect(row-cnt:1) cost in 55 ms.
      +
    • \u6253\u5370\u7C7B\u7684\u8BE6\u7EC6\u4FE1\u606F

      $ sc -d demo.MathGame
      +class-info        demo.MathGame
      +code-source       /private/tmp/math-game.jar
      +name              demo.MathGame
      +isInterface       false
      +isAnnotation      false
      +isEnum            false
      +isAnonymousClass  false
      +isArray           false
      +isLocalClass      false
      +isMemberClass     false
      +isPrimitive       false
      +isSynthetic       false
      +simple-name       MathGame
      +modifier          public
      +annotation
      +interfaces
      +super-class       +-java.lang.Object
      +class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
      +                    +-sun.misc.Launcher$ExtClassLoader@66350f69
      +classLoaderHash   3d4eac69
      +
      +Affect(row-cnt:1) cost in 875 ms.
      +
    • \u6253\u5370\u51FA\u7C7B\u7684 Field \u4FE1\u606F

      $ sc -d -f demo.MathGame
      +class-info        demo.MathGame
      +code-source       /private/tmp/math-game.jar
      +name              demo.MathGame
      +isInterface       false
      +isAnnotation      false
      +isEnum            false
      +isAnonymousClass  false
      +isArray           false
      +isLocalClass      false
      +isMemberClass     false
      +isPrimitive       false
      +isSynthetic       false
      +simple-name       MathGame
      +modifier          public
      +annotation
      +interfaces
      +super-class       +-java.lang.Object
      +class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
      +                    +-sun.misc.Launcher$ExtClassLoader@66350f69
      +classLoaderHash   3d4eac69
      +fields            modifierprivate,static
      +                  type    java.util.Random
      +                  name    random
      +                  value   java.util.Random@522b4
      +                          08a
      +
      +                  modifierprivate
      +                  type    int
      +                  name    illegalArgumentCount
      +
      +
      +Affect(row-cnt:1) cost in 19 ms.
      +
    • \u901A\u8FC7 ClassLoader#toString \u67E5\u627E\u7C7B\uFF08\u524D\u63D0\uFF1A\u6709\u4E00\u4E2A toString()\u8FD4\u56DE\u503C\u662Fapo\u7684\u7C7B\u52A0\u8F7D\u5668\uFF0C\u52A0\u8F7D\u7684\u7C7B\u4E2D\u5305\u542Bdemo.MathGame, demo.MyBar, demo.MyFoo3 \u4E2A\u7C7B\uFF09

      $ sc -cs apo *demo*
      +demo.MathGame
      +demo.MyBar
      +demo.MyFoo
      +Affect(row-cnt:3) cost in 56 ms.
      +
    `,8);function b(h,g){const a=c("ExternalLinkIcon");return l(),i("div",null,[r,s("p",null,[s("a",m,[v,p,t(a)])]),u])}const k=n(o,[["render",b],["__file","sc.html.vue"]]);export{k as default}; diff --git a/3.x/assets/sc.html.4231ef3b.js b/3.x/assets/sc.html.4231ef3b.js new file mode 100644 index 00000000000..11bb13d1f48 --- /dev/null +++ b/3.x/assets/sc.html.4231ef3b.js @@ -0,0 +1,65 @@ +import{_ as n,o as t,c as i,a as e,b as l,e as s,d,r as c}from"./app.4d248835.js";const o={},r=e("h1",{id:"sc",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#sc","aria-hidden":"true"},"#"),s(" sc")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=en&id=command-sc",target:"_blank",rel:"noopener noreferrer"},p=e("code",null,"sc",-1),u=s(" online tutorial"),v=d(`

    TIP

    Search classes loaded by JVM.

    sc stands for search class. This command can search all possible classes loaded by JVM and show their information. The supported options are: [d]\u3001[E]\u3001[f] and [x:].

    Supported Options

    NameSpecification
    class-patternpattern for the class name
    method-patternpattern for the method name
    [d]print the details of the current class, including its code source, class specification, its class loader and so on.
    If a class is loaded by more than one class loader, then the class details will be printed several times
    [E]turn on regex match, the default behavior is wildcards match
    [f]print the fields info of the current class, MUST be used with -d together
    [x:]specify the depth of recursive traverse the static fields, the default value is '0' - equivalent to use toString to output
    [c:]The hash code of the special class's classLoader
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.
    [n:]Maximum number of matching classes with details (100 by default)
    [cs <arg>]Specify the return value of class's ClassLoader#toString(). Long format is[classLoaderStr <arg>]

    TIP

    class-patten supports full qualified class name, e.g. com.taobao.test.AAA and com/taobao/test/AAA. It also supports the format of 'com/taobao/test/AAA', so that it is convenient to directly copy class name from the exception stack trace without replacing '/' to '.'.

    TIP

    sc turns on matching sub-class match by default, that is, sc will also search the sub classes of the target class too. If exact-match is desired, pls. use options disable-sub-class true.

    Usage

    • Wildcards match search

      $ sc demo.*
      +demo.MathGame
      +Affect(row-cnt:1) cost in 55 ms.
      +
    • View class details

      $ sc -d demo.MathGame
      +class-info        demo.MathGame
      +code-source       /private/tmp/math-game.jar
      +name              demo.MathGame
      +isInterface       false
      +isAnnotation      false
      +isEnum            false
      +isAnonymousClass  false
      +isArray           false
      +isLocalClass      false
      +isMemberClass     false
      +isPrimitive       false
      +isSynthetic       false
      +simple-name       MathGame
      +modifier          public
      +annotation
      +interfaces
      +super-class       +-java.lang.Object
      +class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
      +                    +-sun.misc.Launcher$ExtClassLoader@66350f69
      +classLoaderHash   3d4eac69
      +
      +Affect(row-cnt:1) cost in 875 ms.
      +
    • View class fields

      $ sc -d -f demo.MathGame
      +class-info        demo.MathGame
      +code-source       /private/tmp/math-game.jar
      +name              demo.MathGame
      +isInterface       false
      +isAnnotation      false
      +isEnum            false
      +isAnonymousClass  false
      +isArray           false
      +isLocalClass      false
      +isMemberClass     false
      +isPrimitive       false
      +isSynthetic       false
      +simple-name       MathGame
      +modifier          public
      +annotation
      +interfaces
      +super-class       +-java.lang.Object
      +class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
      +                    +-sun.misc.Launcher$ExtClassLoader@66350f69
      +classLoaderHash   3d4eac69
      +fields            modifierprivate,static
      +                  type    java.util.Random
      +                  name    random
      +                  value   java.util.Random@522b4
      +                          08a
      +
      +                  modifierprivate
      +                  type    int
      +                  name    illegalArgumentCount
      +
      +
      +Affect(row-cnt:1) cost in 19 ms.
      +
    • Search class by ClassLoader#toString (on the premise that a ClassLoader instance whose toString() returns apo has loaded some classes including demo.MathGame, demo.MyBar, demo.MyFoo)

      $ sc -cs apo *demo*
      +demo.MathGame
      +demo.MyBar
      +demo.MyFoo
      +Affect(row-cnt:3) cost in 56 ms.
      +
    `,8);function b(h,f){const a=c("ExternalLinkIcon");return t(),i("div",null,[r,e("p",null,[e("a",m,[p,u,l(a)])]),v])}const k=n(o,[["render",b],["__file","sc.html.vue"]]);export{k as default}; diff --git a/3.x/assets/sc.html.74c76d3a.js b/3.x/assets/sc.html.74c76d3a.js new file mode 100644 index 00000000000..2633e5cd395 --- /dev/null +++ b/3.x/assets/sc.html.74c76d3a.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-1fc55619","path":"/doc/sc.html","title":"sc","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":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/sc.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/sc.html.7e6d0647.js b/3.x/assets/sc.html.7e6d0647.js new file mode 100644 index 00000000000..be9496cfd90 --- /dev/null +++ b/3.x/assets/sc.html.7e6d0647.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-28022d85","path":"/en/doc/sc.html","title":"sc","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Supported Options","slug":"supported-options","link":"#supported-options","children":[]},{"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},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"en/doc/sc.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/session.html.5c4eabed.js b/3.x/assets/session.html.5c4eabed.js new file mode 100644 index 00000000000..c630bf4e4be --- /dev/null +++ b/3.x/assets/session.html.5c4eabed.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-3891b473","path":"/doc/session.html","title":"session","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":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/session.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/session.html.61530ca8.js b/3.x/assets/session.html.61530ca8.js new file mode 100644 index 00000000000..ed9a2b79481 --- /dev/null +++ b/3.x/assets/session.html.61530ca8.js @@ -0,0 +1,7 @@ +import{_ as e,o as s,c as n,d as i}from"./app.4d248835.js";const a={},d=i(`

    session

    \u67E5\u770B\u5F53\u524D\u4F1A\u8BDD\u7684\u4FE1\u606F\uFF0C\u663E\u793A\u5F53\u524D\u7ED1\u5B9A\u7684 pid \u4EE5\u53CA\u4F1A\u8BDD id\u3002

    \u63D0\u793A

    \u5982\u679C\u914D\u7F6E\u4E86 tunnel server\uFF0C\u4F1A\u8FFD\u52A0\u6253\u5370 \u4EE3\u7406 id\u3001tunnel \u670D\u52A1\u5668\u7684 url \u4EE5\u53CA\u8FDE\u63A5\u72B6\u6001\u3002

    \u5982\u679C\u4F7F\u7528\u4E86 staturl \u505A\u7EDF\u8BA1\uFF0C\u4F1A\u8FFD\u52A0\u663E\u793A statUrl \u5730\u5740\u3002

    \u4F7F\u7528\u53C2\u8003

    $ session
    +  Name        Value
    +--------------------------------------------------
    + JAVA_PID    14584
    + SESSION_ID  c2073d3b-443a-4a9b-9249-0c5d24a5756c
    +
    +
    `,5),t=[d];function c(r,l){return s(),n("div",null,t)}const u=e(a,[["render",c],["__file","session.html.vue"]]);export{u as default}; diff --git a/3.x/assets/session.html.c643c273.js b/3.x/assets/session.html.c643c273.js new file mode 100644 index 00000000000..8ca87edd522 --- /dev/null +++ b/3.x/assets/session.html.c643c273.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-dfe2bef2","path":"/en/doc/session.html","title":"session","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]}],"git":{"updatedTime":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/session.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/session.html.ebca9c60.js b/3.x/assets/session.html.ebca9c60.js new file mode 100644 index 00000000000..e4d8aa42baa --- /dev/null +++ b/3.x/assets/session.html.ebca9c60.js @@ -0,0 +1,6 @@ +import{_ as e,o as s,c as n,d as a}from"./app.4d248835.js";const i={},t=a(`

    session

    examines the current session,show the current binded processId and the sessionId.

    TIP

    if exits tunnel server\uFF0Cit will also show agentId\u3001tunnelServerUrl\u3001connected status.

    if exits statUrl\uFF0Cit will also show statUrl.

    Usage

    $ session
    +  Name        Value
    +--------------------------------------------------
    + JAVA_PID    14584
    + SESSION_ID  c2073d3b-443a-4a9b-9249-0c5d24a5756c
    +
    `,5),d=[t];function r(c,l){return s(),n("div",null,d)}const u=e(i,[["render",r],["__file","session.html.vue"]]);export{u as default}; diff --git a/3.x/assets/sm.html.0d66961e.js b/3.x/assets/sm.html.0d66961e.js new file mode 100644 index 00000000000..4bdc020af45 --- /dev/null +++ b/3.x/assets/sm.html.0d66961e.js @@ -0,0 +1,57 @@ +import{_ as e,o as t,c as l,a,b as i,e as n,d as r,r as o}from"./app.4d248835.js";const d={},c=a("h1",{id:"sm",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#sm","aria-hidden":"true"},"#"),n(" sm")],-1),p={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=cn&id=command-sm",target:"_blank",rel:"noopener noreferrer"},g=a("code",null,"sm",-1),v=n("\u5728\u7EBF\u6559\u7A0B"),m=r(`

    \u63D0\u793A

    \u67E5\u770B\u5DF2\u52A0\u8F7D\u7C7B\u7684\u65B9\u6CD5\u4FE1\u606F

    \u201CSearch-Method\u201D \u7684\u7B80\u5199\uFF0C\u8FD9\u4E2A\u547D\u4EE4\u80FD\u641C\u7D22\u51FA\u6240\u6709\u5DF2\u7ECF\u52A0\u8F7D\u4E86 Class \u4FE1\u606F\u7684\u65B9\u6CD5\u4FE1\u606F\u3002

    sm \u547D\u4EE4\u53EA\u80FD\u770B\u5230\u7531\u5F53\u524D\u7C7B\u6240\u58F0\u660E (declaring) \u7684\u65B9\u6CD5\uFF0C\u7236\u7C7B\u5219\u65E0\u6CD5\u770B\u5230\u3002

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    class-pattern\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    method-pattern\u65B9\u6CD5\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    [d]\u5C55\u793A\u6BCF\u4E2A\u65B9\u6CD5\u7684\u8BE6\u7EC6\u4FE1\u606F
    [E]\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D
    [c:]\u6307\u5B9A class \u7684 ClassLoader \u7684 hashcode
    [classLoaderClass:]\u6307\u5B9A\u6267\u884C\u8868\u8FBE\u5F0F\u7684 ClassLoader \u7684 class name
    [n:]\u5177\u6709\u8BE6\u7EC6\u4FE1\u606F\u7684\u5339\u914D\u7C7B\u7684\u6700\u5927\u6570\u91CF\uFF08\u9ED8\u8BA4\u4E3A 100\uFF09

    \u4F7F\u7528\u53C2\u8003

    $ sm java.lang.String
    +java.lang.String-><init>
    +java.lang.String->equals
    +java.lang.String->toString
    +java.lang.String->hashCode
    +java.lang.String->compareTo
    +java.lang.String->indexOf
    +java.lang.String->valueOf
    +java.lang.String->checkBounds
    +java.lang.String->length
    +java.lang.String->isEmpty
    +java.lang.String->charAt
    +java.lang.String->codePointAt
    +java.lang.String->codePointBefore
    +java.lang.String->codePointCount
    +java.lang.String->offsetByCodePoints
    +java.lang.String->getChars
    +java.lang.String->getBytes
    +java.lang.String->contentEquals
    +java.lang.String->nonSyncContentEquals
    +java.lang.String->equalsIgnoreCase
    +java.lang.String->compareToIgnoreCase
    +java.lang.String->regionMatches
    +java.lang.String->startsWith
    +java.lang.String->endsWith
    +java.lang.String->indexOfSupplementary
    +java.lang.String->lastIndexOf
    +java.lang.String->lastIndexOfSupplementary
    +java.lang.String->substring
    +java.lang.String->subSequence
    +java.lang.String->concat
    +java.lang.String->replace
    +java.lang.String->matches
    +java.lang.String->contains
    +java.lang.String->replaceFirst
    +java.lang.String->replaceAll
    +java.lang.String->split
    +java.lang.String->join
    +java.lang.String->toLowerCase
    +java.lang.String->toUpperCase
    +java.lang.String->trim
    +java.lang.String->toCharArray
    +java.lang.String->format
    +java.lang.String->copyValueOf
    +java.lang.String->intern
    +Affect(row-cnt:44) cost in 1342 ms.
    +
    $ sm -d java.lang.String toString
    + declaring-class  java.lang.String
    + method-name      toString
    + modifier         public
    + annotation
    + parameters
    + return           java.lang.String
    + exceptions
    +
    +Affect(row-cnt:1) cost in 3 ms.
    +
    `,8);function u(b,h){const s=o("ExternalLinkIcon");return t(),l("div",null,[c,a("p",null,[a("a",p,[g,v,i(s)])]),m])}const S=e(d,[["render",u],["__file","sm.html.vue"]]);export{S as default}; diff --git a/3.x/assets/sm.html.961479d6.js b/3.x/assets/sm.html.961479d6.js new file mode 100644 index 00000000000..f2cc3e78141 --- /dev/null +++ b/3.x/assets/sm.html.961479d6.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-3912a3bb","path":"/en/doc/sm.html","title":"sm","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":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/sm.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/sm.html.981fdfec.js b/3.x/assets/sm.html.981fdfec.js new file mode 100644 index 00000000000..572109934d1 --- /dev/null +++ b/3.x/assets/sm.html.981fdfec.js @@ -0,0 +1,57 @@ +import{_ as s,o as t,c as i,a,b as l,e as n,d as r,r as o}from"./app.4d248835.js";const d={},c=a("h1",{id:"sm",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#sm","aria-hidden":"true"},"#"),n(" sm")],-1),p={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials?language=en&id=command-sm",target:"_blank",rel:"noopener noreferrer"},g=a("code",null,"sm",-1),v=n(" online tutorial"),m=r(`

    TIP

    Search method from the loaded classes.

    sm stands for search method. This command can search and show method information from all loaded classes. sm can only view the methods declared on the target class, that is, methods from its parent classes are invisible.

    Options

    NameSpecification
    class-patternpattern for class name
    method-patternpattern for method name
    [d]print the details of the method
    [E]turn on regex matching while the default mode is wildcard matching
    [c:]The hash code of the special class's classLoader
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.
    [n:]Maximum number of matching classes with details (100 by default)

    Usage

    View methods of java.lang.String:

    $ sm java.lang.String
    +java.lang.String-><init>
    +java.lang.String->equals
    +java.lang.String->toString
    +java.lang.String->hashCode
    +java.lang.String->compareTo
    +java.lang.String->indexOf
    +java.lang.String->valueOf
    +java.lang.String->checkBounds
    +java.lang.String->length
    +java.lang.String->isEmpty
    +java.lang.String->charAt
    +java.lang.String->codePointAt
    +java.lang.String->codePointBefore
    +java.lang.String->codePointCount
    +java.lang.String->offsetByCodePoints
    +java.lang.String->getChars
    +java.lang.String->getBytes
    +java.lang.String->contentEquals
    +java.lang.String->nonSyncContentEquals
    +java.lang.String->equalsIgnoreCase
    +java.lang.String->compareToIgnoreCase
    +java.lang.String->regionMatches
    +java.lang.String->startsWith
    +java.lang.String->endsWith
    +java.lang.String->indexOfSupplementary
    +java.lang.String->lastIndexOf
    +java.lang.String->lastIndexOfSupplementary
    +java.lang.String->substring
    +java.lang.String->subSequence
    +java.lang.String->concat
    +java.lang.String->replace
    +java.lang.String->matches
    +java.lang.String->contains
    +java.lang.String->replaceFirst
    +java.lang.String->replaceAll
    +java.lang.String->split
    +java.lang.String->join
    +java.lang.String->toLowerCase
    +java.lang.String->toUpperCase
    +java.lang.String->trim
    +java.lang.String->toCharArray
    +java.lang.String->format
    +java.lang.String->copyValueOf
    +java.lang.String->intern
    +Affect(row-cnt:44) cost in 1342 ms.
    +

    View method java.lang.String#toString details:

    $ sm -d java.lang.String toString
    + declaring-class  java.lang.String
    + method-name      toString
    + modifier         public
    + annotation
    + parameters
    + return           java.lang.String
    + exceptions
    +
    +Affect(row-cnt:1) cost in 3 ms.
    +
    `,9);function u(h,b){const e=o("ExternalLinkIcon");return t(),i("div",null,[c,a("p",null,[a("a",p,[g,v,l(e)])]),m])}const S=s(d,[["render",u],["__file","sm.html.vue"]]);export{S as default}; diff --git a/3.x/assets/sm.html.e7e61e0b.js b/3.x/assets/sm.html.e7e61e0b.js new file mode 100644 index 00000000000..548305ea124 --- /dev/null +++ b/3.x/assets/sm.html.e7e61e0b.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-30d5cc4f","path":"/doc/sm.html","title":"sm","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":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/sm.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/spring-boot-starter.html.0ccae142.js b/3.x/assets/spring-boot-starter.html.0ccae142.js new file mode 100644 index 00000000000..2993764cb43 --- /dev/null +++ b/3.x/assets/spring-boot-starter.html.0ccae142.js @@ -0,0 +1,37 @@ +import{_ as c,o as i,c as l,a as n,b as a,w as u,e as s,d as p,r as e}from"./app.4d248835.js";const r={},d=n("h1",{id:"arthas-spring-boot-starter",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#arthas-spring-boot-starter","aria-hidden":"true"},"#"),s(" Arthas Spring Boot Starter")],-1),k=n("div",{class:"custom-container tip"},[n("p",{class:"custom-container-title"},"\u63D0\u793A"),n("p",null,"\u53EA\u652F\u6301 spring boot 2")],-1),g=s("\u6700\u65B0\u7248\u672C\uFF1A"),v={href:"https://search.maven.org/search?q=arthas-spring-boot-starter",target:"_blank",rel:"noopener noreferrer"},h=s("\u67E5\u770B"),m=p(`

    \u914D\u7F6E maven \u4F9D\u8D56\uFF1A

            <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-spring-boot-starter</artifactId>
    +            <version>\${arthas.version}</version>
    +        </dependency>
    +

    \u5E94\u7528\u542F\u52A8\u540E\uFF0Cspring \u4F1A\u542F\u52A8 arthas\uFF0C\u5E76\u4E14 attach \u81EA\u8EAB\u8FDB\u7A0B\u3002

    \u63D0\u793A

    \u4E00\u952E\u521B\u5EFA\u5305\u542B Arthas Spring Boot Starter \u7684\u5DE5\u7A0B\uFF1A\u70B9\u51FB

    \u914D\u7F6E\u5C5E\u6027

    \u6BD4\u5982\uFF0C\u901A\u8FC7\u914D\u7F6E tunnel server \u5B9E\u73B0\u8FDC\u7A0B\u7BA1\u7406\uFF1A

    arthas.agent-id=hsehdfsfghhwertyfad
    +arthas.tunnel-server=ws://47.75.156.201:7777/ws
    +
    `,7),b=s("\u5168\u90E8\u652F\u6301\u7684\u914D\u7F6E\u9879\uFF1A"),_={href:"https://github.com/alibaba/arthas/blob/master/arthas-spring-boot-starter/src/main/java/com/alibaba/arthas/spring/ArthasProperties.java",target:"_blank",rel:"noopener noreferrer"},f=s("\u53C2\u8003"),x=n("div",{class:"custom-container tip"},[n("p",{class:"custom-container-title"},"\u63D0\u793A"),n("p",null,[s("\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0Carthas-spring-boot-starter \u4F1A\u7981\u6389"),n("code",null,"stop"),s("\u547D\u4EE4\u3002")])],-1),q=s("\u53C2\u8003\uFF1A"),w=s("Arthas Properties"),y=n("h2",{id:"\u67E5\u770B-endpoint-\u4FE1\u606F",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u67E5\u770B-endpoint-\u4FE1\u606F","aria-hidden":"true"},"#"),s(" \u67E5\u770B Endpoint \u4FE1\u606F")],-1),I={class:"custom-container tip"},S=n("p",{class:"custom-container-title"},"\u63D0\u793A",-1),A=s("\u9700\u8981\u914D\u7F6E spring boot \u66B4\u9732 endpoint\uFF1A"),j={href:"https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html#production-ready-endpoints",target:"_blank",rel:"noopener noreferrer"},B=s("\u53C2\u8003"),M=p(`

    \u5047\u5B9A endpoint \u7AEF\u53E3\u662F 8080\uFF0C\u5219\u901A\u8FC7\u4E0B\u9762 url \u53EF\u4EE5\u67E5\u770B\uFF1A

    http://localhost:8080/actuator/arthas

    {
    +    "arthasConfigMap": {
    +        "agent-id": "hsehdfsfghhwertyfad",
    +        "tunnel-server": "ws://47.75.156.201:7777/ws",
    +    }
    +}
    +

    \u975E spring boot \u5E94\u7528\u4F7F\u7528\u65B9\u5F0F

    \u975E Spring Boot \u5E94\u7528\uFF0C\u53EF\u4EE5\u901A\u8FC7\u4E0B\u9762\u7684\u65B9\u5F0F\u6765\u4F7F\u7528\uFF1A

            <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-agent-attach</artifactId>
    +            <version>\${arthas.version}</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-packaging</artifactId>
    +            <version>\${arthas.version}</version>
    +        </dependency>
    +
    import com.taobao.arthas.agent.attach.ArthasAgent;
    +
    +public class ArthasAttachExample {
    +
    +	public static void main(String[] args) {
    +		ArthasAgent.attach();
    +	}
    +
    +}
    +

    \u4E5F\u53EF\u4EE5\u914D\u7F6E\u5C5E\u6027\uFF1A

            HashMap<String, String> configMap = new HashMap<String, String>();
    +        configMap.put("arthas.appName", "demo");
    +        configMap.put("arthas.tunnelServer", "ws://127.0.0.1:7777/ws");
    +        ArthasAgent.attach(configMap);
    +

    \u6CE8\u610F

    \u6CE8\u610F\u914D\u7F6E\u5FC5\u987B\u662F\u9A7C\u5CF0\u7684\uFF0C\u548C spring boot \u7684-\u98CE\u683C\u4E0D\u4E00\u6837\u3002spring boot \u5E94\u7528\u624D\u540C\u65F6\u652F\u6301\u9A7C\u5CF0 \u548C -\u98CE\u683C\u7684\u914D\u7F6E\u3002

    `,10);function E(N,L){const t=e("ExternalLinkIcon"),o=e("RouterLink");return i(),l("div",null,[d,k,n("p",null,[g,n("a",v,[h,a(t)])]),m,n("p",null,[b,n("a",_,[f,a(t)])]),x,n("p",null,[q,a(o,{to:"/doc/arthas-properties.html"},{default:u(()=>[w]),_:1})]),y,n("div",I,[S,n("p",null,[A,n("a",j,[B,a(t)])])]),M])}const C=c(r,[["render",E],["__file","spring-boot-starter.html.vue"]]);export{C as default}; diff --git a/3.x/assets/spring-boot-starter.html.304b29da.js b/3.x/assets/spring-boot-starter.html.304b29da.js new file mode 100644 index 00000000000..e7dbc51b958 --- /dev/null +++ b/3.x/assets/spring-boot-starter.html.304b29da.js @@ -0,0 +1 @@ +const t=JSON.parse('{"key":"v-71870b69","path":"/en/doc/spring-boot-starter.html","title":"Arthas Spring Boot Starter","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Configuration properties","slug":"configuration-properties","link":"#configuration-properties","children":[]},{"level":2,"title":"View Endpoint Information","slug":"view-endpoint-information","link":"#view-endpoint-information","children":[]},{"level":2,"title":"Non-spring boot application usage","slug":"non-spring-boot-application-usage","link":"#non-spring-boot-application-usage","children":[]}],"git":{"updatedTime":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/spring-boot-starter.md","version":"3.7.3"}');export{t as data}; diff --git a/3.x/assets/spring-boot-starter.html.60544b4f.js b/3.x/assets/spring-boot-starter.html.60544b4f.js new file mode 100644 index 00000000000..803af8e8ad0 --- /dev/null +++ b/3.x/assets/spring-boot-starter.html.60544b4f.js @@ -0,0 +1,37 @@ +import{_ as c,o as i,c as l,a as n,b as a,w as r,e as s,d as p,r as e}from"./app.4d248835.js";const u={},d=n("h1",{id:"arthas-spring-boot-starter",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#arthas-spring-boot-starter","aria-hidden":"true"},"#"),s(" Arthas Spring Boot Starter")],-1),k=n("div",{class:"custom-container tip"},[n("p",{class:"custom-container-title"},"TIP"),n("p",null,"Support spring boot 2")],-1),g=s("Latest Version: "),v={href:"https://search.maven.org/search?q=arthas-spring-boot-starter",target:"_blank",rel:"noopener noreferrer"},h=s("View"),m=p(`

    Add maven dependency:

            <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-spring-boot-starter</artifactId>
    +            <version>\${arthas.version}</version>
    +        </dependency>
    +

    When the application is started, spring will start arthas and attach its own process.

    Configuration properties

    For example, by configuring the tunnel server for remote management.

    arthas.agent-id=hsehdfsfghhwertyfad
    +arthas.tunnel-server=ws://47.75.156.201:7777/ws
    +
    `,6),b=s("All supported configuration: "),f={href:"https://github.com/alibaba/arthas/blob/master/arthas-spring-boot-starter/src/main/java/com/alibaba/arthas/spring/ArthasProperties.java",target:"_blank",rel:"noopener noreferrer"},_=s("Reference"),w=n("div",{class:"custom-container tip"},[n("p",{class:"custom-container-title"},"TIP"),n("p",null,[s("By default, arthas-spring-boot-starter will disable the "),n("code",null,"stop"),s(" command.")])],-1),y=s("Reference: "),x=s("Arthas Properties"),q=n("h2",{id:"view-endpoint-information",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#view-endpoint-information","aria-hidden":"true"},"#"),s(" View Endpoint Information")],-1),I={class:"custom-container tip"},A=n("p",{class:"custom-container-title"},"TIP",-1),S=s("Need to configure spring boot to expose endpoint: "),j={href:"https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html#production-ready-endpoints",target:"_blank",rel:"noopener noreferrer"},N=s("Reference"),B=s("."),M=p(`

    Assuming the endpoint port is 8080, it can be viewed via the following url.

    http://localhost:8080/actuator/arthas

    {
    +    "arthasConfigMap": {
    +        "agent-id": "hsehdfsfghhwertyfad",
    +        "tunnel-server": "ws://47.75.156.201:7777/ws",
    +    }
    +}
    +

    Non-spring boot application usage

    Non-Spring Boot applications can be used in the following ways.

            <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-agent-attach</artifactId>
    +            <version>\${arthas.version}</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-packaging</artifactId>
    +            <version>\${arthas.version}</version>
    +        </dependency>
    +
    import com.taobao.arthas.agent.attach.ArthasAgent;
    +
    +public class ArthasAttachExample {
    +
    +	public static void main(String[] args) {
    +		ArthasAgent.attach();
    +	}
    +
    +}
    +

    You can also configure properties:

            HashMap<String, String> configMap = new HashMap<String, String>();
    +        configMap.put("arthas.appName", "demo");
    +        configMap.put("arthas.tunnelServer", "ws://127.0.0.1:7777/ws");
    +        ArthasAgent.attach(configMap);
    +

    WARNING

    Note that the configuration must be camel case, which is different from the - style of spring boot. Only the spring boot application supports both camel case and - style configuration.

    `,10);function V(R,E){const t=e("ExternalLinkIcon"),o=e("RouterLink");return i(),l("div",null,[d,k,n("p",null,[g,n("a",v,[h,a(t)])]),m,n("p",null,[b,n("a",f,[_,a(t)])]),w,n("p",null,[y,a(o,{to:"/en/doc/arthas-properties.html"},{default:r(()=>[x]),_:1})]),q,n("div",I,[A,n("p",null,[S,n("a",j,[N,a(t)]),B])]),M])}const P=c(u,[["render",V],["__file","spring-boot-starter.html.vue"]]);export{P as default}; diff --git a/3.x/assets/spring-boot-starter.html.f437e222.js b/3.x/assets/spring-boot-starter.html.f437e222.js new file mode 100644 index 00000000000..1392d321df7 --- /dev/null +++ b/3.x/assets/spring-boot-starter.html.f437e222.js @@ -0,0 +1 @@ +const t=JSON.parse('{"key":"v-07cf9d55","path":"/doc/spring-boot-starter.html","title":"Arthas Spring Boot Starter","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u914D\u7F6E\u5C5E\u6027","slug":"\u914D\u7F6E\u5C5E\u6027","link":"#\u914D\u7F6E\u5C5E\u6027","children":[]},{"level":2,"title":"\u67E5\u770B Endpoint \u4FE1\u606F","slug":"\u67E5\u770B-endpoint-\u4FE1\u606F","link":"#\u67E5\u770B-endpoint-\u4FE1\u606F","children":[]},{"level":2,"title":"\u975E spring boot \u5E94\u7528\u4F7F\u7528\u65B9\u5F0F","slug":"\u975E-spring-boot-\u5E94\u7528\u4F7F\u7528\u65B9\u5F0F","link":"#\u975E-spring-boot-\u5E94\u7528\u4F7F\u7528\u65B9\u5F0F","children":[]}],"git":{"updatedTime":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/spring-boot-starter.md","version":"3.7.3"}');export{t as data}; diff --git a/3.x/assets/stack.html.6561e199.js b/3.x/assets/stack.html.6561e199.js new file mode 100644 index 00000000000..a83e6894888 --- /dev/null +++ b/3.x/assets/stack.html.6561e199.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-b75a107e","path":"/doc/stack.html","title":"stack","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\u4F8B\u5B50","slug":"\u4F7F\u7528\u4F8B\u5B50","link":"#\u4F7F\u7528\u4F8B\u5B50","children":[{"level":3,"title":"\u542F\u52A8 Demo","slug":"\u542F\u52A8-demo","link":"#\u542F\u52A8-demo","children":[]},{"level":3,"title":"stack","slug":"stack-1","link":"#stack-1","children":[]},{"level":3,"title":"\u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF","slug":"\u6307\u5B9A-class-\u6700\u5927\u5339\u914D\u6570\u91CF","link":"#\u6307\u5B9A-class-\u6700\u5927\u5339\u914D\u6570\u91CF","children":[]},{"level":3,"title":"\u636E\u6761\u4EF6\u8868\u8FBE\u5F0F\u6765\u8FC7\u6EE4","slug":"\u636E\u6761\u4EF6\u8868\u8FBE\u5F0F\u6765\u8FC7\u6EE4","link":"#\u636E\u6761\u4EF6\u8868\u8FBE\u5F0F\u6765\u8FC7\u6EE4","children":[]},{"level":3,"title":"\u636E\u6267\u884C\u65F6\u95F4\u6765\u8FC7\u6EE4","slug":"\u636E\u6267\u884C\u65F6\u95F4\u6765\u8FC7\u6EE4","link":"#\u636E\u6267\u884C\u65F6\u95F4\u6765\u8FC7\u6EE4","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},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/stack.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/stack.html.bbfa304b.js b/3.x/assets/stack.html.bbfa304b.js new file mode 100644 index 00000000000..78f904d8893 --- /dev/null +++ b/3.x/assets/stack.html.bbfa304b.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-4483d8d5","path":"/en/doc/stack.html","title":"stack","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Parameters","slug":"parameters","link":"#parameters","children":[]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"Start Demo","slug":"start-demo","link":"#start-demo","children":[]},{"level":3,"title":"stack","slug":"stack-1","link":"#stack-1","children":[]},{"level":3,"title":"Specify the max number of matched Classes","slug":"specify-the-max-number-of-matched-classes","link":"#specify-the-max-number-of-matched-classes","children":[]},{"level":3,"title":"Filtering by condition expression","slug":"filtering-by-condition-expression","link":"#filtering-by-condition-expression","children":[]},{"level":3,"title":"Filtering by cost","slug":"filtering-by-cost","link":"#filtering-by-cost","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},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"en/doc/stack.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/stack.html.db4b5700.js b/3.x/assets/stack.html.db4b5700.js new file mode 100644 index 00000000000..3b10b32e2c1 --- /dev/null +++ b/3.x/assets/stack.html.db4b5700.js @@ -0,0 +1,32 @@ +import{_ as c,o as i,c as r,a,b as n,w as o,e as s,d as l,r as p}from"./app.4d248835.js";const d={},u=a("h1",{id:"stack",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#stack","aria-hidden":"true"},"#"),s(" stack")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-stack",target:"_blank",rel:"noopener noreferrer"},k=a("code",null,"stack",-1),h=s("\u5728\u7EBF\u6559\u7A0B"),b=l('

    \u63D0\u793A

    \u8F93\u51FA\u5F53\u524D\u65B9\u6CD5\u88AB\u8C03\u7528\u7684\u8C03\u7528\u8DEF\u5F84

    \u5F88\u591A\u65F6\u5019\u6211\u4EEC\u90FD\u77E5\u9053\u4E00\u4E2A\u65B9\u6CD5\u88AB\u6267\u884C\uFF0C\u4F46\u8FD9\u4E2A\u65B9\u6CD5\u88AB\u6267\u884C\u7684\u8DEF\u5F84\u975E\u5E38\u591A\uFF0C\u6216\u8005\u4F60\u6839\u672C\u5C31\u4E0D\u77E5\u9053\u8FD9\u4E2A\u65B9\u6CD5\u662F\u4ECE\u90A3\u91CC\u88AB\u6267\u884C\u4E86\uFF0C\u6B64\u65F6\u4F60\u9700\u8981\u7684\u662F stack \u547D\u4EE4\u3002

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    class-pattern\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    method-pattern\u65B9\u6CD5\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    condition-express\u6761\u4EF6\u8868\u8FBE\u5F0F
    [E]\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D
    [n:]\u6267\u884C\u6B21\u6570\u9650\u5236
    [m <arg>]\u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF\uFF0C\u9ED8\u8BA4\u503C\u4E3A 50\u3002\u957F\u683C\u5F0F\u4E3A[maxMatch <arg>]\u3002

    \u8FD9\u91CC\u91CD\u70B9\u8981\u8BF4\u660E\u7684\u662F\u89C2\u5BDF\u8868\u8FBE\u5F0F\uFF0C\u89C2\u5BDF\u8868\u8FBE\u5F0F\u7684\u6784\u6210\u4E3B\u8981\u7531 \bognl \u8868\u8FBE\u5F0F\u7EC4\u6210\uFF0C\u6240\u4EE5\u4F60\u53EF\u4EE5\u8FD9\u6837\u5199"{params,returnObj}"\uFF0C\u53EA\u8981\u662F\u4E00\u4E2A\u5408\u6CD5\u7684 ognl \u8868\u8FBE\u5F0F\uFF0C\u90FD\u80FD\u88AB\u6B63\u5E38\u652F\u6301\u3002

    \u89C2\u5BDF\u7684\u7EF4\u5EA6\u4E5F\u6BD4\u8F83\u591A\uFF0C\u4E3B\u8981\u4F53\u73B0\u5728\u53C2\u6570 advice \u7684\u6570\u636E\u7ED3\u6784\u4E0A\u3002Advice \u53C2\u6570\u6700\u4E3B\u8981\u662F\u5C01\u88C5\u4E86\u901A\u77E5\u8282\u70B9\u7684\u6240\u6709\u4FE1\u606F\u3002

    ',6),v=s("\u8BF7\u53C2\u8003"),g=s("\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF"),_=s("\u4E2D\u5173\u4E8E\u8BE5\u8282\u70B9\u7684\u63CF\u8FF0\u3002"),f=s("\u7279\u6B8A\u7528\u6CD5\u8BF7\u53C2\u8003\uFF1A"),x={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},C=s("https://github.com/alibaba/arthas/issues/71"),y=s("OGNL \u8868\u8FBE\u5F0F\u5B98\u7F51\uFF1A"),G={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},M=s("https://commons.apache.org/proper/commons-ognl/language-guide.html"),L=a("h2",{id:"\u4F7F\u7528\u4F8B\u5B50",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u4F7F\u7528\u4F8B\u5B50","aria-hidden":"true"},"#"),s(" \u4F7F\u7528\u4F8B\u5B50")],-1),A=a("h3",{id:"\u542F\u52A8-demo",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u542F\u52A8-demo","aria-hidden":"true"},"#"),s(" \u542F\u52A8 Demo")],-1),$=s("\u542F\u52A8"),w=s("\u5FEB\u901F\u5165\u95E8"),j=s("\u91CC\u7684"),T=a("code",null,"math-game",-1),F=s("\u3002"),N=l(`

    stack

    $ stack demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 36 ms.
    +ts=2018-12-04 01:32:19;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +

    \u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF

    $ stack demo.MathGame primeFactors -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 561 ms, listenerId: 5.
    +ts=2022-12-25 21:07:07;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    @demo.MathGame.primeFactors()
    +        at demo.MathGame.run(MathGame.java:46)
    +        at demo.MathGame.main(MathGame.java:38)
    +

    \u636E\u6761\u4EF6\u8868\u8FBE\u5F0F\u6765\u8FC7\u6EE4

    $ stack demo.MathGame primeFactors 'params[0]<0' -n 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 30 ms.
    +ts=2018-12-04 01:34:27;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    +ts=2018-12-04 01:34:30;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    +Command execution times exceed limit: 2, so command will exit. You can set it with -n option.
    +

    \u636E\u6267\u884C\u65F6\u95F4\u6765\u8FC7\u6EE4

    $ stack demo.MathGame primeFactors '#cost>5'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 35 ms.
    +ts=2018-12-04 01:35:58;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    `,8);function E(P,V){const e=p("ExternalLinkIcon"),t=p("RouterLink");return i(),r("div",null,[u,a("p",null,[a("a",m,[k,h,n(e)])]),b,a("p",null,[v,n(t,{to:"/doc/advice-class.html"},{default:o(()=>[g]),_:1}),_]),a("ul",null,[a("li",null,[f,a("a",x,[C,n(e)])]),a("li",null,[y,a("a",G,[M,n(e)])])]),L,A,a("p",null,[$,n(t,{to:"/doc/quick-start.html"},{default:o(()=>[w]),_:1}),j,T,F]),N])}const B=c(d,[["render",E],["__file","stack.html.vue"]]);export{B as default}; diff --git a/3.x/assets/stack.html.dfb85a5e.js b/3.x/assets/stack.html.dfb85a5e.js new file mode 100644 index 00000000000..9aea0e7dae2 --- /dev/null +++ b/3.x/assets/stack.html.dfb85a5e.js @@ -0,0 +1,32 @@ +import{_ as l,o as c,c as r,a,b as n,w as o,e as s,d as p,r as i}from"./app.4d248835.js";const d={},u=a("h1",{id:"stack",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#stack","aria-hidden":"true"},"#"),s(" stack")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-stack",target:"_blank",rel:"noopener noreferrer"},h=a("code",null,"stack",-1),k=s(" online tutorial"),b=p('

    TIP

    Print out the full call stack of the current method.

    Most often we know one method gets called, but we have no idea on which code path gets executed or when the method gets called since there are so many code paths to the target method. The command stack comes to rescue in this difficult situation.

    Parameters

    NameSpecification
    class-patternpattern for the class name
    method-patternpattern for the method name
    condition-expressioncondition expression
    [E]turn on regex match, the default behavior is wildcard match
    [n:]execution times
    [m <arg>]Specify the max number of matched Classes, the default value is 50. Long format is [maxMatch <arg>].

    There's one thing worthy noting here is observation expression. The observation expression supports OGNL grammar, for example, you can come up a expression like this "{params,returnObj}". All OGNL expressions are supported as long as they are legal to the grammar.

    Thanks for advice's data structure, it is possible to observe from varieties of different angles. Inside advice parameter, all necessary information for notification can be found.

    ',6),v=s("Pls. refer to "),g=s("core parameters in expression"),f=s(" for more details."),_=s("Pls. also refer to "),x={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},y=s("https://github.com/alibaba/arthas/issues/71"),C=s(" for more advanced usage"),G=s("OGNL official site: "),L={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},M=s("https://commons.apache.org/proper/commons-ognl/language-guide.html"),w=a("h2",{id:"usage",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#usage","aria-hidden":"true"},"#"),s(" Usage")],-1),T=a("h3",{id:"start-demo",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#start-demo","aria-hidden":"true"},"#"),s(" Start Demo")],-1),A=s("Start "),P=a("code",null,"math-game",-1),$=s(" in "),N=s("Quick Start"),j=s("."),F=p(`

    stack

    $ stack demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 36 ms.
    +ts=2018-12-04 01:32:19;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +

    Specify the max number of matched Classes

    $ stack demo.MathGame primeFactors -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 561 ms, listenerId: 5.
    +ts=2022-12-25 21:07:07;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    @demo.MathGame.primeFactors()
    +        at demo.MathGame.run(MathGame.java:46)
    +        at demo.MathGame.main(MathGame.java:38)
    +

    Filtering by condition expression

    $ stack demo.MathGame primeFactors 'params[0]<0' -n 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 30 ms.
    +ts=2018-12-04 01:34:27;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    +ts=2018-12-04 01:34:30;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    +Command execution times exceed limit: 2, so command will exit. You can set it with -n option.
    +

    Filtering by cost

    $ stack demo.MathGame primeFactors '#cost>5'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 35 ms.
    +ts=2018-12-04 01:35:58;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    `,8);function S(I,E){const e=i("ExternalLinkIcon"),t=i("RouterLink");return c(),r("div",null,[u,a("p",null,[a("a",m,[h,k,n(e)])]),b,a("p",null,[v,n(t,{to:"/en/doc/advice-class.html"},{default:o(()=>[g]),_:1}),f]),a("ul",null,[a("li",null,[_,a("a",x,[y,n(e)]),C]),a("li",null,[G,a("a",L,[M,n(e)])])]),w,T,a("p",null,[A,P,$,n(t,{to:"/en/doc/quick-start.html"},{default:o(()=>[N]),_:1}),j]),F])}const V=l(d,[["render",S],["__file","stack.html.vue"]]);export{V as default}; diff --git a/3.x/assets/start-arthas.html.11758ed5.js b/3.x/assets/start-arthas.html.11758ed5.js new file mode 100644 index 00000000000..538e985d398 --- /dev/null +++ b/3.x/assets/start-arthas.html.11758ed5.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-a9c412f2","path":"/doc/start-arthas.html","title":"\u542F\u52A8 Arthas","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4EA4\u4E92\u6A21\u5F0F\u542F\u52A8","slug":"\u4EA4\u4E92\u6A21\u5F0F\u542F\u52A8","link":"#\u4EA4\u4E92\u6A21\u5F0F\u542F\u52A8","children":[]},{"level":2,"title":"\u975E\u4EA4\u4E92\u6A21\u5F0F\u542F\u52A8","slug":"\u975E\u4EA4\u4E92\u6A21\u5F0F\u542F\u52A8","link":"#\u975E\u4EA4\u4E92\u6A21\u5F0F\u542F\u52A8","children":[{"level":3,"title":"\u53C2\u6570\u8BF4\u660E","slug":"\u53C2\u6570\u8BF4\u660E","link":"#\u53C2\u6570\u8BF4\u660E","children":[]},{"level":3,"title":"\u793A\u4F8B","slug":"\u793A\u4F8B","link":"#\u793A\u4F8B","children":[]},{"level":3,"title":"\u8FDC\u7A0B\u8BCA\u65AD","slug":"\u8FDC\u7A0B\u8BCA\u65AD","link":"#\u8FDC\u7A0B\u8BCA\u65AD","children":[]},{"level":3,"title":"sudo \u652F\u6301","slug":"sudo-\u652F\u6301","link":"#sudo-\u652F\u6301","children":[]},{"level":3,"title":"Windows \u73AF\u5883\u652F\u6301","slug":"windows-\u73AF\u5883\u652F\u6301","link":"#windows-\u73AF\u5883\u652F\u6301","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/start-arthas.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/start-arthas.html.4886b6be.js b/3.x/assets/start-arthas.html.4886b6be.js new file mode 100644 index 00000000000..f55ab490ce5 --- /dev/null +++ b/3.x/assets/start-arthas.html.4886b6be.js @@ -0,0 +1,18 @@ +import{_ as a,o as s,c as n,d as e}from"./app.4d248835.js";const t={},p=e(`

    \u542F\u52A8 Arthas

    \u4EA4\u4E92\u6A21\u5F0F\u542F\u52A8

    ./as3.sh
    +
    \u279C  bin git:(develop) \u2717 ./as3.sh
    +Found existing java process, please choose one and input the serial number of the process, eg: 1 . Then hit ENTER.
    +  [1]: 3088 org.jetbrains.idea.maven.server.RemoteMavenServer
    +* [2]: 12872 org.apache.catalina.startup.Bootstrap
    +  [3]: 2455
    +Attaching to 12872...
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
    +|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
    +\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
    +$
    +

    \u975E\u4EA4\u4E92\u6A21\u5F0F\u542F\u52A8

    \u542F\u52A8\u811A\u672C\u5982\u4E0B\uFF1A

    ./as3.sh <PID>[@IP:PORT]
    +

    \u53C2\u6570\u8BF4\u660E

    • PID\uFF1A\u76EE\u6807 Java \u8FDB\u7A0B ID\uFF08\u8BF7\u786E\u4FDD\u6267\u884C\u5F53\u524D\u6267\u884C\u547D\u4EE4\u7684\u7528\u6237\u5FC5\u987B\u6709\u8DB3\u591F\u7684\u6743\u9650\u64CD\u4F5C\u5BF9\u5E94\u7684 Java \u8FDB\u7A0B\uFF09
    • IP\uFF1AArthas Server \u4FA6\u542C\u7684\u5730\u5740\uFF0C\u9ED8\u8BA4\u503C\u662F 127.00.1\u3002Arthas \u5141\u8BB8\u591A\u4E2A\u7528\u6237\u540C\u65F6\u8BBF\u95EE\uFF0C\u5E76\u4E14\u5404\u81EA\u7684\u547D\u4EE4\u4E0D\u4F1A\u76F8\u4E92\u5E72\u6270\u6267\u884C
    • PORT\uFF1A\u76EE\u6807\u670D\u52A1\u5668 Arthas Server \u7684\u7AEF\u53E3\u53F7\uFF0C\u9ED8\u8BA4\u7684\u7AEF\u53E3\u53F7\u662F 3658

    \u793A\u4F8B

    • \u5982\u679C\u4E0D\u6307\u5B9A IP \u548C PORT\uFF0C\u9ED8\u8BA4\u662F 127.0.0.1 \u548C 3658

      ./as3.sh 12345

      \u4E0A\u8FF0\u547D\u4EE4\u7B49\u4EF7\u4E8E\uFF1A

      ./as3.sh 12356@127.0.0.1:3658

    \u8FDC\u7A0B\u8BCA\u65AD

    \u670D\u52A1\u5668\u542F\u52A8 Arthas Server \u540E\uFF0C\u5176\u4ED6\u4EBA\u53EF\u4EE5\u4F7F\u7528 telnet \u8FDC\u7A0B\u8FDE\u63A5\u4E0A\u53BB\u8FDB\u7A0B\u8BCA\u65AD\uFF0C\u4F8B\u5982\uFF1A

    telnet 192.168.1.119 3658
    +

    sudo \u652F\u6301

    \u6210\u719F\u7684\u7EBF\u4E0A\u7BA1\u7406\u73AF\u5883\u4E00\u822C\u90FD\u4E0D\u4F1A\u76F4\u63A5\u5F00\u653E JVM \u90E8\u7F72\u7528\u6237\u6743\u9650\u7ED9\u4F60\uFF0C\u800C\u662F\u901A\u8FC7 sudo-list \u6765\u63A7\u5236\u548C\u76D1\u63A7\u7528\u6237\u7684\u8D8A\u6743\u64CD\u4F5C\u3002\u7531\u4E8E as3.sh \u811A\u672C\u4E2D\u4F1A\u5BF9\u5F53\u524D\u7528\u6237\u7684\u73AF\u5883\u53D8\u91CF\u4EA7\u751F\u611F\u77E5\uFF0C\u6240\u4EE5\u9700\u8981\u52A0\u4E0A -H \u53C2\u6570

    sudo -u admin -H ./as3.sh 12345
    +

    Windows \u73AF\u5883\u652F\u6301

    \u76EE\u524Das.bat\u811A\u672C\u53EA\u652F\u6301\u4E00\u4E2A\u53C2\u6570\uFF1Apid

    as.bat <pid>
    +
    `,20),r=[p];function o(l,i){return s(),n("div",null,r)}const d=a(t,[["render",o],["__file","start-arthas.html.vue"]]);export{d as default}; diff --git a/3.x/assets/start-arthas.html.aeeb9c4f.js b/3.x/assets/start-arthas.html.aeeb9c4f.js new file mode 100644 index 00000000000..3e375741674 --- /dev/null +++ b/3.x/assets/start-arthas.html.aeeb9c4f.js @@ -0,0 +1,18 @@ +import{_ as a,o as s,c as e,d as n}from"./app.4d248835.js";const t={},r=n(`

    Start Arthas

    Interactive Mode

    ./as3.sh
    +
    \u279C  bin git:(develop) \u2717 ./as3.sh
    +Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
    +  [1]: 3088 org.jetbrains.idea.maven.server.RemoteMavenServer
    +* [2]: 12872 org.apache.catalina.startup.Bootstrap
    +  [3]: 2455
    +Attaching to 12872...
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
    +|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
    +\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
    +$
    +

    Non-Interactive Mode

    Startup script is as follows:

    ./as3.sh <PID>[@IP:PORT]
    +

    Parameter Description

    • PID: Target Java process ID (Make sure that the user executing the command has sufficient permissions to operate the target Java process.)
    • IP: The address that Arthas Server listens on, the default value is 127.0.0.1. Arthas allows multiple users to access simultaneously without interfering with each other.
    • PORT: Arthas Server port\uFF0Cthe default value is 3658

    Sample

    • If IP and PORT are not specified, then the default values are 127.0.0.1 and 3658

      ./as3.sh 12345

      Equivalent to:

      ./as3.sh 12356@127.0.0.1:3658

    Remote Diagnosis

    After starting Arthas Server on the target Java process, users can use telnet connect to the remote Arthas Server, for example\uFF1A

    telnet 192.168.1.119 3658
    +

    sudo Support

    Usually online environment will only grant users privilege as low as possible, instead, all advanced operations are through sudo-list. Since as3.sh script takes into account the current effective user, it is possible to run the script in the other rule, by specifying -H option like this:

    sudo -u admin -H ./as3.sh 12345
    +

    Windows Support

    Right now as.bat script supports one parameter only, which is: pid

    as.bat <pid>
    +
    `,20),o=[r];function p(i,l){return s(),e("div",null,o)}const d=a(t,[["render",p],["__file","start-arthas.html.vue"]]);export{d as default}; diff --git a/3.x/assets/start-arthas.html.ddd2298e.js b/3.x/assets/start-arthas.html.ddd2298e.js new file mode 100644 index 00000000000..32e73e494c3 --- /dev/null +++ b/3.x/assets/start-arthas.html.ddd2298e.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-7af576f3","path":"/en/doc/start-arthas.html","title":"Start Arthas","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Interactive Mode","slug":"interactive-mode","link":"#interactive-mode","children":[]},{"level":2,"title":"Non-Interactive Mode","slug":"non-interactive-mode","link":"#non-interactive-mode","children":[{"level":3,"title":"Parameter Description","slug":"parameter-description","link":"#parameter-description","children":[]},{"level":3,"title":"Sample","slug":"sample","link":"#sample","children":[]},{"level":3,"title":"Remote Diagnosis","slug":"remote-diagnosis","link":"#remote-diagnosis","children":[]},{"level":3,"title":"sudo Support","slug":"sudo-support","link":"#sudo-support","children":[]},{"level":3,"title":"Windows Support","slug":"windows-support","link":"#windows-support","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/start-arthas.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/stop.html.17210afa.js b/3.x/assets/stop.html.17210afa.js new file mode 100644 index 00000000000..09aeeb0244f --- /dev/null +++ b/3.x/assets/stop.html.17210afa.js @@ -0,0 +1 @@ +import{_ as t,o as s,c as o,a as e,e as a}from"./app.4d248835.js";const c={},n=e("h1",{id:"stop",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#stop","aria-hidden":"true"},"#"),a(" stop")],-1),r=e("p",null,"\u5173\u95ED Arthas \u670D\u52A1\u7AEF\uFF0C\u6240\u6709 Arthas \u5BA2\u6237\u7AEF\u5168\u90E8\u9000\u51FA\u3002",-1),_=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"\u63D0\u793A"),e("p",null,"\u5173\u95ED Arthas \u670D\u52A1\u5668\u4E4B\u524D\uFF0C\u4F1A\u91CD\u7F6E\u6389\u6240\u6709\u505A\u8FC7\u7684\u589E\u5F3A\u7C7B\u3002\u4F46\u662F\u7528 redefine \u91CD\u52A0\u8F7D\u7684\u7C7B\u5185\u5BB9\u4E0D\u4F1A\u88AB\u91CD\u7F6E\u3002")],-1),i=[n,r,_];function d(l,h){return s(),o("div",null,i)}const u=t(c,[["render",d],["__file","stop.html.vue"]]);export{u as default}; diff --git a/3.x/assets/stop.html.29be75c6.js b/3.x/assets/stop.html.29be75c6.js new file mode 100644 index 00000000000..7bfc3f49115 --- /dev/null +++ b/3.x/assets/stop.html.29be75c6.js @@ -0,0 +1 @@ +const t=JSON.parse('{"key":"v-bc0910b2","path":"/doc/stop.html","title":"stop","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/stop.md","version":"3.7.3"}');export{t as data}; diff --git a/3.x/assets/stop.html.493e47db.js b/3.x/assets/stop.html.493e47db.js new file mode 100644 index 00000000000..3485ee4642e --- /dev/null +++ b/3.x/assets/stop.html.493e47db.js @@ -0,0 +1 @@ +import{_ as t,o as s,c as o,a as e,e as n}from"./app.4d248835.js";const c={},a=e("h1",{id:"stop",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#stop","aria-hidden":"true"},"#"),n(" stop")],-1),r=e("p",null,"terminates the Arthas server, all the Arthas clients connecting to this server will be disconnected.",-1),i=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"TIP"),e("p",null,"the class redefined by redefine command will not be reset.")],-1),l=[a,r,i];function d(_,h){return s(),o("div",null,l)}const m=t(c,[["render",d],["__file","stop.html.vue"]]);export{m as default}; diff --git a/3.x/assets/stop.html.8c6a9664.js b/3.x/assets/stop.html.8c6a9664.js new file mode 100644 index 00000000000..3dc8a16b15a --- /dev/null +++ b/3.x/assets/stop.html.8c6a9664.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-e33fb7da","path":"/en/doc/stop.html","title":"stop","lang":"en-US","frontmatter":{},"excerpt":"","headers":[],"git":{"updatedTime":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/stop.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/style.f2bd2fc0.css b/3.x/assets/style.f2bd2fc0.css new file mode 100644 index 00000000000..c6e7d3f0f92 --- /dev/null +++ b/3.x/assets/style.f2bd2fc0.css @@ -0,0 +1 @@ +:root{--back-to-top-z-index: 5;--back-to-top-color: #3eaf7c;--back-to-top-color-hover: #71cda3}.back-to-top{cursor:pointer;position:fixed;bottom:2rem;right:2.5rem;width:2rem;height:1.2rem;background-color:var(--back-to-top-color);-webkit-mask:url(/3.x/assets/back-to-top.8efcbe56.svg) no-repeat;mask:url(/3.x/assets/back-to-top.8efcbe56.svg) no-repeat;z-index:var(--back-to-top-z-index)}.back-to-top:hover{background-color:var(--back-to-top-color-hover)}@media (max-width: 959px){.back-to-top{display:none}}.back-to-top-enter-active,.back-to-top-leave-active{transition:opacity .3s}.back-to-top-enter-from,.back-to-top-leave-to{opacity:0}:root{--external-link-icon-color: #aaa}.external-link-icon{position:relative;display:inline-block;color:var(--external-link-icon-color);vertical-align:middle;top:-1px}.external-link-icon-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}:root{--medium-zoom-z-index: 100;--medium-zoom-bg-color: #ffffff;--medium-zoom-opacity: 1}.medium-zoom-overlay{background-color:var(--medium-zoom-bg-color)!important;z-index:var(--medium-zoom-z-index)}.medium-zoom-overlay~img{z-index:calc(var(--medium-zoom-z-index) + 1)}.medium-zoom--opened .medium-zoom-overlay{opacity:var(--medium-zoom-opacity)}:root{--nprogress-color: #29d;--nprogress-z-index: 1031}#nprogress{pointer-events:none}#nprogress .bar{background:var(--nprogress-color);position:fixed;z-index:var(--nprogress-z-index);top:0;left:0;width:100%;height:2px}.users-logo[data-v-024b28a0]{max-width:140px;-o-object-fit:contain;object-fit:contain;margin:10px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.user-boards[data-v-5032c352]{display:flex;flex-direction:column;justify-content:center;align-items:center;border-top:1px solid var(--c-border);padding:1.2rem 0;margin-top:20px}.user-boards .user-logos[data-v-5032c352]{display:flex;flex-wrap:wrap;justify-content:center}.icon[data-v-514d14c6]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;width:48px;height:48px;font-size:30px}.my-badge[data-v-b201bc64]{width:fit-content;width:-webkit-fit-content;width:-moz-fit-content;padding:5px;margin:0 10px;display:flex;align-items:center;justify-content:center;border-radius:5px;color:var(--c-text);background-color:#595f6533;-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (max-width: 719px){.my-badge[data-v-b201bc64]{margin:0 5px}}.badges[data-v-d7ced36e]{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center}.navbar-version[data-v-a8869d06]{line-height:var(--navbar-height);color:var(--c-text-lighter)}.theme-default-content .right-menu-wrapper .right-menu-margin[data-v-64666cd5]{border-left:1px solid var(--c-border)}.right-menu-wrapper[data-v-64666cd5]{width:280px;float:right;margin-right:-300px;position:-webkit-sticky;position:sticky;top:0;font-size:.8rem}.right-menu-wrapper .right-menu-margin[data-v-64666cd5]{margin-top:calc(var(--navbar-height) + 1rem);border-radius:3px;overflow:hidden}.right-menu-wrapper .right-menu-title[data-v-64666cd5]{padding:10px 15px 0;background:var(--mainBg);font-size:1rem}.right-menu-wrapper .right-menu-title[data-v-64666cd5]:after{content:"";display:block;width:100%;height:1px;background:var(--c-border);margin-top:10px}.right-menu-wrapper .right-menu-content[data-v-64666cd5]{max-height:80vh;position:relative;overflow:hidden;background:var(--mainBg);padding:4px 3px 4px 0}.right-menu-wrapper .right-menu-content[data-v-64666cd5]::-webkit-scrollbar{width:3px;height:3px}.right-menu-wrapper .right-menu-content[data-v-64666cd5]::-webkit-scrollbar-track-piece{background:none}.right-menu-wrapper .right-menu-content[data-v-64666cd5]::-webkit-scrollbar-thumb:vertical{background-color:#7d7d7d4d}.right-menu-wrapper .right-menu-content[data-v-64666cd5]:hover{overflow-y:auto;padding-right:0}.right-menu-wrapper .right-menu-content .right-menu-item[data-v-64666cd5]{padding:4px 0 0 15px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:relative}.right-menu-wrapper .right-menu-content .right-menu-item.level2[data-v-64666cd5]{font-size:.8rem}.right-menu-wrapper .right-menu-content .right-menu-item.level3[data-v-64666cd5]{padding-left:27px}.right-menu-wrapper .right-menu-content .right-menu-item.level4[data-v-64666cd5]{padding-left:37px}.right-menu-wrapper .right-menu-content .right-menu-item.level5[data-v-64666cd5]{padding-left:47px}.right-menu-wrapper .right-menu-content .right-menu-item.level6[data-v-64666cd5]{padding-left:57px}.right-menu-wrapper .right-menu-content .right-menu-item.active[data-v-64666cd5]:before{content:"";position:absolute;top:5px;left:0;width:3px;height:14px;background:var(--c-text-accent);border-radius:0 4px 4px 0}.right-menu-wrapper .right-menu-content .right-menu-item.active a[data-v-64666cd5]{color:var(--c-text-accent);opacity:1}.right-menu-wrapper .right-menu-content .right-menu-item a[data-v-64666cd5]{color:var(--textColor);opacity:.75;display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.right-menu-wrapper .right-menu-content .right-menu-item a[data-v-64666cd5]:hover{opacity:1}@media (max-width: 1300px){.theme-default-content .right-menu-wrapper[data-v-64666cd5]{display:none}}@media (min-width: 1300px){.page .theme-default-content.right-menu-padding[data-v-fdd717e0],.page .page-meta.right-menu-padding[data-v-fdd717e0],.page .page-nav.right-menu-padding[data-v-fdd717e0]{padding-right:240px;padding-left:0}}:root{--c-brand: #3eaf7c;--c-brand-light: #4abf8a;--c-bg: #ffffff;--c-bg-light: #f3f4f5;--c-bg-lighter: #eeeeee;--c-bg-navbar: var(--c-bg);--c-bg-sidebar: var(--c-bg);--c-bg-arrow: #cccccc;--c-text: #2c3e50;--c-text-accent: var(--c-brand);--c-text-light: #3a5169;--c-text-lighter: #4e6e8e;--c-text-lightest: #6a8bad;--c-text-quote: #999999;--c-border: #eaecef;--c-border-dark: #dfe2e5;--c-tip: #42b983;--c-tip-bg: var(--c-bg-light);--c-tip-title: var(--c-text);--c-tip-text: var(--c-text);--c-tip-text-accent: var(--c-text-accent);--c-warning: #e7c000;--c-warning-bg: #fffae3;--c-warning-title: #ad9000;--c-warning-text: #746000;--c-warning-text-accent: var(--c-text);--c-danger: #cc0000;--c-danger-bg: #ffe0e0;--c-danger-title: #990000;--c-danger-text: #660000;--c-danger-text-accent: var(--c-text);--c-details-bg: #eeeeee;--c-badge-tip: var(--c-tip);--c-badge-warning: var(--c-warning);--c-badge-danger: var(--c-danger);--t-color: .3s ease;--t-transform: .3s ease;--code-bg-color: #282c34;--code-hl-bg-color: rgba(0, 0, 0, .66);--code-ln-color: #9e9e9e;--code-ln-wrapper-width: 3.5rem;--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;--font-family-code: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;--navbar-height: 3.6rem;--navbar-padding-v: .7rem;--navbar-padding-h: 1.5rem;--sidebar-width: 20rem;--sidebar-width-mobile: calc(var(--sidebar-width) * .82);--content-width: 740px;--homepage-width: 960px}.back-to-top{--back-to-top-color: var(--c-brand);--back-to-top-color-hover: var(--c-brand-light)}.DocSearch{--docsearch-primary-color: var(--c-brand);--docsearch-text-color: var(--c-text);--docsearch-highlight-color: var(--c-brand);--docsearch-muted-color: var(--c-text-quote);--docsearch-container-background: rgba(9, 10, 17, .8);--docsearch-modal-background: var(--c-bg-light);--docsearch-searchbox-background: var(--c-bg-lighter);--docsearch-searchbox-focus-background: var(--c-bg);--docsearch-searchbox-shadow: inset 0 0 0 2px var(--c-brand);--docsearch-hit-color: var(--c-text-light);--docsearch-hit-active-color: var(--c-bg);--docsearch-hit-background: var(--c-bg);--docsearch-hit-shadow: 0 1px 3px 0 var(--c-border-dark);--docsearch-footer-background: var(--c-bg)}.external-link-icon{--external-link-icon-color: var(--c-text-quote)}.medium-zoom-overlay{--medium-zoom-bg-color: var(--c-bg)}#nprogress{--nprogress-color: var(--c-brand)}.pwa-popup{--pwa-popup-text-color: var(--c-text);--pwa-popup-bg-color: var(--c-bg);--pwa-popup-border-color: var(--c-brand);--pwa-popup-shadow: 0 4px 16px var(--c-brand);--pwa-popup-btn-text-color: var(--c-bg);--pwa-popup-btn-bg-color: var(--c-brand);--pwa-popup-btn-hover-bg-color: var(--c-brand-light)}.search-box{--search-bg-color: var(--c-bg);--search-accent-color: var(--c-brand);--search-text-color: var(--c-text);--search-border-color: var(--c-border);--search-item-text-color: var(--c-text-lighter);--search-item-focus-bg-color: var(--c-bg-light)}html.dark{--c-brand: #3aa675;--c-brand-light: #349469;--c-bg: #22272e;--c-bg-light: #2b313a;--c-bg-lighter: #262c34;--c-text: #adbac7;--c-text-light: #96a7b7;--c-text-lighter: #8b9eb0;--c-text-lightest: #8094a8;--c-border: #3e4c5a;--c-border-dark: #34404c;--c-tip: #318a62;--c-warning: #ceab00;--c-warning-bg: #7e755b;--c-warning-title: #ceac03;--c-warning-text: #362e00;--c-danger: #940000;--c-danger-bg: #806161;--c-danger-title: #610000;--c-danger-text: #3a0000;--c-details-bg: #323843;--code-hl-bg-color: #363b46}html.dark .DocSearch{--docsearch-logo-color: var(--c-text);--docsearch-modal-shadow: inset 1px 1px 0 0 #2c2e40, 0 3px 8px 0 #000309;--docsearch-key-shadow: inset 0 -2px 0 0 #282d55, inset 0 0 1px 1px #51577d, 0 2px 2px 0 rgba(3, 4, 9, .3);--docsearch-key-gradient: linear-gradient(-225deg, #444950, #1c1e21);--docsearch-footer-shadow: inset 0 1px 0 0 rgba(73, 76, 106, .5), 0 -4px 8px 0 rgba(0, 0, 0, .2)}html,body{padding:0;margin:0;background-color:var(--c-bg);transition:background-color var(--t-color)}html.dark{color-scheme:dark}html{font-size:16px}body{font-family:var(--font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1rem;color:var(--c-text)}a{font-weight:500;color:var(--c-text-accent);text-decoration:none;overflow-wrap:break-word}p a code{font-weight:400;color:var(--c-text-accent)}kbd{font-family:var(--font-family-code);color:var(--c-text);background:var(--c-bg-lighter);border:solid .15rem var(--c-border-dark);border-bottom:solid .25rem var(--c-border-dark);border-radius:.15rem;padding:0 .15em}code{font-family:var(--font-family-code);color:var(--c-text-lighter);padding:.25rem .5rem;margin:0;font-size:.85em;background-color:var(--c-bg-lighter);border-radius:3px;overflow-wrap:break-word;transition:background-color var(--t-color)}blockquote{font-size:1rem;color:var(--c-text-quote);border-left:.2rem solid var(--c-border-dark);margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ul,ol{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}h1:focus-visible,h2:focus-visible,h3:focus-visible,h4:focus-visible,h5:focus-visible,h6:focus-visible{outline:none}h1:hover .header-anchor,h2:hover .header-anchor,h3:hover .header-anchor,h4:hover .header-anchor,h5:hover .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid var(--c-border);transition:border-color var(--t-color)}h3{font-size:1.35rem}h4{font-size:1.15rem}h5{font-size:1.05rem}h6{font-size:1rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;opacity:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}a.header-anchor:hover{text-decoration:none}a.header-anchor:focus-visible{opacity:1}p,ul,ol{line-height:1.7}hr{border:0;border-top:1px solid var(--c-border)}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto;transition:border-color var(--t-color)}tr{border-top:1px solid var(--c-border-dark);transition:border-color var(--t-color)}tr:nth-child(2n){background-color:var(--c-bg-light);transition:background-color var(--t-color)}th,td{padding:.6em 1em;border:1px solid var(--c-border-dark);transition:border-color var(--t-color)}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:6px solid var(--c-bg-arrow)}.arrow.down{border-left:4px solid transparent;border-right:4px solid transparent;border-top:6px solid var(--c-bg-arrow)}.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:6px solid var(--c-bg-arrow)}.arrow.left{border-top:4px solid transparent;border-bottom:4px solid transparent;border-right:6px solid var(--c-bg-arrow)}.badge{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:var(--c-bg);vertical-align:top;transition:color var(--t-color),background-color var(--t-color)}.badge.tip{background-color:var(--c-badge-tip)}.badge.warning{background-color:var(--c-badge-warning)}.badge.danger{background-color:var(--c-badge-danger)}.badge+.badge{margin-left:5px}code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:var(--font-family-code);font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.block-comment,.token.prolog,.token.doctype,.token.cdata{color:#999}.token.punctuation{color:#ccc}.token.tag,.token.attr-name,.token.namespace,.token.deleted{color:#ec5975}.token.function-name{color:#6196cc}.token.boolean,.token.number,.token.function{color:#f08d49}.token.property,.token.class-name,.token.constant,.token.symbol{color:#f8c555}.token.selector,.token.important,.token.atrule,.token.keyword,.token.builtin{color:#cc99cd}.token.string,.token.char,.token.attr-value,.token.regex,.token.variable{color:#7ec699}.token.operator,.token.entity,.token.url{color:#67cdcc}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:#3eaf7c}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.3rem 1.5rem;margin:.85rem 0;border-radius:6px;overflow:auto}.theme-default-content pre code,.theme-default-content pre[class*=language-] code{color:#fff;padding:0;background-color:transparent;border-radius:0;overflow-wrap:unset;-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.theme-default-content .line-number{font-family:var(--font-family-code)}div[class*=language-]{position:relative;background-color:var(--code-bg-color);border-radius:6px}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:var(--code-ln-color)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent!important;position:relative;z-index:1}div[class*=language-] .highlight-lines{-webkit-user-select:none;-moz-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlight-line{background-color:var(--code-hl-bg-color)}div[class*=language-]:not(.line-numbers-mode) .line-numbers{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlight-line{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlight-line:before{content:" ";position:absolute;z-index:2;left:0;top:0;display:block;width:var(--code-ln-wrapper-width);height:100%}div[class*=language-].line-numbers-mode pre{margin-left:var(--code-ln-wrapper-width);padding-left:1rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers{position:absolute;top:0;width:var(--code-ln-wrapper-width);text-align:center;color:var(--code-ln-color);padding-top:1.25rem;line-height:1.4;counter-reset:line-number}div[class*=language-].line-numbers-mode .line-numbers .line-number{position:relative;z-index:3;-webkit-user-select:none;-moz-user-select:none;user-select:none;height:1.4em}div[class*=language-].line-numbers-mode .line-numbers .line-number:before{counter-increment:line-number;content:counter(line-number);font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;top:0;left:0;width:var(--code-ln-wrapper-width);height:100%;border-radius:6px 0 0 6px;border-right:1px solid var(--code-hl-bg-color)}div[class*=language-].ext-c:before{content:"c"}div[class*=language-].ext-cpp:before{content:"cpp"}div[class*=language-].ext-cs:before{content:"cs"}div[class*=language-].ext-css:before{content:"css"}div[class*=language-].ext-dart:before{content:"dart"}div[class*=language-].ext-docker:before{content:"docker"}div[class*=language-].ext-fs:before{content:"fs"}div[class*=language-].ext-go:before{content:"go"}div[class*=language-].ext-html:before{content:"html"}div[class*=language-].ext-java:before{content:"java"}div[class*=language-].ext-js:before{content:"js"}div[class*=language-].ext-json:before{content:"json"}div[class*=language-].ext-kt:before{content:"kt"}div[class*=language-].ext-less:before{content:"less"}div[class*=language-].ext-makefile:before{content:"makefile"}div[class*=language-].ext-md:before{content:"md"}div[class*=language-].ext-php:before{content:"php"}div[class*=language-].ext-py:before{content:"py"}div[class*=language-].ext-rb:before{content:"rb"}div[class*=language-].ext-rs:before{content:"rs"}div[class*=language-].ext-sass:before{content:"sass"}div[class*=language-].ext-scss:before{content:"scss"}div[class*=language-].ext-sh:before{content:"sh"}div[class*=language-].ext-styl:before{content:"styl"}div[class*=language-].ext-ts:before{content:"ts"}div[class*=language-].ext-toml:before{content:"toml"}div[class*=language-].ext-vue:before{content:"vue"}div[class*=language-].ext-yml:before{content:"yml"}@media (max-width: 419px){.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}.code-group__nav{margin-top:.85rem;margin-bottom:calc(-1.7rem - 6px);padding-bottom:calc(1.7rem - 6px);padding-left:10px;padding-top:10px;border-top-left-radius:6px;border-top-right-radius:6px;background-color:var(--code-bg-color)}.code-group__ul{margin:auto 0;padding-left:0;display:inline-flex;list-style:none}.code-group__nav-tab{border:0;padding:5px;cursor:pointer;background-color:transparent;font-size:.85em;line-height:1.4;color:#ffffffe6;font-weight:600}.code-group__nav-tab:focus{outline:none}.code-group__nav-tab:focus-visible{outline:1px solid rgba(255,255,255,.9)}.code-group__nav-tab-active{border-bottom:var(--c-brand) 1px solid}@media (max-width: 419px){.code-group__nav{margin-left:-1.5rem;margin-right:-1.5rem;border-radius:0}}.code-group-item{display:none}.code-group-item__active{display:block}.code-group-item>pre{background-color:orange}.custom-container{transition:color var(--t-color),border-color var(--t-color),background-color var(--t-color)}.custom-container .custom-container-title{font-weight:600}.custom-container .custom-container-title:not(:only-child){margin-bottom:-.4rem}.custom-container.tip,.custom-container.warning,.custom-container.danger{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-container.tip{border-color:var(--c-tip);background-color:var(--c-tip-bg);color:var(--c-tip-text)}.custom-container.tip .custom-container-title{color:var(--c-tip-title)}.custom-container.tip a{color:var(--c-tip-text-accent)}.custom-container.warning{border-color:var(--c-warning);background-color:var(--c-warning-bg);color:var(--c-warning-text)}.custom-container.warning .custom-container-title{color:var(--c-warning-title)}.custom-container.warning a{color:var(--c-warning-text-accent)}.custom-container.danger{border-color:var(--c-danger);background-color:var(--c-danger-bg);color:var(--c-danger-text)}.custom-container.danger .custom-container-title{color:var(--c-danger-title)}.custom-container.danger a{color:var(--c-danger-text-accent)}.custom-container.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:var(--c-details-bg)}.custom-container.details h4{margin-top:0}.custom-container.details figure:last-child,.custom-container.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-container.details summary{outline:none;cursor:pointer}.home{padding:var(--navbar-height) 2rem 0;max-width:var(--homepage-width);margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero h1,.home .hero .description,.home .hero .actions{margin:1.8rem auto}.home .hero .actions{display:flex;flex-wrap:wrap;gap:1rem;justify-content:center}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:var(--c-text-lightest)}.home .hero .action-button{display:inline-block;font-size:1.2rem;padding:.8rem 1.6rem;border-width:2px;border-style:solid;border-radius:4px;transition:background-color var(--t-color);box-sizing:border-box}.home .hero .action-button.primary{color:var(--c-bg);background-color:var(--c-brand);border-color:var(--c-brand)}.home .hero .action-button.primary:hover{background-color:var(--c-brand-light)}.home .hero .action-button.secondary{color:var(--c-brand);background-color:var(--c-bg);border-color:var(--c-brand)}.home .hero .action-button.secondary:hover{color:var(--c-bg);background-color:var(--c-brand-light)}.home .features{border-top:1px solid var(--c-border);transition:border-color var(--t-color);padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:var(--c-text-light)}.home .feature p{color:var(--c-text-lighter)}.home .theme-default-content{padding:0;margin:0}.home .footer{padding:2.5rem;border-top:1px solid var(--c-border);text-align:center;color:var(--c-text-lighter);transition:border-color var(--t-color)}@media (max-width: 719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width: 419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero h1,.home .hero .description,.home .hero .actions{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.page{padding-top:var(--navbar-height);padding-left:var(--sidebar-width)}.navbar{position:fixed;z-index:20;top:0;left:0;right:0;height:var(--navbar-height);box-sizing:border-box;border-bottom:1px solid var(--c-border);background-color:var(--c-bg-navbar);transition:background-color var(--t-color),border-color var(--t-color)}.sidebar{font-size:16px;width:var(--sidebar-width);position:fixed;z-index:10;margin:0;top:var(--navbar-height);left:0;bottom:0;box-sizing:border-box;border-right:1px solid var(--c-border);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--c-brand) var(--c-border);background-color:var(--c-bg-sidebar);transition:transform var(--t-transform),background-color var(--t-color),border-color var(--t-color)}.sidebar::-webkit-scrollbar{width:7px}.sidebar::-webkit-scrollbar-track{background-color:var(--c-border)}.sidebar::-webkit-scrollbar-thumb{background-color:var(--c-brand)}.sidebar-mask{position:fixed;z-index:9;top:0;left:0;width:100vw;height:100vh;display:none}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(1){transform:rotate(45deg) translate3d(5.5px,5.5px,0)}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(2){transform:scale3d(0,1,1)}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(3){transform:rotate(-45deg) translate3d(6px,-6px,0)}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(1),.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(3){transform-origin:center}.theme-container.no-navbar .theme-default-content h1,.theme-container.no-navbar .theme-default-content h2,.theme-container.no-navbar .theme-default-content h3,.theme-container.no-navbar .theme-default-content h4,.theme-container.no-navbar .theme-default-content h5,.theme-container.no-navbar .theme-default-content h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .page{padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width: 720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}.theme-default-content a:hover{text-decoration:underline}.theme-default-content img{max-width:100%}.theme-default-content h1,.theme-default-content h2,.theme-default-content h3,.theme-default-content h4,.theme-default-content h5,.theme-default-content h6{margin-top:calc(.5rem - var(--navbar-height));padding-top:calc(1rem + var(--navbar-height));margin-bottom:0}.theme-default-content h1:first-child,.theme-default-content h2:first-child,.theme-default-content h3:first-child,.theme-default-content h4:first-child,.theme-default-content h5:first-child,.theme-default-content h6:first-child{margin-bottom:1rem}.theme-default-content h1:first-child+p,.theme-default-content h1:first-child+pre,.theme-default-content h1:first-child+.custom-container,.theme-default-content h2:first-child+p,.theme-default-content h2:first-child+pre,.theme-default-content h2:first-child+.custom-container,.theme-default-content h3:first-child+p,.theme-default-content h3:first-child+pre,.theme-default-content h3:first-child+.custom-container,.theme-default-content h4:first-child+p,.theme-default-content h4:first-child+pre,.theme-default-content h4:first-child+.custom-container,.theme-default-content h5:first-child+p,.theme-default-content h5:first-child+pre,.theme-default-content h5:first-child+.custom-container,.theme-default-content h6:first-child+p,.theme-default-content h6:first-child+pre,.theme-default-content h6:first-child+.custom-container{margin-top:2rem}@media (max-width: 959px){.sidebar{font-size:15px;width:var(--sidebar-width-mobile)}.page{padding-left:var(--sidebar-width-mobile)}}@media (max-width: 719px){.sidebar{top:0;padding-top:var(--navbar-height);transform:translate(-100%)}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translate(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width: 419px){h1{font-size:1.9rem}}.navbar{--navbar-line-height: calc( var(--navbar-height) - 2 * var(--navbar-padding-v) );padding:var(--navbar-padding-v) var(--navbar-padding-h);line-height:var(--navbar-line-height)}.navbar .logo{height:var(--navbar-line-height);margin-right:var(--navbar-padding-v);vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:var(--c-text);position:relative}.navbar .navbar-items-wrapper{display:flex;position:absolute;box-sizing:border-box;top:var(--navbar-padding-v);right:var(--navbar-padding-h);height:var(--navbar-line-height);padding-left:var(--navbar-padding-h);white-space:nowrap;font-size:.9rem}.navbar .navbar-items-wrapper .search-box{flex:0 0 auto;vertical-align:top}@media (max-width: 719px){.navbar{padding-left:4rem}.navbar .can-hide{display:none}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.navbar-items{display:inline-block}.navbar-items a{display:inline-block;line-height:1.4rem;color:inherit}.navbar-items a:hover,.navbar-items a.router-link-active{color:var(--c-text-accent)}.navbar-items .navbar-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:var(--navbar-line-height)}.navbar-items .navbar-item:first-child{margin-left:0}@media (max-width: 719px){.navbar-items .navbar-item{margin-left:0}}@media (min-width: 719px){.navbar-items a:hover,.navbar-items a.router-link-active{color:var(--c-text)}.navbar-item>a:hover,.navbar-item>a.router-link-active{margin-bottom:-2px;border-bottom:2px solid var(--c-text-accent)}}.toggle-sidebar-button{position:absolute;top:.6rem;left:1rem;display:none;padding:.6rem;cursor:pointer}.toggle-sidebar-button .icon{display:flex;flex-direction:column;justify-content:center;align-items:center;width:1.25rem;height:1.25rem;cursor:inherit}.toggle-sidebar-button .icon span{display:inline-block;width:100%;height:2px;border-radius:2px;background-color:var(--c-text);transition:transform var(--t-transform)}.toggle-sidebar-button .icon span:nth-child(2){margin:6px 0}@media screen and (max-width: 719px){.toggle-sidebar-button{display:block}}.toggle-color-mode-button{display:flex;margin:auto;margin-left:1rem;border:0;background:none;color:var(--c-text);opacity:.8;cursor:pointer}.toggle-color-mode-button:hover{opacity:1}.toggle-color-mode-button .icon{width:1.25rem;height:1.25rem}.DocSearch{transition:background-color var(--t-color)}.navbar-dropdown-wrapper{cursor:pointer}.navbar-dropdown-wrapper .navbar-dropdown-title,.navbar-dropdown-wrapper .navbar-dropdown-title-mobile{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:var(--c-text)}.navbar-dropdown-wrapper .navbar-dropdown-title:hover,.navbar-dropdown-wrapper .navbar-dropdown-title-mobile:hover{border-color:transparent}.navbar-dropdown-wrapper .navbar-dropdown-title .arrow,.navbar-dropdown-wrapper .navbar-dropdown-title-mobile .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.navbar-dropdown-wrapper .navbar-dropdown-title-mobile{display:none;font-weight:600;font-size:inherit}.navbar-dropdown-wrapper .navbar-dropdown-title-mobile:hover{color:var(--c-text-accent)}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item{color:inherit;line-height:1.7rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle{margin:.45rem 0 0;border-top:1px solid var(--c-border);padding:1rem 0 .45rem;font-size:.9rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle>span{padding:0 1.5rem 0 1.25rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle>a{font-weight:inherit}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle>a.router-link-active:after{display:none}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subitem-wrapper{padding:0;list-style:none}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subitem-wrapper .navbar-dropdown-subitem{font-size:.9em}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a:hover,.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a.router-link-active{color:var(--c-text-accent)}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid var(--c-text-accent);border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item:first-child .navbar-dropdown-subtitle{margin-top:0;padding-top:0;border-top:0}@media (max-width: 719px){.navbar-dropdown-wrapper.open .navbar-dropdown-title,.navbar-dropdown-wrapper.open .navbar-dropdown-title-mobile{margin-bottom:.5rem}.navbar-dropdown-wrapper .navbar-dropdown-title,.navbar-dropdown-wrapper .navbar-dropdown-title-mobile{display:none}.navbar-dropdown-wrapper .navbar-dropdown-title-mobile{display:block}.navbar-dropdown-wrapper .navbar-dropdown{transition:height .1s ease-out;overflow:hidden}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle{border-top:0;margin-top:0;padding-top:0;padding-bottom:0}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle,.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item>a{font-size:15px;line-height:2rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width: 720px){.navbar-dropdown-wrapper{height:1.8rem}.navbar-dropdown-wrapper:hover .navbar-dropdown,.navbar-dropdown-wrapper.open .navbar-dropdown{display:block!important}.navbar-dropdown-wrapper.open:blur{display:none}.navbar-dropdown-wrapper .navbar-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:var(--c-bg-navbar);padding:.6rem 0;border:1px solid var(--c-border);border-bottom-color:var(--c-border-dark);text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.page{padding-bottom:2rem;display:block}.page .theme-default-content{max-width:var(--content-width);margin:0 auto;padding:2rem 2.5rem;padding-top:0}@media (max-width: 959px){.page .theme-default-content{padding:2rem}}@media (max-width: 419px){.page .theme-default-content{padding:1.5rem}}.page-meta{max-width:var(--content-width);margin:0 auto;padding:1rem 2.5rem;overflow:auto}@media (max-width: 959px){.page-meta{padding:2rem}}@media (max-width: 419px){.page-meta{padding:1.5rem}}.page-meta .meta-item{cursor:default;margin-top:.8rem}.page-meta .meta-item .meta-item-label{font-weight:500;color:var(--c-text-lighter)}.page-meta .meta-item .meta-item-info{font-weight:400;color:var(--c-text-quote)}.page-meta .edit-link{display:inline-block;margin-right:.25rem}.page-meta .last-updated{float:right}@media (max-width: 719px){.page-meta .last-updated{font-size:.8em;float:none}.page-meta .contributors{font-size:.8em}}.page-nav{max-width:var(--content-width);margin:0 auto;padding:1rem 2.5rem 2rem;padding-bottom:0}@media (max-width: 959px){.page-nav{padding:2rem}}@media (max-width: 419px){.page-nav{padding:1.5rem}}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid var(--c-border);transition:border-color var(--t-color);padding-top:1rem;overflow:auto}.page-nav .prev a:before{content:"\2190"}.page-nav .next{float:right}.page-nav .next a:after{content:"\2192"}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .navbar-items{display:none;border-bottom:1px solid var(--c-border);transition:border-color var(--t-color);padding:.5rem 0 .75rem}.sidebar .navbar-items a{font-weight:600}.sidebar .navbar-items .navbar-item{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar .sidebar-items{padding:1.5rem 0}@media (max-width: 719px){.sidebar .navbar-items{display:block}.sidebar .navbar-items .navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar .sidebar-items{padding:1rem 0}}.sidebar-item{cursor:default;border-left:.25rem solid transparent;color:var(--c-text)}.sidebar-item:focus-visible{outline-width:1px;outline-offset:-1px}.sidebar-item.active:not(p.sidebar-heading){font-weight:600;color:var(--c-text-accent);border-left-color:var(--c-text-accent)}.sidebar-item.sidebar-heading{transition:color .15s ease;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0}.sidebar-item.sidebar-heading+.sidebar-item-children{transition:height .1s ease-out;overflow:hidden;margin-bottom:.75rem}.sidebar-item.sidebar-heading.collapsible{cursor:pointer}.sidebar-item.sidebar-heading.collapsible .arrow{position:relative;top:-.12em;left:.5em}.sidebar-item:not(.sidebar-heading){font-size:1em;font-weight:400;display:inline-block;margin:0;padding:.35rem 1rem .35rem 2rem;line-height:1.4;width:100%;box-sizing:border-box}.sidebar-item:not(.sidebar-heading)+.sidebar-item-children{padding-left:1rem;font-size:.95em}.sidebar-item-children .sidebar-item-children .sidebar-item:not(.sidebar-heading){padding:.25rem 1rem .25rem 1.75rem}.sidebar-item-children .sidebar-item-children .sidebar-item:not(.sidebar-heading).active{font-weight:500;border-left-color:transparent}a.sidebar-heading+.sidebar-item-children .sidebar-item:not(.sidebar-heading).active{border-left-color:transparent}a.sidebar-item{cursor:pointer}a.sidebar-item:hover{color:var(--c-text-accent)}.table-of-contents .badge{vertical-align:middle}.dropdown-enter-from,.dropdown-leave-to{height:0!important}.fade-slide-y-enter-active{transition:all .2s ease}.fade-slide-y-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)}.fade-slide-y-enter-from,.fade-slide-y-leave-to{transform:translateY(10px);opacity:0}:root{--sidebar-width: 17rem;scroll-behavior:smooth}.site-name.can-hide{display:none}:root{--box-shadow: #f0f1f2}html.dark{--box-shadow: #0f0e0d}:root{--card-shadow: rgba(0, 0, 0, .15)}html.dark{--card-shadow: rgba(0, 0, 0, .3)}:root{--black: #000}html.dark{--black: #fff}:root{--dark-grey: #666}html.dark{--dark-grey: #999}:root{--light-grey: #999}html.dark{--light-grey: #666}:root{--white: #fff}html.dark{--white: #000}:root{--grey3: #333}html.dark{--grey3: #bbb}:root{--grey12: #bbb}html.dark{--grey12: #333}:root{--grey14: #eee}html.dark{--grey14: #111}:root{--navbar-height: 3.6rem}:root{--content-width: 740px}:root{--color-transition: .3s ease}:root{--transform-transition: .3s ease}@-webkit-keyframes message-move-in{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}@keyframes message-move-in{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}@-webkit-keyframes message-move-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-100%)}}@keyframes message-move-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-100%)}}#message-container{position:fixed;top:calc(var(--navbar-height) + 1rem);right:0;left:0;z-index:75;text-align:center}#message-container .message{display:inline-block;padding:8px 10px;border-radius:3px;background:var(--c-bg, #fff);color:var(--c-text, #2c3e50);box-shadow:0 0 10px 0 var(--box-shadow, #f0f1f2);font-size:14px;transition:height .2s ease-in-out,margin .2s ease-in-out}#message-container .message.move-in{-webkit-animation:message-move-in .3s ease-in-out;animation:message-move-in .3s ease-in-out}#message-container .message.move-out{-webkit-animation:message-move-out .3s ease-in-out;animation:message-move-out .3s ease-in-out;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}#message-container .message svg{position:relative;bottom:-.125em;margin-right:5px}:root{--balloon-border-radius: 2px;--balloon-color: rgba(16, 16, 16, .95);--balloon-text-color: #fff;--balloon-font-size: 12px;--balloon-move: 4px}button[aria-label][data-balloon-pos]{overflow:visible}[aria-label][data-balloon-pos]{position:relative;cursor:pointer}[aria-label][data-balloon-pos]:after{opacity:0;pointer-events:none;transition:all .18s ease-out .18s;text-indent:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-weight:400;font-style:normal;text-shadow:none;font-size:var(--balloon-font-size);background:var(--balloon-color);border-radius:2px;color:var(--balloon-text-color);border-radius:var(--balloon-border-radius);content:attr(aria-label);padding:.5em 1em;position:absolute;white-space:nowrap;z-index:10}[aria-label][data-balloon-pos]:before{width:0;height:0;border:5px solid transparent;border-top-color:var(--balloon-color);opacity:0;pointer-events:none;transition:all .18s ease-out .18s;content:"";position:absolute;z-index:10}[aria-label][data-balloon-pos]:hover:before,[aria-label][data-balloon-pos]:hover:after,[aria-label][data-balloon-pos][data-balloon-visible]:before,[aria-label][data-balloon-pos][data-balloon-visible]:after,[aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:before,[aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:after{opacity:1;pointer-events:none}[aria-label][data-balloon-pos].font-awesome:after{font-family:FontAwesome,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[aria-label][data-balloon-pos][data-balloon-break]:after{white-space:pre}[aria-label][data-balloon-pos][data-balloon-break][data-balloon-length]:after{white-space:pre-line;word-break:break-word}[aria-label][data-balloon-pos][data-balloon-blunt]:before,[aria-label][data-balloon-pos][data-balloon-blunt]:after{transition:none}[aria-label][data-balloon-pos][data-balloon-pos=up]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=up][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=down]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=down][data-balloon-visible]:after{transform:translate(-50%)}[aria-label][data-balloon-pos][data-balloon-pos=up]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=up][data-balloon-visible]:before,[aria-label][data-balloon-pos][data-balloon-pos=down]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=down][data-balloon-visible]:before{transform:translate(-50%)}[aria-label][data-balloon-pos][data-balloon-pos*=-left]:after{left:0}[aria-label][data-balloon-pos][data-balloon-pos*=-left]:before{left:5px}[aria-label][data-balloon-pos][data-balloon-pos*=-right]:after{right:0}[aria-label][data-balloon-pos][data-balloon-pos*=-right]:before{right:5px}[aria-label][data-balloon-pos][data-balloon-po*=-left]:hover:after,[aria-label][data-balloon-pos][data-balloon-po*=-left][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos*=-right]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos*=-right][data-balloon-visible]:after{transform:translate(0)}[aria-label][data-balloon-pos][data-balloon-po*=-left]:hover:before,[aria-label][data-balloon-pos][data-balloon-po*=-left][data-balloon-visible]:before,[aria-label][data-balloon-pos][data-balloon-pos*=-right]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos*=-right][data-balloon-visible]:before{transform:translate(0)}[aria-label][data-balloon-pos][data-balloon-pos^=up]:before,[aria-label][data-balloon-pos][data-balloon-pos^=up]:after{bottom:100%;transform-origin:top;transform:translateY(var(--balloon-move))}[aria-label][data-balloon-pos][data-balloon-pos^=up]:after{margin-bottom:10px}[aria-label][data-balloon-pos][data-balloon-pos=up]:before,[aria-label][data-balloon-pos][data-balloon-pos=up]:after{left:50%;transform:translate(-50%,var(--balloon-move))}[aria-label][data-balloon-pos][data-balloon-pos^=down]:before,[aria-label][data-balloon-pos][data-balloon-pos^=down]:after{top:100%;transform:translateY(calc(var(--balloon-move) * -1))}[aria-label][data-balloon-pos][data-balloon-pos^=down]:after{margin-top:10px}[aria-label][data-balloon-pos][data-balloon-pos^=down]:before{width:0;height:0;border:5px solid transparent;border-bottom-color:var(--balloon-color)}[aria-label][data-balloon-pos][data-balloon-pos=down]:after,[aria-label][data-balloon-pos][data-balloon-pos=down]:before{left:50%;transform:translate(-50%,calc(var(--balloon-move) * -1))}[aria-label][data-balloon-pos][data-balloon-pos=left]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=left][data-balloon-visible]:after,[aria-label][data-balloon-pos][data-balloon-pos=right]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=right][data-balloon-visible]:after{transform:translateY(-50%)}[aria-label][data-balloon-pos][data-balloon-pos=left]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=left][data-balloon-visible]:before,[aria-label][data-balloon-pos][data-balloon-pos=right]:hover:before,[aria-label][data-balloon-pos][data-balloon-pos=right][data-balloon-visible]:before{transform:translateY(-50%)}[aria-label][data-balloon-pos][data-balloon-pos=left]:after,[aria-label][data-balloon-pos][data-balloon-pos=left]:before{right:100%;top:50%;transform:translate(var(--balloon-move),-50%)}[aria-label][data-balloon-pos][data-balloon-pos=left]:after{margin-right:10px}[aria-label][data-balloon-pos][data-balloon-pos=left]:before{width:0;height:0;border:5px solid transparent;border-left-color:var(--balloon-color)}[aria-label][data-balloon-pos][data-balloon-pos=right]:after,[aria-label][data-balloon-pos][data-balloon-pos=right]:before{left:100%;top:50%;transform:translate(calc(var(--balloon-move) * -1),-50%)}[aria-label][data-balloon-pos][data-balloon-pos=right]:after{margin-left:10px}[aria-label][data-balloon-pos][data-balloon-pos=right]:before{width:0;height:0;border:5px solid transparent;border-right-color:var(--balloon-color)}[aria-label][data-balloon-pos][data-balloon-length]:after{white-space:normal}[aria-label][data-balloon-pos][data-balloon-length=small]:after{width:80px}[aria-label][data-balloon-pos][data-balloon-length=medium]:after{width:150px}[aria-label][data-balloon-pos][data-balloon-length=large]:after{width:260px}[aria-label][data-balloon-pos][data-balloon-length=xlarge]:after{width:380px}@media screen and (max-width: 768px){[aria-label][data-balloon-pos][data-balloon-length=xlarge]:after{width:90vw}}[aria-label][data-balloon-pos][data-balloon-length=fit]:after{width:100%}.copy-code-button{border-width:0;background-color:transparent;cursor:pointer;width:32px;height:32px;padding:7px 8px;border-radius:50%;background:#339af0;color:#fff;outline:none}.copy-code-button:hover{background:#228be6;cursor:pointer!important}div[class*=language-] .copy-code-button{position:absolute;right:-14px;bottom:-14px;z-index:5}@media (max-width: 419px){div[class*=language-] .copy-code-button{right:0;bottom:0;width:28px;height:28px;border-radius:50% 10% 0}div[class*=language-] .copy-code-button .icon-copy-code{position:relative;top:2px;left:2px}}.copy-code-button .icon-copy-code{width:100%;height:100%}.copy-code-pure-button{border-width:0;background-color:transparent;cursor:pointer;box-sizing:content-box;width:.75rem;height:.75rem;padding:.8em;color:var(--code-ln-color, #9e9e9e);outline:none}.copy-code-pure-button:hover{background-color:var(--code-hl-bg-color, rgba(0, 0, 0, .66));cursor:pointer!important}div[class*=language-] .copy-code-pure-button{position:absolute;top:0;right:3em;z-index:5}.copy-code-pure-button .icon-copy-code{width:100%;height:100%;fill:currentcolor}/*! @docsearch/css 3.2.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::-moz-placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{-webkit-animation:none;animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{-webkit-animation:fade-in .1s ease-in forwards;animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:focus{outline:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:-webkit-sticky;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"\bb "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@media (min-width: 751px){#docsearch-container{min-width:171.36px}}@media (max-width: 750px){.DocSearch-Container{position:fixed}#docsearch-container{min-width:52px}} diff --git a/3.x/assets/sysenv.html.2f968356.js b/3.x/assets/sysenv.html.2f968356.js new file mode 100644 index 00000000000..8816fb19157 --- /dev/null +++ b/3.x/assets/sysenv.html.2f968356.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-0333612e","path":"/doc/sysenv.html","title":"sysenv","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[{"level":3,"title":"\u67E5\u770B\u6240\u6709\u73AF\u5883\u53D8\u91CF","slug":"\u67E5\u770B\u6240\u6709\u73AF\u5883\u53D8\u91CF","link":"#\u67E5\u770B\u6240\u6709\u73AF\u5883\u53D8\u91CF","children":[]},{"level":3,"title":"\u67E5\u770B\u5355\u4E2A\u73AF\u5883\u53D8\u91CF","slug":"\u67E5\u770B\u5355\u4E2A\u73AF\u5883\u53D8\u91CF","link":"#\u67E5\u770B\u5355\u4E2A\u73AF\u5883\u53D8\u91CF","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/sysenv.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/sysenv.html.ac969eec.js b/3.x/assets/sysenv.html.ac969eec.js new file mode 100644 index 00000000000..55987f151c1 --- /dev/null +++ b/3.x/assets/sysenv.html.ac969eec.js @@ -0,0 +1,52 @@ +import{_ as s,o as a,c as d,a as e,b as l,e as n,d as r,r as v}from"./app.4d248835.js";const c={},t=e("h1",{id:"sysenv",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#sysenv","aria-hidden":"true"},"#"),n(" sysenv")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-sysenv",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"sysenv",-1),o=n("\u5728\u7EBF\u6559\u7A0B"),b=r(`

    \u63D0\u793A

    \u67E5\u770B\u5F53\u524D JVM \u7684\u73AF\u5883\u5C5E\u6027(System Environment Variables)

    \u4F7F\u7528\u53C2\u8003

     USAGE:
    +   sysenv [-h] [env-name]
    +
    + SUMMARY:
    +   Display the system env.
    +
    + EXAMPLES:
    +   sysenv
    +   sysenv USER
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/sysenv
    +
    + OPTIONS:
    + -h, --help                                                 this help
    + <env-name>                                                 env name
    +

    \u67E5\u770B\u6240\u6709\u73AF\u5883\u53D8\u91CF

    $ sysenv
    + KEY                      VALUE
    +----------------------------------------------------------------------------------------------------------------------------
    + PATH                     /Users/admin/.sdkman/candidates/visualvm/current/bin:/Users/admin/.sdkman/candidates/ja
    +                          va/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/
    +                          MacOS
    + SDKMAN_VERSION           5.7.3+337
    + JAVA_HOME                /Users/admin/.sdkman/candidates/java/current
    + JAVA_MAIN_CLASS_65244    demo.MathGame
    + TERM                     xterm-256color
    + LANG                     zh_CN.UTF-8
    + AUTOJUMP_SOURCED         1
    + COLORTERM                truecolor
    + LOGNAME                  admin
    + XPC_SERVICE_NAME         0
    + PWD                      /Users/admin/code/ali/arthas/demo
    + TERM_PROGRAM_VERSION     3.2.5
    + _                        /Users/admin/.sdkman/candidates/java/current/bin/java
    + SHELL                    /bin/bash
    + TERM_PROGRAM             iTerm.app
    + SDKMAN_PLATFORM          Darwin
    + USER                     admin
    + ITERM_PROFILE            Default
    + TMPDIR                   /var/folders/0r/k561bkk917gg972stqclbz9h0000gn/T/
    + XPC_FLAGS                0x0
    + TERM_SESSION_ID          w0t4p0:60BC264D-9649-42AC-A7E4-AF85B69F93F8
    + __CF_USER_TEXT_ENCODING  0x1F5:0x19:0x34
    + Apple_PubSub_Socket_Ren  /private/tmp/com.apple.launchd.DwmmjSQsll/Render
    + der
    + COLORFGBG                7;0
    + HOME                     /Users/admin
    + SHLVL                    1
    + AUTOJUMP_ERROR_PATH      /Users/admin/Library/autojump/errors.log
    +

    \u67E5\u770B\u5355\u4E2A\u73AF\u5883\u53D8\u91CF

    \u63D0\u793A

    \u652F\u6301\u901A\u8FC7TAB\u952E\u81EA\u52A8\u8865\u5168

    $ sysenv USER
    +USER=admin
    +
    `,8);function h(_,p){const i=v("ExternalLinkIcon");return a(),d("div",null,[t,e("p",null,[e("a",m,[u,o,l(i)])]),b])}const R=s(c,[["render",h],["__file","sysenv.html.vue"]]);export{R as default}; diff --git a/3.x/assets/sysenv.html.ce9a0bce.js b/3.x/assets/sysenv.html.ce9a0bce.js new file mode 100644 index 00000000000..8cd26b2517b --- /dev/null +++ b/3.x/assets/sysenv.html.ce9a0bce.js @@ -0,0 +1,52 @@ +import{_ as s,o as a,c as d,a as e,b as l,e as n,d as r,r as v}from"./app.4d248835.js";const c={},t=e("h1",{id:"sysenv",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#sysenv","aria-hidden":"true"},"#"),n(" sysenv")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-sysenv",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"sysenv",-1),o=n(" online tutorial"),b=r(`

    TIP

    View the current JVM environment variables.

    Usage

     USAGE:
    +   sysenv [-h] [env-name]
    +
    + SUMMARY:
    +   Display the system env.
    +
    + EXAMPLES:
    +   sysenv
    +   sysenv USER
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/sysenv
    +
    + OPTIONS:
    + -h, --help                                                 this help
    + <env-name>                                                 env name
    +

    View all environment variables

    $ sysenv
    + KEY                      VALUE
    +----------------------------------------------------------------------------------------------------------------------------
    + PATH                     /Users/admin/.sdkman/candidates/visualvm/current/bin:/Users/admin/.sdkman/candidates/ja
    +                          va/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/
    +                          MacOS
    + SDKMAN_VERSION           5.7.3+337
    + JAVA_HOME                /Users/admin/.sdkman/candidates/java/current
    + JAVA_MAIN_CLASS_65244    demo.MathGame
    + TERM                     xterm-256color
    + LANG                     zh_CN.UTF-8
    + AUTOJUMP_SOURCED         1
    + COLORTERM                truecolor
    + LOGNAME                  admin
    + XPC_SERVICE_NAME         0
    + PWD                      /Users/admin/code/ali/arthas/demo
    + TERM_PROGRAM_VERSION     3.2.5
    + _                        /Users/admin/.sdkman/candidates/java/current/bin/java
    + SHELL                    /bin/bash
    + TERM_PROGRAM             iTerm.app
    + SDKMAN_PLATFORM          Darwin
    + USER                     admin
    + ITERM_PROFILE            Default
    + TMPDIR                   /var/folders/0r/k561bkk917gg972stqclbz9h0000gn/T/
    + XPC_FLAGS                0x0
    + TERM_SESSION_ID          w0t4p0:60BC264D-9649-42AC-A7E4-AF85B69F93F8
    + __CF_USER_TEXT_ENCODING  0x1F5:0x19:0x34
    + Apple_PubSub_Socket_Ren  /private/tmp/com.apple.launchd.DwmmjSQsll/Render
    + der
    + COLORFGBG                7;0
    + HOME                     /Users/admin
    + SHLVL                    1
    + AUTOJUMP_ERROR_PATH      /Users/admin/Library/autojump/errors.log
    +

    View individual environment variables

    TIP

    Use tab for auto-completion

    $ sysenv USER
    +USER=admin
    +
    `,8);function h(_,p){const i=v("ExternalLinkIcon");return a(),d("div",null,[t,e("p",null,[e("a",m,[u,o,l(i)])]),b])}const R=s(c,[["render",h],["__file","sysenv.html.vue"]]);export{R as default}; diff --git a/3.x/assets/sysenv.html.d4a09599.js b/3.x/assets/sysenv.html.d4a09599.js new file mode 100644 index 00000000000..7928e87840e --- /dev/null +++ b/3.x/assets/sysenv.html.d4a09599.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-645190d5","path":"/en/doc/sysenv.html","title":"sysenv","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"View all environment variables","slug":"view-all-environment-variables","link":"#view-all-environment-variables","children":[]},{"level":3,"title":"View individual environment variables","slug":"view-individual-environment-variables","link":"#view-individual-environment-variables","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/sysenv.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/sysprop.html.024045c5.js b/3.x/assets/sysprop.html.024045c5.js new file mode 100644 index 00000000000..2337f2f951d --- /dev/null +++ b/3.x/assets/sysprop.html.024045c5.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-1f738fad","path":"/en/doc/sysprop.html","title":"sysprop","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"Check all properties","slug":"check-all-properties","link":"#check-all-properties","children":[]},{"level":3,"title":"Check One Single Property","slug":"check-one-single-property","link":"#check-one-single-property","children":[]},{"level":3,"title":"Modify Single Property","slug":"modify-single-property","link":"#modify-single-property","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/sysprop.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/sysprop.html.36bf4069.js b/3.x/assets/sysprop.html.36bf4069.js new file mode 100644 index 00000000000..844c294fe8a --- /dev/null +++ b/3.x/assets/sysprop.html.36bf4069.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-7012b8ce","path":"/doc/sysprop.html","title":"sysprop","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[{"level":3,"title":"\u67E5\u770B\u6240\u6709\u5C5E\u6027","slug":"\u67E5\u770B\u6240\u6709\u5C5E\u6027","link":"#\u67E5\u770B\u6240\u6709\u5C5E\u6027","children":[]},{"level":3,"title":"\u67E5\u770B\u5355\u4E2A\u5C5E\u6027","slug":"\u67E5\u770B\u5355\u4E2A\u5C5E\u6027","link":"#\u67E5\u770B\u5355\u4E2A\u5C5E\u6027","children":[]},{"level":3,"title":"\u4FEE\u6539\u5355\u4E2A\u5C5E\u6027","slug":"\u4FEE\u6539\u5355\u4E2A\u5C5E\u6027","link":"#\u4FEE\u6539\u5355\u4E2A\u5C5E\u6027","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/sysprop.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/sysprop.html.76aee09d.js b/3.x/assets/sysprop.html.76aee09d.js new file mode 100644 index 00000000000..9ddf9ce0c3f --- /dev/null +++ b/3.x/assets/sysprop.html.76aee09d.js @@ -0,0 +1,96 @@ +import{_ as a,o as s,c as r,a as e,b as l,e as n,d,r as v}from"./app.4d248835.js";const t={},c=e("h1",{id:"sysprop",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#sysprop","aria-hidden":"true"},"#"),n(" sysprop")],-1),o={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-sysprop",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"sysprop",-1),m=n(" online tutorial"),b=d(`

    TIP

    Examine the system properties from the target JVM

    Usage

     USAGE:
    +   sysprop [-h] [property-name] [property-value]
    +
    + SUMMARY:
    +   Display, and change all the system properties.
    +
    + EXAMPLES:
    + sysprop
    + sysprop file.encoding
    + sysprop production.mode true
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/sysprop
    +
    + OPTIONS:
    + -h, --help                                  this help
    + <property-name>                             property name
    + <property-value>                            property value
    +

    Check all properties

    $ sysprop
    + KEY                                                  VALUE
    +-------------------------------------------------------------------------------------------------------------------------------------
    + java.runtime.name                                    Java(TM) SE Runtime Environment
    + sun.boot.library.path                                /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib
    + java.vm.version                                      25.51-b03
    + user.country.format                                  CN
    + gopherProxySet                                       false
    + java.vm.vendor                                       Oracle Corporation
    + java.vendor.url                                      http://java.oracle.com/
    + path.separator                                       :
    + java.vm.name                                         Java HotSpot(TM) 64-Bit Server VM
    + file.encoding.pkg                                    sun.io
    + user.country                                         US
    + sun.java.launcher                                    SUN_STANDARD
    + sun.os.patch.level                                   unknown
    + java.vm.specification.name                           Java Virtual Machine Specification
    + user.dir                                             /private/var/tmp
    + java.runtime.version                                 1.8.0_51-b16
    + java.awt.graphicsenv                                 sun.awt.CGraphicsEnvironment
    + java.endorsed.dirs                                   /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/endors
    +                                                      ed
    + os.arch                                              x86_64
    + java.io.tmpdir                                       /var/folders/2c/tbxwzs4s4sbcvh7frbcc7n000000gn/T/
    + line.separator
    +
    + java.vm.specification.vendor                         Oracle Corporation
    + os.name                                              Mac OS X
    + sun.jnu.encoding                                     UTF-8
    + java.library.path                                    /Users/wangtao/Library/Java/Extensions:/Library/Java/Extensions:/Network/Libra
    +                                                      ry/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
    + sun.nio.ch.bugLevel
    + java.specification.name                              Java Platform API Specification
    + java.class.version                                   52.0
    + sun.management.compiler                              HotSpot 64-Bit Tiered Compilers
    + os.version                                           10.12.6
    + user.home                                            /Users/wangtao
    + user.timezone                                        Asia/Shanghai
    + java.awt.printerjob                                  sun.lwawt.macosx.CPrinterJob
    + file.encoding                                        UTF-8
    + java.specification.version                           1.8
    + user.name                                            wangtao
    + java.class.path                                      .
    + java.vm.specification.version                        1.8
    + sun.arch.data.model                                  64
    + java.home                                            /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre
    + sun.java.command                                     Test
    + java.specification.vendor                            Oracle Corporation
    + user.language                                        en
    + awt.toolkit                                          sun.lwawt.macosx.LWCToolkit
    + java.vm.info                                         mixed mode
    + java.version                                         1.8.0_51
    + 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
    + sun.boot.class.path                                  /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/resour
    +                                                      ces.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/li
    +                                                      b/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/l
    +                                                      ib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/H
    +                                                      ome/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Content
    +                                                      s/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Conte
    +                                                      nts/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jd
    +                                                      k/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.
    +                                                      jdk/Contents/Home/jre/classes
    + java.vendor                                          Oracle Corporation
    + file.separator                                       /
    + java.vendor.url.bug                                  http://bugreport.sun.com/bugreport/
    + sun.cpu.endian                                       little
    + sun.io.unicode.encoding                              UnicodeBig
    + sun.cpu.isalist
    +

    Check One Single Property

    TIP

    Use tab for auto-completion

    $ sysprop java.version
    +java.version=1.8.0_51
    +

    Modify Single Property

    $ sysprop user.country
    +user.country=US
    +$ sysprop user.country CN
    +Successfully changed the system property.
    +user.country=CN
    +
    `,10);function p(h,j){const i=v("ExternalLinkIcon");return s(),r("div",null,[c,e("p",null,[e("a",o,[u,m,l(i)])]),b])}const g=a(t,[["render",p],["__file","sysprop.html.vue"]]);export{g as default}; diff --git a/3.x/assets/sysprop.html.aeb4ee87.js b/3.x/assets/sysprop.html.aeb4ee87.js new file mode 100644 index 00000000000..df8fca61077 --- /dev/null +++ b/3.x/assets/sysprop.html.aeb4ee87.js @@ -0,0 +1,96 @@ +import{_ as a,o as s,c as r,a as e,b as d,e as n,d as l,r as v}from"./app.4d248835.js";const c={},t=e("h1",{id:"sysprop",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#sysprop","aria-hidden":"true"},"#"),n(" sysprop")],-1),o={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-sysprop",target:"_blank",rel:"noopener noreferrer"},u=e("code",null,"sysprop",-1),m=n("\u5728\u7EBF\u6559\u7A0B"),b=l(`

    \u63D0\u793A

    \u67E5\u770B\u5F53\u524D JVM \u7684\u7CFB\u7EDF\u5C5E\u6027(System Property)

    \u4F7F\u7528\u53C2\u8003

     USAGE:
    +   sysprop [-h] [property-name] [property-value]
    +
    + SUMMARY:
    +   Display, and change all the system properties.
    +
    + EXAMPLES:
    + sysprop
    + sysprop file.encoding
    + sysprop production.mode true
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/sysprop
    +
    + OPTIONS:
    + -h, --help                                  this help
    + <property-name>                             property name
    + <property-value>                            property value
    +

    \u67E5\u770B\u6240\u6709\u5C5E\u6027

    $ sysprop
    + KEY                                                  VALUE
    +-------------------------------------------------------------------------------------------------------------------------------------
    + java.runtime.name                                    Java(TM) SE Runtime Environment
    + sun.boot.library.path                                /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib
    + java.vm.version                                      25.51-b03
    + user.country.format                                  CN
    + gopherProxySet                                       false
    + java.vm.vendor                                       Oracle Corporation
    + java.vendor.url                                      http://java.oracle.com/
    + path.separator                                       :
    + java.vm.name                                         Java HotSpot(TM) 64-Bit Server VM
    + file.encoding.pkg                                    sun.io
    + user.country                                         US
    + sun.java.launcher                                    SUN_STANDARD
    + sun.os.patch.level                                   unknown
    + java.vm.specification.name                           Java Virtual Machine Specification
    + user.dir                                             /private/var/tmp
    + java.runtime.version                                 1.8.0_51-b16
    + java.awt.graphicsenv                                 sun.awt.CGraphicsEnvironment
    + java.endorsed.dirs                                   /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/endors
    +                                                      ed
    + os.arch                                              x86_64
    + java.io.tmpdir                                       /var/folders/2c/tbxwzs4s4sbcvh7frbcc7n000000gn/T/
    + line.separator
    +
    + java.vm.specification.vendor                         Oracle Corporation
    + os.name                                              Mac OS X
    + sun.jnu.encoding                                     UTF-8
    + java.library.path                                    /Users/wangtao/Library/Java/Extensions:/Library/Java/Extensions:/Network/Libra
    +                                                      ry/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
    + sun.nio.ch.bugLevel
    + java.specification.name                              Java Platform API Specification
    + java.class.version                                   52.0
    + sun.management.compiler                              HotSpot 64-Bit Tiered Compilers
    + os.version                                           10.12.6
    + user.home                                            /Users/wangtao
    + user.timezone                                        Asia/Shanghai
    + java.awt.printerjob                                  sun.lwawt.macosx.CPrinterJob
    + file.encoding                                        UTF-8
    + java.specification.version                           1.8
    + user.name                                            wangtao
    + java.class.path                                      .
    + java.vm.specification.version                        1.8
    + sun.arch.data.model                                  64
    + java.home                                            /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre
    + sun.java.command                                     Test
    + java.specification.vendor                            Oracle Corporation
    + user.language                                        en
    + awt.toolkit                                          sun.lwawt.macosx.LWCToolkit
    + java.vm.info                                         mixed mode
    + java.version                                         1.8.0_51
    + 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
    + sun.boot.class.path                                  /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/resour
    +                                                      ces.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/li
    +                                                      b/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/l
    +                                                      ib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/H
    +                                                      ome/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Content
    +                                                      s/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Conte
    +                                                      nts/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jd
    +                                                      k/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.
    +                                                      jdk/Contents/Home/jre/classes
    + java.vendor                                          Oracle Corporation
    + file.separator                                       /
    + java.vendor.url.bug                                  http://bugreport.sun.com/bugreport/
    + sun.cpu.endian                                       little
    + sun.io.unicode.encoding                              UnicodeBig
    + sun.cpu.isalist
    +

    \u67E5\u770B\u5355\u4E2A\u5C5E\u6027

    \u63D0\u793A

    \u652F\u6301\u901A\u8FC7TAB\u952E\u81EA\u52A8\u8865\u5168

    $ sysprop java.version
    +java.version=1.8.0_51
    +

    \u4FEE\u6539\u5355\u4E2A\u5C5E\u6027

    $ sysprop user.country
    +user.country=US
    +$ sysprop user.country CN
    +Successfully changed the system property.
    +user.country=CN
    +
    `,10);function p(h,j){const i=v("ExternalLinkIcon");return s(),r("div",null,[t,e("p",null,[e("a",o,[u,m,d(i)])]),b])}const g=a(c,[["render",p],["__file","sysprop.html.vue"]]);export{g as default}; diff --git a/3.x/assets/tee.html.2c90d1cb.js b/3.x/assets/tee.html.2c90d1cb.js new file mode 100644 index 00000000000..6280c42c527 --- /dev/null +++ b/3.x/assets/tee.html.2c90d1cb.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-049503c9","path":"/en/doc/tee.html","title":"tee","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/tee.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/tee.html.8aa74468.js b/3.x/assets/tee.html.8aa74468.js new file mode 100644 index 00000000000..1ebfa6b2af6 --- /dev/null +++ b/3.x/assets/tee.html.8aa74468.js @@ -0,0 +1,18 @@ +import{_ as a,o as s,c as t,a as e,b as l,e as n,d,r}from"./app.4d248835.js";const c={},o=e("h1",{id:"tee",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#tee","aria-hidden":"true"},"#"),n(" tee")],-1),v={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-tee",target:"_blank",rel:"noopener noreferrer"},m=e("code",null,"tee",-1),u=n("\u5728\u7EBF\u6559\u7A0B"),p=d(`

    \u63D0\u793A

    \u7C7B\u4F3C\u4F20\u7EDF\u7684tee\u547D\u4EE4, \u7528\u4E8E\u8BFB\u53D6\u6807\u51C6\u8F93\u5165\u7684\u6570\u636E\uFF0C\u5E76\u5C06\u5176\u5185\u5BB9\u8F93\u51FA\u6210\u6587\u4EF6\u3002

    tee \u6307\u4EE4\u4F1A\u4ECE\u6807\u51C6\u8F93\u5165\u8BBE\u5907\u8BFB\u53D6\u6570\u636E\uFF0C\u5C06\u5176\u5185\u5BB9\u8F93\u51FA\u5230\u6807\u51C6\u8F93\u51FA\u8BBE\u5907\uFF0C\u540C\u65F6\u4FDD\u5B58\u6210\u6587\u4EF6\u3002

    \u4F7F\u7528\u53C2\u8003

     USAGE:
    +   tee [-a] [-h] [file]
    +
    + SUMMARY:
    +   tee command for pipes.
    +
    + EXAMPLES:
    +  sysprop | tee /path/to/logfile | grep java
    +  sysprop | tee -a /path/to/logfile | grep java
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/tee
    +
    + OPTIONS:
    + -a, --append                              Append to file
    + -h, --help                                this help
    + <file>                                    File path
    +
    `,3);function h(_,b){const i=r("ExternalLinkIcon");return s(),t("div",null,[o,e("p",null,[e("a",v,[m,u,l(i)])]),p])}const x=a(c,[["render",h],["__file","tee.html.vue"]]);export{x as default}; diff --git a/3.x/assets/tee.html.9daca569.js b/3.x/assets/tee.html.9daca569.js new file mode 100644 index 00000000000..a1c0158d68d --- /dev/null +++ b/3.x/assets/tee.html.9daca569.js @@ -0,0 +1,18 @@ +import{_ as t,o as i,c as s,a as e,b as d,e as n,d as l,r}from"./app.4d248835.js";const o={},c=e("h1",{id:"tee",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#tee","aria-hidden":"true"},"#"),n(" tee")],-1),u={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-tee",target:"_blank",rel:"noopener noreferrer"},v=e("code",null,"tee",-1),m=n(" online tutorial"),p=l(`

    TIP

    Similar to the traditional tee command, it is used to read standard input data and output its contents into a file.

    tee will read data from standard input device, output its content to standard output device, and save it as a file.

    Usage

     USAGE:
    +   tee [-a] [-h] [file]
    +
    + SUMMARY:
    +   tee command for pipes.
    +
    + EXAMPLES:
    +  sysprop | tee /path/to/logfile | grep java
    +  sysprop | tee -a /path/to/logfile | grep java
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/tee
    +
    + OPTIONS:
    + -a, --append                              Append to file
    + -h, --help                                this help
    + <file>                                    File path
    +
    `,3);function h(_,b){const a=r("ExternalLinkIcon");return i(),s("div",null,[c,e("p",null,[e("a",u,[v,m,d(a)])]),p])}const g=t(o,[["render",h],["__file","tee.html.vue"]]);export{g as default}; diff --git a/3.x/assets/tee.html.f88833bc.js b/3.x/assets/tee.html.f88833bc.js new file mode 100644 index 00000000000..e1c85b8e953 --- /dev/null +++ b/3.x/assets/tee.html.f88833bc.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-0536edb5","path":"/doc/tee.html","title":"tee","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/tee.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/thread.html.036b2896.js b/3.x/assets/thread.html.036b2896.js new file mode 100644 index 00000000000..2ef601e7eda --- /dev/null +++ b/3.x/assets/thread.html.036b2896.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-10845ac2","path":"/doc/thread.html","title":"thread","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":"cpu \u4F7F\u7528\u7387\u662F\u5982\u4F55\u7EDF\u8BA1\u51FA\u6765\u7684\uFF1F","slug":"cpu-\u4F7F\u7528\u7387\u662F\u5982\u4F55\u7EDF\u8BA1\u51FA\u6765\u7684","link":"#cpu-\u4F7F\u7528\u7387\u662F\u5982\u4F55\u7EDF\u8BA1\u51FA\u6765\u7684","children":[{"level":3,"title":"\u5DE5\u4F5C\u539F\u7406\u8BF4\u660E\uFF1A","slug":"\u5DE5\u4F5C\u539F\u7406\u8BF4\u660E","link":"#\u5DE5\u4F5C\u539F\u7406\u8BF4\u660E","children":[]}]},{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[{"level":3,"title":"\u652F\u6301\u4E00\u952E\u5C55\u793A\u5F53\u524D\u6700\u5FD9\u7684\u524D N \u4E2A\u7EBF\u7A0B\u5E76\u6253\u5370\u5806\u6808\uFF1A","slug":"\u652F\u6301\u4E00\u952E\u5C55\u793A\u5F53\u524D\u6700\u5FD9\u7684\u524D-n-\u4E2A\u7EBF\u7A0B\u5E76\u6253\u5370\u5806\u6808","link":"#\u652F\u6301\u4E00\u952E\u5C55\u793A\u5F53\u524D\u6700\u5FD9\u7684\u524D-n-\u4E2A\u7EBF\u7A0B\u5E76\u6253\u5370\u5806\u6808","children":[]},{"level":3,"title":"\u5F53\u6CA1\u6709\u53C2\u6570\u65F6\uFF0C\u663E\u793A\u7B2C\u4E00\u9875\u7EBF\u7A0B\u7684\u4FE1\u606F","slug":"\u5F53\u6CA1\u6709\u53C2\u6570\u65F6-\u663E\u793A\u7B2C\u4E00\u9875\u7EBF\u7A0B\u7684\u4FE1\u606F","link":"#\u5F53\u6CA1\u6709\u53C2\u6570\u65F6-\u663E\u793A\u7B2C\u4E00\u9875\u7EBF\u7A0B\u7684\u4FE1\u606F","children":[]},{"level":3,"title":"thread --all, \u663E\u793A\u6240\u6709\u5339\u914D\u7684\u7EBF\u7A0B","slug":"thread-all-\u663E\u793A\u6240\u6709\u5339\u914D\u7684\u7EBF\u7A0B","link":"#thread-all-\u663E\u793A\u6240\u6709\u5339\u914D\u7684\u7EBF\u7A0B","children":[]},{"level":3,"title":"thread id, \u663E\u793A\u6307\u5B9A\u7EBF\u7A0B\u7684\u8FD0\u884C\u5806\u6808","slug":"thread-id-\u663E\u793A\u6307\u5B9A\u7EBF\u7A0B\u7684\u8FD0\u884C\u5806\u6808","link":"#thread-id-\u663E\u793A\u6307\u5B9A\u7EBF\u7A0B\u7684\u8FD0\u884C\u5806\u6808","children":[]},{"level":3,"title":"thread -b, \u627E\u51FA\u5F53\u524D\u963B\u585E\u5176\u4ED6\u7EBF\u7A0B\u7684\u7EBF\u7A0B","slug":"thread-b-\u627E\u51FA\u5F53\u524D\u963B\u585E\u5176\u4ED6\u7EBF\u7A0B\u7684\u7EBF\u7A0B","link":"#thread-b-\u627E\u51FA\u5F53\u524D\u963B\u585E\u5176\u4ED6\u7EBF\u7A0B\u7684\u7EBF\u7A0B","children":[]},{"level":3,"title":"thread -i, \u6307\u5B9A\u91C7\u6837\u65F6\u95F4\u95F4\u9694","slug":"thread-i-\u6307\u5B9A\u91C7\u6837\u65F6\u95F4\u95F4\u9694","link":"#thread-i-\u6307\u5B9A\u91C7\u6837\u65F6\u95F4\u95F4\u9694","children":[]},{"level":3,"title":"thread --state \uFF0C\u67E5\u770B\u6307\u5B9A\u72B6\u6001\u7684\u7EBF\u7A0B","slug":"thread-state-\u67E5\u770B\u6307\u5B9A\u72B6\u6001\u7684\u7EBF\u7A0B","link":"#thread-state-\u67E5\u770B\u6307\u5B9A\u72B6\u6001\u7684\u7EBF\u7A0B","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/thread.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/thread.html.3171fcb1.js b/3.x/assets/thread.html.3171fcb1.js new file mode 100644 index 00000000000..aca7f298f3e --- /dev/null +++ b/3.x/assets/thread.html.3171fcb1.js @@ -0,0 +1,112 @@ +import{_ as r,o as c,c as i,a,b as s,w as l,e as n,d as e,r as p}from"./app.4d248835.js";const d={},u=a("h1",{id:"thread",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#thread","aria-hidden":"true"},"#"),n(" thread")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-thread",target:"_blank",rel:"noopener noreferrer"},h=a("code",null,"thread",-1),v=n(" online tutorial"),b=e('

    TIP

    Check the basic info and stack trace of the target thread.

    Parameters

    NameSpecification
    idthread id in JVM
    [n:]the top n busiest threads with stack traces printed
    [b]locate the thread blocking the others
    [i <value>]specify the interval to collect data to compute CPU ratios (ms)
    [--all]Show all matching threads

    How the CPU ratios are calculated?

    The cpu ratios here is similar to the thread %CPU of the linux command top -H -p <pid>. During a sampling interval, the ratio of the incremental cpu time of each thread in the current JVM to the sampling interval time.

    Working principle description:

    • Do the first sampling, get the CPU time of all threads ( by calling java.lang.management.ThreadMXBean#getThreadCpuTime() and sun.management.HotspotThreadMBean.getInternalThreadCpuTimes() )
    • Sleep and wait for an interval (the default is 200ms, the interval can be specified by -i)
    • Do the second sampling, get the CPU time of all threads, compare the two sampling data, and calculate the incremental CPU time of each thread
    • Thread CPU usage ratio = Thread increment CPU time / Sampling interval time * 100%

    Note: this operation consumes CPU time too (getThreadCpuTime is time-consuming), therefore it is possible to observe Arthas's thread appears in the list. To avoid this, try to increase sample interval, for example: 5000 ms.

    ',8),k=n("Another way to view the thread cpu usage of the Java process, "),g={href:"https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/java.md#-show-busy-java-threads",target:"_blank",rel:"noopener noreferrer"},T=a("code",null,"show-busy-java-threads",-1),f=n(" can come to help."),j=e(`

    Usage

    List the top n busiest threads with detailed stack trace

    $ thread -n 3
    +"C1 CompilerThread0" [Internal] cpuUsage=1.63% deltaTime=3ms time=1170ms
    +
    +
    +"arthas-command-execute" Id=23 cpuUsage=0.11% deltaTime=0ms time=401ms RUNNABLE
    +    at java.management@11.0.7/sun.management.ThreadImpl.dumpThreads0(Native Method)
    +    at java.management@11.0.7/sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:466)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads(ThreadCommand.java:199)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process(ThreadCommand.java:122)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:82)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:18)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:111)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:108)
    +    at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:385)
    +    at java.base@11.0.7/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    +    at java.base@11.0.7/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    +    at java.base@11.0.7/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    +    at java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    +    at java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    +    at java.base@11.0.7/java.lang.Thread.run(Thread.java:834)
    +
    +
    +"VM Periodic Task Thread" [Internal] cpuUsage=0.07% deltaTime=0ms time=584ms
    +
    `,3),I=n("Without thread ID, including "),A=a("code",null,"[Internal]",-1),C=n(" means JVM internal thread, refer to the introduction of "),y=n("dashboard"),x=n(" command."),E=a("code",null,"cpuUsage",-1),_=n(" is the CPU usage of the thread during the sampling interval, consistent with the data of the "),N=n("dashboard"),P=n(" command."),w=a("li",null,[a("code",null,"deltaTime"),n(" is the incremental CPU time of the thread during the sampling interval. If it is less than 1ms, it will be rounded and displayed as 0ms.")],-1),S=a("li",null,[a("code",null,"time"),n(" The total CPU time of thread.")],-1),U=e(`

    Note: The thread stack is acquired at the end of the second sampling, which does not indicate that the thread is processing the same task during the sampling interval. It is recommended that the interval time should not be too long. The larger the interval time, the more inaccurate.

    You can try to specify different intervals according to the specific situation and observe the output results.

    List first page threads' info when no options provided

    By default, they are arranged in descending order of CPU increment time, and only the first page of data is displayed.

    $ thread
    +Threads Total: 33, NEW: 0, RUNNABLE: 9, BLOCKED: 0, WAITING: 3, TIMED_WAITING: 4, TERMINATED: 0, Internal threads: 17
    +ID   NAME                           GROUP          PRIORITY  STATE     %CPU      DELTA_TIME TIME      INTERRUPT DAEMON
    +-1   C2 CompilerThread0             -              -1        -         5.06      0.010      0:0.973   false     true
    +-1   C1 CompilerThread0             -              -1        -         0.95      0.001      0:0.603   false     true
    +23   arthas-command-execute         system         5         RUNNABLE  0.17      0.000      0:0.226   false     true
    +-1   VM Periodic Task Thread        -              -1        -         0.05      0.000      0:0.094   false     true
    +-1   Sweeper thread                 -              -1        -         0.04      0.000      0:0.011   false     true
    +-1   G1 Young RemSet Sampling       -              -1        -         0.02      0.000      0:0.025   false     true
    +12   Attach Listener                system         9         RUNNABLE  0.0       0.000      0:0.022   false     true
    +11   Common-Cleaner                 InnocuousThrea 8         TIMED_WAI 0.0       0.000      0:0.000   false     true
    +3    Finalizer                      system         8         WAITING   0.0       0.000      0:0.000   false     true
    +2    Reference Handler              system         10        RUNNABLE  0.0       0.000      0:0.000   false     true
    +4    Signal Dispatcher              system         9         RUNNABLE  0.0       0.000      0:0.000   false     true
    +15   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.029   false     true
    +22   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.196   false     true
    +24   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.038   false     true
    +16   arthas-NettyWebsocketTtyBootst system         5         RUNNABLE  0.0       0.000      0:0.001   false     true
    +17   arthas-NettyWebsocketTtyBootst system         5         RUNNABLE  0.0       0.000      0:0.001   false     true
    +

    thread --all, show all matching threads

    Display all matching threads. Sometimes it is necessary to obtain all the thread data of the JVM for analysis.

    thread id, show the running stack for the target thread

    $ thread 1
    +"main" Id=1 WAITING on java.util.concurrent.CountDownLatch$Sync@29fafb28
    +    at sun.misc.Unsafe.park(Native Method)
    +    -  waiting on java.util.concurrent.CountDownLatch$Sync@29fafb28
    +    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
    +    at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
    +

    thread -b, locate the thread bocking the others

    In some occasions, we experience the whole application is stuck because there's one particular thread hold one lock that other threads are relying on. To diagnose such an issue, Arthas provides thread -b to find the problematic thread in one single command.

    $ thread -b
    +"http-bio-8080-exec-4" Id=27 TIMED_WAITING
    +    at java.lang.Thread.sleep(Native Method)
    +    at test.arthas.TestThreadBlocking.doGet(TestThreadBlocking.java:22)
    +    -  locked java.lang.Object@725be470 <---- but blocks 4 other threads!
    +    at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    +    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at test.filter.TestDurexFilter.doFilter(TestDurexFilter.java:46)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    +    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    +    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    +    at com.taobao.tomcat.valves.ContextLoadFilterValve$FilterChainAdapter.doFilter(ContextLoadFilterValve.java:191)
    +    at com.taobao.eagleeye.EagleEyeFilter.doFilter(EagleEyeFilter.java:81)
    +    at com.taobao.tomcat.valves.ContextLoadFilterValve.invoke(ContextLoadFilterValve.java:150)
    +    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    +    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    +    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    +    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:429)
    +    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)
    +    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    +    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
    +    -  locked org.apache.tomcat.util.net.SocketWrapper@7127ee12
    +    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    +    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    +    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    +    at java.lang.Thread.run(Thread.java:745)
    +
    +    Number of locked synchronizers = 1
    +    - java.util.concurrent.ThreadPoolExecutor$Worker@31a6493e
    +

    Note: By now Arthas only supports to locate the thread blocked by synchronzied, while java.util.concurrent.Lock is not supported yet.

    thread -i, specify the sampling interval

    • thread -i 1000: Count the thread cpu time of the last 1000ms.

    • thread -n 3 -i 1000: List the 3 busiest thread stacks in 1000ms

    $ thread -n 3 -i 1000
    +"as-command-execute-daemon" Id=4759 cpuUsage=23% RUNNABLE
    +    at sun.management.ThreadImpl.dumpThreads0(Native Method)
    +    at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:440)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads(ThreadCommand.java:133)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process(ThreadCommand.java:79)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:96)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:27)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:125)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:122)
    +    at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:332)
    +    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    +    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    +    at java.lang.Thread.run(Thread.java:756)
    +
    +    Number of locked synchronizers = 1
    +    - java.util.concurrent.ThreadPoolExecutor$Worker@546aeec1
    +...
    +

    thread --state , view the special state theads

    [arthas@28114]$ thread --state WAITING
    +Threads Total: 16, NEW: 0, RUNNABLE: 9, BLOCKED: 0, WAITING: 3, TIMED_WAITING: 4, TERMINATED: 0
    +ID   NAME                           GROUP           PRIORITY   STATE     %CPU      DELTA_TIME TIME      INTERRUPTE DAEMON
    +3    Finalizer                      system          8          WAITING   0.0       0.000      0:0.000   false      true
    +20   arthas-UserStat                system          9          WAITING   0.0       0.000      0:0.001   false      true
    +14   arthas-timer                   system          9          WAITING   0.0       0.000      0:0.000   false      true
    +
    `,18);function F(L,B){const t=p("ExternalLinkIcon"),o=p("RouterLink");return c(),i("div",null,[u,a("p",null,[a("a",m,[h,v,s(t)])]),b,a("blockquote",null,[a("p",null,[k,a("a",g,[T,s(t)]),f])]),j,a("ul",null,[a("li",null,[I,A,C,s(o,{to:"/en/doc/dashboard.html"},{default:l(()=>[y]),_:1}),x]),a("li",null,[E,_,s(o,{to:"/en/doc/dashboard.html"},{default:l(()=>[N]),_:1}),P]),w,S]),U])}const W=r(d,[["render",F],["__file","thread.html.vue"]]);export{W as default}; diff --git a/3.x/assets/thread.html.c837e66a.js b/3.x/assets/thread.html.c837e66a.js new file mode 100644 index 00000000000..974b535523d --- /dev/null +++ b/3.x/assets/thread.html.c837e66a.js @@ -0,0 +1,112 @@ +import{_ as c,o as r,c as i,a,b as s,w as l,e as n,d as e,r as p}from"./app.4d248835.js";const u={},d=a("h1",{id:"thread",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#thread","aria-hidden":"true"},"#"),n(" thread")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-thread",target:"_blank",rel:"noopener noreferrer"},v=a("code",null,"thread",-1),b=n("\u5728\u7EBF\u6559\u7A0B"),k=e('

    \u63D0\u793A

    \u67E5\u770B\u5F53\u524D\u7EBF\u7A0B\u4FE1\u606F\uFF0C\u67E5\u770B\u7EBF\u7A0B\u7684\u5806\u6808

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    id\u7EBF\u7A0B id
    [n:]\u6307\u5B9A\u6700\u5FD9\u7684\u524D N \u4E2A\u7EBF\u7A0B\u5E76\u6253\u5370\u5806\u6808
    [b]\u627E\u51FA\u5F53\u524D\u963B\u585E\u5176\u4ED6\u7EBF\u7A0B\u7684\u7EBF\u7A0B
    [i <value>]\u6307\u5B9A cpu \u4F7F\u7528\u7387\u7EDF\u8BA1\u7684\u91C7\u6837\u95F4\u9694\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2\uFF0C\u9ED8\u8BA4\u503C\u4E3A 200
    [--all]\u663E\u793A\u6240\u6709\u5339\u914D\u7684\u7EBF\u7A0B

    cpu \u4F7F\u7528\u7387\u662F\u5982\u4F55\u7EDF\u8BA1\u51FA\u6765\u7684\uFF1F

    \u8FD9\u91CC\u7684 cpu \u4F7F\u7528\u7387\u4E0E linux \u547D\u4EE4top -H -p <pid> \u7684\u7EBF\u7A0B%CPU\u7C7B\u4F3C\uFF0C\u4E00\u6BB5\u91C7\u6837\u95F4\u9694\u65F6\u95F4\u5185\uFF0C\u5F53\u524D JVM \u91CC\u5404\u4E2A\u7EBF\u7A0B\u7684\u589E\u91CF cpu \u65F6\u95F4\u4E0E\u91C7\u6837\u95F4\u9694\u65F6\u95F4\u7684\u6BD4\u4F8B\u3002

    \u5DE5\u4F5C\u539F\u7406\u8BF4\u660E\uFF1A

    • \u9996\u5148\u7B2C\u4E00\u6B21\u91C7\u6837\uFF0C\u83B7\u53D6\u6240\u6709\u7EBF\u7A0B\u7684 CPU \u65F6\u95F4(\u8C03\u7528\u7684\u662Fjava.lang.management.ThreadMXBean#getThreadCpuTime()\u53CAsun.management.HotspotThreadMBean.getInternalThreadCpuTimes()\u63A5\u53E3)
    • \u7136\u540E\u7761\u7720\u7B49\u5F85\u4E00\u4E2A\u95F4\u9694\u65F6\u95F4\uFF08\u9ED8\u8BA4\u4E3A 200ms\uFF0C\u53EF\u4EE5\u901A\u8FC7-i\u6307\u5B9A\u95F4\u9694\u65F6\u95F4\uFF09
    • \u518D\u6B21\u7B2C\u4E8C\u6B21\u91C7\u6837\uFF0C\u83B7\u53D6\u6240\u6709\u7EBF\u7A0B\u7684 CPU \u65F6\u95F4\uFF0C\u5BF9\u6BD4\u4E24\u6B21\u91C7\u6837\u6570\u636E\uFF0C\u8BA1\u7B97\u51FA\u6BCF\u4E2A\u7EBF\u7A0B\u7684\u589E\u91CF CPU \u65F6\u95F4
    • \u7EBF\u7A0B CPU \u4F7F\u7528\u7387 = \u7EBF\u7A0B\u589E\u91CF CPU \u65F6\u95F4 / \u91C7\u6837\u95F4\u9694\u65F6\u95F4 * 100%

    \u6CE8\u610F

    \u6CE8\u610F\uFF1A \u8FD9\u4E2A\u7EDF\u8BA1\u4E5F\u4F1A\u4EA7\u751F\u4E00\u5B9A\u7684\u5F00\u9500\uFF08JDK \u8FD9\u4E2A\u63A5\u53E3\u672C\u8EAB\u5F00\u9500\u6BD4\u8F83\u5927\uFF09\uFF0C\u56E0\u6B64\u4F1A\u770B\u5230 as \u7684\u7EBF\u7A0B\u5360\u7528\u4E00\u5B9A\u7684\u767E\u5206\u6BD4\uFF0C\u4E3A\u4E86\u964D\u4F4E\u7EDF\u8BA1\u81EA\u8EAB\u7684\u5F00\u9500\u5E26\u6765\u7684\u5F71\u54CD\uFF0C\u53EF\u4EE5\u628A\u91C7\u6837\u95F4\u9694\u62C9\u957F\u4E00\u4E9B\uFF0C\u6BD4\u5982 5000 \u6BEB\u79D2\u3002

    ',8),h={class:"custom-container tip"},g=a("p",{class:"custom-container-title"},"\u63D0\u793A",-1),T=n("\u53E6\u5916\u4E00\u79CD\u67E5\u770B Java \u8FDB\u7A0B\u7684\u7EBF\u7A0B cpu \u4F7F\u7528\u7387\u65B9\u6CD5\uFF1A\u53EF\u4EE5\u4F7F\u7528"),j={href:"https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/java.md#-show-busy-java-threads",target:"_blank",rel:"noopener noreferrer"},I=a("code",null,"show-busy-java-threads",-1),A=n("\u8FD9\u4E2A\u811A\u672C\u3002"),C=e(`

    \u4F7F\u7528\u53C2\u8003

    \u652F\u6301\u4E00\u952E\u5C55\u793A\u5F53\u524D\u6700\u5FD9\u7684\u524D N \u4E2A\u7EBF\u7A0B\u5E76\u6253\u5370\u5806\u6808\uFF1A

    $ thread -n 3
    +"C1 CompilerThread0" [Internal] cpuUsage=1.63% deltaTime=3ms time=1170ms
    +
    +
    +"arthas-command-execute" Id=23 cpuUsage=0.11% deltaTime=0ms time=401ms RUNNABLE
    +    at java.management@11.0.7/sun.management.ThreadImpl.dumpThreads0(Native Method)
    +    at java.management@11.0.7/sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:466)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads(ThreadCommand.java:199)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process(ThreadCommand.java:122)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:82)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:18)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:111)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:108)
    +    at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:385)
    +    at java.base@11.0.7/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    +    at java.base@11.0.7/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    +    at java.base@11.0.7/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    +    at java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    +    at java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    +    at java.base@11.0.7/java.lang.Thread.run(Thread.java:834)
    +
    +
    +"VM Periodic Task Thread" [Internal] cpuUsage=0.07% deltaTime=0ms time=584ms
    +
    `,3),f=n("\u6CA1\u6709\u7EBF\u7A0B ID\uFF0C\u5305\u542B"),_=a("code",null,"[Internal]",-1),x=n("\u8868\u793A\u4E3A JVM \u5185\u90E8\u7EBF\u7A0B\uFF0C\u53C2\u8003"),E=n("dashboard"),N=n("\u547D\u4EE4\u7684\u4ECB\u7ECD\u3002"),y=a("code",null,"cpuUsage",-1),P=n("\u4E3A\u91C7\u6837\u95F4\u9694\u65F6\u95F4\u5185\u7EBF\u7A0B\u7684 CPU \u4F7F\u7528\u7387\uFF0C\u4E0E"),F=n("dashboard"),S=n("\u547D\u4EE4\u7684\u6570\u636E\u4E00\u81F4\u3002"),U=a("li",null,[a("code",null,"deltaTime"),n("\u4E3A\u91C7\u6837\u95F4\u9694\u65F6\u95F4\u5185\u7EBF\u7A0B\u7684\u589E\u91CF CPU \u65F6\u95F4\uFF0C\u5C0F\u4E8E 1ms \u65F6\u88AB\u53D6\u6574\u663E\u793A\u4E3A 0ms\u3002")],-1),L=a("li",null,[a("code",null,"time"),n(" \u7EBF\u7A0B\u8FD0\u884C\u603B CPU \u65F6\u95F4\u3002")],-1),R=e(`

    \u6CE8\u610F\uFF1A\u7EBF\u7A0B\u6808\u4E3A\u7B2C\u4E8C\u91C7\u6837\u7ED3\u675F\u65F6\u83B7\u53D6\uFF0C\u4E0D\u80FD\u8868\u660E\u91C7\u6837\u95F4\u9694\u65F6\u95F4\u5185\u8BE5\u7EBF\u7A0B\u90FD\u662F\u5728\u5904\u7406\u76F8\u540C\u7684\u4EFB\u52A1\u3002\u5EFA\u8BAE\u95F4\u9694\u65F6\u95F4\u4E0D\u8981\u592A\u957F\uFF0C\u53EF\u80FD\u95F4\u9694\u65F6\u95F4\u8D8A\u5927\u8D8A\u4E0D\u51C6\u786E\u3002 \u53EF\u4EE5\u6839\u636E\u5177\u4F53\u60C5\u51B5\u5C1D\u8BD5\u6307\u5B9A\u4E0D\u540C\u7684\u95F4\u9694\u65F6\u95F4\uFF0C\u89C2\u5BDF\u8F93\u51FA\u7ED3\u679C\u3002

    \u5F53\u6CA1\u6709\u53C2\u6570\u65F6\uFF0C\u663E\u793A\u7B2C\u4E00\u9875\u7EBF\u7A0B\u7684\u4FE1\u606F

    \u9ED8\u8BA4\u6309\u7167 CPU \u589E\u91CF\u65F6\u95F4\u964D\u5E8F\u6392\u5217\uFF0C\u53EA\u663E\u793A\u7B2C\u4E00\u9875\u6570\u636E\u3002

    $ thread
    +Threads Total: 33, NEW: 0, RUNNABLE: 9, BLOCKED: 0, WAITING: 3, TIMED_WAITING: 4, TERMINATED: 0, Internal threads: 17
    +ID   NAME                           GROUP          PRIORITY  STATE     %CPU      DELTA_TIME TIME      INTERRUPT DAEMON
    +-1   C2 CompilerThread0             -              -1        -         5.06      0.010      0:0.973   false     true
    +-1   C1 CompilerThread0             -              -1        -         0.95      0.001      0:0.603   false     true
    +23   arthas-command-execute         system         5         RUNNABLE  0.17      0.000      0:0.226   false     true
    +-1   VM Periodic Task Thread        -              -1        -         0.05      0.000      0:0.094   false     true
    +-1   Sweeper thread                 -              -1        -         0.04      0.000      0:0.011   false     true
    +-1   G1 Young RemSet Sampling       -              -1        -         0.02      0.000      0:0.025   false     true
    +12   Attach Listener                system         9         RUNNABLE  0.0       0.000      0:0.022   false     true
    +11   Common-Cleaner                 InnocuousThrea 8         TIMED_WAI 0.0       0.000      0:0.000   false     true
    +3    Finalizer                      system         8         WAITING   0.0       0.000      0:0.000   false     true
    +2    Reference Handler              system         10        RUNNABLE  0.0       0.000      0:0.000   false     true
    +4    Signal Dispatcher              system         9         RUNNABLE  0.0       0.000      0:0.000   false     true
    +15   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.029   false     true
    +22   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.196   false     true
    +24   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.038   false     true
    +16   arthas-NettyWebsocketTtyBootst system         5         RUNNABLE  0.0       0.000      0:0.001   false     true
    +17   arthas-NettyWebsocketTtyBootst system         5         RUNNABLE  0.0       0.000      0:0.001   false     true
    +

    thread --all, \u663E\u793A\u6240\u6709\u5339\u914D\u7684\u7EBF\u7A0B

    \u663E\u793A\u6240\u6709\u5339\u914D\u7EBF\u7A0B\u4FE1\u606F\uFF0C\u6709\u65F6\u9700\u8981\u83B7\u53D6\u5168\u90E8 JVM \u7684\u7EBF\u7A0B\u6570\u636E\u8FDB\u884C\u5206\u6790\u3002

    thread id, \u663E\u793A\u6307\u5B9A\u7EBF\u7A0B\u7684\u8FD0\u884C\u5806\u6808

    $ thread 1
    +"main" Id=1 WAITING on java.util.concurrent.CountDownLatch$Sync@29fafb28
    +    at sun.misc.Unsafe.park(Native Method)
    +    -  waiting on java.util.concurrent.CountDownLatch$Sync@29fafb28
    +    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
    +    at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
    +

    thread -b, \u627E\u51FA\u5F53\u524D\u963B\u585E\u5176\u4ED6\u7EBF\u7A0B\u7684\u7EBF\u7A0B

    \u6709\u65F6\u5019\u6211\u4EEC\u53D1\u73B0\u5E94\u7528\u5361\u4F4F\u4E86\uFF0C \u901A\u5E38\u662F\u7531\u4E8E\u67D0\u4E2A\u7EBF\u7A0B\u62FF\u4F4F\u4E86\u67D0\u4E2A\u9501\uFF0C \u5E76\u4E14\u5176\u4ED6\u7EBF\u7A0B\u90FD\u5728\u7B49\u5F85\u8FD9\u628A\u9501\u9020\u6210\u7684\u3002 \u4E3A\u4E86\u6392\u67E5\u8FD9\u7C7B\u95EE\u9898\uFF0C arthas \u63D0\u4F9B\u4E86thread -b\uFF0C \u4E00\u952E\u627E\u51FA\u90A3\u4E2A\u7F6A\u9B41\u7978\u9996\u3002

    $ thread -b
    +"http-bio-8080-exec-4" Id=27 TIMED_WAITING
    +    at java.lang.Thread.sleep(Native Method)
    +    at test.arthas.TestThreadBlocking.doGet(TestThreadBlocking.java:22)
    +    -  locked java.lang.Object@725be470 <---- but blocks 4 other threads!
    +    at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    +    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at test.filter.TestDurexFilter.doFilter(TestDurexFilter.java:46)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    +    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    +    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    +    at com.taobao.tomcat.valves.ContextLoadFilterValve$FilterChainAdapter.doFilter(ContextLoadFilterValve.java:191)
    +    at com.taobao.eagleeye.EagleEyeFilter.doFilter(EagleEyeFilter.java:81)
    +    at com.taobao.tomcat.valves.ContextLoadFilterValve.invoke(ContextLoadFilterValve.java:150)
    +    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    +    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    +    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    +    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:429)
    +    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)
    +    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    +    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
    +    -  locked org.apache.tomcat.util.net.SocketWrapper@7127ee12
    +    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    +    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    +    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    +    at java.lang.Thread.run(Thread.java:745)
    +
    +    Number of locked synchronizers = 1
    +    - java.util.concurrent.ThreadPoolExecutor$Worker@31a6493e
    +

    \u6CE8\u610F

    \u6CE8\u610F\uFF0C \u76EE\u524D\u53EA\u652F\u6301\u627E\u51FA synchronized \u5173\u952E\u5B57\u963B\u585E\u4F4F\u7684\u7EBF\u7A0B\uFF0C \u5982\u679C\u662Fjava.util.concurrent.Lock\uFF0C \u76EE\u524D\u8FD8\u4E0D\u652F\u6301\u3002

    thread -i, \u6307\u5B9A\u91C7\u6837\u65F6\u95F4\u95F4\u9694

    • thread -i 1000 : \u7EDF\u8BA1\u6700\u8FD1 1000ms \u5185\u7684\u7EBF\u7A0B CPU \u65F6\u95F4\u3002

    • thread -n 3 -i 1000 : \u5217\u51FA 1000ms \u5185\u6700\u5FD9\u7684 3 \u4E2A\u7EBF\u7A0B\u6808

    $ thread -n 3 -i 1000
    +"as-command-execute-daemon" Id=4759 cpuUsage=23% RUNNABLE
    +    at sun.management.ThreadImpl.dumpThreads0(Native Method)
    +    at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:440)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads(ThreadCommand.java:133)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process(ThreadCommand.java:79)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:96)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:27)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:125)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:122)
    +    at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:332)
    +    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    +    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    +    at java.lang.Thread.run(Thread.java:756)
    +
    +    Number of locked synchronizers = 1
    +    - java.util.concurrent.ThreadPoolExecutor$Worker@546aeec1
    +...
    +

    thread --state \uFF0C\u67E5\u770B\u6307\u5B9A\u72B6\u6001\u7684\u7EBF\u7A0B

    [arthas@28114]$ thread --state WAITING
    +Threads Total: 16, NEW: 0, RUNNABLE: 9, BLOCKED: 0, WAITING: 3, TIMED_WAITING: 4, TERMINATED: 0
    +ID   NAME                           GROUP           PRIORITY   STATE     %CPU      DELTA_TIME TIME      INTERRUPTE DAEMON
    +3    Finalizer                      system          8          WAITING   0.0       0.000      0:0.000   false      true
    +20   arthas-UserStat                system          9          WAITING   0.0       0.000      0:0.001   false      true
    +14   arthas-timer                   system          9          WAITING   0.0       0.000      0:0.000   false      true
    +
    `,17);function B(W,$){const t=p("ExternalLinkIcon"),o=p("RouterLink");return r(),i("div",null,[d,a("p",null,[a("a",m,[v,b,s(t)])]),k,a("div",h,[g,a("p",null,[T,a("a",j,[I,s(t)]),A])]),C,a("ul",null,[a("li",null,[f,_,x,s(o,{to:"/doc/dashboard.html"},{default:l(()=>[E]),_:1}),N]),a("li",null,[y,P,s(o,{to:"/doc/dashboard.html"},{default:l(()=>[F]),_:1}),S]),U,L]),R])}const M=c(u,[["render",B],["__file","thread.html.vue"]]);export{M as default}; diff --git a/3.x/assets/thread.html.e4dd07a8.js b/3.x/assets/thread.html.e4dd07a8.js new file mode 100644 index 00000000000..307461e33b7 --- /dev/null +++ b/3.x/assets/thread.html.e4dd07a8.js @@ -0,0 +1 @@ +const e=JSON.parse(`{"key":"v-5da9140b","path":"/en/doc/thread.html","title":"thread","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Parameters","slug":"parameters","link":"#parameters","children":[]},{"level":2,"title":"How the CPU ratios are calculated?","slug":"how-the-cpu-ratios-are-calculated","link":"#how-the-cpu-ratios-are-calculated","children":[{"level":3,"title":"Working principle description:","slug":"working-principle-description","link":"#working-principle-description","children":[]}]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"List the top n busiest threads with detailed stack trace","slug":"list-the-top-n-busiest-threads-with-detailed-stack-trace","link":"#list-the-top-n-busiest-threads-with-detailed-stack-trace","children":[]},{"level":3,"title":"List first page threads' info when no options provided","slug":"list-first-page-threads-info-when-no-options-provided","link":"#list-first-page-threads-info-when-no-options-provided","children":[]},{"level":3,"title":"thread --all, show all matching threads","slug":"thread-all-show-all-matching-threads","link":"#thread-all-show-all-matching-threads","children":[]},{"level":3,"title":"thread id, show the running stack for the target thread","slug":"thread-id-show-the-running-stack-for-the-target-thread","link":"#thread-id-show-the-running-stack-for-the-target-thread","children":[]},{"level":3,"title":"thread -b, locate the thread bocking the others","slug":"thread-b-locate-the-thread-bocking-the-others","link":"#thread-b-locate-the-thread-bocking-the-others","children":[]},{"level":3,"title":"thread -i, specify the sampling interval","slug":"thread-i-specify-the-sampling-interval","link":"#thread-i-specify-the-sampling-interval","children":[]},{"level":3,"title":"thread --state , view the special state theads","slug":"thread-state-view-the-special-state-theads","link":"#thread-state-view-the-special-state-theads","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/thread.md","version":"3.7.3"}`);export{e as data}; diff --git a/3.x/assets/trace.html.0dc105ca.js b/3.x/assets/trace.html.0dc105ca.js new file mode 100644 index 00000000000..07efb683c6c --- /dev/null +++ b/3.x/assets/trace.html.0dc105ca.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-65d67724","path":"/doc/trace.html","title":"trace","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":"\u6CE8\u610F\u4E8B\u9879","slug":"\u6CE8\u610F\u4E8B\u9879","link":"#\u6CE8\u610F\u4E8B\u9879","children":[]},{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[{"level":3,"title":"\u542F\u52A8 Demo","slug":"\u542F\u52A8-demo","link":"#\u542F\u52A8-demo","children":[]},{"level":3,"title":"trace \u51FD\u6570","slug":"trace-\u51FD\u6570","link":"#trace-\u51FD\u6570","children":[]},{"level":3,"title":"\u6307\u5B9A Class \u5339\u914D\u7684\u6700\u5927\u6570\u91CF","slug":"\u6307\u5B9A-class-\u5339\u914D\u7684\u6700\u5927\u6570\u91CF","link":"#\u6307\u5B9A-class-\u5339\u914D\u7684\u6700\u5927\u6570\u91CF","children":[]},{"level":3,"title":"trace \u6B21\u6570\u9650\u5236","slug":"trace-\u6B21\u6570\u9650\u5236","link":"#trace-\u6B21\u6570\u9650\u5236","children":[]},{"level":3,"title":"\u5305\u542B jdk \u7684\u51FD\u6570","slug":"\u5305\u542B-jdk-\u7684\u51FD\u6570","link":"#\u5305\u542B-jdk-\u7684\u51FD\u6570","children":[]},{"level":3,"title":"\u6839\u636E\u8C03\u7528\u8017\u65F6\u8FC7\u6EE4","slug":"\u6839\u636E\u8C03\u7528\u8017\u65F6\u8FC7\u6EE4","link":"#\u6839\u636E\u8C03\u7528\u8017\u65F6\u8FC7\u6EE4","children":[]},{"level":3,"title":"trace \u591A\u4E2A\u7C7B\u6216\u8005\u591A\u4E2A\u51FD\u6570","slug":"trace-\u591A\u4E2A\u7C7B\u6216\u8005\u591A\u4E2A\u51FD\u6570","link":"#trace-\u591A\u4E2A\u7C7B\u6216\u8005\u591A\u4E2A\u51FD\u6570","children":[]},{"level":3,"title":"\u6392\u9664\u6389\u6307\u5B9A\u7684\u7C7B","slug":"\u6392\u9664\u6389\u6307\u5B9A\u7684\u7C7B","link":"#\u6392\u9664\u6389\u6307\u5B9A\u7684\u7C7B","children":[]}]},{"level":2,"title":"\u52A8\u6001 trace","slug":"\u52A8\u6001-trace","link":"#\u52A8\u6001-trace","children":[]},{"level":2,"title":"trace \u7ED3\u679C\u65F6\u95F4\u4E0D\u51C6\u786E\u95EE\u9898","slug":"trace-\u7ED3\u679C\u65F6\u95F4\u4E0D\u51C6\u786E\u95EE\u9898","link":"#trace-\u7ED3\u679C\u65F6\u95F4\u4E0D\u51C6\u786E\u95EE\u9898","children":[{"level":3,"title":"\u4F7F\u7528 -v \u53C2\u6570\u6253\u5370\u66F4\u591A\u4FE1\u606F","slug":"\u4F7F\u7528-v-\u53C2\u6570\u6253\u5370\u66F4\u591A\u4FE1\u606F","link":"#\u4F7F\u7528-v-\u53C2\u6570\u6253\u5370\u66F4\u591A\u4FE1\u606F","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"duanwenjun","email":"47908685+duanwenjun@users.noreply.github.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/trace.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/trace.html.53ffd359.js b/3.x/assets/trace.html.53ffd359.js new file mode 100644 index 00000000000..e31c9c9baa4 --- /dev/null +++ b/3.x/assets/trace.html.53ffd359.js @@ -0,0 +1,111 @@ +import{_ as l,o as i,c as r,a as s,b as n,w as o,e as a,d as t,r as c}from"./app.4d248835.js";const u={},d=s("h1",{id:"trace",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#trace","aria-hidden":"true"},"#"),a(" trace")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-trace",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"trace",-1),b=a(" online tutorial"),h=t('

    TIP

    Trace method calling path, and output the time cost for each node in the path.

    trace can track the calling path specified by class-pattern / method-pattern, and calculate the time cost on the whole path.

    Parameters

    NameSpecification
    class-patternpattern for the class name
    method-patternpattern for the method name
    condition-expresscondition expression
    [E]enable regex match, the default behavior is wildcards match
    [n:]execution times
    #costtime cost
    [m <arg>]Specify the max number of matched Classes, the default value is 50. Long format is [maxMatch <arg>].

    There's one thing worthy noting here is condition expression. The condition expression supports OGNL grammar, for example, you can come up a expression like this "params[0]<0". All OGNL expressions are supported as long as they are legal to the grammar.

    ',5),v=a("Pls. refer to "),g=a("core parameters in expression"),f=a(" for more details."),x=a("Pls. also refer to "),_={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},y=a("https://github.com/alibaba/arthas/issues/71"),C=a(" for more advanced usage"),w=a("OGNL official site: "),M={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},L=a("https://commons.apache.org/proper/commons-ognl/language-guide.html"),G=t('

    Many times what we are interested is the exact trace result when the method call takes time over one particular period. It is possible to achieve this in Arthas, for example: trace *StringUtils isBlank '#cost>100' means trace result will only be output when the executing time exceeds 100ms.

    TIP

    watch/stack/trace, these three commands all support #cost.

    Notice

    ',3),T=s("li",null,[s("p",null,[s("code",null,"trace"),a(" is handy to help discovering and locating the performance flaws in your system, but pls. note Arthas can only trace the first level method call each time.")])],-1),A=s("li",null,[s("p",null,"After version 3.3.0, you can use the Dynamic Trace feature to add new matching classes/methods, see the following example.")],-1),j=a("Currently "),I=s("code",null,"trace java.lang.Thread getName",-1),S=a(" is not supported, please refer to issue: "),F={href:"https://github.com/alibaba/arthas/issues/1610",target:"_blank",rel:"noopener noreferrer"},P=a("#1610"),$=a(", considering that it is not very necessary and it is difficult to repair , So it won\u2019t be fixed for now"),E=s("h2",{id:"usage",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#usage","aria-hidden":"true"},"#"),a(" Usage")],-1),B=s("h3",{id:"start-demo",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#start-demo","aria-hidden":"true"},"#"),a(" Start Demo")],-1),q=a("Start "),N=s("code",null,"math-game",-1),Q=a(" in "),D=a("Quick Start"),O=a("."),J=t(`

    Trace method

    $ trace demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 28 ms.
    +\`---ts=2019-12-04 00:45:08;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[0.617465ms] demo.MathGame:run()
    +        \`---[0.078946ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +
    +\`---ts=2019-12-04 00:45:09;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[1.276874ms] demo.MathGame:run()
    +        \`---[0.03752ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +

    TIP

    The #24 in the result indicates that in the run function, the primeFactors() function was called on line 24 of the source file.

    Specify the max number of matched Classes

    $ trace demo.MathGame run -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 412 ms, listenerId: 4
    +\`---ts=2022-12-25 21:00:00;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    \`---[0.762093ms] demo.MathGame:run()
    +        \`---[30.21% 0.230241ms] demo.MathGame:primeFactors() #46 [throws Exception]
    +
    +\`---ts=2022-12-25 21:00:10;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    \`---[0.315298ms] demo.MathGame:run()
    +        \`---[13.95% 0.043995ms] demo.MathGame:primeFactors() #46 [throws Exception]
    +

    Trace times limit

    If the method invoked many times, use -n options to specify trace times. For example, the command will exit when received a trace result.

    $ trace demo.MathGame run -n 1
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 20 ms.
    +\`---ts=2019-12-04 00:45:53;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[0.549379ms] demo.MathGame:run()
    +        +---[0.059839ms] demo.MathGame:primeFactors() #24
    +        \`---[0.232887ms] demo.MathGame:print() #25
    +
    +Command execution times exceed limit: 1, so command will exit. You can set it with -n option.
    +

    Include jdk method

    • --skipJDKMethod <value> skip jdk method trace, default value true.
    $ trace --skipJDKMethod false demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 60 ms.
    +\`---ts=2019-12-04 00:44:41;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[1.357742ms] demo.MathGame:run()
    +        +---[0.028624ms] java.util.Random:nextInt() #23
    +        +---[0.045534ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +        +---[0.005372ms] java.lang.StringBuilder:<init>() #28
    +        +---[0.012257ms] java.lang.Integer:valueOf() #28
    +        +---[0.234537ms] java.lang.String:format() #28
    +        +---[min=0.004539ms,max=0.005778ms,total=0.010317ms,count=2] java.lang.StringBuilder:append() #28
    +        +---[0.013777ms] java.lang.Exception:getMessage() #28
    +        +---[0.004935ms] java.lang.StringBuilder:toString() #28
    +        \`---[0.06941ms] java.io.PrintStream:println() #28
    +
    +\`---ts=2019-12-04 00:44:42;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[3.030432ms] demo.MathGame:run()
    +        +---[0.010473ms] java.util.Random:nextInt() #23
    +        +---[0.023715ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +        +---[0.005198ms] java.lang.StringBuilder:<init>() #28
    +        +---[0.006405ms] java.lang.Integer:valueOf() #28
    +        +---[0.178583ms] java.lang.String:format() #28
    +        +---[min=0.011636ms,max=0.838077ms,total=0.849713ms,count=2] java.lang.StringBuilder:append() #28
    +        +---[0.008747ms] java.lang.Exception:getMessage() #28
    +        +---[0.019768ms] java.lang.StringBuilder:toString() #28
    +        \`---[0.076457ms] java.io.PrintStream:println() #28
    +

    Filtering by cost

    $ trace demo.MathGame run '#cost > 10'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 41 ms.
    +\`---ts=2018-12-04 01:12:02;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[12.033735ms] demo.MathGame:run()
    +        +---[0.006783ms] java.util.Random:nextInt()
    +        +---[11.852594ms] demo.MathGame:primeFactors()
    +        \`---[0.05447ms] demo.MathGame:print()
    +

    TIP

    Only the call path which's time cost is higher than 10ms will be shown. This feature is handy to focus on what's needed to focus when troubleshoot.

    • Here Arthas provides the similar functionality JProfile and other commercial software provide. Compared to these professional softwares, Arthas doesn't deduce the time cost trace itself takes, therefore it is not as accurate as these softwares offer. More classes and methods on the calling path, more inaccurate trace output is, but it is still helpful for diagnostics where the bottleneck is.
    • "[12.033735ms]" means the method on the node takes 12.033735 ms.
    • "[min=0.005428ms,max=0.094064ms,total=0.105228ms,count=3] demo:call()" means aggregating all same method calls into one single line. The minimum time cost is 0.005428 ms, the maximum time cost is 0.094064 ms, and the total time cost for all method calls (3 times in total) to "demo:call()" is 0.105228ms. If "throws Exception" appears in this line, it means some exceptions have been thrown from this method calls.
    • The total time cost may not equal to the sum of the time costs each sub method call takes, this is because Arthas instrumented code takes time too.

    Trace multiple classes or multiple methods

    The trace command will only trace the subcalls in the method to the trace, and will not trace down multiple layers. Because traces are expensive, multi-layer traces can lead to a lot of classes and methods that ultimately have to be traced.

    You can use the regular expression to match multiple classes and methods on the path to achieve a multi-layer trace effect to some extent.

    Trace -E com.test.ClassA|org.test.ClassB method1|method2|method3
    +

    Exclude the specified class

    TIP

    The watch/trace/monitor/stack/tt commands all support the --exclude-class-pattern parameter

    Use the --exclude-class-pattern parameter to exclude the specified class, for example:

    watch javax.servlet.Filter * --exclude-class-pattern com.demo.TestFilter
    +

    Dynamic trace

    TIP

    Supported since version 3.3.0.

    Open terminal 1, trace the run method in the above demo, and you can see the printout listenerId: 1 .

    [arthas@59161]$ trace demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 112 ms, listenerId: 1
    +\`---ts=2020-07-09 16:48:11;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[1.389634ms] demo.MathGame:run()
    +        \`---[0.123934ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +
    +\`---ts=2020-07-09 16:48:12;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[3.716391ms] demo.MathGame:run()
    +        +---[3.182813ms] demo.MathGame:primeFactors() #24
    +        \`---[0.167786ms] demo.MathGame:print() #25
    +

    Now to drill down into the sub method primeFactors, you can open a new terminal 2 and use the telnet localhost 3658 connects to the arthas, then trace primeFactors with the specify listenerId.

    [arthas@59161]$ trace demo.MathGame primeFactors --listenerId 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 34 ms, listenerId: 1
    +

    At Terminal 2 prints the results, indicating that a method has been enhanced: Affect(class count: 1 , method count: 1), but no more results are printed.

    At terminal 1, you can see that the trace result has increased by one layer:

    \`---ts=2020-07-09 16:49:29;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[0.492551ms] demo.MathGame:run()
    +        \`---[0.113929ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +            \`---[0.061462ms] demo.MathGame:primeFactors()
    +                \`---[0.001018ms] throw:java.lang.IllegalArgumentException() #46
    +
    +\`---ts=2020-07-09 16:49:30;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[0.409446ms] demo.MathGame:run()
    +        +---[0.232606ms] demo.MathGame:primeFactors() #24
    +        |   \`---[0.1294ms] demo.MathGame:primeFactors()
    +        \`---[0.084025ms] demo.MathGame:print() #25
    +

    Dynamic trace by specifying listenerId, you can go deeper and deeper. In addition, commands such as watch/tt/monitor also support similar functionality.

    Trace result time inaccuracy problem

    For example, in the following result: 0.705196 > (0.152743 + 0.145825)

    $ trace demo.MathGame run -n 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 66 ms, listenerId: 1
    +\`---ts=2021-02-08 11:27:36;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@232204a1
    +    \`--[0.705196ms] demo.MathGame:run()
    +        +---[0.152743ms] demo.MathGame:primeFactors() #24
    +        \`--[0.145825ms] demo.MathGame:print() #25
    +

    So where is the rest of the time consumed?

    1. Methods that are not traced to. For example, methods under java.* are ignored by default. This can be printed out by adding the -skipJDKMethod false parameter.

      $ trace demo.MathGame run --skipJDKMethod false
      +Press Q or Ctrl+C to abort.
      +Affect(class count: 1 , method count: 1) cost in 35 ms, listenerId: 2
      +\`---ts=2021-02-08 11:27:48;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@232204a1
      +    \`--[0.810591ms] demo.MathGame:run()
      +        +--[0.034568ms] java.util.Random:nextInt() #23
      +        +---[0.119367ms] demo.MathGame:timeFactors() #24 [throws Exception]
      +        +---[0.017407ms] java.lang.StringBuilder:<init>() #28
      +        +--[0.127922ms] java.lang.String:format() #57
      +        +---[min=0.01419ms,max=0.020221ms,total=0.034411ms,count=2] java.lang.StringBuilder:append() #57
      +        +--[0.021911ms] java.lang.Exception:getMessage() #57
      +        +---[0.015643ms] java.lang.StringBuilder:toString() #57
      +        \`--[0.086622ms] java.io.PrintStream:println() #57
      +
    2. Instruction consumption. For example, instructions such as i++, getfield, etc.

    3. Possible JVM pause during code execution, such as GC, entering synchronization blocks, etc.

    Use the -v parameter to print more information

    TIP

    The watch/trace/monitor/stack/tt commands all support the -v parameter.

    When the command is executed, there is no output result. There are two possibilities:

    1. The matched function is not executed
    2. The result of the conditional expression is false

    But the user cannot tell which situation is.

    Using the -v option, the specific value and execution result of Condition express will be printed for easy confirmation.

    `,44);function R(U,V){const e=c("ExternalLinkIcon"),p=c("RouterLink");return i(),r("div",null,[d,s("p",null,[s("a",m,[k,b,n(e)])]),h,s("p",null,[v,n(p,{to:"/en/doc/advice-class.html"},{default:o(()=>[g]),_:1}),f]),s("ul",null,[s("li",null,[x,s("a",_,[y,n(e)]),C]),s("li",null,[w,s("a",M,[L,n(e)])])]),G,s("ul",null,[T,A,s("li",null,[s("p",null,[j,I,S,s("a",F,[P,n(e)]),$])])]),E,B,s("p",null,[q,N,Q,n(p,{to:"/en/doc/quick-start.html"},{default:o(()=>[D]),_:1}),O]),J])}const Y=l(u,[["render",R],["__file","trace.html.vue"]]);export{Y as default}; diff --git a/3.x/assets/trace.html.861de4ab.js b/3.x/assets/trace.html.861de4ab.js new file mode 100644 index 00000000000..f0bdfa569f2 --- /dev/null +++ b/3.x/assets/trace.html.861de4ab.js @@ -0,0 +1,111 @@ +import{_ as l,o as i,c as r,a as s,b as a,w as p,e as n,d as c,r as o}from"./app.4d248835.js";const u={},k=s("h1",{id:"trace",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#trace","aria-hidden":"true"},"#"),n(" trace")],-1),d={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-trace",target:"_blank",rel:"noopener noreferrer"},m=s("code",null,"trace",-1),b=n("\u5728\u7EBF\u6559\u7A0B"),v=c('

    \u63D0\u793A

    \u65B9\u6CD5\u5185\u90E8\u8C03\u7528\u8DEF\u5F84\uFF0C\u5E76\u8F93\u51FA\u65B9\u6CD5\u8DEF\u5F84\u4E0A\u7684\u6BCF\u4E2A\u8282\u70B9\u4E0A\u8017\u65F6

    trace \u547D\u4EE4\u80FD\u4E3B\u52A8\u641C\u7D22 class-pattern\uFF0Fmethod-pattern \u5BF9\u5E94\u7684\u65B9\u6CD5\u8C03\u7528\u8DEF\u5F84\uFF0C\u6E32\u67D3\u548C\u7EDF\u8BA1\u6574\u4E2A\u8C03\u7528\u94FE\u8DEF\u4E0A\u7684\u6240\u6709\u6027\u80FD\u5F00\u9500\u548C\u8FFD\u8E2A\u8C03\u7528\u94FE\u8DEF\u3002

    \u53C2\u6570\u8BF4\u660E

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    class-pattern\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    method-pattern\u65B9\u6CD5\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    condition-express\u6761\u4EF6\u8868\u8FBE\u5F0F
    [E]\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D
    [n:]\u547D\u4EE4\u6267\u884C\u6B21\u6570
    #cost\u65B9\u6CD5\u6267\u884C\u8017\u65F6
    [m <arg>]\u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF\uFF0C\u9ED8\u8BA4\u503C\u4E3A 50\u3002\u957F\u683C\u5F0F\u4E3A[maxMatch <arg>]\u3002

    \u8FD9\u91CC\u91CD\u70B9\u8981\u8BF4\u660E\u7684\u662F\u6761\u4EF6\u8868\u8FBE\u5F0F\uFF0C\u6761\u4EF6\u8868\u8FBE\u5F0F\u7684\u6784\u6210\u4E3B\u8981\u7531 \bognl \u8868\u8FBE\u5F0F\u7EC4\u6210\uFF0C\u6240\u4EE5\u4F60\u53EF\u4EE5\u8FD9\u6837\u5199"params[0]<0"\uFF0C\u53EA\u8981\u662F\u4E00\u4E2A\u5408\u6CD5\u7684 ognl \u8868\u8FBE\u5F0F\uFF0C\u90FD\u80FD\u88AB\u6B63\u5E38\u652F\u6301\u3002

    ',5),h=n("\u8BF7\u53C2\u8003"),g=n("\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF"),f=n("\u4E2D\u5173\u4E8E\u8BE5\u8282\u70B9\u7684\u63CF\u8FF0\u3002"),_=n("\u7279\u6B8A\u7528\u6CD5\u8BF7\u53C2\u8003\uFF1A"),x={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},C=n("https://github.com/alibaba/arthas/issues/71"),M=n("OGNL \u8868\u8FBE\u5F0F\u5B98\u7F51\uFF1A"),L={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},G=n("https://commons.apache.org/proper/commons-ognl/language-guide.html"),y=s("p",null,[n("\u5F88\u591A\u65F6\u5019\u6211\u4EEC\u53EA\u60F3\u770B\u5230\u67D0\u4E2A\u65B9\u6CD5\u7684 rt \u5927\u4E8E\u67D0\u4E2A\u65F6\u95F4\u4E4B\u540E\u7684 trace \u7ED3\u679C\uFF0C\u73B0\u5728 Arthas \u53EF\u4EE5\u6309\u7167\u65B9\u6CD5\u6267\u884C\u7684\u8017\u65F6\u6765\u8FDB\u884C\u8FC7\u6EE4\u4E86\uFF0C\u4F8B\u5982"),s("code",null,"trace *StringUtils isBlank '#cost>100'"),n("\u8868\u793A\u5F53\u6267\u884C\u65F6\u95F4\u8D85\u8FC7 100ms \u7684\u65F6\u5019\uFF0C\u624D\u4F1A\u8F93\u51FA trace \u7684\u7ED3\u679C\u3002")],-1),j=s("div",{class:"custom-container tip"},[s("p",{class:"custom-container-title"},"\u63D0\u793A"),s("p",null,[n("watch/stack/trace \u8FD9\u4E2A\u4E09\u4E2A\u547D\u4EE4\u90FD\u652F\u6301"),s("code",null,"#cost")])],-1),w=s("h2",{id:"\u6CE8\u610F\u4E8B\u9879",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u6CE8\u610F\u4E8B\u9879","aria-hidden":"true"},"#"),n(" \u6CE8\u610F\u4E8B\u9879")],-1),A=s("p",null,[s("code",null,"trace"),n(" \u80FD\u65B9\u4FBF\u7684\u5E2E\u52A9\u4F60\u5B9A\u4F4D\u548C\u53D1\u73B0\u56E0 RT \u9AD8\u800C\u5BFC\u81F4\u7684\u6027\u80FD\u95EE\u9898\u7F3A\u9677\uFF0C\u4F46\u5176\u6BCF\u6B21\u53EA\u80FD\u8DDF\u8E2A\u4E00\u7EA7\u65B9\u6CD5\u7684\u8C03\u7528\u94FE\u8DEF\u3002")],-1),F=n("\u53C2\u8003\uFF1A"),$={href:"https://github.com/alibaba/arthas/issues/597",target:"_blank",rel:"noopener noreferrer"},E=n("Trace \u547D\u4EE4\u7684\u5B9E\u73B0\u539F\u7406"),S=s("li",null,[s("p",null,"3.3.0 \u7248\u672C\u540E\uFF0C\u53EF\u4EE5\u4F7F\u7528\u52A8\u6001 Trace \u529F\u80FD\uFF0C\u4E0D\u65AD\u589E\u52A0\u65B0\u7684\u5339\u914D\u7C7B\uFF0C\u53C2\u8003\u4E0B\u9762\u7684\u793A\u4F8B\u3002")],-1),T=n("\u76EE\u524D\u4E0D\u652F\u6301 "),I=s("code",null,"trace java.lang.Thread getName",-1),B=n("\uFF0C\u53C2\u8003 issue: "),P={href:"https://github.com/alibaba/arthas/issues/1610",target:"_blank",rel:"noopener noreferrer"},J=n("#1610"),Q=n(" \uFF0C\u8003\u8651\u5230\u4E0D\u662F\u975E\u5E38\u5FC5\u8981\u573A\u666F\uFF0C\u4E14\u4FEE\u590D\u6709\u4E00\u5B9A\u96BE\u5EA6\uFF0C\u56E0\u6B64\u5F53\u524D\u6682\u4E0D\u4FEE\u590D"),R=s("h2",{id:"\u4F7F\u7528\u53C2\u8003",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u4F7F\u7528\u53C2\u8003","aria-hidden":"true"},"#"),n(" \u4F7F\u7528\u53C2\u8003")],-1),D=s("h3",{id:"\u542F\u52A8-demo",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u542F\u52A8-demo","aria-hidden":"true"},"#"),n(" \u542F\u52A8 Demo")],-1),N=n("\u542F\u52A8"),K=n("\u5FEB\u901F\u5165\u95E8"),V=n("\u91CC\u7684"),q=s("code",null,"math-game",-1),O=n("\u3002"),U=c(`

    trace \u51FD\u6570

    $ trace demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 28 ms.
    +\`---ts=2019-12-04 00:45:08;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[0.617465ms] demo.MathGame:run()
    +        \`---[0.078946ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +
    +\`---ts=2019-12-04 00:45:09;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[1.276874ms] demo.MathGame:run()
    +        \`---[0.03752ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +

    \u63D0\u793A

    \u7ED3\u679C\u91CC\u7684 #24\uFF0C\u8868\u793A\u5728 run \u51FD\u6570\u91CC\uFF0C\u5728\u6E90\u6587\u4EF6\u7684\u7B2C24\u884C\u8C03\u7528\u4E86primeFactors()\u51FD\u6570\u3002

    \u6307\u5B9A Class \u5339\u914D\u7684\u6700\u5927\u6570\u91CF

    $ trace demo.MathGame run -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 412 ms, listenerId: 4
    +\`---ts=2022-12-25 21:00:00;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    \`---[0.762093ms] demo.MathGame:run()
    +        \`---[30.21% 0.230241ms] demo.MathGame:primeFactors() #46 [throws Exception]
    +
    +\`---ts=2022-12-25 21:00:10;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    \`---[0.315298ms] demo.MathGame:run()
    +        \`---[13.95% 0.043995ms] demo.MathGame:primeFactors() #46 [throws Exception]
    +

    trace \u6B21\u6570\u9650\u5236

    \u5982\u679C\u65B9\u6CD5\u8C03\u7528\u7684\u6B21\u6570\u5F88\u591A\uFF0C\u90A3\u4E48\u53EF\u4EE5\u7528-n\u53C2\u6570\u6307\u5B9A\u6355\u6349\u7ED3\u679C\u7684\u6B21\u6570\u3002\u6BD4\u5982\u4E0B\u9762\u7684\u4F8B\u5B50\u91CC\uFF0C\u6355\u6349\u5230\u4E00\u6B21\u8C03\u7528\u5C31\u9000\u51FA\u547D\u4EE4\u3002

    $ trace demo.MathGame run -n 1
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 20 ms.
    +\`---ts=2019-12-04 00:45:53;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[0.549379ms] demo.MathGame:run()
    +        +---[0.059839ms] demo.MathGame:primeFactors() #24
    +        \`---[0.232887ms] demo.MathGame:print() #25
    +
    +Command execution times exceed limit: 1, so command will exit. You can set it with -n option.
    +

    \u5305\u542B jdk \u7684\u51FD\u6570

    • --skipJDKMethod <value> skip jdk method trace, default value true.

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0Ctrace \u4E0D\u4F1A\u5305\u542B jdk \u91CC\u7684\u51FD\u6570\u8C03\u7528\uFF0C\u5982\u679C\u5E0C\u671B trace jdk \u91CC\u7684\u51FD\u6570\uFF0C\u9700\u8981\u663E\u5F0F\u8BBE\u7F6E--skipJDKMethod false\u3002

    $ trace --skipJDKMethod false demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 60 ms.
    +\`---ts=2019-12-04 00:44:41;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[1.357742ms] demo.MathGame:run()
    +        +---[0.028624ms] java.util.Random:nextInt() #23
    +        +---[0.045534ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +        +---[0.005372ms] java.lang.StringBuilder:<init>() #28
    +        +---[0.012257ms] java.lang.Integer:valueOf() #28
    +        +---[0.234537ms] java.lang.String:format() #28
    +        +---[min=0.004539ms,max=0.005778ms,total=0.010317ms,count=2] java.lang.StringBuilder:append() #28
    +        +---[0.013777ms] java.lang.Exception:getMessage() #28
    +        +---[0.004935ms] java.lang.StringBuilder:toString() #28
    +        \`---[0.06941ms] java.io.PrintStream:println() #28
    +
    +\`---ts=2019-12-04 00:44:42;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[3.030432ms] demo.MathGame:run()
    +        +---[0.010473ms] java.util.Random:nextInt() #23
    +        +---[0.023715ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +        +---[0.005198ms] java.lang.StringBuilder:<init>() #28
    +        +---[0.006405ms] java.lang.Integer:valueOf() #28
    +        +---[0.178583ms] java.lang.String:format() #28
    +        +---[min=0.011636ms,max=0.838077ms,total=0.849713ms,count=2] java.lang.StringBuilder:append() #28
    +        +---[0.008747ms] java.lang.Exception:getMessage() #28
    +        +---[0.019768ms] java.lang.StringBuilder:toString() #28
    +        \`---[0.076457ms] java.io.PrintStream:println() #28
    +

    \u6839\u636E\u8C03\u7528\u8017\u65F6\u8FC7\u6EE4

    $ trace demo.MathGame run '#cost > 10'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 41 ms.
    +\`---ts=2018-12-04 01:12:02;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[12.033735ms] demo.MathGame:run()
    +        +---[0.006783ms] java.util.Random:nextInt()
    +        +---[11.852594ms] demo.MathGame:primeFactors()
    +        \`---[0.05447ms] demo.MathGame:print()
    +

    \u63D0\u793A

    \u53EA\u4F1A\u5C55\u793A\u8017\u65F6\u5927\u4E8E 10ms \u7684\u8C03\u7528\u8DEF\u5F84\uFF0C\u6709\u52A9\u4E8E\u5728\u6392\u67E5\u95EE\u9898\u7684\u65F6\u5019\uFF0C\u53EA\u5173\u6CE8\u5F02\u5E38\u60C5\u51B5

    • \u662F\u4E0D\u662F\u5F88\u773C\u719F\uFF0C\u6CA1\u9519\uFF0C\u5728 JProfiler \u7B49\u6536\u8D39\u8F6F\u4EF6\u4E2D\u4F60\u66FE\u7ECF\u89C1\u8BC6\u7C7B\u4F3C\u7684\u529F\u80FD\uFF0C\u8FD9\u91CC\u4F60\u5C06\u53EF\u4EE5\u901A\u8FC7\u547D\u4EE4\u5C31\u80FD\u6253\u5370\u51FA\u6307\u5B9A\u8C03\u7528\u8DEF\u5F84\u3002 \u53CB\u60C5\u63D0\u9192\u4E0B\uFF0Ctrace \u5728\u6267\u884C\u7684\u8FC7\u7A0B\u4E2D\u672C\u8EAB\u662F\u4F1A\u6709\u4E00\u5B9A\u7684\u6027\u80FD\u5F00\u9500\uFF0C\u5728\u7EDF\u8BA1\u7684\u62A5\u544A\u4E2D\u5E76\u672A\u50CF JProfiler \u4E00\u6837\u9884\u5148\u51CF\u53BB\u5176\u81EA\u8EAB\u7684\u7EDF\u8BA1\u5F00\u9500\u3002\u6240\u4EE5\u8FD9\u7EDF\u8BA1\u51FA\u6765\u6709\u4E9B\u8BB8\u7684\u4E0D\u51C6\uFF0C\u6E32\u67D3\u8DEF\u5F84\u4E0A\u8C03\u7528\u7684\u7C7B\u3001\u65B9\u6CD5\u8D8A\u591A\uFF0C\u6027\u80FD\u504F\u5DEE\u8D8A\u5927\u3002\u4F46\u8FD8\u662F\u80FD\u8BA9\u4F60\u770B\u6E05\u4E00\u4E9B\u4E8B\u60C5\u7684\u3002
    • [12.033735ms] \u7684\u542B\u4E49\uFF0C12.033735 \u7684\u542B\u4E49\u662F\uFF1A\u5F53\u524D\u8282\u70B9\u5728\u5F53\u524D\u6B65\u9AA4\u7684\u8017\u65F6\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2
    • [0,0,0ms,11]xxx:yyy() [throws Exception]\uFF0C\u5BF9\u8BE5\u65B9\u6CD5\u4E2D\u76F8\u540C\u7684\u65B9\u6CD5\u8C03\u7528\u8FDB\u884C\u4E86\u5408\u5E76\uFF0C0,0,0ms,11 \u8868\u793A\u65B9\u6CD5\u8C03\u7528\u8017\u65F6\uFF0Cmin,max,total,count\uFF1Bthrows Exception \u8868\u660E\u8BE5\u65B9\u6CD5\u8C03\u7528\u4E2D\u5B58\u5728\u5F02\u5E38\u8FD4\u56DE
    • \u8FD9\u91CC\u5B58\u5728\u4E00\u4E2A\u7EDF\u8BA1\u4E0D\u51C6\u786E\u7684\u95EE\u9898\uFF0C\u5C31\u662F\u6240\u6709\u65B9\u6CD5\u8017\u65F6\u52A0\u8D77\u6765\u53EF\u80FD\u4F1A\u5C0F\u4E8E\u8BE5\u76D1\u6D4B\u65B9\u6CD5\u7684\u603B\u8017\u65F6\uFF0C\u8FD9\u4E2A\u662F\u7531\u4E8E Arthas \u672C\u8EAB\u7684\u903B\u8F91\u4F1A\u6709\u4E00\u5B9A\u7684\u8017\u65F6

    trace \u591A\u4E2A\u7C7B\u6216\u8005\u591A\u4E2A\u51FD\u6570

    trace \u547D\u4EE4\u53EA\u4F1A trace \u5339\u914D\u5230\u7684\u51FD\u6570\u91CC\u7684\u5B50\u8C03\u7528\uFF0C\u5E76\u4E0D\u4F1A\u5411\u4E0B trace \u591A\u5C42\u3002\u56E0\u4E3A trace \u662F\u4EE3\u4EF7\u6BD4\u8F83\u8D35\u7684\uFF0C\u591A\u5C42 trace \u53EF\u80FD\u4F1A\u5BFC\u81F4\u6700\u7EC8\u8981 trace \u7684\u7C7B\u548C\u51FD\u6570\u975E\u5E38\u591A\u3002

    \u53EF\u4EE5\u7528\u6B63\u5219\u8868\u5339\u914D\u8DEF\u5F84\u4E0A\u7684\u591A\u4E2A\u7C7B\u548C\u51FD\u6570\uFF0C\u4E00\u5B9A\u7A0B\u5EA6\u4E0A\u8FBE\u5230\u591A\u5C42 trace \u7684\u6548\u679C\u3002

    trace -E com.test.ClassA|org.test.ClassB method1|method2|method3
    +

    \u6392\u9664\u6389\u6307\u5B9A\u7684\u7C7B

    \u4F7F\u7528 --exclude-class-pattern \u53C2\u6570\u53EF\u4EE5\u6392\u9664\u6389\u6307\u5B9A\u7684\u7C7B\uFF0C\u6BD4\u5982\uFF1A

    trace javax.servlet.Filter * --exclude-class-pattern com.demo.TestFilter
    +

    \u52A8\u6001 trace

    \u63D0\u793A

    3.3.0 \u7248\u672C\u540E\u652F\u6301\u3002

    \u6253\u5F00\u7EC8\u7AEF 1\uFF0Ctrace \u4E0A\u9762 demo \u91CC\u7684run\u51FD\u6570\uFF0C\u53EF\u4EE5\u770B\u5230\u6253\u5370\u51FA listenerId: 1\uFF1A

    [arthas@59161]$ trace demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 112 ms, listenerId: 1
    +\`---ts=2020-07-09 16:48:11;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[1.389634ms] demo.MathGame:run()
    +        \`---[0.123934ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +
    +\`---ts=2020-07-09 16:48:12;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[3.716391ms] demo.MathGame:run()
    +        +---[3.182813ms] demo.MathGame:primeFactors() #24
    +        \`---[0.167786ms] demo.MathGame:print() #25
    +

    \u73B0\u5728\u60F3\u8981\u6DF1\u5165\u5B50\u51FD\u6570primeFactors\uFF0C\u53EF\u4EE5\u6253\u5F00\u4E00\u4E2A\u65B0\u7EC8\u7AEF 2\uFF0C\u4F7F\u7528telnet localhost 3658\u8FDE\u63A5\u4E0A arthas\uFF0C\u518D trace primeFactors\u65F6\uFF0C\u6307\u5B9AlistenerId\u3002

    [arthas@59161]$ trace demo.MathGame primeFactors --listenerId 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 34 ms, listenerId: 1
    +

    \u8FD9\u65F6\u7EC8\u7AEF 2 \u6253\u5370\u7684\u7ED3\u679C\uFF0C\u8BF4\u660E\u5DF2\u7ECF\u589E\u5F3A\u4E86\u4E00\u4E2A\u51FD\u6570\uFF1AAffect(class count: 1 , method count: 1)\uFF0C\u4F46\u4E0D\u518D\u6253\u5370\u66F4\u591A\u7684\u7ED3\u679C\u3002

    \u518D\u67E5\u770B\u7EC8\u7AEF 1\uFF0C\u53EF\u4EE5\u53D1\u73B0 trace \u7684\u7ED3\u679C\u589E\u52A0\u4E86\u4E00\u5C42\uFF0C\u6253\u5370\u4E86primeFactors\u51FD\u6570\u91CC\u7684\u5185\u5BB9\uFF1A

    \`---ts=2020-07-09 16:49:29;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[0.492551ms] demo.MathGame:run()
    +        \`---[0.113929ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +            \`---[0.061462ms] demo.MathGame:primeFactors()
    +                \`---[0.001018ms] throw:java.lang.IllegalArgumentException() #46
    +
    +\`---ts=2020-07-09 16:49:30;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    \`---[0.409446ms] demo.MathGame:run()
    +        +---[0.232606ms] demo.MathGame:primeFactors() #24
    +        |   \`---[0.1294ms] demo.MathGame:primeFactors()
    +        \`---[0.084025ms] demo.MathGame:print() #25
    +

    \u901A\u8FC7\u6307\u5B9AlistenerId\u7684\u65B9\u5F0F\u52A8\u6001 trace\uFF0C\u53EF\u4EE5\u4E0D\u65AD\u6DF1\u5165\u3002\u53E6\u5916 watch/tt/monitor\u7B49\u547D\u4EE4\u4E5F\u652F\u6301\u7C7B\u4F3C\u7684\u529F\u80FD\u3002

    trace \u7ED3\u679C\u65F6\u95F4\u4E0D\u51C6\u786E\u95EE\u9898

    \u6BD4\u5982\u4E0B\u9762\u7684\u7ED3\u679C\u91CC\uFF1A0.705196 > (0.152743 + 0.145825)

    $ trace demo.MathGame run -n 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 66 ms, listenerId: 1
    +\`---ts=2021-02-08 11:27:36;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@232204a1
    +    \`---[0.705196ms] demo.MathGame:run()
    +        +---[0.152743ms] demo.MathGame:primeFactors() #24
    +        \`---[0.145825ms] demo.MathGame:print() #25
    +

    \u90A3\u4E48\u5176\u5B83\u7684\u65F6\u95F4\u6D88\u8017\u5728\u54EA\u4E9B\u5730\u65B9\uFF1F

    1. \u6CA1\u6709\u88AB trace \u5230\u7684\u51FD\u6570\u3002\u6BD4\u5982java.* \u4E0B\u7684\u51FD\u6570\u8C03\u7528\u9ED8\u8BA4\u4F1A\u5FFD\u7565\u6389\u3002\u901A\u8FC7\u589E\u52A0--skipJDKMethod false\u53C2\u6570\u53EF\u4EE5\u6253\u5370\u51FA\u6765\u3002

      $ trace demo.MathGame run --skipJDKMethod false
      +Press Q or Ctrl+C to abort.
      +Affect(class count: 1 , method count: 1) cost in 35 ms, listenerId: 2
      +\`---ts=2021-02-08 11:27:48;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@232204a1
      +    \`---[0.810591ms] demo.MathGame:run()
      +        +---[0.034568ms] java.util.Random:nextInt() #23
      +        +---[0.119367ms] demo.MathGame:primeFactors() #24 [throws Exception]
      +        +---[0.017407ms] java.lang.StringBuilder:<init>() #28
      +        +---[0.127922ms] java.lang.String:format() #57
      +        +---[min=0.01419ms,max=0.020221ms,total=0.034411ms,count=2] java.lang.StringBuilder:append() #57
      +        +---[0.021911ms] java.lang.Exception:getMessage() #57
      +        +---[0.015643ms] java.lang.StringBuilder:toString() #57
      +        \`---[0.086622ms] java.io.PrintStream:println() #57
      +
    2. \u975E\u51FD\u6570\u8C03\u7528\u7684\u6307\u4EE4\u6D88\u8017\u3002\u6BD4\u5982 i++, getfield\u7B49\u6307\u4EE4\u3002

    3. \u5728\u4EE3\u7801\u6267\u884C\u8FC7\u7A0B\u4E2D\uFF0CJVM \u53EF\u80FD\u51FA\u73B0\u505C\u987F\uFF0C\u6BD4\u5982 GC\uFF0C\u8FDB\u5165\u540C\u6B65\u5757\u7B49\u3002

    \u4F7F\u7528 -v \u53C2\u6570\u6253\u5370\u66F4\u591A\u4FE1\u606F

    \u63D0\u793A

    watch/trace/monitor/stack/tt \u547D\u4EE4\u90FD\u652F\u6301 -v \u53C2\u6570

    \u5F53\u547D\u4EE4\u6267\u884C\u4E4B\u540E\uFF0C\u6CA1\u6709\u8F93\u51FA\u7ED3\u679C\u3002\u6709\u4E24\u79CD\u53EF\u80FD\uFF1A

    1. \u5339\u914D\u5230\u7684\u51FD\u6570\u6CA1\u6709\u88AB\u6267\u884C
    2. \u6761\u4EF6\u8868\u8FBE\u5F0F\u7ED3\u679C\u662F false

    \u4F46\u7528\u6237\u533A\u5206\u4E0D\u51FA\u662F\u54EA\u79CD\u60C5\u51B5\u3002

    \u4F7F\u7528 -v\u9009\u9879\uFF0C\u5219\u4F1A\u6253\u5370Condition express\u7684\u5177\u4F53\u503C\u548C\u6267\u884C\u7ED3\u679C\uFF0C\u65B9\u4FBF\u786E\u8BA4\u3002

    `,44);function Y(z,H){const e=o("ExternalLinkIcon"),t=o("RouterLink");return i(),r("div",null,[k,s("p",null,[s("a",d,[m,b,a(e)])]),v,s("p",null,[h,a(t,{to:"/doc/advice-class.html"},{default:p(()=>[g]),_:1}),f]),s("ul",null,[s("li",null,[_,s("a",x,[C,a(e)])]),s("li",null,[M,s("a",L,[G,a(e)])])]),y,j,w,s("ul",null,[s("li",null,[A,s("p",null,[F,s("a",$,[E,a(e)])])]),S,s("li",null,[s("p",null,[T,I,B,s("a",P,[J,a(e)]),Q])])]),R,D,s("p",null,[N,a(t,{to:"/doc/quick-start.html"},{default:p(()=>[K]),_:1}),V,q,O]),U])}const X=l(u,[["render",Y],["__file","trace.html.vue"]]);export{X as default}; diff --git a/3.x/assets/trace.html.987171f7.js b/3.x/assets/trace.html.987171f7.js new file mode 100644 index 00000000000..23565188913 --- /dev/null +++ b/3.x/assets/trace.html.987171f7.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-06075838","path":"/en/doc/trace.html","title":"trace","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Parameters","slug":"parameters","link":"#parameters","children":[]},{"level":2,"title":"Notice","slug":"notice","link":"#notice","children":[]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"Start Demo","slug":"start-demo","link":"#start-demo","children":[]},{"level":3,"title":"Trace method","slug":"trace-method","link":"#trace-method","children":[]},{"level":3,"title":"Specify the max number of matched Classes","slug":"specify-the-max-number-of-matched-classes","link":"#specify-the-max-number-of-matched-classes","children":[]},{"level":3,"title":"Trace times limit","slug":"trace-times-limit","link":"#trace-times-limit","children":[]},{"level":3,"title":"Include jdk method","slug":"include-jdk-method","link":"#include-jdk-method","children":[]},{"level":3,"title":"Filtering by cost","slug":"filtering-by-cost","link":"#filtering-by-cost","children":[]},{"level":3,"title":"Trace multiple classes or multiple methods","slug":"trace-multiple-classes-or-multiple-methods","link":"#trace-multiple-classes-or-multiple-methods","children":[]},{"level":3,"title":"Exclude the specified class","slug":"exclude-the-specified-class","link":"#exclude-the-specified-class","children":[]},{"level":3,"title":"Dynamic trace","slug":"dynamic-trace","link":"#dynamic-trace","children":[]}]},{"level":2,"title":"Trace result time inaccuracy problem","slug":"trace-result-time-inaccuracy-problem","link":"#trace-result-time-inaccuracy-problem","children":[{"level":3,"title":"Use the -v parameter to print more information","slug":"use-the-v-parameter-to-print-more-information","link":"#use-the-v-parameter-to-print-more-information","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"en/doc/trace.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/tt.html.1800bc01.js b/3.x/assets/tt.html.1800bc01.js new file mode 100644 index 00000000000..e850b7a6558 --- /dev/null +++ b/3.x/assets/tt.html.1800bc01.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-71adf3e9","path":"/doc/tt.html","title":"tt","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u6CE8\u610F\u4E8B\u9879","slug":"\u6CE8\u610F\u4E8B\u9879","link":"#\u6CE8\u610F\u4E8B\u9879","children":[]},{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[{"level":3,"title":"\u542F\u52A8 Demo","slug":"\u542F\u52A8-demo","link":"#\u542F\u52A8-demo","children":[]},{"level":3,"title":"\u8BB0\u5F55\u8C03\u7528","slug":"\u8BB0\u5F55\u8C03\u7528","link":"#\u8BB0\u5F55\u8C03\u7528","children":[]},{"level":3,"title":"\u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF","slug":"\u6307\u5B9A-class-\u6700\u5927\u5339\u914D\u6570\u91CF","link":"#\u6307\u5B9A-class-\u6700\u5927\u5339\u914D\u6570\u91CF","children":[]},{"level":3,"title":"\u68C0\u7D22\u8C03\u7528\u8BB0\u5F55","slug":"\u68C0\u7D22\u8C03\u7528\u8BB0\u5F55","link":"#\u68C0\u7D22\u8C03\u7528\u8BB0\u5F55","children":[]},{"level":3,"title":"\u67E5\u770B\u8C03\u7528\u4FE1\u606F","slug":"\u67E5\u770B\u8C03\u7528\u4FE1\u606F","link":"#\u67E5\u770B\u8C03\u7528\u4FE1\u606F","children":[]},{"level":3,"title":"\u91CD\u505A\u4E00\u6B21\u8C03\u7528","slug":"\u91CD\u505A\u4E00\u6B21\u8C03\u7528","link":"#\u91CD\u505A\u4E00\u6B21\u8C03\u7528","children":[]},{"level":3,"title":"\u89C2\u5BDF\u8868\u8FBE\u5F0F","slug":"\u89C2\u5BDF\u8868\u8FBE\u5F0F","link":"#\u89C2\u5BDF\u8868\u8FBE\u5F0F","children":[]},{"level":3,"title":"\u901A\u8FC7\u7D22\u5F15\u5220\u9664\u6307\u5B9A\u7684 tt \u8BB0\u5F55","slug":"\u901A\u8FC7\u7D22\u5F15\u5220\u9664\u6307\u5B9A\u7684-tt-\u8BB0\u5F55","link":"#\u901A\u8FC7\u7D22\u5F15\u5220\u9664\u6307\u5B9A\u7684-tt-\u8BB0\u5F55","children":[]},{"level":3,"title":"\u6E05\u9664\u6240\u6709\u7684 tt \u8BB0\u5F55","slug":"\u6E05\u9664\u6240\u6709\u7684-tt-\u8BB0\u5F55","link":"#\u6E05\u9664\u6240\u6709\u7684-tt-\u8BB0\u5F55","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":2},{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/tt.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/tt.html.51ba2266.js b/3.x/assets/tt.html.51ba2266.js new file mode 100644 index 00000000000..18cccb76014 --- /dev/null +++ b/3.x/assets/tt.html.51ba2266.js @@ -0,0 +1,92 @@ +import{_ as p,o as i,c as r,a as n,b as a,w as o,e as s,d as e,r as c}from"./app.4d248835.js";const d={},u=n("h1",{id:"tt",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#tt","aria-hidden":"true"},"#"),s(" tt")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-tt",target:"_blank",rel:"noopener noreferrer"},b=n("code",null,"tt",-1),h=s(" online tutorial"),k=e('

    Check the parameters, return values and exceptions of the methods at different times.

    watch is a powerful command but due to its feasibility and complexity, it's quite hard to locate the issue effectively.

    In such difficulties, tt comes into play.

    With the help of tt (TimeTunnel), you can check the contexts of the methods at different times in execution history.

    Precautions

    • The implementation of the tt command is to save the input parameters/return values of the function into a Map<Integer, TimeFragment>. The default size is 100.
    • After using tt related functions, you need to manually release the memory, otherwise OOM may occur for a long time. Exiting arthas will not automatically clear tt's cache map.

    Usage

    Start Demo

    ',8),v=s("Start "),f=n("code",null,"math-game",-1),g=s(" in "),x=s("Quick Start"),_=s("."),T=e(`

    Record method calls

    $ tt -t demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 66 ms.
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +

    Specify the max number of matched Classes

    $ tt -t -m 1 demo.MathGame primeFactors
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 130 ms, listenerId: 1.
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2022-12-25 19:41:45  2.629929  true    false    0x3bf400       MathGame                       primeFactors
    + 1001    2022-12-25 19:41:55  0.146161  false   true     0x3bf400       MathGame                       primeFactors
    +
    • -t

      record the calling context of the method demo.MathGame primeFactors

    • -n 3

      limit the number of the records (avoid overflow for too many records; with -n option, Arthas can automatically stop recording once the records reach the specified limit)

    • -m 1

      limit the number of matched Classes to avoid JVM suspending when too many matched Classes. The default value is 50.

    • Property

    NameSpecification
    INDEXthe index for each call based on time
    TIMESTAMPtime to invoke the method
    COST(ms)time cost of the method call
    IS-RETwhether method exits with normal return
    IS-EXPwhether method failed with exceptions
    OBJECThashCode() of the object invoking the method
    CLASSclass name of the object invoking the method
    METHODmethod being invoked
    • Condition expression

    Tips:

    1. tt -t *Test print params.length==1 with different amounts of parameters;
    2. tt -t *Test print 'params[1] instanceof Integer' with different types of parameters;
    3. tt -t *Test print params[0].mobile=="13989838402" with specified parameter.

    Advanced:

    `,10),E=s("Critical fields in expression"),M={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},S=s("Special usage"),I={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},y=s("OGNL official guide"),C=e(`

    List all records

    $ tt -l
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +                              9
    + 1005    2018-12-04 11:15:43  0.4776    false   true     0x4b67cf4d     MathGame                       primeFactors
    +Affect(row-cnt:6) cost in 4 ms.
    +

    Searching for records

    $ tt -s 'method.name=="primeFactors"'
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +                              9
    + 1005    2018-12-04 11:15:43  0.4776    false   true     0x4b67cf4d     MathGame                       primeFactors
    +Affect(row-cnt:6) cost in 607 ms.
    +

    Advanced:

    `,5),A=s("Critical fields in expression"),w=e(`

    Check context of the call

    Using tt -i <index> to check a specific calling details.

    $ tt -i 1003
    + INDEX            1003
    + GMT-CREATE       2018-12-04 11:15:41
    + COST(ms)         0.186073
    + OBJECT           0x4b67cf4d
    + CLASS            demo.MathGame
    + METHOD           primeFactors
    + IS-RETURN        false
    + IS-EXCEPTION     true
    + PARAMETERS[0]    @Integer[-564322413]
    + THROW-EXCEPTION  java.lang.IllegalArgumentException: number is: -564322413, need >= 2
    +                    at demo.MathGame.primeFactors(MathGame.java:46)
    +                    at demo.MathGame.run(MathGame.java:24)
    +                    at demo.MathGame.main(MathGame.java:16)
    +
    +Affect(row-cnt:1) cost in 11 ms.
    +

    Replay record

    Since Arthas stores the context of the call, you can even replay the method calling afterwards with extra option -p to replay the issue for advanced troubleshooting, option --replay-times define the replay execution times, option --replay-interval define the interval(unit in ms,with default value 1000) of replays

    $ tt -i 1004 -p
    + RE-INDEX       1004
    + GMT-REPLAY     2018-12-04 11:26:00
    + OBJECT         0x4b67cf4d
    + CLASS          demo.MathGame
    + METHOD         primeFactors
    + PARAMETERS[0]  @Integer[946738738]
    + IS-RETURN      true
    + IS-EXCEPTION   false
    + RETURN-OBJ     @ArrayList[
    +                    @Integer[2],
    +                    @Integer[11],
    +                    @Integer[17],
    +                    @Integer[2531387],
    +                ]
    +Time fragment[1004] successfully replayed.
    +Affect(row-cnt:1) cost in 14 ms.
    +

    Watch express

    -w, --watch-express watch the time fragment by ognl express.

    `,8),G=s("You can used all variables in "),O=s("fundamental fields in expressions"),F=s(" for the watch express\u3002"),P=e(`
    [arthas@10718]$ tt -t demo.MathGame run -n 5
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1
    + INDEX      TIMESTAMP                   COST(ms)     IS-RET     IS-EXP      OBJECT              CLASS                                     METHOD
    +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    + 1000       2021-01-08 21:54:17         0.901091     true       false       0x7699a589          MathGame                                  run
    +[arthas@10718]$ tt -w 'target.illegalArgumentCount'  -x 1 -i 1000
    +@Integer[60]
    +Affect(row-cnt:1) cost in 7 ms.
    +
    • Get a static field and calling a static method
    [arthas@10718]$ tt -t demo.MathGame run -n 5
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1
    + INDEX      TIMESTAMP                   COST(ms)     IS-RET     IS-EXP      OBJECT              CLASS                                     METHOD
    +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    + 1000       2021-01-08 21:54:17         0.901091     true       false       0x7699a589          MathGame                                  run
    +[arthas@10718]$ tt -w '@demo.MathGame@random.nextInt(100)'  -x 1 -i 1000
    +@Integer[46]
    +
    `,3),R=s("Note that "),N=n("code",null,"com.taobao.arthas.core.advisor.Advice#getLoader",-1),L=s(" is used here, and that it is better to use the exact "),D=n("code",null,"classloader",-1),X=s(),B=s("ognl"),J=s("."),H=s("Advanced usage "),$={href:"https://github.com/alibaba/arthas/issues/482",target:"_blank",rel:"noopener noreferrer"},j=s("get spring context to call the bean method"),q=e(`

    F.Y.I

    1. Loss of the ThreadLocal

      Arthas save params into an array, then invoke the method with the params again. The method execute in another thread, so the ThreadLocal lost.

    2. params may be modified

      Arthas save params into an array, they are object references. The Objects may be modified by other code.

    Delete the specified tt record by index

    tt -d 1001
    +

    Clear all tt records

    tt --delete-all
    +
    `,6);function U(V,Q){const l=c("ExternalLinkIcon"),t=c("RouterLink");return i(),r("div",null,[u,n("p",null,[n("a",m,[b,h,a(l)])]),k,n("p",null,[v,f,g,a(t,{to:"/en/doc/quick-start.html"},{default:o(()=>[x]),_:1}),_]),T,n("ul",null,[n("li",null,[a(t,{to:"/en/doc/advice-class.html"},{default:o(()=>[E]),_:1})]),n("li",null,[n("a",M,[S,a(l)])]),n("li",null,[n("a",I,[y,a(l)])])]),C,n("ul",null,[n("li",null,[a(t,{to:"/en/doc/advice-class.html"},{default:o(()=>[A]),_:1})])]),w,n("ul",null,[n("li",null,[G,a(t,{to:"/en/doc/advice-class.html"},{default:o(()=>[O]),_:1}),F])]),P,n("p",null,[R,N,L,D,X,a(t,{to:"/en/doc/ognl.html"},{default:o(()=>[B]),_:1}),J]),n("p",null,[H,n("a",$,[j,a(l)])]),q])}const Y=p(d,[["render",U],["__file","tt.html.vue"]]);export{Y as default}; diff --git a/3.x/assets/tt.html.980704e8.js b/3.x/assets/tt.html.980704e8.js new file mode 100644 index 00000000000..94af40f214a --- /dev/null +++ b/3.x/assets/tt.html.980704e8.js @@ -0,0 +1,93 @@ +import{_ as c,o as i,c as r,a as s,b as a,w as p,e as n,d as e,r as l}from"./app.4d248835.js";const d={},u=s("h1",{id:"tt",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#tt","aria-hidden":"true"},"#"),n(" tt")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-tt",target:"_blank",rel:"noopener noreferrer"},b=s("code",null,"tt",-1),k=n("\u5728\u7EBF\u6559\u7A0B"),v=e('

    \u63D0\u793A

    \u65B9\u6CD5\u6267\u884C\u6570\u636E\u7684\u65F6\u7A7A\u96A7\u9053\uFF0C\u8BB0\u5F55\u4E0B\u6307\u5B9A\u65B9\u6CD5\u6BCF\u6B21\u8C03\u7528\u7684\u5165\u53C2\u548C\u8FD4\u56DE\u4FE1\u606F\uFF0C\u5E76\u80FD\u5BF9\u8FD9\u4E9B\u4E0D\u540C\u7684\u65F6\u95F4\u4E0B\u8C03\u7528\u8FDB\u884C\u89C2\u6D4B

    watch \u867D\u7136\u5F88\u65B9\u4FBF\u548C\u7075\u6D3B\uFF0C\u4F46\u9700\u8981\u63D0\u524D\u60F3\u6E05\u695A\u89C2\u5BDF\u8868\u8FBE\u5F0F\u7684\u62FC\u5199\uFF0C\u8FD9\u5BF9\u6392\u67E5\u95EE\u9898\u800C\u8A00\u8981\u6C42\u592A\u9AD8\uFF0C\u56E0\u4E3A\u5F88\u591A\u65F6\u5019\u6211\u4EEC\u5E76\u4E0D\u6E05\u695A\u95EE\u9898\u51FA\u81EA\u4E8E\u4F55\u65B9\uFF0C\u53EA\u80FD\u9760\u86DB\u4E1D\u9A6C\u8FF9\u8FDB\u884C\u731C\u6D4B\u3002

    \u8FD9\u4E2A\u65F6\u5019\u5982\u679C\u80FD\u8BB0\u5F55\u4E0B\u5F53\u65F6\u65B9\u6CD5\u8C03\u7528\u7684\u6240\u6709\u5165\u53C2\u548C\u8FD4\u56DE\u503C\u3001\u629B\u51FA\u7684\u5F02\u5E38\u4F1A\u5BF9\u6574\u4E2A\u95EE\u9898\u7684\u601D\u8003\u4E0E\u5224\u65AD\u975E\u5E38\u6709\u5E2E\u52A9\u3002

    \u4E8E\u662F\u4E4E\uFF0CTimeTunnel \u547D\u4EE4\u5C31\u8BDE\u751F\u4E86\u3002

    \u6CE8\u610F\u4E8B\u9879

    • tt \u547D\u4EE4\u7684\u5B9E\u73B0\u662F\uFF1A\u628A\u51FD\u6570\u7684\u5165\u53C2/\u8FD4\u56DE\u503C\u7B49\uFF0C\u4FDD\u5B58\u5230\u4E00\u4E2AMap<Integer, TimeFragment>\u91CC\uFF0C\u9ED8\u8BA4\u7684\u5927\u5C0F\u662F 100\u3002
    • tt \u76F8\u5173\u529F\u80FD\u5728\u4F7F\u7528\u5B8C\u4E4B\u540E\uFF0C\u9700\u8981\u624B\u52A8\u91CA\u653E\u5185\u5B58\uFF0C\u5426\u5219\u957F\u65F6\u95F4\u53EF\u80FD\u5BFC\u81F4OOM\u3002\u9000\u51FA arthas \u4E0D\u4F1A\u81EA\u52A8\u6E05\u9664 tt \u7684\u7F13\u5B58 map\u3002

    \u4F7F\u7528\u53C2\u8003

    \u542F\u52A8 Demo

    ',8),h=n("\u542F\u52A8"),f=n("\u5FEB\u901F\u5165\u95E8"),_=n("\u91CC\u7684"),g=s("code",null,"math-game",-1),T=n("\u3002"),E=e(`

    \u8BB0\u5F55\u8C03\u7528

    \u5BF9\u4E8E\u4E00\u4E2A\u6700\u57FA\u672C\u7684\u4F7F\u7528\u6765\u8BF4\uFF0C\u5C31\u662F\u8BB0\u5F55\u4E0B\u5F53\u524D\u65B9\u6CD5\u7684\u6BCF\u6B21\u8C03\u7528\u73AF\u5883\u73B0\u573A\u3002

    $ tt -t demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 66 ms.
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +

    \u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF

    $ tt -t -m 1 demo.MathGame primeFactors
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 130 ms, listenerId: 1.
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2022-12-25 19:41:45  2.629929  true    false    0x3bf400       MathGame                       primeFactors
    + 1001    2022-12-25 19:41:55  0.146161  false   true     0x3bf400       MathGame                       primeFactors
    +
    • \u547D\u4EE4\u53C2\u6570\u89E3\u6790

      • -t

        tt \u547D\u4EE4\u6709\u5F88\u591A\u4E2A\u4E3B\u53C2\u6570\uFF0C-t \u5C31\u662F\u5176\u4E2D\u4E4B\u4E00\u3002\u8FD9\u4E2A\u53C2\u6570\u7684\u8868\u660E\u5E0C\u671B\u8BB0\u5F55\u4E0B\u7C7B *Test \u7684 print \u65B9\u6CD5\u7684\u6BCF\u6B21\u6267\u884C\u60C5\u51B5\u3002

      • -n 3

        \u5F53\u4F60\u6267\u884C\u4E00\u4E2A\u8C03\u7528\u91CF\u4E0D\u9AD8\u7684\u65B9\u6CD5\u65F6\u53EF\u80FD\u4F60\u8FD8\u80FD\u6709\u8DB3\u591F\u7684\u65F6\u95F4\u7528 CTRL+C \u4E2D\u65AD tt \u547D\u4EE4\u8BB0\u5F55\u7684\u8FC7\u7A0B\uFF0C\u4F46\u5982\u679C\u9047\u5230\u8C03\u7528\u91CF\u975E\u5E38\u5927\u7684\u65B9\u6CD5\uFF0C\u77AC\u95F4\u5C31\u80FD\u5C06\u4F60\u7684 JVM \u5185\u5B58\u6491\u7206\u3002

        \u6B64\u65F6\u4F60\u53EF\u4EE5\u901A\u8FC7 -n \u53C2\u6570\u6307\u5B9A\u4F60\u9700\u8981\u8BB0\u5F55\u7684\u6B21\u6570\uFF0C\u5F53\u8FBE\u5230\u8BB0\u5F55\u6B21\u6570\u65F6 Arthas \u4F1A\u4E3B\u52A8\u4E2D\u65AD tt \u547D\u4EE4\u7684\u8BB0\u5F55\u8FC7\u7A0B\uFF0C\u907F\u514D\u4EBA\u5DE5\u64CD\u4F5C\u65E0\u6CD5\u505C\u6B62\u7684\u60C5\u51B5\u3002

      • -m 1

        \u901A\u8FC7 -m \u53C2\u6570\u6307\u5B9A Class \u5339\u914D\u7684\u6700\u5927\u6570\u91CF\uFF0C\u9632\u6B62\u5339\u914D\u5230\u7684 Class \u6570\u91CF\u592A\u591A\u5BFC\u81F4 JVM \u6302\u8D77\uFF0C\u9ED8\u8BA4\u503C\u662F 50\u3002

    • \u8868\u683C\u5B57\u6BB5\u8BF4\u660E

    \u8868\u683C\u5B57\u6BB5\u5B57\u6BB5\u89E3\u91CA
    INDEX\u65F6\u95F4\u7247\u6BB5\u8BB0\u5F55\u7F16\u53F7\uFF0C\u6BCF\u4E00\u4E2A\u7F16\u53F7\u4EE3\u8868\u7740\u4E00\u6B21\u8C03\u7528\uFF0C\u540E\u7EED tt \u8FD8\u6709\u5F88\u591A\u547D\u4EE4\u90FD\u662F\u57FA\u4E8E\u6B64\u7F16\u53F7\u6307\u5B9A\u8BB0\u5F55\u64CD\u4F5C\uFF0C\u975E\u5E38\u91CD\u8981\u3002
    TIMESTAMP\u65B9\u6CD5\u6267\u884C\u7684\u672C\u673A\u65F6\u95F4\uFF0C\u8BB0\u5F55\u4E86\u8FD9\u4E2A\u65F6\u95F4\u7247\u6BB5\u6240\u53D1\u751F\u7684\u672C\u673A\u65F6\u95F4
    COST(ms)\u65B9\u6CD5\u6267\u884C\u7684\u8017\u65F6
    IS-RET\u65B9\u6CD5\u662F\u5426\u4EE5\u6B63\u5E38\u8FD4\u56DE\u7684\u5F62\u5F0F\u7ED3\u675F
    IS-EXP\u65B9\u6CD5\u662F\u5426\u4EE5\u629B\u5F02\u5E38\u7684\u5F62\u5F0F\u7ED3\u675F
    OBJECT\u6267\u884C\u5BF9\u8C61\u7684hashCode()\uFF0C\u6CE8\u610F\uFF0C\u66FE\u7ECF\u6709\u4EBA\u8BEF\u8BA4\u4E3A\u662F\u5BF9\u8C61\u5728 JVM \u4E2D\u7684\u5185\u5B58\u5730\u5740\uFF0C\u4F46\u5F88\u9057\u61BE\u4ED6\u4E0D\u662F\u3002\u4F46\u4ED6\u80FD\u5E2E\u52A9\u4F60\u7B80\u5355\u7684\u6807\u8BB0\u5F53\u524D\u6267\u884C\u65B9\u6CD5\u7684\u7C7B\u5B9E\u4F53
    CLASS\u6267\u884C\u7684\u7C7B\u540D
    METHOD\u6267\u884C\u7684\u65B9\u6CD5\u540D
    `,7),M=e("
  • \u6761\u4EF6\u8868\u8FBE\u5F0F

    \u4E0D\u77E5\u9053\u5927\u5BB6\u662F\u5426\u6709\u5728\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u9047\u5230\u4EE5\u4E0B\u56F0\u60D1

    • Arthas \u4F3C\u4E4E\u5F88\u96BE\u533A\u5206\u51FA\u91CD\u8F7D\u7684\u65B9\u6CD5
    • \u6211\u53EA\u9700\u8981\u89C2\u5BDF\u7279\u5B9A\u53C2\u6570\uFF0C\u4F46\u662F tt \u5374\u5168\u90E8\u90FD\u7ED9\u6211\u8BB0\u5F55\u4E86\u4E0B\u6765

    \u6761\u4EF6\u8868\u8FBE\u5F0F\u4E5F\u662F\u7528 \bOGNL \u6765\u7F16\u5199\uFF0C\u6838\u5FC3\u7684\u5224\u65AD\u5BF9\u8C61\u4F9D\u7136\u662F Advice \u5BF9\u8C61\u3002\u9664\u4E86 tt \u547D\u4EE4\u4E4B\u5916\uFF0Cwatch\u3001trace\u3001stack \u547D\u4EE4\u4E5F\u90FD\u652F\u6301\u6761\u4EF6\u8868\u8FBE\u5F0F\u3002

  • \u89E3\u51B3\u65B9\u6CD5\u91CD\u8F7D

    tt -t *Test print params.length==1

    \u901A\u8FC7\u5236\u5B9A\u53C2\u6570\u4E2A\u6570\u7684\u5F62\u5F0F\u89E3\u51B3\u4E0D\u540C\u7684\u65B9\u6CD5\u7B7E\u540D\uFF0C\u5982\u679C\u53C2\u6570\u4E2A\u6570\u4E00\u6837\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u8FD9\u6837\u5199

    tt -t *Test print 'params[1] instanceof Integer'

  • \u89E3\u51B3\u6307\u5B9A\u53C2\u6570

    tt -t *Test print params[0].mobile=="13989838402"

  • ",3),x=s("p",null,[n("\u6784\u6210\u6761\u4EF6\u8868\u8FBE\u5F0F\u7684 "),s("code",null,"Advice"),n(" \u5BF9\u8C61")],-1),I=n("\u524D\u8FB9\u770B\u5230\u4E86\u5F88\u591A\u6761\u4EF6\u8868\u8FBE\u5F0F\u4E2D\uFF0C\u90FD\u4F7F\u7528\u4E86 "),S=s("code",null,"params[0]",-1),C=n("\uFF0C\u6709\u5173\u8FD9\u4E2A\u53D8\u91CF\u7684\u4ECB\u7ECD\uFF0C\u8BF7\u53C2\u8003"),A=n("\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF"),G=e(`

    \u68C0\u7D22\u8C03\u7528\u8BB0\u5F55

    \u5F53\u4F60\u7528 tt \u8BB0\u5F55\u4E86\u4E00\u5927\u7247\u7684\u65F6\u95F4\u7247\u6BB5\u4E4B\u540E\uFF0C\u4F60\u5E0C\u671B\u80FD\u4ECE\u4E2D\u7B5B\u9009\u51FA\u81EA\u5DF1\u9700\u8981\u7684\u65F6\u95F4\u7247\u6BB5\uFF0C\u8FD9\u4E2A\u65F6\u5019\u4F60\u5C31\u9700\u8981\u5BF9\u73B0\u6709\u8BB0\u5F55\u8FDB\u884C\u68C0\u7D22\u3002

    \u5047\u8BBE\u6211\u4EEC\u6709\u8FD9\u4E9B\u8BB0\u5F55

    $ tt -l
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +                              9
    + 1005    2018-12-04 11:15:43  0.4776    false   true     0x4b67cf4d     MathGame                       primeFactors
    +Affect(row-cnt:6) cost in 4 ms.
    +

    \u6211\u9700\u8981\u7B5B\u9009\u51FA primeFactors \u65B9\u6CD5\u7684\u8C03\u7528\u4FE1\u606F

    $ tt -s 'method.name=="primeFactors"'
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +                              9
    + 1005    2018-12-04 11:15:43  0.4776    false   true     0x4b67cf4d     MathGame                       primeFactors
    +Affect(row-cnt:6) cost in 607 ms.
    +

    \u4F60\u9700\u8981\u4E00\u4E2A -s \u53C2\u6570\u3002\u540C\u6837\u7684\uFF0C\u641C\u7D22\u8868\u8FBE\u5F0F\u7684\u6838\u5FC3\u5BF9\u8C61\u4F9D\u65E7\u662F Advice \u5BF9\u8C61\u3002

    \u67E5\u770B\u8C03\u7528\u4FE1\u606F

    \u5BF9\u4E8E\u5177\u4F53\u4E00\u4E2A\u65F6\u95F4\u7247\u7684\u4FE1\u606F\u800C\u8A00\uFF0C\u4F60\u53EF\u4EE5\u901A\u8FC7 -i \u53C2\u6570\u540E\u8FB9\u8DDF\u7740\u5BF9\u5E94\u7684 INDEX \u7F16\u53F7\u67E5\u770B\u5230\u4ED6\u7684\u8BE6\u7EC6\u4FE1\u606F\u3002

    $ tt -i 1003
    + INDEX            1003
    + GMT-CREATE       2018-12-04 11:15:41
    + COST(ms)         0.186073
    + OBJECT           0x4b67cf4d
    + CLASS            demo.MathGame
    + METHOD           primeFactors
    + IS-RETURN        false
    + IS-EXCEPTION     true
    + PARAMETERS[0]    @Integer[-564322413]
    + THROW-EXCEPTION  java.lang.IllegalArgumentException: number is: -564322413, need >= 2
    +                      at demo.MathGame.primeFactors(MathGame.java:46)
    +                      at demo.MathGame.run(MathGame.java:24)
    +                      at demo.MathGame.main(MathGame.java:16)
    +
    +Affect(row-cnt:1) cost in 11 ms.
    +

    \u91CD\u505A\u4E00\u6B21\u8C03\u7528

    \u5F53\u4F60\u7A0D\u7A0D\u505A\u4E86\u4E00\u4E9B\u8C03\u6574\u4E4B\u540E\uFF0C\u4F60\u53EF\u80FD\u9700\u8981\u524D\u7AEF\u7CFB\u7EDF\u91CD\u65B0\u89E6\u53D1\u4E00\u6B21\u4F60\u7684\u8C03\u7528\uFF0C\u6B64\u65F6\u5F97\u6C42\u7237\u7237\u544A\u5976\u5976\u7684\u9700\u8981\u524D\u7AEF\u914D\u5408\u8054\u8C03\u7684\u540C\u5B66\u518D\u6B21\u53D1\u8D77\u4E00\u6B21\u8C03\u7528\u3002\u800C\u6709\u4E9B\u573A\u666F\u4E0B\uFF0C\u8FD9\u4E2A\u8C03\u7528\u4E0D\u662F\u8FD9\u4E48\u597D\u89E6\u53D1\u7684\u3002

    tt \u547D\u4EE4\u7531\u4E8E\u4FDD\u5B58\u4E86\u5F53\u65F6\u8C03\u7528\u7684\u6240\u6709\u73B0\u573A\u4FE1\u606F\uFF0C\u6240\u4EE5\u6211\u4EEC\u53EF\u4EE5\u81EA\u5DF1\u4E3B\u52A8\u5BF9\u4E00\u4E2A INDEX \u7F16\u53F7\u7684\u65F6\u95F4\u7247\u81EA\u4E3B\u53D1\u8D77\u4E00\u6B21\u8C03\u7528\uFF0C\u4ECE\u800C\u89E3\u653E\u4F60\u7684\u6C9F\u901A\u6210\u672C\u3002\u6B64\u65F6\u4F60\u9700\u8981 -p \u53C2\u6570\u3002\u901A\u8FC7 --replay-times \u6307\u5B9A \u8C03\u7528\u6B21\u6570\uFF0C\u901A\u8FC7 --replay-interval \u6307\u5B9A\u591A\u6B21\u8C03\u7528\u95F4\u9694(\u5355\u4F4D ms, \u9ED8\u8BA4 1000ms)

    $ tt -i 1004 -p
    + RE-INDEX       1004
    + GMT-REPLAY     2018-12-04 11:26:00
    + OBJECT         0x4b67cf4d
    + CLASS          demo.MathGame
    + METHOD         primeFactors
    + PARAMETERS[0]  @Integer[946738738]
    + IS-RETURN      true
    + IS-EXCEPTION   false
    + COST(ms)         0.186073
    + RETURN-OBJ     @ArrayList[
    +                    @Integer[2],
    +                    @Integer[11],
    +                    @Integer[17],
    +                    @Integer[2531387],
    +                ]
    +Time fragment[1004] successfully replayed.
    +Affect(row-cnt:1) cost in 14 ms.
    +

    \u4F60\u4F1A\u53D1\u73B0\u7ED3\u679C\u867D\u7136\u4E00\u6837\uFF0C\u4F46\u8C03\u7528\u7684\u8DEF\u5F84\u53D1\u751F\u4E86\u53D8\u5316\uFF0C\u7531\u539F\u6765\u7684\u7A0B\u5E8F\u53D1\u8D77\u53D8\u6210\u4E86 Arthas \u81EA\u5DF1\u7684\u5185\u90E8\u7EBF\u7A0B\u53D1\u8D77\u7684\u8C03\u7528\u4E86\u3002

    \u89C2\u5BDF\u8868\u8FBE\u5F0F

    -w, --watch-express \u89C2\u5BDF\u65F6\u7A7A\u96A7\u9053\u4F7F\u7528ognl \u8868\u8FBE\u5F0F

    `,17),O=n("\u4F7F\u7528"),F=n("\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF"),P=n("\u4E2D\u6240\u6709\u53D8\u91CF\u4F5C\u4E3A\u5DF2\u77E5\u6761\u4EF6\u7F16\u5199\u8868\u8FBE\u5F0F\u3002"),R=e(`
    [arthas@10718]$ tt -t demo.MathGame run -n 5
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1
    + INDEX      TIMESTAMP                   COST(ms)     IS-RET     IS-EXP      OBJECT              CLASS                                     METHOD
    +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    + 1000       2021-01-08 21:54:17         0.901091     true       false       0x7699a589          MathGame                                  run
    +[arthas@10718]$ tt -w 'target.illegalArgumentCount'  -x 1 -i 1000
    +@Integer[60]
    +Affect(row-cnt:1) cost in 7 ms.
    +
    • \u83B7\u53D6\u7C7B\u7684\u9759\u6001\u5B57\u6BB5\u3001\u8C03\u7528\u7C7B\u7684\u9759\u6001\u65B9\u6CD5
    [arthas@10718]$ tt -t demo.MathGame run -n 5
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1
    + INDEX      TIMESTAMP                   COST(ms)     IS-RET     IS-EXP      OBJECT              CLASS                                     METHOD
    +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    + 1000       2021-01-08 21:54:17         0.901091     true       false       0x7699a589          MathGame                                  run
    +[arthas@10718]$ tt -w '@demo.MathGame@random.nextInt(100)'  -x 1 -i 1000
    +@Integer[46]
    +
    `,3),w=n("\u6CE8\u610F\u8FD9\u91CC\u4F7F\u7528 "),N=s("code",null,"com.taobao.arthas.core.advisor.Advice#getLoader",-1),D=n("\u52A0\u8F7D,\u4F7F\u7528\u7CBE\u786E"),L=s("code",null,"classloader",-1),X=n(),y=n("ognl"),B=n("\u66F4\u597D\u3002"),J=n("\u9AD8\u7EA7\u7528\u6CD5 "),H={href:"https://github.com/alibaba/arthas/issues/482",target:"_blank",rel:"noopener noreferrer"},$=n("\u83B7\u53D6 spring context \u8C03\u7528 bean \u65B9\u6CD5"),V=e(`
    • \u9700\u8981\u5F3A\u8C03\u7684\u70B9

      1. ThreadLocal \u4FE1\u606F\u4E22\u5931

        \u5F88\u591A\u6846\u67B6\u5077\u5077\u7684\u5C06\u4E00\u4E9B\u73AF\u5883\u53D8\u91CF\u4FE1\u606F\u585E\u5230\u4E86\u53D1\u8D77\u8C03\u7528\u7EBF\u7A0B\u7684 ThreadLocal \u4E2D\uFF0C\u7531\u4E8E\u8C03\u7528\u7EBF\u7A0B\u53D1\u751F\u4E86\u53D8\u5316\uFF0C\u8FD9\u4E9B ThreadLocal \u7EBF\u7A0B\u4FE1\u606F\u65E0\u6CD5\u901A\u8FC7 Arthas \u4FDD\u5B58\uFF0C\u6240\u4EE5\u8FD9\u4E9B\u4FE1\u606F\u5C06\u4F1A\u4E22\u5931\u3002

        \u4E00\u4E9B\u5E38\u89C1\u7684 CASE \u6BD4\u5982\uFF1A\u9E70\u773C\u7684 TraceId \u7B49\u3002

      2. \u5F15\u7528\u7684\u5BF9\u8C61

        \u9700\u8981\u5F3A\u8C03\u7684\u662F\uFF0Ctt \u547D\u4EE4\u662F\u5C06\u5F53\u524D\u73AF\u5883\u7684\u5BF9\u8C61\u5F15\u7528\u4FDD\u5B58\u8D77\u6765\uFF0C\u4F46\u4EC5\u4EC5\u4E5F\u53EA\u80FD\u4FDD\u5B58\u4E00\u4E2A\u5F15\u7528\u800C\u5DF2\u3002\u5982\u679C\u65B9\u6CD5\u5185\u90E8\u5BF9\u5165\u53C2\u8FDB\u884C\u4E86\u53D8\u66F4\uFF0C\u6216\u8005\u8FD4\u56DE\u7684\u5BF9\u8C61\u7ECF\u8FC7\u4E86\u540E\u7EED\u7684\u5904\u7406\uFF0C\u90A3\u4E48\u5728 tt \u67E5\u770B\u7684\u65F6\u5019\u5C06\u65E0\u6CD5\u770B\u5230\u5F53\u65F6\u6700\u51C6\u786E\u7684\u503C\u3002\u8FD9\u4E5F\u662F\u4E3A\u4EC0\u4E48 watch \u547D\u4EE4\u5B58\u5728\u7684\u610F\u4E49\u3002

    \u901A\u8FC7\u7D22\u5F15\u5220\u9664\u6307\u5B9A\u7684 tt \u8BB0\u5F55

    tt -d 1001
    +

    \u6E05\u9664\u6240\u6709\u7684 tt \u8BB0\u5F55

    tt --delete-all
    +
    `,5);function q(j,Q){const o=l("ExternalLinkIcon"),t=l("RouterLink");return i(),r("div",null,[u,s("p",null,[s("a",m,[b,k,a(o)])]),v,s("p",null,[h,a(t,{to:"/doc/quick-start.html"},{default:p(()=>[f]),_:1}),_,g,T]),E,s("ul",null,[M,s("li",null,[x,s("p",null,[I,S,C,a(t,{to:"/doc/advice-class.html"},{default:p(()=>[A]),_:1})])])]),G,s("ul",null,[s("li",null,[O,a(t,{to:"/doc/advice-class.html"},{default:p(()=>[F]),_:1}),P])]),R,s("p",null,[w,N,D,L,X,a(t,{to:"/doc/ognl.html"},{default:p(()=>[y]),_:1}),B]),s("p",null,[J,s("a",H,[$,a(o)])]),V])}const W=c(d,[["render",q],["__file","tt.html.vue"]]);export{W as default}; diff --git a/3.x/assets/tt.html.fd7438d0.js b/3.x/assets/tt.html.fd7438d0.js new file mode 100644 index 00000000000..5cdcbc80fba --- /dev/null +++ b/3.x/assets/tt.html.fd7438d0.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-79eacb55","path":"/en/doc/tt.html","title":"tt","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Precautions","slug":"precautions","link":"#precautions","children":[]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"Start Demo","slug":"start-demo","link":"#start-demo","children":[]},{"level":3,"title":"Record method calls","slug":"record-method-calls","link":"#record-method-calls","children":[]},{"level":3,"title":"Specify the max number of matched Classes","slug":"specify-the-max-number-of-matched-classes","link":"#specify-the-max-number-of-matched-classes","children":[]},{"level":3,"title":"List all records","slug":"list-all-records","link":"#list-all-records","children":[]},{"level":3,"title":"Searching for records","slug":"searching-for-records","link":"#searching-for-records","children":[]},{"level":3,"title":"Check context of the call","slug":"check-context-of-the-call","link":"#check-context-of-the-call","children":[]},{"level":3,"title":"Replay record","slug":"replay-record","link":"#replay-record","children":[]},{"level":3,"title":"Watch express","slug":"watch-express","link":"#watch-express","children":[]},{"level":3,"title":"Delete the specified tt record by index","slug":"delete-the-specified-tt-record-by-index","link":"#delete-the-specified-tt-record-by-index","children":[]},{"level":3,"title":"Clear all tt records","slug":"clear-all-tt-records","link":"#clear-all-tt-records","children":[]}]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":2},{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"en/doc/tt.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/tunnel-server-agents.03d5eafa.js b/3.x/assets/tunnel-server-agents.03d5eafa.js new file mode 100644 index 00000000000..30cdf3e7e5d --- /dev/null +++ b/3.x/assets/tunnel-server-agents.03d5eafa.js @@ -0,0 +1 @@ +const s="/3.x/images/arthas-tunnel-server.png",e="/3.x/images/tunnel-server-apps.png",n="/3.x/images/tunnel-server-agents.png";export{e as _,s as a,n as b}; diff --git a/3.x/assets/tunnel.html.203ccf1d.js b/3.x/assets/tunnel.html.203ccf1d.js new file mode 100644 index 00000000000..1f46f1ed0e6 --- /dev/null +++ b/3.x/assets/tunnel.html.203ccf1d.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-07074726","path":"/en/doc/tunnel.html","title":"Arthas Tunnel","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Download and deploy arthas tunnel server","slug":"download-and-deploy-arthas-tunnel-server","link":"#download-and-deploy-arthas-tunnel-server","children":[]},{"level":2,"title":"Connecting to the tunnel server when starting arthas","slug":"connecting-to-the-tunnel-server-when-starting-arthas","link":"#connecting-to-the-tunnel-server-when-starting-arthas","children":[]},{"level":2,"title":"Best practices","slug":"best-practices","link":"#best-practices","children":[]},{"level":2,"title":"Tunnel Server Management Page","slug":"tunnel-server-management-page","link":"#tunnel-server-management-page","children":[]},{"level":2,"title":"Security and Privilege Management","slug":"security-and-privilege-management","link":"#security-and-privilege-management","children":[]},{"level":2,"title":"Cluster Management","slug":"cluster-management","link":"#cluster-management","children":[]},{"level":2,"title":"How arthas tunnel server works","slug":"how-arthas-tunnel-server-works","link":"#how-arthas-tunnel-server-works","children":[]}],"git":{"updatedTime":1725176890000,"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},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1}]},"filePathRelative":"en/doc/tunnel.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/tunnel.html.5346db5d.js b/3.x/assets/tunnel.html.5346db5d.js new file mode 100644 index 00000000000..d6935ccf4e9 --- /dev/null +++ b/3.x/assets/tunnel.html.5346db5d.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-d2ddc9fe","path":"/doc/tunnel.html","title":"Arthas Tunnel","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4E0B\u8F7D\u90E8\u7F72 arthas tunnel server","slug":"\u4E0B\u8F7D\u90E8\u7F72-arthas-tunnel-server","link":"#\u4E0B\u8F7D\u90E8\u7F72-arthas-tunnel-server","children":[]},{"level":2,"title":"\u542F\u52A8 arthas \u65F6\u8FDE\u63A5\u5230 tunnel server","slug":"\u542F\u52A8-arthas-\u65F6\u8FDE\u63A5\u5230-tunnel-server","link":"#\u542F\u52A8-arthas-\u65F6\u8FDE\u63A5\u5230-tunnel-server","children":[]},{"level":2,"title":"\u6700\u4F73\u5B9E\u8DF5","slug":"\u6700\u4F73\u5B9E\u8DF5","link":"#\u6700\u4F73\u5B9E\u8DF5","children":[]},{"level":2,"title":"Tunnel Server \u7684\u7BA1\u7406\u9875\u9762","slug":"tunnel-server-\u7684\u7BA1\u7406\u9875\u9762","link":"#tunnel-server-\u7684\u7BA1\u7406\u9875\u9762","children":[]},{"level":2,"title":"\u5B89\u5168\u548C\u6743\u9650\u7BA1\u7406","slug":"\u5B89\u5168\u548C\u6743\u9650\u7BA1\u7406","link":"#\u5B89\u5168\u548C\u6743\u9650\u7BA1\u7406","children":[]},{"level":2,"title":"\u96C6\u7FA4\u65B9\u5F0F\u7BA1\u7406","slug":"\u96C6\u7FA4\u65B9\u5F0F\u7BA1\u7406","link":"#\u96C6\u7FA4\u65B9\u5F0F\u7BA1\u7406","children":[]},{"level":2,"title":"Arthas tunnel server \u7684\u5DE5\u4F5C\u539F\u7406","slug":"arthas-tunnel-server-\u7684\u5DE5\u4F5C\u539F\u7406","link":"#arthas-tunnel-server-\u7684\u5DE5\u4F5C\u539F\u7406","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":3},{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/tunnel.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/tunnel.html.9c3dcb91.js b/3.x/assets/tunnel.html.9c3dcb91.js new file mode 100644 index 00000000000..7a00d9db568 --- /dev/null +++ b/3.x/assets/tunnel.html.9c3dcb91.js @@ -0,0 +1,47 @@ +import{_ as o,a as c,b as d}from"./tunnel-server-agents.03d5eafa.js";import{_ as p,o as h,c as u,a as e,b as n,w as i,e as s,d as t,r as l}from"./app.4d248835.js";const v={},b=e("h1",{id:"arthas-tunnel",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#arthas-tunnel","aria-hidden":"true"},"#"),s(" Arthas Tunnel")],-1),m=e("p",null,"\u901A\u8FC7 Arthas Tunnel Server/Client \u6765\u8FDC\u7A0B\u7BA1\u7406/\u8FDE\u63A5\u591A\u4E2A Agent\u3002",-1),_=e("p",null,"\u6BD4\u5982\uFF0C\u5728\u6D41\u5F0F\u8BA1\u7B97\u91CC\uFF0CJava \u8FDB\u7A0B\u53EF\u4EE5\u662F\u5728\u4E0D\u540C\u7684\u673A\u5668\u542F\u52A8\u7684\uFF0C\u60F3\u8981\u4F7F\u7528 Arthas \u53BB\u8BCA\u65AD\u4F1A\u6BD4\u8F83\u9EBB\u70E6\uFF0C\u56E0\u4E3A\u7528\u6237\u901A\u5E38\u6CA1\u6709\u673A\u5668\u7684\u6743\u9650\uFF0C\u5373\u4F7F\u767B\u9646\u673A\u5668\u4E5F\u5206\u4E0D\u6E05\u662F\u54EA\u4E2A Java \u8FDB\u7A0B\u3002",-1),g=e("p",null,"\u5728\u8FD9\u79CD\u60C5\u51B5\u4E0B\uFF0C\u53EF\u4EE5\u4F7F\u7528 Arthas Tunnel Server/Client\u3002",-1),k=e("p",null,"\u53C2\u8003:",-1),f=s("1: "),x=s("Web Console"),w=s("2: "),I=s("Arthas Spring Boot Starter"),A=e("h2",{id:"\u4E0B\u8F7D\u90E8\u7F72-arthas-tunnel-server",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u4E0B\u8F7D\u90E8\u7F72-arthas-tunnel-server","aria-hidden":"true"},"#"),s(" \u4E0B\u8F7D\u90E8\u7F72 arthas tunnel server")],-1),E={href:"https://github.com/alibaba/arthas/releases",target:"_blank",rel:"noopener noreferrer"},N=s("https://github.com/alibaba/arthas/releases"),R=s("\u4ECE Github Releases \u9875\u4E0B\u8F7D\uFF1A "),L={href:"https://github.com/alibaba/arthas/releases",target:"_blank",rel:"noopener noreferrer"},S=s("https://github.com/alibaba/arthas/releases"),T=t(`

    Arthas tunnel server \u662F\u4E00\u4E2A spring boot fat jar \u5E94\u7528\uFF0C\u76F4\u63A5java -jar\u542F\u52A8\uFF1A

    java -jar  arthas-tunnel-server.jar
    +

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0Carthas tunnel server \u7684 web \u7AEF\u53E3\u662F8080\uFF0Carthas agent \u8FDE\u63A5\u7684\u7AEF\u53E3\u662F7777\u3002

    `,3),V=s("\u542F\u52A8\u4E4B\u540E\uFF0C\u53EF\u4EE5\u8BBF\u95EE "),B={href:"http://127.0.0.1:8080/",target:"_blank",rel:"noopener noreferrer"},y=s("http://127.0.0.1:8080/"),C=s(" \uFF0C\u518D\u901A\u8FC7"),D=e("code",null,"agentId",-1),J=s("\u8FDE\u63A5\u5230\u5DF2\u6CE8\u518C\u7684 arthas agent \u4E0A\u3002"),O=s("\u901A\u8FC7 Spring Boot \u7684 Endpoint\uFF0C\u53EF\u4EE5\u67E5\u770B\u5230\u5177\u4F53\u7684\u8FDE\u63A5\u4FE1\u606F\uFF1A "),j={href:"http://127.0.0.1:8080/actuator/arthas",target:"_blank",rel:"noopener noreferrer"},P=s("http://127.0.0.1:8080/actuator/arthas"),U=s(" \uFF0C\u767B\u9646\u7528\u6237\u540D\u662F"),G=e("code",null,"arthas",-1),Z=s("\uFF0C\u5BC6\u7801\u5728 arthas tunnel server \u7684\u65E5\u5FD7\u91CC\u53EF\u4EE5\u627E\u5230\uFF0C\u6BD4\u5982\uFF1A"),K=t(`
    32851 [main] INFO  o.s.b.a.s.s.UserDetailsServiceAutoConfiguration
    +
    +Using generated security password: f1dca050-3777-48f4-a577-6367e55a78a2
    +

    \u542F\u52A8 arthas \u65F6\u8FDE\u63A5\u5230 tunnel server

    \u5728\u542F\u52A8 arthas\uFF0C\u53EF\u4EE5\u4F20\u9012--tunnel-server\u53C2\u6570\uFF0C\u6BD4\u5982\uFF1A

    as3.sh --tunnel-server 'ws://127.0.0.1:7777/ws'
    +

    \u4E5F\u53EF\u4EE5\u4F7F\u7528\u4E0B\u9762\u7684\u6D4B\u8BD5\u5730\u5740\uFF08\u4E0D\u4FDD\u8BC1\u4E00\u76F4\u53EF\u7528\uFF09\uFF1A

    as3.sh --tunnel-server 'ws://47.75.156.201:80/ws'
    +
    • \u5982\u679C\u6709\u7279\u6B8A\u9700\u6C42\uFF0C\u53EF\u4EE5\u901A\u8FC7--agent-id\u53C2\u6570\u91CC\u6307\u5B9A agentId\u3002\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u4F1A\u751F\u6210\u968F\u673A ID\u3002

    attach \u6210\u529F\u4E4B\u540E\uFF0C\u4F1A\u6253\u5370\u51FA agentId\uFF0C\u6BD4\u5982\uFF1A

      ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
    +|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
    +\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
    +
    +
    +wiki      https://arthas.aliyun.com/3.x/doc
    +tutorials https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
    +version   3.1.2
    +pid       86183
    +time      2019-08-30 15:40:53
    +id        URJZ5L48RPBR2ALI5K4V
    +

    \u5982\u679C\u662F\u542F\u52A8\u65F6\u6CA1\u6709\u8FDE\u63A5\u5230 tunnel server\uFF0C\u4E5F\u53EF\u4EE5\u5728\u540E\u7EED\u81EA\u52A8\u91CD\u8FDE\u6210\u529F\u4E4B\u540E\uFF0C\u901A\u8FC7 session \u547D\u4EE4\u6765\u83B7\u53D6 agentId\uFF1A

    [arthas@86183]$ session
    + Name           Value
    +-----------------------------------------------------
    + JAVA_PID       86183
    + SESSION_ID     f7273eb5-e7b0-4a00-bc5b-3fe55d741882
    + AGENT_ID       URJZ5L48RPBR2ALI5K4V
    + TUNNEL_SERVER  ws://47.75.156.201:80/ws
    +
    `,11),M=s("\u4EE5\u4E0A\u9762\u7684\u4E3A\u4F8B\uFF0C\u5728\u6D4F\u89C8\u5668\u91CC\u8BBF\u95EE "),$={href:"http://47.75.156.201/arthas/?port=80",target:"_blank",rel:"noopener noreferrer"},F=s("http://47.75.156.201/arthas/?port=80"),W=s(" \uFF0C\u8F93\u5165 "),Y=e("code",null,"agentId",-1),q=s("\uFF0C\u5C31\u53EF\u4EE5\u8FDE\u63A5\u5230\u672C\u673A\u4E0A\u7684 arthas \u4E86\u3002"),z=t('

    \u6700\u4F73\u5B9E\u8DF5

    \u63D0\u793A

    \u6CE8\u610F\uFF0CagentId \u8981\u4FDD\u6301\u552F\u4E00\uFF0C\u5426\u5219\u4F1A\u5728 tunnel server \u4E0A\u51B2\u7A81\uFF0C\u4E0D\u80FD\u6B63\u5E38\u5DE5\u4F5C\u3002

    \u5982\u679C arthas agent \u914D\u7F6E\u4E86 appName\uFF0C\u5219\u751F\u6210\u7684 agentId \u4F1A\u5E26\u4E0AappName\u7684\u524D\u7F00\u3002

    \u6BD4\u5982\u5728\u52A0\u4E0A\u542F\u52A8\u53C2\u6570\uFF1Aas3.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name demoapp \uFF0C\u5219\u751F\u6210\u7684 agentId \u53EF\u80FD\u662Fdemoapp_URJZ5L48RPBR2ALI5K4V\u3002

    Tunnel server \u4F1A\u4EE5_\u505A\u5206\u9694\u7B26\uFF0C\u63D0\u53D6\u51FAappName\uFF0C\u65B9\u4FBF\u6309\u5E94\u7528\u8FDB\u884C\u7BA1\u7406\u3002

    \u63D0\u793A

    \u53E6\u5916\uFF0C\u4E5F\u53EF\u4EE5\u5728\u89E3\u538B\u7684 arthas \u76EE\u5F55\u4E0B\u7684 arthas.properties\uFF0C\u6216\u8005\u5728 spring boot \u5E94\u7528\u7684application.properties\u91CC\u914D\u7F6EappName\u3002

    Tunnel Server \u7684\u7BA1\u7406\u9875\u9762

    \u63D0\u793A

    \u9700\u8981\u5728 spring boot \u7684application.properties\u91CC\u914D\u7F6E arthas.enable-detail-pages=true

    \u6CE8\u610F\uFF0C\u5F00\u653E\u7BA1\u7406\u9875\u9762\u6709\u98CE\u9669\uFF01\u7BA1\u7406\u9875\u9762\u6CA1\u6709\u5B89\u5168\u62E6\u622A\u529F\u80FD\uFF0C\u52A1\u5FC5\u81EA\u884C\u589E\u52A0\u5B89\u5168\u63AA\u65BD\u3002

    \u5728\u672C\u5730\u542F\u52A8 tunnel-server\uFF0C\u7136\u540E\u4F7F\u7528as3.sh attach\uFF0C\u5E76\u4E14\u6307\u5B9A\u5E94\u7528\u540D--app-name test\uFF1A

    $ as3.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name test
    +telnet connecting to arthas server... current timestamp is 1627539688
    +Trying 127.0.0.1...
    +Connected to 127.0.0.1.
    +Escape character is '^]'.
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
    +|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
    +\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
    +
    +
    +wiki       https://arthas.aliyun.com/3.x/doc
    +tutorials  https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
    +version    3.5.3
    +main_class demo.MathGame
    +pid        65825
    +time       2021-07-29 14:21:29
    +id         test_PE3LZO9NA9ENJYTPGL9L
    +

    \u7136\u540E\u8BBF\u95EE tunnel-server\uFF0C\u53EF\u4EE5\u770B\u5230\u6240\u6709\u8FDE\u63A5\u7684\u5E94\u7528\u5217\u8868\uFF1A

    `,12),H={href:"http://localhost:8080/apps.html",target:"_blank",rel:"noopener noreferrer"},Q=s("http://localhost:8080/apps.html"),X=e("p",null,[e("img",{src:o,alt:""})],-1),ee=e("p",null,"\u518D\u6253\u5F00\u8BE6\u60C5\uFF0C\u5219\u53EF\u4EE5\u770B\u5230\u8FDE\u63A5\u7684\u6240\u6709 agent \u5217\u8868\uFF1A",-1),se={href:"http://localhost:8080/agents.html?app=test",target:"_blank",rel:"noopener noreferrer"},ne=s("http://localhost:8080/agents.html?app=test"),ae=t('

    \u5B89\u5168\u548C\u6743\u9650\u7BA1\u7406

    \u63D0\u793A

    \u5F3A\u70C8\u5EFA\u8BAE\u4E0D\u8981\u628A tunnel server \u76F4\u63A5\u66B4\u9732\u5230\u516C\u7F51\u4E0A\u3002

    \u76EE\u524D tunnel server \u6CA1\u6709\u4E13\u95E8\u7684\u6743\u9650\u7BA1\u7406

    1. \u7528\u6237\u9700\u8981\u81EA\u884C\u5F00\u53D1\uFF0C\u5BF9 app name \u9274\u6743\u3002
    2. \u5982\u679C\u5F00\u653E\u7BA1\u7406\u9875\u9762\uFF0C\u9700\u8981\u589E\u52A0\u5B89\u5168\u63AA\u65BD\u3002

    \u96C6\u7FA4\u65B9\u5F0F\u7BA1\u7406

    \u5982\u679C\u5E0C\u671B\u90E8\u7F72\u591A\u53F0 tunnel server\uFF0C\u53EF\u4EE5\u901A\u8FC7 nginx \u505A\u8F6C\u53D1\uFF0Credis \u6765\u4FDD\u5B58 agent \u4FE1\u606F\u3002

    • nginx \u9700\u8981\u914D\u7F6E sticky session\uFF0C\u4FDD\u8BC1\u7528\u6237 web socket \u8FDE\u63A5\u5230\u540C\u4E00\u4E2A\u540E\u7AEF tunnel server \u4E0A\u3002\u7B80\u5355\u7684\u914D\u7F6E\u65B9\u5F0F\u662F\u7528ip_hash\u3002

    Arthas tunnel server \u7684\u5DE5\u4F5C\u539F\u7406

    browser <-> arthas tunnel server <-> arthas tunnel client <-> arthas agent
    +
    `,10),te={href:"https://github.com/alibaba/arthas/blob/master/tunnel-server/README.md#",target:"_blank",rel:"noopener noreferrer"},re=s("tunnel-server/README.md");function ie(le,oe){const r=l("RouterLink"),a=l("ExternalLinkIcon");return h(),u("div",null,[b,m,_,g,k,e("ul",null,[e("li",null,[f,n(r,{to:"/doc/web-console.html"},{default:i(()=>[x]),_:1})]),e("li",null,[w,n(r,{to:"/doc/spring-boot-starter.html"},{default:i(()=>[I]),_:1})])]),A,e("p",null,[e("a",E,[N,n(a)])]),e("ul",null,[e("li",null,[R,e("a",L,[S,n(a)])])]),T,e("p",null,[V,e("a",B,[y,n(a)]),C,D,J]),e("p",null,[O,e("a",j,[P,n(a)]),U,G,Z]),K,e("p",null,[M,e("a",$,[F,n(a)]),W,Y,q]),z,e("p",null,[e("a",H,[Q,n(a)])]),X,ee,e("p",null,[e("a",se,[ne,n(a)])]),ae,e("p",null,[e("a",te,[re,n(a)])])])}const pe=p(v,[["render",ie],["__file","tunnel.html.vue"]]);export{pe as default}; diff --git a/3.x/assets/tunnel.html.d20e61ab.js b/3.x/assets/tunnel.html.d20e61ab.js new file mode 100644 index 00000000000..cb6d3eecb36 --- /dev/null +++ b/3.x/assets/tunnel.html.d20e61ab.js @@ -0,0 +1,47 @@ +import{_ as l,a as c,b as d}from"./tunnel-server-agents.03d5eafa.js";import{_ as p,o as h,c as u,a as e,b as a,w as r,e as n,d as t,r as i}from"./app.4d248835.js";const v={},m=e("h1",{id:"arthas-tunnel",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#arthas-tunnel","aria-hidden":"true"},"#"),n(" Arthas Tunnel")],-1),b=e("p",null,"Manage/connect multiple Agents remotely via Arthas Tunnel Server/Client.",-1),g=e("p",null,"For example, in streaming computing, Java processes can be started on different machines, and it can be difficult to use Arthas to diagnose them, because the user usually does not have access to the machine.",-1),_=e("p",null,"In this case, Arthas Tunnel Server/Client can be used.",-1),k=e("p",null,"Reference:",-1),f=n("1: "),w=n("Web Console"),y=n("2: "),x=n("Arthas Spring Boot Starter"),I=e("h2",{id:"download-and-deploy-arthas-tunnel-server",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#download-and-deploy-arthas-tunnel-server","aria-hidden":"true"},"#"),n(" Download and deploy arthas tunnel server")],-1),A={href:"https://github.com/alibaba/arthas/releases",target:"_blank",rel:"noopener noreferrer"},N=n("https://github.com/alibaba/arthas/releases"),T=t(`

    Arthas tunnel server is a spring boot fat jar application, start with the java -jar command:

    java -jar  arthas-tunnel-server.jar
    +

    By default, the web port of the arthas tunnel server is 8080, and the port connected by the arthas agent is 7777.

    `,3),R=n("Once started, you can go to "),E={href:"http://127.0.0.1:8080/",target:"_blank",rel:"noopener noreferrer"},L=n("http://127.0.0.1:8080/"),S=n(" and connect to the registered arthas agent via "),B=e("code",null,"agentId",-1),P=n("."),C=n("Through Spring Boot's Endpoint, you can view the specific connection information: "),V={href:"http://127.0.0.1:8080/actuator/arthas",target:"_blank",rel:"noopener noreferrer"},D=n("http://127.0.0.1:8080/actuator/arthas"),O=n(", the login user name is "),M=e("code",null,"arthas",-1),U=n(", and the password can be found in the log of arthas tunnel server, for example:"),j=t(`
    32851 [main] INFO o.s.b.a.s.s.UserDetailsServiceAutoConfiguration
    +
    +Using generated security password: f1dca050-3777-48f4-a577-6367e55a78a2
    +

    Connecting to the tunnel server when starting arthas

    When starting arthas, you can use the --tunnel-server parameter, for example:

    as3.sh --tunnel-server 'ws://127.0.0.1:7777/ws'
    +

    You can also use the following test address (not guaranteed to be available all the time):

    as3.sh --tunnel-server 'ws://47.75.156.201:80/ws'
    +
    • You can specify the agentId by the --agent-id parameter. By default, a random ID is generated.

    After Arthas attach succeeds, the agentId will be printed, such as:

      ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
    +|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
    +\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
    +
    +
    +wiki      https://arthas.aliyun.com/3.x/doc
    +tutorials https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
    +version   3.1.2
    +pid       86183
    +time      2019-08-30 15:40:53
    +id        URJZ5L48RPBR2ALI5K4V
    +

    If the connection is not connected to the tunnel server at startup, you can also obtain the agentId through the session command after reconnection succeeds:

    [arthas@86183]$ session
    + Name           Value
    +-----------------------------------------------------
    + JAVA_PID       86183
    + SESSION_ID     f7273eb5-e7b0-4a00-bc5b-3fe55d741882
    + AGENT_ID       URJZ5L48RPBR2ALI5K4V
    + TUNNEL_SERVER  ws://47.75.156.201:80/ws
    +
    `,11),J=n("For the above example, go to "),F={href:"http://47.75.156.201/arthas/?port=80",target:"_blank",rel:"noopener noreferrer"},G=n("http://47.75.156.201/arthas/?port=80"),Z=n(" in the browser and input the "),K=e("code",null,"agentId",-1),W=n(" to connect to arthas on remote machine."),Y=t('

    Best practices

    WARNING

    Note that the agentId must be unique, otherwise it will conflict on the tunnel server and not work properly.

    If the arthas agent is configured with appName, the generated agentId will be prefixed with appName.

    For example, if you add the startup parameter as3.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name demoapp, the generated agentId might be demoapp_URJZ5L48RPBR2ALI5K4V.

    Tunnel server will use _ as a delimiter to extract appName, which is convenient to manage by application.

    TIP

    Alternatively, you can configure appName in arthas.properties in the unzipped arthas directory, or in application.properties of the spring boot application.

    Tunnel Server Management Page

    TIP

    Need to configure arthas.enable-detail-pages=true in application.properties of spring boot

    Attention, opening admin pages is risky! There is no security blocking function on the management page, you must add security measures by yourself.

    Start the tunnel-server locally, then use as3.sh attach, and specify the application name --app-name test:

    $ as3.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name test
    +telnet connecting to arthas server... current timestamp is 1627539688
    +Trying 127.0.0.1...
    +Connected to 127.0.0.1.
    +Escape character is '^]'.
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \\ |  .--. ''--.  .--'|  '--'  | /  O  \\ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |\`.  \`-.
    +|  | |  ||  |\\  \\    |  |   |  |  |  ||  | |  |.-'    |
    +\`--' \`--'\`--' '--'   \`--'   \`--'  \`--'\`--' \`--'\`-----'
    +
    +
    +wiki       https://arthas.aliyun.com/3.x/doc
    +tutorials  https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
    +version    3.5.3
    +main_class demo.MathGame
    +pid        65825
    +time       2021-07-29 14:21:29
    +id         test_PE3LZO9NA9ENJYTPGL9L
    +

    Then visit tunnel-server, you can see a list of all connected applications:

    `,12),$={href:"http://localhost:8080/apps.html",target:"_blank",rel:"noopener noreferrer"},q=n("http://localhost:8080/apps.html"),z=e("p",null,[e("img",{src:l,alt:""})],-1),H=e("p",null,"Then open the details, you can see a list of all connected agents:",-1),Q={href:"http://localhost:8080/agents.html?app=test",target:"_blank",rel:"noopener noreferrer"},X=n("http://localhost:8080/agents.html?app=test"),ee=t('

    Security and Privilege Management

    TIP

    It is strongly recommended not to expose the tunnel server directly to the public network.

    Currently tunnel server does not have special permission management

    1. Users need to develop by themselves and authenticate the app name.
    2. If the management page is opened, security measures need to be added.

    Cluster Management

    If you want to deploy multiple tunnel servers, you can use nginx for forwarding and redis to store agent information.

    Nginx needs to configure sticky session to ensure that the user's web socket is connected to the same back-end tunnel server. The simple configuration method is to use ip_hash.

    How arthas tunnel server works

    browser <-> arthas tunnel server <-> arthas tunnel client <-> arthas agent
    +
    `,10),ne={href:"https://github.com/alibaba/arthas/blob/master/tunnel-server/README.md#",target:"_blank",rel:"noopener noreferrer"},ae=n("tunnel-server/README.md");function se(te,oe){const o=i("RouterLink"),s=i("ExternalLinkIcon");return h(),u("div",null,[m,b,g,_,k,e("ul",null,[e("li",null,[f,a(o,{to:"/en/doc/web-console.html"},{default:r(()=>[w]),_:1})]),e("li",null,[y,a(o,{to:"/en/doc/spring-boot-starter.html"},{default:r(()=>[x]),_:1})])]),I,e("p",null,[e("a",A,[N,a(s)])]),T,e("p",null,[R,e("a",E,[L,a(s)]),S,B,P]),e("p",null,[C,e("a",V,[D,a(s)]),O,M,U]),j,e("p",null,[J,e("a",F,[G,a(s)]),Z,K,W]),Y,e("p",null,[e("a",$,[q,a(s)])]),z,H,e("p",null,[e("a",Q,[X,a(s)])]),ee,e("p",null,[e("a",ne,[ae,a(s)])])])}const le=p(v,[["render",se],["__file","tunnel.html.vue"]]);export{le as default}; diff --git a/3.x/assets/version.html.18257b2f.js b/3.x/assets/version.html.18257b2f.js new file mode 100644 index 00000000000..5263ee0f990 --- /dev/null +++ b/3.x/assets/version.html.18257b2f.js @@ -0,0 +1,3 @@ +import{_ as e,o as s,c as a,d as n}from"./app.4d248835.js";const r={},i=n(`

    version

    prints out Arthas's version.

    Usage

    $ version
    + 3.5.1
    +
    `,4),d=[i];function o(t,c){return s(),a("div",null,d)}const h=e(r,[["render",o],["__file","version.html.vue"]]);export{h as default}; diff --git a/3.x/assets/version.html.2ce43555.js b/3.x/assets/version.html.2ce43555.js new file mode 100644 index 00000000000..b41df3e12dd --- /dev/null +++ b/3.x/assets/version.html.2ce43555.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-9a4bc0f6","path":"/en/doc/version.html","title":"version","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[]}],"git":{"updatedTime":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"en/doc/version.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/version.html.48ec1551.js b/3.x/assets/version.html.48ec1551.js new file mode 100644 index 00000000000..971e8552573 --- /dev/null +++ b/3.x/assets/version.html.48ec1551.js @@ -0,0 +1,3 @@ +import{_ as e,o as a,c as n,d as r}from"./app.4d248835.js";const s={},i=r(`

    version

    \u8F93\u51FA\u5F53\u524D\u76EE\u6807 Java \u8FDB\u7A0B\u6240\u52A0\u8F7D\u7684 Arthas \u7248\u672C\u53F7

    \u4F7F\u7528\u53C2\u8003

    $ version
    + 3.5.1
    +
    `,4),t=[i];function d(c,o){return a(),n("div",null,t)}const h=e(s,[["render",d],["__file","version.html.vue"]]);export{h as default}; diff --git a/3.x/assets/version.html.85cfef6a.js b/3.x/assets/version.html.85cfef6a.js new file mode 100644 index 00000000000..97b0eb98bf3 --- /dev/null +++ b/3.x/assets/version.html.85cfef6a.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-5b5d3371","path":"/doc/version.html","title":"version","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":1660041759000,"contributors":[{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":1}]},"filePathRelative":"doc/version.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/vmoption.html.58b16737.js b/3.x/assets/vmoption.html.58b16737.js new file mode 100644 index 00000000000..5ca888a5b16 --- /dev/null +++ b/3.x/assets/vmoption.html.58b16737.js @@ -0,0 +1 @@ +const i=JSON.parse('{"key":"v-40db67fd","path":"/doc/vmoption.html","title":"vmoption","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u4F7F\u7528\u53C2\u8003","slug":"\u4F7F\u7528\u53C2\u8003","link":"#\u4F7F\u7528\u53C2\u8003","children":[{"level":3,"title":"\u67E5\u770B\u6240\u6709\u7684 option","slug":"\u67E5\u770B\u6240\u6709\u7684-option","link":"#\u67E5\u770B\u6240\u6709\u7684-option","children":[]},{"level":3,"title":"\u67E5\u770B\u6307\u5B9A\u7684 option","slug":"\u67E5\u770B\u6307\u5B9A\u7684-option","link":"#\u67E5\u770B\u6307\u5B9A\u7684-option","children":[]},{"level":3,"title":"\u66F4\u65B0\u6307\u5B9A\u7684 option","slug":"\u66F4\u65B0\u6307\u5B9A\u7684-option","link":"#\u66F4\u65B0\u6307\u5B9A\u7684-option","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/vmoption.md","version":"3.7.3"}');export{i as data}; diff --git a/3.x/assets/vmoption.html.a450713f.js b/3.x/assets/vmoption.html.a450713f.js new file mode 100644 index 00000000000..b6a4bbe870c --- /dev/null +++ b/3.x/assets/vmoption.html.a450713f.js @@ -0,0 +1,40 @@ +import{_ as s,o as i,c as l,a as n,b as o,e as a,d as t,r}from"./app.4d248835.js";const d={},c=n("h1",{id:"vmoption",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#vmoption","aria-hidden":"true"},"#"),a(" vmoption")],-1),p={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-vmoption",target:"_blank",rel:"noopener noreferrer"},u=n("code",null,"vmoption",-1),v=a(" online tutorial"),b=t(`

    TIP

    Display, and update the vm diagnostic options.

    Usage

    View all options

    [arthas@56963]$ vmoption
    + KEY                    VALUE                   ORIGIN                 WRITEABLE
    +---------------------------------------------------------------------------------------------
    + HeapDumpBeforeFullGC   false                   DEFAULT                true
    + HeapDumpAfterFullGC    false                   DEFAULT                true
    + HeapDumpOnOutOfMemory  false                   DEFAULT                true
    + Error
    + HeapDumpPath                                   DEFAULT                true
    + CMSAbortablePrecleanW  100                     DEFAULT                true
    + aitMillis
    + CMSWaitDuration        2000                    DEFAULT                true
    + CMSTriggerInterval     -1                      DEFAULT                true
    + PrintGC                false                   DEFAULT                true
    + PrintGCDetails         true                    MANAGEMENT             true
    + PrintGCDateStamps      false                   DEFAULT                true
    + PrintGCTimeStamps      false                   DEFAULT                true
    + PrintGCID              false                   DEFAULT                true
    + PrintClassHistogramBe  false                   DEFAULT                true
    + foreFullGC
    + PrintClassHistogramAf  false                   DEFAULT                true
    + terFullGC
    + PrintClassHistogram    false                   DEFAULT                true
    + MinHeapFreeRatio       0                       DEFAULT                true
    + MaxHeapFreeRatio       100                     DEFAULT                true
    + PrintConcurrentLocks   false                   DEFAULT                true
    +

    View individual option

    $ vmoption PrintGC
    + KEY                 VALUE                ORIGIN              WRITEABLE
    +---------------------------------------------------------------------------------
    + PrintGC             false                MANAGEMENT          true
    +

    Update individual option

    $ vmoption PrintGC true
    +Successfully updated the vm option.
    + NAME     BEFORE-VALUE  AFTER-VALUE
    +------------------------------------
    + PrintGC  false         true
    +
    $ vmoption PrintGCDetails true
    +Successfully updated the vm option.
    + NAME            BEFORE-VALUE  AFTER-VALUE
    +-------------------------------------------
    + PrintGCDetails  false         true
    +
    `,9);function m(h,k){const e=r("ExternalLinkIcon");return i(),l("div",null,[c,n("p",null,[n("a",p,[u,v,o(e)])]),b])}const A=s(d,[["render",m],["__file","vmoption.html.vue"]]);export{A as default}; diff --git a/3.x/assets/vmoption.html.c32a5087.js b/3.x/assets/vmoption.html.c32a5087.js new file mode 100644 index 00000000000..1728ca0cc8e --- /dev/null +++ b/3.x/assets/vmoption.html.c32a5087.js @@ -0,0 +1,40 @@ +import{_ as e,o as l,c as i,a as n,b as o,e as a,d as t,r}from"./app.4d248835.js";const d={},c=n("h1",{id:"vmoption",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#vmoption","aria-hidden":"true"},"#"),a(" vmoption")],-1),p={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-vmoption",target:"_blank",rel:"noopener noreferrer"},u=n("code",null,"vmoption",-1),v=a("\u5728\u7EBF\u6559\u7A0B"),b=t(`

    \u63D0\u793A

    \u67E5\u770B\uFF0C\u66F4\u65B0 VM \u8BCA\u65AD\u76F8\u5173\u7684\u53C2\u6570

    \u4F7F\u7528\u53C2\u8003

    \u67E5\u770B\u6240\u6709\u7684 option

    [arthas@56963]$ vmoption
    + KEY                    VALUE                   ORIGIN                 WRITEABLE
    +---------------------------------------------------------------------------------------------
    + HeapDumpBeforeFullGC   false                   DEFAULT                true
    + HeapDumpAfterFullGC    false                   DEFAULT                true
    + HeapDumpOnOutOfMemory  false                   DEFAULT                true
    + Error
    + HeapDumpPath                                   DEFAULT                true
    + CMSAbortablePrecleanW  100                     DEFAULT                true
    + aitMillis
    + CMSWaitDuration        2000                    DEFAULT                true
    + CMSTriggerInterval     -1                      DEFAULT                true
    + PrintGC                false                   DEFAULT                true
    + PrintGCDetails         true                    MANAGEMENT             true
    + PrintGCDateStamps      false                   DEFAULT                true
    + PrintGCTimeStamps      false                   DEFAULT                true
    + PrintGCID              false                   DEFAULT                true
    + PrintClassHistogramBe  false                   DEFAULT                true
    + foreFullGC
    + PrintClassHistogramAf  false                   DEFAULT                true
    + terFullGC
    + PrintClassHistogram    false                   DEFAULT                true
    + MinHeapFreeRatio       0                       DEFAULT                true
    + MaxHeapFreeRatio       100                     DEFAULT                true
    + PrintConcurrentLocks   false                   DEFAULT                true
    +

    \u67E5\u770B\u6307\u5B9A\u7684 option

    $ vmoption PrintGC
    + KEY                 VALUE                ORIGIN              WRITEABLE
    +---------------------------------------------------------------------------------
    + PrintGC             false                MANAGEMENT          true
    +

    \u66F4\u65B0\u6307\u5B9A\u7684 option

    $ vmoption PrintGC true
    +Successfully updated the vm option.
    + NAME     BEFORE-VALUE  AFTER-VALUE
    +------------------------------------
    + PrintGC  false         true
    +
    $ vmoption PrintGCDetails true
    +Successfully updated the vm option.
    + NAME            BEFORE-VALUE  AFTER-VALUE
    +-------------------------------------------
    + PrintGCDetails  false         true
    +
    `,9);function m(h,k){const s=r("ExternalLinkIcon");return l(),i("div",null,[c,n("p",null,[n("a",p,[u,v,o(s)])]),b])}const A=e(d,[["render",m],["__file","vmoption.html.vue"]]);export{A as default}; diff --git a/3.x/assets/vmoption.html.c8c7e7fc.js b/3.x/assets/vmoption.html.c8c7e7fc.js new file mode 100644 index 00000000000..1817322f9d6 --- /dev/null +++ b/3.x/assets/vmoption.html.c8c7e7fc.js @@ -0,0 +1 @@ +const i=JSON.parse('{"key":"v-4e08032e","path":"/en/doc/vmoption.html","title":"vmoption","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"View all options","slug":"view-all-options","link":"#view-all-options","children":[]},{"level":3,"title":"View individual option","slug":"view-individual-option","link":"#view-individual-option","children":[]},{"level":3,"title":"Update individual option","slug":"update-individual-option","link":"#update-individual-option","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/vmoption.md","version":"3.7.3"}');export{i as data}; diff --git a/3.x/assets/vmtool.html.3a06f08b.js b/3.x/assets/vmtool.html.3a06f08b.js new file mode 100644 index 00000000000..f131bb39218 --- /dev/null +++ b/3.x/assets/vmtool.html.3a06f08b.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-10890efa","path":"/doc/vmtool.html","title":"vmtool","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u83B7\u53D6\u5BF9\u8C61","slug":"\u83B7\u53D6\u5BF9\u8C61","link":"#\u83B7\u53D6\u5BF9\u8C61","children":[]},{"level":2,"title":"\u6307\u5B9A classloader name","slug":"\u6307\u5B9A-classloader-name","link":"#\u6307\u5B9A-classloader-name","children":[]},{"level":2,"title":"\u6307\u5B9A classloader hash","slug":"\u6307\u5B9A-classloader-hash","link":"#\u6307\u5B9A-classloader-hash","children":[]},{"level":2,"title":"\u6307\u5B9A\u8FD4\u56DE\u7ED3\u679C\u5C55\u5F00\u5C42\u6570","slug":"\u6307\u5B9A\u8FD4\u56DE\u7ED3\u679C\u5C55\u5F00\u5C42\u6570","link":"#\u6307\u5B9A\u8FD4\u56DE\u7ED3\u679C\u5C55\u5F00\u5C42\u6570","children":[]},{"level":2,"title":"\u6267\u884C\u8868\u8FBE\u5F0F","slug":"\u6267\u884C\u8868\u8FBE\u5F0F","link":"#\u6267\u884C\u8868\u8FBE\u5F0F","children":[]},{"level":2,"title":"\u5F3A\u5236 GC","slug":"\u5F3A\u5236-gc","link":"#\u5F3A\u5236-gc","children":[]},{"level":2,"title":"interrupt \u6307\u5B9A\u7EBF\u7A0B","slug":"interrupt-\u6307\u5B9A\u7EBF\u7A0B","link":"#interrupt-\u6307\u5B9A\u7EBF\u7A0B","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/vmtool.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/vmtool.html.65118aec.js b/3.x/assets/vmtool.html.65118aec.js new file mode 100644 index 00000000000..a1ad471c347 --- /dev/null +++ b/3.x/assets/vmtool.html.65118aec.js @@ -0,0 +1,29 @@ +import{_ as r,o as c,c as l,a as e,b as s,w as d,e as a,d as o,r as t}from"./app.4d248835.js";const p={},u=e("h1",{id:"vmtool",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#vmtool","aria-hidden":"true"},"#"),a(" vmtool")],-1),h=e("div",{class:"custom-container tip"},[e("p",{class:"custom-container-title"},"TIP"),e("p",null,"@since 3.5.1")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-vmtool",target:"_blank",rel:"noopener noreferrer"},v=e("code",null,"vmtool",-1),b=a(" online tutorial"),g=e("p",null,[e("code",null,"vmtool"),a(" uses the "),e("code",null,"JVMTI"),a(" to support "),e("code",null,"getInstances"),a(" in jvm and "),e("code",null,"forceGc"),a(".")],-1),k={href:"https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html",target:"_blank",rel:"noopener noreferrer"},f=a("JVM Tool Interface"),x=o(`

    getInstances

    $ vmtool --action getInstances --className java.lang.String --limit 10
    +@String[][
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com.taobao.arthas.core.shell.session.Session],
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/],
    +    @String[java/util/concurrent/ConcurrentHashMap$ValueIterator],
    +    @String[java/util/concurrent/locks/LockSupport],
    +]
    +

    TIP

    Through the --limit parameter, you can limit the number of return values to avoid pressure on the JVM when obtaining large data. The default value of limit is 10.

    Specify classloader name

    vmtool --action getInstances --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader --className org.springframework.context.ApplicationContext
    +

    Specify classloader hash

    The classloader that loads the class can be found through the sc command.

    $ sc -d org.springframework.context.ApplicationContext
    + class-info org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext
    + code-source file:/private/tmp/demo-arthas-spring-boot.jar!/BOOT-INF/lib/spring-boot-1.5.13.RELEASE.jar!/
    + name org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext
    +...
    + class-loader +-org.springframework.boot.loader.LaunchedURLClassLoader@19469ea2
    +                     +-sun.misc.Launcher$AppClassLoader@75b84c92
    +                       +-sun.misc.Launcher$ExtClassLoader@4f023edb
    + classLoaderHash 19469ea2
    +

    Then use the -c/--classloader parameter to specify:

    vmtool --action getInstances -c 19469ea2 --className org.springframework.context.ApplicationContext
    +

    Specify the number of expanded layers of returned results

    TIP

    The return result of the getInstances action is bound to the instances variable, which is an array.

    The expansion level of the result can be specified by the -x/--expand parameter, the default value is 1.

    vmtool --action getInstances -c 19469ea2 --className org.springframework.context.ApplicationContext -x 2
    +

    Execute expression

    TIP

    The return result of the getInstances action is bound to the instances variable, which is an array. The specified expression can be executed through the --express parameter.

    vmtool --action getInstances --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader --className org.springframework.context.ApplicationContext --express'instances[0].getBeanDefinitionNames()'
    +

    Force GC

    vmtool --action forceGc
    +
    `,18),_=a("Use the "),S=e("code",null,"vmoption",-1),L=a(" command to dynamically turn on the "),y=e("code",null,"PrintGC",-1),C=a(" option."),I=o(`

    interrupt \u6307\u5B9A\u7EBF\u7A0B

    The thread id is specified by the -t parameter. It can be obtained using the thread command.

    vmtool --action interruptThread -t 1
    +
    `,3);function T(w,A){const n=t("ExternalLinkIcon"),i=t("RouterLink");return c(),l("div",null,[u,h,e("p",null,[e("a",m,[v,b,s(n)])]),g,e("ul",null,[e("li",null,[e("a",k,[f,s(n)])])]),x,e("ul",null,[e("li",null,[_,s(i,{to:"/en/doc/vmoption.html"},{default:d(()=>[S]),_:1}),L,y,C])]),I])}const E=r(p,[["render",T],["__file","vmtool.html.vue"]]);export{E as default}; diff --git a/3.x/assets/vmtool.html.ab0c1d24.js b/3.x/assets/vmtool.html.ab0c1d24.js new file mode 100644 index 00000000000..8c69140fbb0 --- /dev/null +++ b/3.x/assets/vmtool.html.ab0c1d24.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-76745066","path":"/en/doc/vmtool.html","title":"vmtool","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"getInstances","slug":"getinstances","link":"#getinstances","children":[]},{"level":2,"title":"Specify classloader name","slug":"specify-classloader-name","link":"#specify-classloader-name","children":[]},{"level":2,"title":"Specify classloader hash","slug":"specify-classloader-hash","link":"#specify-classloader-hash","children":[]},{"level":2,"title":"Specify the number of expanded layers of returned results","slug":"specify-the-number-of-expanded-layers-of-returned-results","link":"#specify-the-number-of-expanded-layers-of-returned-results","children":[]},{"level":2,"title":"Execute expression","slug":"execute-expression","link":"#execute-expression","children":[]},{"level":2,"title":"Force GC","slug":"force-gc","link":"#force-gc","children":[]},{"level":2,"title":"interrupt \u6307\u5B9A\u7EBF\u7A0B","slug":"interrupt-\u6307\u5B9A\u7EBF\u7A0B","link":"#interrupt-\u6307\u5B9A\u7EBF\u7A0B","children":[]}],"git":{"updatedTime":1725176890000,"contributors":[{"name":"hengyunabc","email":"hengyunabc@gmail.com","commits":2},{"name":"Fatpandac","email":"i@fatpandac.com","commits":1},{"name":"SiuHui","email":"anrun388@gmail.com","commits":1},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1}]},"filePathRelative":"en/doc/vmtool.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/vmtool.html.dc9e0833.js b/3.x/assets/vmtool.html.dc9e0833.js new file mode 100644 index 00000000000..33eb544513e --- /dev/null +++ b/3.x/assets/vmtool.html.dc9e0833.js @@ -0,0 +1,29 @@ +import{_ as c,o as r,c as l,a,b as e,w as d,e as s,d as t,r as o}from"./app.4d248835.js";const p={},u=a("h1",{id:"vmtool",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#vmtool","aria-hidden":"true"},"#"),s(" vmtool")],-1),m=a("div",{class:"custom-container tip"},[a("p",{class:"custom-container-title"},"\u63D0\u793A"),a("p",null,"@since 3.5.1")],-1),v={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-vmtool",target:"_blank",rel:"noopener noreferrer"},h=a("code",null,"vmtool",-1),b=s("\u5728\u7EBF\u6559\u7A0B"),g=a("p",null,[a("code",null,"vmtool"),s(" \u5229\u7528"),a("code",null,"JVMTI"),s("\u63A5\u53E3\uFF0C\u5B9E\u73B0\u67E5\u8BE2\u5185\u5B58\u5BF9\u8C61\uFF0C\u5F3A\u5236 GC \u7B49\u529F\u80FD\u3002")],-1),k={href:"https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html",target:"_blank",rel:"noopener noreferrer"},_=s("JVM Tool Interface"),x=t(`

    \u83B7\u53D6\u5BF9\u8C61

    $ vmtool --action getInstances --className java.lang.String --limit 10
    +@String[][
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com.taobao.arthas.core.shell.session.Session],
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/],
    +    @String[java/util/concurrent/ConcurrentHashMap$ValueIterator],
    +    @String[java/util/concurrent/locks/LockSupport],
    +]
    +

    \u63D0\u793A

    \u901A\u8FC7 --limit\u53C2\u6570\uFF0C\u53EF\u4EE5\u9650\u5236\u8FD4\u56DE\u503C\u6570\u91CF\uFF0C\u907F\u514D\u83B7\u53D6\u8D85\u5927\u6570\u636E\u65F6\u5BF9 JVM \u9020\u6210\u538B\u529B\u3002\u9ED8\u8BA4\u503C\u662F 10\u3002

    \u6307\u5B9A classloader name

    vmtool --action getInstances --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader --className org.springframework.context.ApplicationContext
    +

    \u6307\u5B9A classloader hash

    \u53EF\u4EE5\u901A\u8FC7sc\u547D\u4EE4\u67E5\u627E\u5230\u52A0\u8F7D class \u7684 classloader\u3002

    $ sc -d org.springframework.context.ApplicationContext
    + class-info        org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext
    + code-source       file:/private/tmp/demo-arthas-spring-boot.jar!/BOOT-INF/lib/spring-boot-1.5.13.RELEASE.jar!/
    + name              org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext
    +...
    + class-loader      +-org.springframework.boot.loader.LaunchedURLClassLoader@19469ea2
    +                     +-sun.misc.Launcher$AppClassLoader@75b84c92
    +                       +-sun.misc.Launcher$ExtClassLoader@4f023edb
    + classLoaderHash   19469ea2
    +

    \u7136\u540E\u7528-c/--classloader \u53C2\u6570\u6307\u5B9A\uFF1A

    vmtool --action getInstances -c 19469ea2 --className org.springframework.context.ApplicationContext
    +

    \u6307\u5B9A\u8FD4\u56DE\u7ED3\u679C\u5C55\u5F00\u5C42\u6570

    \u63D0\u793A

    getInstances action \u8FD4\u56DE\u7ED3\u679C\u7ED1\u5B9A\u5230instances\u53D8\u91CF\u4E0A\uFF0C\u5B83\u662F\u6570\u7EC4\u3002

    \u901A\u8FC7 -x/--expand \u53C2\u6570\u53EF\u4EE5\u6307\u5B9A\u7ED3\u679C\u7684\u5C55\u5F00\u5C42\u6B21\uFF0C\u9ED8\u8BA4\u503C\u662F 1\u3002

    vmtool --action getInstances -c 19469ea2 --className org.springframework.context.ApplicationContext -x 2
    +

    \u6267\u884C\u8868\u8FBE\u5F0F

    \u63D0\u793A

    getInstances action \u8FD4\u56DE\u7ED3\u679C\u7ED1\u5B9A\u5230instances\u53D8\u91CF\u4E0A\uFF0C\u5B83\u662F\u6570\u7EC4\u3002\u53EF\u4EE5\u901A\u8FC7--express\u53C2\u6570\u6267\u884C\u6307\u5B9A\u7684\u8868\u8FBE\u5F0F\u3002

    vmtool --action getInstances --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader --className org.springframework.context.ApplicationContext --express 'instances[0].getBeanDefinitionNames()'
    +

    \u5F3A\u5236 GC

    vmtool --action forceGc
    +
    `,18),f=s("\u53EF\u4EE5\u7ED3\u5408 "),C=a("code",null,"vmoption",-1),L=s(" \u547D\u4EE4\u52A8\u6001\u6253\u5F00"),S=a("code",null,"PrintGC",-1),I=s("\u5F00\u5173\u3002"),w=t(`

    interrupt \u6307\u5B9A\u7EBF\u7A0B

    thread id \u901A\u8FC7-t\u53C2\u6570\u6307\u5B9A\uFF0C\u53EF\u4EE5\u4F7F\u7528 thread\u547D\u4EE4\u83B7\u53D6\u3002

    vmtool --action interruptThread -t 1
    +
    `,3);function A(N,E){const n=o("ExternalLinkIcon"),i=o("RouterLink");return r(),l("div",null,[u,m,a("p",null,[a("a",v,[h,b,e(n)])]),g,a("ul",null,[a("li",null,[a("a",k,[_,e(n)])])]),x,a("ul",null,[a("li",null,[f,e(i,{to:"/doc/vmoption.html"},{default:d(()=>[C]),_:1}),L,S,I])]),w])}const V=c(p,[["render",A],["__file","vmtool.html.vue"]]);export{V as default}; diff --git a/3.x/assets/watch.html.30c91d3e.js b/3.x/assets/watch.html.30c91d3e.js new file mode 100644 index 00000000000..0ce43218a2a --- /dev/null +++ b/3.x/assets/watch.html.30c91d3e.js @@ -0,0 +1,188 @@ +import{_ as i,o as l,c as r,a as n,b as a,w as o,e as s,d as p,r as c}from"./app.4d248835.js";const u={},d=n("h1",{id:"watch",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#watch","aria-hidden":"true"},"#"),s(" watch")],-1),m={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=command-watch",target:"_blank",rel:"noopener noreferrer"},k=n("code",null,"watch",-1),v=s(" online tutorial"),b=n("p",null,[s("Monitor methods in data aspect including "),n("code",null,"return values"),s(", "),n("code",null,"exceptions"),s(" and "),n("code",null,"parameters"),s(".")],-1),h=s("With the help of "),g={href:"https://commons.apache.org/proper/commons-ognl/index.html",target:"_blank",rel:"noopener noreferrer"},f=s("OGNL"),x=s(", you can easily check the details of variables when methods being invoked."),_=p('

    Parameters & Options

    There are four different scenarios for watch command, which makes it rather complicated.

    NameSpecification
    class-patternpattern for the class name
    method-patternpattern for the method name
    expressionexpression to watch, default value {params, target, returnObj}
    condition-expressioncondition expression to filter
    [b]before method being invoked
    [e]when method encountering exceptions
    [s]when method exits normally
    [f]when method exits (either succeed or fail with exceptions)
    [E]turn on regex matching while the default is wildcard matching
    [x:]the depth to print the specified property with default value: 1, the max value is 4
    [m <arg>]Specify the max number of matched Classes, the default value is 50. Long format is [maxMatch <arg>].

    F.Y.I

    1. any valid OGNL expression as "{params,returnObj}" supported
    2. there are four watching points: -b, -e, -s and -f (the first three are off in default while -f on);
    3. at the watching point, Arthas will use the expression to evaluate the variables and print them out;
    4. in parameters and out parameters are different since they can be modified within the invoked methods; params stands for in parameters in -bwhile out parameters in other watching points;
    5. there are no return values and exceptions when using -b.
    6. In the result of the watch command, the location information will be printed. There are three possible values for location: AtEnter, AtExit, and AtExceptionExit. Corresponding to the method entry, the method returns normally, and the method throws an exception.

    Advanced:

    ',6),y=s("Critical fields in "),w=n("em",null,"expression",-1),I={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},A=s("Special usages"),C={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},G=s("OGNL official guide"),j=n("h2",{id:"usage",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#usage","aria-hidden":"true"},"#"),s(" Usage")],-1),M=n("h3",{id:"start-demo",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#start-demo","aria-hidden":"true"},"#"),s(" Start Demo")],-1),L=s("Start "),E=n("code",null,"math-game",-1),O=s(" in "),F=s("Quick Start"),q=s("."),T=p(`

    Check the out parameters, this and return value

    TIP

    The expression to watch, default value {params, target, returnObj}

    $ watch demo.MathGame primeFactors -x 2
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 32 ms, listenerId: 5
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2021-08-31 15:22:57; [cost=0.220625ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-179173],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@31cefde0],
    +        illegalArgumentCount=@Integer[44],
    +    ],
    +    null,
    +]
    +method=demo.MathGame.primeFactors location=AtExit
    +ts=2021-08-31 15:22:58; [cost=1.020982ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@31cefde0],
    +        illegalArgumentCount=@Integer[44],
    +    ],
    +    @ArrayList[
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[26947],
    +    ],
    +]
    +
    • In the above result, the method is executed twice, the first result is location=AtExceptionExit, indicating that the method throws an exception, so returnObj is null
    • In the second result is location=AtExit, indicating that the method returns normally, so you can see that the result of returnObj is an ArrayList

    Specify the max number of matched Classes

    $ watch demo.MathGame primeFactors -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 302 ms, listenerId: 3
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2022-12-25 19:58:41; [cost=0.222419ms] result=@ArrayList[
    +    @Object[][isEmpty=false;size=1],
    +    @MathGame[demo.MathGame@3bf400],
    +    null,
    +]
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2022-12-25 19:58:51; [cost=0.046928ms] result=@ArrayList[
    +    @Object[][isEmpty=false;size=1],
    +    @MathGame[demo.MathGame@3bf400],
    +    null,
    +]
    +

    Check in parameters

    $ watch demo.MathGame primeFactors "{params,returnObj}" -x 2 -b
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 50 ms.
    +ts=2018-12-03 19:23:23; [cost=0.0353ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-1077465243],
    +    ],
    +    null,
    +]
    +

    Compared to the previous check:

    • return value is null since it's -b.

    Check before and after at the same time

    $ watch demo.MathGame primeFactors "{params,target,returnObj}" -x 2 -b -s -n 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 46 ms.
    +ts=2018-12-03 19:29:54; [cost=0.01696ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@522b408a],
    +        illegalArgumentCount=@Integer[13038],
    +    ],
    +    null,
    +]
    +ts=2018-12-03 19:29:54; [cost=4.277392ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@522b408a],
    +        illegalArgumentCount=@Integer[13038],
    +    ],
    +    @ArrayList[
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[5],
    +        @Integer[5],
    +        @Integer[73],
    +        @Integer[241],
    +        @Integer[439],
    +    ],
    +]
    +

    F.Y.I

    • -n 2: threshold of execution times is 2.
    • the first block of output is the before watching point;
    • *the order of the output determined by the *watching* order itself (nothing to do with the order of the options -b -s).

    Use -x to check more details

    $ watch demo.MathGame primeFactors "{params,target}" -x 3
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 58 ms.
    +ts=2018-12-03 19:34:19; [cost=0.587833ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[
    +            serialVersionUID=@Long[3905348978240129619],
    +            seed=@AtomicLong[3133719055989],
    +            multiplier=@Long[25214903917],
    +            addend=@Long[11],
    +            mask=@Long[281474976710655],
    +            DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +            BadBound=@String[bound must be positive],
    +            BadRange=@String[bound must be greater than origin],
    +            BadSize=@String[size must be non-negative],
    +            seedUniquifier=@AtomicLong[-3282039941672302964],
    +            nextNextGaussian=@Double[0.0],
    +            haveNextNextGaussian=@Boolean[false],
    +            serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +            unsafe=@Unsafe[sun.misc.Unsafe@2eaa1027],
    +            seedOffset=@Long[24],
    +        ],
    +        illegalArgumentCount=@Integer[13159],
    +    ],
    +]
    +
    • -x: Expand level of object (1 by default)
    • The max value of -x is 4, to prevent the expansion result taking up too much memory. Users can specify the field in the ognl expression.

    Use condition expressions to locate specific call

    $ watch demo.MathGame primeFactors "{params[0],target}" "params[0]<0"
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 68 ms.
    +ts=2018-12-03 19:36:04; [cost=0.530255ms] result=@ArrayList[
    +    @Integer[-18178089],
    +    @MathGame[demo.MathGame@41cf53f9],
    +]
    +

    Check exceptions

    $ watch demo.MathGame primeFactors "{params[0],throwExp}" -e -x 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 62 ms.
    +ts=2018-12-03 19:38:00; [cost=1.414993ms] result=@ArrayList[
    +    @Integer[-1120397038],
    +    java.lang.IllegalArgumentException: number is: -1120397038, need >= 2
    +	at demo.MathGame.primeFactors(MathGame.java:46)
    +	at demo.MathGame.run(MathGame.java:24)
    +	at demo.MathGame.main(MathGame.java:16)
    +,
    +]
    +
    • -e\b: Trigger when an exception is thrown
    • throwExp: the exception object

    Filter by time cost

    $ watch demo.MathGame primeFactors '{params, returnObj}' '#cost>200' -x 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 66 ms.
    +ts=2018-12-03 19:40:28; [cost=2112.168897ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @ArrayList[
    +        @Integer[5],
    +        @Integer[428379493],
    +    ],
    +]
    +
    • #cost>200 (ms) filter out all invokings that take less than 200ms.

    Check the field of the target object

    • target is the this object in java.
    $ watch demo.MathGame primeFactors 'target'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 52 ms.
    +ts=2018-12-03 19:41:52; [cost=0.477882ms] result=@MathGame[
    +    random=@Random[java.util.Random@522b408a],
    +    illegalArgumentCount=@Integer[13355],
    +]
    +
    • target.field_name: the field of the current object.
    $ watch demo.MathGame primeFactors 'target.illegalArgumentCount'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 67 ms.
    +ts=2018-12-03 20:04:34; [cost=131.303498ms] result=@Integer[8]
    +ts=2018-12-03 20:04:35; [cost=0.961441ms] result=@Integer[8]
    +

    Get a static field and calling a static method

    watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -v -n 1 -x 2
    +[arthas@6527]$ watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -n 1 -x 2
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 5) cost in 34 ms, listenerId: 3
    +ts=2021-01-05 21:35:20; [cost=0.173966ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-138282],
    +    ],
    +    @Integer[89],
    +]
    +
    `,32),P=s("Note that here you use "),R=n("code",null,"Thread.currentThread().getContextClassLoader()",-1),N=s(" to load, and it is better to use the exact "),S=n("code",null,"classloader",-1),U=s(),$=s("ognl"),B=s("."),D=p(`

    Exclude the specified class

    TIP

    The watch/trace/monitor/stack/tt commands all support the --exclude-class-pattern parameter

    Use the --exclude-class-pattern parameter to exclude the specified class, for example:

    watch javax.servlet.Filter * --exclude-class-pattern com.demo.TestFilter
    +

    Does not match subclass

    By default, the watch/trace/monitor/stack/tt commands will match subclass. If you don't want to match, you can turn it off.

    options disable-sub-class true
    +

    Use the -v parameter to print more information

    The watch/trace/monitor/stack/tt commands all support the -v parameter.

    When the command is executed, there is no output result. There are two possibilities:

    1. The matched function is not executed
    2. The result of the conditional expression is false

    But the user cannot tell which situation is.

    Using the -v option, the specific value and execution result of Condition express will be printed for easy confirmation.

    such as:

    $ watch -v -x 2 demo.MathGame print 'params' 'params[0] > 100000'
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 29 ms, listenerId: 11
    +Condition express: params[0] > 100000 , result: false
    +Condition express: params[0] > 100000 , result: false
    +Condition express: params[0] > 100000 , result: true
    +ts=2020-12-02 22:38:56; [cost=0.060843ms] result=@Object[][
    +    @Integer[1],
    +    @ArrayList[
    +        @Integer[200033],
    +    ],
    +]
    +Condition express: params[0] > 100000 , result: true
    +ts=2020-12-02 22:38:57; [cost=0.052877ms] result=@Object[][
    +    @Integer[1],
    +    @ArrayList[
    +        @Integer[29],
    +        @Integer[4243],
    +    ],
    +]
    +
    `,15);function z(Q,V){const e=c("ExternalLinkIcon"),t=c("RouterLink");return l(),r("div",null,[d,n("p",null,[n("a",m,[k,v,a(e)])]),b,n("p",null,[h,n("a",g,[f,a(e)]),x]),_,n("ul",null,[n("li",null,[a(t,{to:"/en/doc/advice-class.html"},{default:o(()=>[y,w]),_:1})]),n("li",null,[n("a",I,[A,a(e)])]),n("li",null,[n("a",C,[G,a(e)])])]),j,M,n("p",null,[L,E,O,a(t,{to:"/en/doc/quick-start.html"},{default:o(()=>[F]),_:1}),q]),T,n("ul",null,[n("li",null,[P,R,N,S,U,a(t,{to:"/en/doc/ognl.html"},{default:o(()=>[$]),_:1}),B])]),D])}const Y=i(u,[["render",z],["__file","watch.html.vue"]]);export{Y as default}; diff --git a/3.x/assets/watch.html.3663bb24.js b/3.x/assets/watch.html.3663bb24.js new file mode 100644 index 00000000000..1b2d2910610 --- /dev/null +++ b/3.x/assets/watch.html.3663bb24.js @@ -0,0 +1 @@ +const l=JSON.parse('{"key":"v-24fc49da","path":"/doc/watch.html","title":"watch","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":"\u542F\u52A8 Demo","slug":"\u542F\u52A8-demo","link":"#\u542F\u52A8-demo","children":[]},{"level":3,"title":"\u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u8FD4\u56DE\u65F6\u7684\u53C2\u6570\u3001this \u5BF9\u8C61\u548C\u8FD4\u56DE\u503C","slug":"\u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u8FD4\u56DE\u65F6\u7684\u53C2\u6570\u3001this-\u5BF9\u8C61\u548C\u8FD4\u56DE\u503C","link":"#\u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u8FD4\u56DE\u65F6\u7684\u53C2\u6570\u3001this-\u5BF9\u8C61\u548C\u8FD4\u56DE\u503C","children":[]},{"level":3,"title":"\u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF","slug":"\u6307\u5B9A-class-\u6700\u5927\u5339\u914D\u6570\u91CF","link":"#\u6307\u5B9A-class-\u6700\u5927\u5339\u914D\u6570\u91CF","children":[]},{"level":3,"title":"\u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u5165\u53E3\u7684\u53C2\u6570\u548C\u8FD4\u56DE\u503C","slug":"\u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u5165\u53E3\u7684\u53C2\u6570\u548C\u8FD4\u56DE\u503C","link":"#\u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u5165\u53E3\u7684\u53C2\u6570\u548C\u8FD4\u56DE\u503C","children":[]},{"level":3,"title":"\u540C\u65F6\u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u524D\u548C\u51FD\u6570\u8FD4\u56DE\u540E","slug":"\u540C\u65F6\u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u524D\u548C\u51FD\u6570\u8FD4\u56DE\u540E","link":"#\u540C\u65F6\u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u524D\u548C\u51FD\u6570\u8FD4\u56DE\u540E","children":[]},{"level":3,"title":"\u8C03\u6574-x\u7684\u503C\uFF0C\u89C2\u5BDF\u5177\u4F53\u7684\u51FD\u6570\u53C2\u6570\u503C","slug":"\u8C03\u6574-x\u7684\u503C-\u89C2\u5BDF\u5177\u4F53\u7684\u51FD\u6570\u53C2\u6570\u503C","link":"#\u8C03\u6574-x\u7684\u503C-\u89C2\u5BDF\u5177\u4F53\u7684\u51FD\u6570\u53C2\u6570\u503C","children":[]},{"level":3,"title":"\u6761\u4EF6\u8868\u8FBE\u5F0F\u7684\u4F8B\u5B50","slug":"\u6761\u4EF6\u8868\u8FBE\u5F0F\u7684\u4F8B\u5B50","link":"#\u6761\u4EF6\u8868\u8FBE\u5F0F\u7684\u4F8B\u5B50","children":[]},{"level":3,"title":"\u89C2\u5BDF\u5F02\u5E38\u4FE1\u606F\u7684\u4F8B\u5B50","slug":"\u89C2\u5BDF\u5F02\u5E38\u4FE1\u606F\u7684\u4F8B\u5B50","link":"#\u89C2\u5BDF\u5F02\u5E38\u4FE1\u606F\u7684\u4F8B\u5B50","children":[]},{"level":3,"title":"\u6309\u7167\u8017\u65F6\u8FDB\u884C\u8FC7\u6EE4","slug":"\u6309\u7167\u8017\u65F6\u8FDB\u884C\u8FC7\u6EE4","link":"#\u6309\u7167\u8017\u65F6\u8FDB\u884C\u8FC7\u6EE4","children":[]},{"level":3,"title":"\u89C2\u5BDF\u5F53\u524D\u5BF9\u8C61\u4E2D\u7684\u5C5E\u6027","slug":"\u89C2\u5BDF\u5F53\u524D\u5BF9\u8C61\u4E2D\u7684\u5C5E\u6027","link":"#\u89C2\u5BDF\u5F53\u524D\u5BF9\u8C61\u4E2D\u7684\u5C5E\u6027","children":[]},{"level":3,"title":"\u83B7\u53D6\u7C7B\u7684\u9759\u6001\u5B57\u6BB5\u3001\u8C03\u7528\u7C7B\u7684\u9759\u6001\u51FD\u6570\u7684\u4F8B\u5B50","slug":"\u83B7\u53D6\u7C7B\u7684\u9759\u6001\u5B57\u6BB5\u3001\u8C03\u7528\u7C7B\u7684\u9759\u6001\u51FD\u6570\u7684\u4F8B\u5B50","link":"#\u83B7\u53D6\u7C7B\u7684\u9759\u6001\u5B57\u6BB5\u3001\u8C03\u7528\u7C7B\u7684\u9759\u6001\u51FD\u6570\u7684\u4F8B\u5B50","children":[]},{"level":3,"title":"\u6392\u9664\u6389\u6307\u5B9A\u7684\u7C7B","slug":"\u6392\u9664\u6389\u6307\u5B9A\u7684\u7C7B","link":"#\u6392\u9664\u6389\u6307\u5B9A\u7684\u7C7B","children":[]},{"level":3,"title":"\u4E0D\u5339\u914D\u5B50\u7C7B","slug":"\u4E0D\u5339\u914D\u5B50\u7C7B","link":"#\u4E0D\u5339\u914D\u5B50\u7C7B","children":[]},{"level":3,"title":"\u4F7F\u7528 -v \u53C2\u6570\u6253\u5370\u66F4\u591A\u4FE1\u606F","slug":"\u4F7F\u7528-v-\u53C2\u6570\u6253\u5370\u66F4\u591A\u4FE1\u606F","link":"#\u4F7F\u7528-v-\u53C2\u6570\u6253\u5370\u66F4\u591A\u4FE1\u606F","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},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"doc/watch.md","version":"3.7.3"}');export{l as data}; diff --git a/3.x/assets/watch.html.8b8293d0.js b/3.x/assets/watch.html.8b8293d0.js new file mode 100644 index 00000000000..7f47244bd96 --- /dev/null +++ b/3.x/assets/watch.html.8b8293d0.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-75a5aa24","path":"/en/doc/watch.html","title":"watch","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Parameters & Options","slug":"parameters-options","link":"#parameters-options","children":[]},{"level":2,"title":"Usage","slug":"usage","link":"#usage","children":[{"level":3,"title":"Start Demo","slug":"start-demo","link":"#start-demo","children":[]},{"level":3,"title":"Check the out parameters, this and return value","slug":"check-the-out-parameters-this-and-return-value","link":"#check-the-out-parameters-this-and-return-value","children":[]},{"level":3,"title":"Specify the max number of matched Classes","slug":"specify-the-max-number-of-matched-classes","link":"#specify-the-max-number-of-matched-classes","children":[]},{"level":3,"title":"Check in parameters","slug":"check-in-parameters","link":"#check-in-parameters","children":[]},{"level":3,"title":"Check before and after at the same time","slug":"check-before-and-after-at-the-same-time","link":"#check-before-and-after-at-the-same-time","children":[]},{"level":3,"title":"Use -x to check more details","slug":"use-x-to-check-more-details","link":"#use-x-to-check-more-details","children":[]},{"level":3,"title":"Use condition expressions to locate specific call","slug":"use-condition-expressions-to-locate-specific-call","link":"#use-condition-expressions-to-locate-specific-call","children":[]},{"level":3,"title":"Check exceptions","slug":"check-exceptions","link":"#check-exceptions","children":[]},{"level":3,"title":"Filter by time cost","slug":"filter-by-time-cost","link":"#filter-by-time-cost","children":[]},{"level":3,"title":"Check the field of the target object","slug":"check-the-field-of-the-target-object","link":"#check-the-field-of-the-target-object","children":[]},{"level":3,"title":"Get a static field and calling a static method","slug":"get-a-static-field-and-calling-a-static-method","link":"#get-a-static-field-and-calling-a-static-method","children":[]},{"level":3,"title":"Exclude the specified class","slug":"exclude-the-specified-class","link":"#exclude-the-specified-class","children":[]},{"level":3,"title":"Does not match subclass","slug":"does-not-match-subclass","link":"#does-not-match-subclass","children":[]},{"level":3,"title":"Use the -v parameter to print more information","slug":"use-the-v-parameter-to-print-more-information","link":"#use-the-v-parameter-to-print-more-information","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},{"name":"hengyunabc","email":"hengyunabc@users.noreply.github.com","commits":1},{"name":"pandaapo","email":"35672972+pandaapo@users.noreply.github.com","commits":1}]},"filePathRelative":"en/doc/watch.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/assets/watch.html.e73d5269.js b/3.x/assets/watch.html.e73d5269.js new file mode 100644 index 00000000000..52c28b6ddbc --- /dev/null +++ b/3.x/assets/watch.html.e73d5269.js @@ -0,0 +1,188 @@ +import{_ as c,o as i,c as r,a as s,b as a,w as o,e as n,d as e,r as l}from"./app.4d248835.js";const u={},d=s("h1",{id:"watch",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#watch","aria-hidden":"true"},"#"),n(" watch")],-1),k={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=command-watch",target:"_blank",rel:"noopener noreferrer"},m=s("code",null,"watch",-1),v=n("\u5728\u7EBF\u6559\u7A0B"),b=e('

    \u63D0\u793A

    \u51FD\u6570\u6267\u884C\u6570\u636E\u89C2\u6D4B

    \u8BA9\u4F60\u80FD\u65B9\u4FBF\u7684\u89C2\u5BDF\u5230\u6307\u5B9A\u51FD\u6570\u7684\u8C03\u7528\u60C5\u51B5\u3002\u80FD\u89C2\u5BDF\u5230\u7684\u8303\u56F4\u4E3A\uFF1A\u8FD4\u56DE\u503C\u3001\u629B\u51FA\u5F02\u5E38\u3001\u5165\u53C2\uFF0C\u901A\u8FC7\u7F16\u5199 OGNL \u8868\u8FBE\u5F0F\u8FDB\u884C\u5BF9\u5E94\u53D8\u91CF\u7684\u67E5\u770B\u3002

    \u53C2\u6570\u8BF4\u660E

    watch \u7684\u53C2\u6570\u6BD4\u8F83\u591A\uFF0C\u4E3B\u8981\u662F\u56E0\u4E3A\u5B83\u80FD\u5728 4 \u4E2A\u4E0D\u540C\u7684\u573A\u666F\u89C2\u5BDF\u5BF9\u8C61

    \u53C2\u6570\u540D\u79F0\u53C2\u6570\u8BF4\u660E
    class-pattern\u7C7B\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    method-pattern\u51FD\u6570\u540D\u8868\u8FBE\u5F0F\u5339\u914D
    express\u89C2\u5BDF\u8868\u8FBE\u5F0F\uFF0C\u9ED8\u8BA4\u503C\uFF1A{params, target, returnObj}
    condition-express\u6761\u4EF6\u8868\u8FBE\u5F0F
    [b]\u5728\u51FD\u6570\u8C03\u7528\u4E4B\u524D\u89C2\u5BDF
    [e]\u5728\u51FD\u6570\u5F02\u5E38\u4E4B\u540E\u89C2\u5BDF
    [s]\u5728\u51FD\u6570\u8FD4\u56DE\u4E4B\u540E\u89C2\u5BDF
    [f]\u5728\u51FD\u6570\u7ED3\u675F\u4E4B\u540E(\u6B63\u5E38\u8FD4\u56DE\u548C\u5F02\u5E38\u8FD4\u56DE)\u89C2\u5BDF
    [E]\u5F00\u542F\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\uFF0C\u9ED8\u8BA4\u4E3A\u901A\u914D\u7B26\u5339\u914D
    [x:]\u6307\u5B9A\u8F93\u51FA\u7ED3\u679C\u7684\u5C5E\u6027\u904D\u5386\u6DF1\u5EA6\uFF0C\u9ED8\u8BA4\u4E3A 1\uFF0C\u6700\u5927\u503C\u662F 4
    [m <arg>]\u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF\uFF0C\u9ED8\u8BA4\u503C\u4E3A 50\u3002\u957F\u683C\u5F0F\u4E3A[maxMatch <arg>]\u3002

    \u8FD9\u91CC\u91CD\u70B9\u8981\u8BF4\u660E\u7684\u662F\u89C2\u5BDF\u8868\u8FBE\u5F0F\uFF0C\u89C2\u5BDF\u8868\u8FBE\u5F0F\u7684\u6784\u6210\u4E3B\u8981\u7531 ognl \u8868\u8FBE\u5F0F\u7EC4\u6210\uFF0C\u6240\u4EE5\u4F60\u53EF\u4EE5\u8FD9\u6837\u5199"{params,returnObj}"\uFF0C\u53EA\u8981\u662F\u4E00\u4E2A\u5408\u6CD5\u7684 ognl \u8868\u8FBE\u5F0F\uFF0C\u90FD\u80FD\u88AB\u6B63\u5E38\u652F\u6301\u3002

    ',6),h=n("\u89C2\u5BDF\u7684\u7EF4\u5EA6\u4E5F\u6BD4\u8F83\u591A\uFF0C\u4E3B\u8981\u4F53\u73B0\u5728\u53C2\u6570 "),g=s("code",null,"advice",-1),f=n(" \u7684\u6570\u636E\u7ED3\u6784\u4E0A\u3002"),x=s("code",null,"Advice",-1),_=n(" \u53C2\u6570\u6700\u4E3B\u8981\u662F\u5C01\u88C5\u4E86\u901A\u77E5\u8282\u70B9\u7684\u6240\u6709\u4FE1\u606F\u3002\u8BF7\u53C2\u8003"),y=n("\u8868\u8FBE\u5F0F\u6838\u5FC3\u53D8\u91CF"),A=n("\u4E2D\u5173\u4E8E\u8BE5\u8282\u70B9\u7684\u63CF\u8FF0\u3002"),I=n("\u7279\u6B8A\u7528\u6CD5\u8BF7\u53C2\u8003\uFF1A"),w={href:"https://github.com/alibaba/arthas/issues/71",target:"_blank",rel:"noopener noreferrer"},C=n("https://github.com/alibaba/arthas/issues/71"),G=n("OGNL \u8868\u8FBE\u5F0F\u5B98\u7F51\uFF1A"),M={href:"https://commons.apache.org/proper/commons-ognl/language-guide.html",target:"_blank",rel:"noopener noreferrer"},L=n("https://commons.apache.org/proper/commons-ognl/language-guide.html"),j=e('

    \u7279\u522B\u8BF4\u660E\uFF1A

    • watch \u547D\u4EE4\u5B9A\u4E49\u4E86 4 \u4E2A\u89C2\u5BDF\u4E8B\u4EF6\u70B9\uFF0C\u5373 -b \u51FD\u6570\u8C03\u7528\u524D\uFF0C-e \u51FD\u6570\u5F02\u5E38\u540E\uFF0C-s \u51FD\u6570\u8FD4\u56DE\u540E\uFF0C-f \u51FD\u6570\u7ED3\u675F\u540E
    • 4 \u4E2A\u89C2\u5BDF\u4E8B\u4EF6\u70B9 -b\u3001-e\u3001-s \u9ED8\u8BA4\u5173\u95ED\uFF0C-f \u9ED8\u8BA4\u6253\u5F00\uFF0C\u5F53\u6307\u5B9A\u89C2\u5BDF\u70B9\u88AB\u6253\u5F00\u540E\uFF0C\u5728\u76F8\u5E94\u4E8B\u4EF6\u70B9\u4F1A\u5BF9\u89C2\u5BDF\u8868\u8FBE\u5F0F\u8FDB\u884C\u6C42\u503C\u5E76\u8F93\u51FA
    • \u8FD9\u91CC\u8981\u6CE8\u610F\u51FD\u6570\u5165\u53C2\u548C\u51FD\u6570\u51FA\u53C2\u7684\u533A\u522B\uFF0C\u6709\u53EF\u80FD\u5728\u4E2D\u95F4\u88AB\u4FEE\u6539\u5BFC\u81F4\u524D\u540E\u4E0D\u4E00\u81F4\uFF0C\u9664\u4E86 -b \u4E8B\u4EF6\u70B9 params \u4EE3\u8868\u51FD\u6570\u5165\u53C2\u5916\uFF0C\u5176\u4F59\u4E8B\u4EF6\u90FD\u4EE3\u8868\u51FD\u6570\u51FA\u53C2
    • \u5F53\u4F7F\u7528 -b \u65F6\uFF0C\u7531\u4E8E\u89C2\u5BDF\u4E8B\u4EF6\u70B9\u662F\u5728\u51FD\u6570\u8C03\u7528\u524D\uFF0C\u6B64\u65F6\u8FD4\u56DE\u503C\u6216\u5F02\u5E38\u5747\u4E0D\u5B58\u5728
    • \u5728 watch \u547D\u4EE4\u7684\u7ED3\u679C\u91CC\uFF0C\u4F1A\u6253\u5370\u51FAlocation\u4FE1\u606F\u3002location\u6709\u4E09\u79CD\u53EF\u80FD\u503C\uFF1AAtEnter\uFF0CAtExit\uFF0CAtExceptionExit\u3002\u5BF9\u5E94\u51FD\u6570\u5165\u53E3\uFF0C\u51FD\u6570\u6B63\u5E38 return\uFF0C\u51FD\u6570\u629B\u51FA\u5F02\u5E38\u3002

    \u4F7F\u7528\u53C2\u8003

    \u542F\u52A8 Demo

    ',4),E=n("\u542F\u52A8"),O=n("\u5FEB\u901F\u5165\u95E8"),F=n("\u91CC\u7684"),q=s("code",null,"math-game",-1),R=n("\u3002"),P=e(`

    \u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u8FD4\u56DE\u65F6\u7684\u53C2\u6570\u3001this \u5BF9\u8C61\u548C\u8FD4\u56DE\u503C

    \u63D0\u793A

    \u89C2\u5BDF\u8868\u8FBE\u5F0F\uFF0C\u9ED8\u8BA4\u503C\u662F{params, target, returnObj}

    $ watch demo.MathGame primeFactors -x 2
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 32 ms, listenerId: 5
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2021-08-31 15:22:57; [cost=0.220625ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-179173],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@31cefde0],
    +        illegalArgumentCount=@Integer[44],
    +    ],
    +    null,
    +]
    +method=demo.MathGame.primeFactors location=AtExit
    +ts=2021-08-31 15:22:58; [cost=1.020982ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@31cefde0],
    +        illegalArgumentCount=@Integer[44],
    +    ],
    +    @ArrayList[
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[26947],
    +    ],
    +]
    +
    • \u4E0A\u9762\u7684\u7ED3\u679C\u91CC\uFF0C\u8BF4\u660E\u51FD\u6570\u88AB\u6267\u884C\u4E86\u4E24\u6B21\uFF0C\u7B2C\u4E00\u6B21\u7ED3\u679C\u662Flocation=AtExceptionExit\uFF0C\u8BF4\u660E\u51FD\u6570\u629B\u51FA\u5F02\u5E38\u4E86\uFF0C\u56E0\u6B64returnObj\u662F null
    • \u5728\u7B2C\u4E8C\u6B21\u7ED3\u679C\u91CC\u662Flocation=AtExit\uFF0C\u8BF4\u660E\u51FD\u6570\u6B63\u5E38\u8FD4\u56DE\uFF0C\u56E0\u6B64\u53EF\u4EE5\u770B\u5230returnObj\u7ED3\u679C\u662F\u4E00\u4E2A ArrayList

    \u6307\u5B9A Class \u6700\u5927\u5339\u914D\u6570\u91CF

    $ watch demo.MathGame primeFactors -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 302 ms, listenerId: 3
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2022-12-25 19:58:41; [cost=0.222419ms] result=@ArrayList[
    +    @Object[][isEmpty=false;size=1],
    +    @MathGame[demo.MathGame@3bf400],
    +    null,
    +]
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2022-12-25 19:58:51; [cost=0.046928ms] result=@ArrayList[
    +    @Object[][isEmpty=false;size=1],
    +    @MathGame[demo.MathGame@3bf400],
    +    null,
    +]
    +

    \u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u5165\u53E3\u7684\u53C2\u6570\u548C\u8FD4\u56DE\u503C

    $ watch demo.MathGame primeFactors "{params,returnObj}" -x 2 -b
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 50 ms.
    +ts=2018-12-03 19:23:23; [cost=0.0353ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-1077465243],
    +    ],
    +    null,
    +]
    +
    • \u5BF9\u6BD4\u524D\u4E00\u4E2A\u4F8B\u5B50\uFF0C\u8FD4\u56DE\u503C\u4E3A\u7A7A\uFF08\u4E8B\u4EF6\u70B9\u4E3A\u51FD\u6570\u6267\u884C\u524D\uFF0C\u56E0\u6B64\u83B7\u53D6\u4E0D\u5230\u8FD4\u56DE\u503C\uFF09

    \u540C\u65F6\u89C2\u5BDF\u51FD\u6570\u8C03\u7528\u524D\u548C\u51FD\u6570\u8FD4\u56DE\u540E

    $ watch demo.MathGame primeFactors "{params,target,returnObj}" -x 2 -b -s -n 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 46 ms.
    +ts=2018-12-03 19:29:54; [cost=0.01696ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@522b408a],
    +        illegalArgumentCount=@Integer[13038],
    +    ],
    +    null,
    +]
    +ts=2018-12-03 19:29:54; [cost=4.277392ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@522b408a],
    +        illegalArgumentCount=@Integer[13038],
    +    ],
    +    @ArrayList[
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[5],
    +        @Integer[5],
    +        @Integer[73],
    +        @Integer[241],
    +        @Integer[439],
    +    ],
    +]
    +
    • \u53C2\u6570\u91CC-n 2\uFF0C\u8868\u793A\u53EA\u6267\u884C\u4E24\u6B21

    • \u8FD9\u91CC\u8F93\u51FA\u7ED3\u679C\u4E2D\uFF0C\u7B2C\u4E00\u6B21\u8F93\u51FA\u7684\u662F\u51FD\u6570\u8C03\u7528\u524D\u7684\u89C2\u5BDF\u8868\u8FBE\u5F0F\u7684\u7ED3\u679C\uFF0C\u7B2C\u4E8C\u6B21\u8F93\u51FA\u7684\u662F\u51FD\u6570\u8FD4\u56DE\u540E\u7684\u8868\u8FBE\u5F0F\u7684\u7ED3\u679C

    • \u7ED3\u679C\u7684\u8F93\u51FA\u987A\u5E8F\u548C\u4E8B\u4EF6\u53D1\u751F\u7684\u5148\u540E\u987A\u5E8F\u4E00\u81F4\uFF0C\u548C\u547D\u4EE4\u4E2D -s -b \u7684\u987A\u5E8F\u65E0\u5173

    \u8C03\u6574-x\u7684\u503C\uFF0C\u89C2\u5BDF\u5177\u4F53\u7684\u51FD\u6570\u53C2\u6570\u503C

    $ watch demo.MathGame primeFactors "{params,target}" -x 3
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 58 ms.
    +ts=2018-12-03 19:34:19; [cost=0.587833ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[
    +            serialVersionUID=@Long[3905348978240129619],
    +            seed=@AtomicLong[3133719055989],
    +            multiplier=@Long[25214903917],
    +            addend=@Long[11],
    +            mask=@Long[281474976710655],
    +            DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +            BadBound=@String[bound must be positive],
    +            BadRange=@String[bound must be greater than origin],
    +            BadSize=@String[size must be non-negative],
    +            seedUniquifier=@AtomicLong[-3282039941672302964],
    +            nextNextGaussian=@Double[0.0],
    +            haveNextNextGaussian=@Boolean[false],
    +            serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +            unsafe=@Unsafe[sun.misc.Unsafe@2eaa1027],
    +            seedOffset=@Long[24],
    +        ],
    +        illegalArgumentCount=@Integer[13159],
    +    ],
    +]
    +
    • -x\u8868\u793A\u904D\u5386\u6DF1\u5EA6\uFF0C\u53EF\u4EE5\u8C03\u6574\u6765\u6253\u5370\u5177\u4F53\u7684\u53C2\u6570\u548C\u7ED3\u679C\u5185\u5BB9\uFF0C\u9ED8\u8BA4\u503C\u662F 1\u3002
    • -x\u6700\u5927\u503C\u662F 4\uFF0C\u9632\u6B62\u5C55\u5F00\u7ED3\u679C\u5360\u7528\u592A\u591A\u5185\u5B58\u3002\u7528\u6237\u53EF\u4EE5\u5728ognl\u8868\u8FBE\u5F0F\u91CC\u6307\u5B9A\u66F4\u5177\u4F53\u7684 field\u3002

    \u6761\u4EF6\u8868\u8FBE\u5F0F\u7684\u4F8B\u5B50

    $ watch demo.MathGame primeFactors "{params[0],target}" "params[0]<0"
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 68 ms.
    +ts=2018-12-03 19:36:04; [cost=0.530255ms] result=@ArrayList[
    +    @Integer[-18178089],
    +    @MathGame[demo.MathGame@41cf53f9],
    +]
    +
    • \u53EA\u6709\u6EE1\u8DB3\u6761\u4EF6\u7684\u8C03\u7528\uFF0C\u624D\u4F1A\u6709\u54CD\u5E94\u3002

    \u89C2\u5BDF\u5F02\u5E38\u4FE1\u606F\u7684\u4F8B\u5B50

    $ watch demo.MathGame primeFactors "{params[0],throwExp}" -e -x 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 62 ms.
    +ts=2018-12-03 19:38:00; [cost=1.414993ms] result=@ArrayList[
    +    @Integer[-1120397038],
    +    java.lang.IllegalArgumentException: number is: -1120397038, need >= 2
    +	at demo.MathGame.primeFactors(MathGame.java:46)
    +	at demo.MathGame.run(MathGame.java:24)
    +	at demo.MathGame.main(MathGame.java:16)
    +,
    +]
    +
    • -e\u8868\u793A\u629B\u51FA\u5F02\u5E38\u65F6\u624D\u89E6\u53D1
    • express \u4E2D\uFF0C\u8868\u793A\u5F02\u5E38\u4FE1\u606F\u7684\u53D8\u91CF\u662FthrowExp

    \u6309\u7167\u8017\u65F6\u8FDB\u884C\u8FC7\u6EE4

    $ watch demo.MathGame primeFactors '{params, returnObj}' '#cost>200' -x 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 66 ms.
    +ts=2018-12-03 19:40:28; [cost=2112.168897ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @ArrayList[
    +        @Integer[5],
    +        @Integer[428379493],
    +    ],
    +]
    +
    • #cost>200(\u5355\u4F4D\u662Fms)\u8868\u793A\u53EA\u6709\u5F53\u8017\u65F6\u5927\u4E8E 200ms \u65F6\u624D\u4F1A\u8F93\u51FA\uFF0C\u8FC7\u6EE4\u6389\u6267\u884C\u65F6\u95F4\u5C0F\u4E8E 200ms \u7684\u8C03\u7528

    \u89C2\u5BDF\u5F53\u524D\u5BF9\u8C61\u4E2D\u7684\u5C5E\u6027

    \u5982\u679C\u60F3\u67E5\u770B\u51FD\u6570\u8FD0\u884C\u524D\u540E\uFF0C\u5F53\u524D\u5BF9\u8C61\u4E2D\u7684\u5C5E\u6027\uFF0C\u53EF\u4EE5\u4F7F\u7528target\u5173\u952E\u5B57\uFF0C\u4EE3\u8868\u5F53\u524D\u5BF9\u8C61

    $ watch demo.MathGame primeFactors 'target'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 52 ms.
    +ts=2018-12-03 19:41:52; [cost=0.477882ms] result=@MathGame[
    +    random=@Random[java.util.Random@522b408a],
    +    illegalArgumentCount=@Integer[13355],
    +]
    +

    \u7136\u540E\u4F7F\u7528target.field_name\u8BBF\u95EE\u5F53\u524D\u5BF9\u8C61\u7684\u67D0\u4E2A\u5C5E\u6027

    $ watch demo.MathGame primeFactors 'target.illegalArgumentCount'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 67 ms.
    +ts=2018-12-03 20:04:34; [cost=131.303498ms] result=@Integer[8]
    +ts=2018-12-03 20:04:35; [cost=0.961441ms] result=@Integer[8]
    +

    \u83B7\u53D6\u7C7B\u7684\u9759\u6001\u5B57\u6BB5\u3001\u8C03\u7528\u7C7B\u7684\u9759\u6001\u51FD\u6570\u7684\u4F8B\u5B50

    watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -v -n 1 -x 2
    +[arthas@6527]$ watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -n 1 -x 2
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 5) cost in 34 ms, listenerId: 3
    +ts=2021-01-05 21:35:20; [cost=0.173966ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-138282],
    +    ],
    +    @Integer[89],
    +]
    +
    `,31),$=n("\u6CE8\u610F\u8FD9\u91CC\u4F7F\u7528 "),N=s("code",null,"Thread.currentThread().getContextClassLoader()",-1),B=n(" \u52A0\u8F7D,\u4F7F\u7528\u7CBE\u786E"),S=s("code",null,"classloader",-1),U=n(),z=n("ognl"),D=n("\u66F4\u597D\u3002"),T=e(`

    \u6392\u9664\u6389\u6307\u5B9A\u7684\u7C7B

    \u63D0\u793A

    watch/trace/monitor/stack/tt \u547D\u4EE4\u90FD\u652F\u6301 --exclude-class-pattern \u53C2\u6570

    \u4F7F\u7528 --exclude-class-pattern \u53C2\u6570\u53EF\u4EE5\u6392\u9664\u6389\u6307\u5B9A\u7684\u7C7B\uFF0C\u6BD4\u5982\uFF1A

    watch javax.servlet.Filter * --exclude-class-pattern com.demo.TestFilter
    +

    \u4E0D\u5339\u914D\u5B50\u7C7B

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B watch/trace/monitor/stack/tt \u547D\u4EE4\u90FD\u4F1A\u5339\u914D\u5B50\u7C7B\u3002\u5982\u679C\u60F3\u4E0D\u5339\u914D\uFF0C\u53EF\u4EE5\u901A\u8FC7\u5168\u5C40\u53C2\u6570\u5173\u6389\u3002

    options disable-sub-class true
    +

    \u4F7F\u7528 -v \u53C2\u6570\u6253\u5370\u66F4\u591A\u4FE1\u606F

    \u63D0\u793A

    watch/trace/monitor/stack/tt \u547D\u4EE4\u90FD\u652F\u6301 -v \u53C2\u6570

    \u5F53\u547D\u4EE4\u6267\u884C\u4E4B\u540E\uFF0C\u6CA1\u6709\u8F93\u51FA\u7ED3\u679C\u3002\u6709\u4E24\u79CD\u53EF\u80FD\uFF1A

    1. \u5339\u914D\u5230\u7684\u51FD\u6570\u6CA1\u6709\u88AB\u6267\u884C
    2. \u6761\u4EF6\u8868\u8FBE\u5F0F\u7ED3\u679C\u662F false

    \u4F46\u7528\u6237\u533A\u5206\u4E0D\u51FA\u662F\u54EA\u79CD\u60C5\u51B5\u3002

    \u4F7F\u7528 -v\u9009\u9879\uFF0C\u5219\u4F1A\u6253\u5370Condition express\u7684\u5177\u4F53\u503C\u548C\u6267\u884C\u7ED3\u679C\uFF0C\u65B9\u4FBF\u786E\u8BA4\u3002

    \u6BD4\u5982\uFF1A

    $ watch -v -x 2 demo.MathGame print 'params' 'params[0] > 100000'
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 29 ms, listenerId: 11
    +Condition express: params[0] > 100000 , result: false
    +Condition express: params[0] > 100000 , result: false
    +Condition express: params[0] > 100000 , result: true
    +ts=2020-12-02 22:38:56; [cost=0.060843ms] result=@Object[][
    +    @Integer[200033],
    +    @ArrayList[
    +        @Integer[200033],
    +    ],
    +]
    +Condition express: params[0] > 100000 , result: true
    +ts=2020-12-02 22:38:57; [cost=0.052877ms] result=@Object[][
    +    @Integer[123047],
    +    @ArrayList[
    +        @Integer[29],
    +        @Integer[4243],
    +    ],
    +]
    +
    `,15);function V(Q,H){const t=l("ExternalLinkIcon"),p=l("RouterLink");return i(),r("div",null,[d,s("p",null,[s("a",k,[m,v,a(t)])]),b,s("p",null,[h,g,f,x,_,a(p,{to:"/doc/advice-class.html"},{default:o(()=>[y]),_:1}),A]),s("ul",null,[s("li",null,[I,s("a",w,[C,a(t)])]),s("li",null,[G,s("a",M,[L,a(t)])])]),j,s("p",null,[E,a(p,{to:"/doc/quick-start.html"},{default:o(()=>[O]),_:1}),F,q,R]),P,s("ul",null,[s("li",null,[$,N,B,S,U,a(p,{to:"/doc/ognl.html"},{default:o(()=>[z]),_:1}),D])]),T])}const K=c(u,[["render",V],["__file","watch.html.vue"]]);export{K as default}; diff --git a/3.x/assets/web-console-local.156ba0ce.js b/3.x/assets/web-console-local.156ba0ce.js new file mode 100644 index 00000000000..fa091606806 --- /dev/null +++ b/3.x/assets/web-console-local.156ba0ce.js @@ -0,0 +1 @@ +const o="/3.x/images/web-console-local.png";export{o as _}; diff --git a/3.x/assets/web-console.html.8f3242b3.js b/3.x/assets/web-console.html.8f3242b3.js new file mode 100644 index 00000000000..62a30ff5e34 --- /dev/null +++ b/3.x/assets/web-console.html.8f3242b3.js @@ -0,0 +1 @@ +const a=JSON.parse('{"key":"v-a5f6e7aa","path":"/doc/web-console.html","title":"Web Console","lang":"zh-CN","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"\u901A\u8FC7\u6D4F\u89C8\u5668\u8FDE\u63A5 arthas","slug":"\u901A\u8FC7\u6D4F\u89C8\u5668\u8FDE\u63A5-arthas","link":"#\u901A\u8FC7\u6D4F\u89C8\u5668\u8FDE\u63A5-arthas","children":[]},{"level":2,"title":"scrollback URL \u53C2\u6570","slug":"scrollback-url-\u53C2\u6570","link":"#scrollback-url-\u53C2\u6570","children":[]},{"level":2,"title":"\u4F7F\u7528 arthas tunnel server \u8FDE\u63A5\u8FDC\u7A0B arthas","slug":"\u4F7F\u7528-arthas-tunnel-server-\u8FDE\u63A5\u8FDC\u7A0B-arthas","link":"#\u4F7F\u7528-arthas-tunnel-server-\u8FDE\u63A5\u8FDC\u7A0B-arthas","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/web-console.md","version":"3.7.3"}');export{a as data}; diff --git a/3.x/assets/web-console.html.a124c728.js b/3.x/assets/web-console.html.a124c728.js new file mode 100644 index 00000000000..a24d31722b1 --- /dev/null +++ b/3.x/assets/web-console.html.a124c728.js @@ -0,0 +1 @@ +import{_ as r}from"./web-console-local.156ba0ce.js";import{_ as c,o as h,c as l,a as e,b as o,w as i,e as t,d,r as a}from"./app.4d248835.js";const u={},_=e("h1",{id:"web-console",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#web-console","aria-hidden":"true"},"#"),t(" Web Console")],-1),p={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=en&id=case-web-console",target:"_blank",rel:"noopener noreferrer"},b=e("code",null,"Web Console",-1),m=t(" online tutorial"),f=e("h2",{id:"connect-arthas-through-the-browser",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#connect-arthas-through-the-browser","aria-hidden":"true"},"#"),t(" Connect arthas through the browser")],-1),g=t("Arthas supports the Web Console. After attach success, the user can access: "),k={href:"http://127.0.0.1:8563/",target:"_blank",rel:"noopener noreferrer"},w=t("http://127.0.0.1:8563/"),v=t("."),x=e("p",null,"The user can fill in the IP and connect the remote arthas on other machines.",-1),C=e("p",null,[e("img",{src:r,alt:""})],-1),y=e("div",{class:"custom-container warning"},[e("p",{class:"custom-container-title"},"WARNING"),e("p",null,[t("By default, arthas only listens to "),e("code",null,"127.0.0.1"),t(", so if you want to connect from a remote, you can use the "),e("code",null,"--target-ip"),t(" parameter to specify the IP. See the help description for "),e("code",null,"-h"),t(" for more information.")])],-1),I=t("If you have suggestions for the Web Console, please leave a message here: "),W={href:"https://github.com/alibaba/arthas/issues/15",target:"_blank",rel:"noopener noreferrer"},L=t("https://github.com/alibaba/arthas/issues/15"),N=t("Copy and paste shortcut keys in Web Console: "),R={href:"https://github.com/alibaba/arthas/issues/1056",target:"_blank",rel:"noopener noreferrer"},B=t("https://github.com/alibaba/arthas/issues/1056"),T=d('

    TIP

    Since 3.5.4, you can right-click to copy and paste in the Web Console.

    scrollback URL parameters

    TIP

    Since 3.5.5

    By default, the number of rows that the Web Console supports to roll back upwards is 1000. It can be specified with scrollback in the URL. for example

    ',4),A={href:"http://127.0.0.1:8563/?scrollback=3000",target:"_blank",rel:"noopener noreferrer"},P=t("http://127.0.0.1:8563/?scrollback=3000"),S=e("h2",{id:"connect-remote-arthas-through-arthas-tunnel-server",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#connect-remote-arthas-through-arthas-tunnel-server","aria-hidden":"true"},"#"),t(" Connect remote arthas through arthas tunnel server")],-1),V=t("Reference: "),E=t("Arthas Tunnel");function U(G,j){const s=a("ExternalLinkIcon"),n=a("RouterLink");return h(),l("div",null,[_,e("p",null,[e("a",p,[b,m,o(s)])]),f,e("p",null,[g,e("a",k,[w,o(s)]),v]),x,C,y,e("p",null,[I,e("a",W,[L,o(s)])]),e("ul",null,[e("li",null,[N,e("a",R,[B,o(s)])])]),T,e("p",null,[e("a",A,[P,o(s)])]),S,e("p",null,[V,o(n,{to:"/en/doc/tunnel.html"},{default:i(()=>[E]),_:1})])])}const D=c(u,[["render",U],["__file","web-console.html.vue"]]);export{D as default}; diff --git a/3.x/assets/web-console.html.ad1a9f26.js b/3.x/assets/web-console.html.ad1a9f26.js new file mode 100644 index 00000000000..4ab047fd5a4 --- /dev/null +++ b/3.x/assets/web-console.html.ad1a9f26.js @@ -0,0 +1 @@ +import{_ as r}from"./web-console-local.156ba0ce.js";import{_ as c,o as l,c as i,a as e,b as o,w as h,e as t,d as _,r as a}from"./app.4d248835.js";const d={},u=e("h1",{id:"web-console",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#web-console","aria-hidden":"true"},"#"),t(" Web Console")],-1),p={href:"https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html?language=cn&id=case-web-console",target:"_blank",rel:"noopener noreferrer"},b=e("code",null,"Web Console",-1),m=t("\u5728\u7EBF\u6559\u7A0B"),f=e("h2",{id:"\u901A\u8FC7\u6D4F\u89C8\u5668\u8FDE\u63A5-arthas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u901A\u8FC7\u6D4F\u89C8\u5668\u8FDE\u63A5-arthas","aria-hidden":"true"},"#"),t(" \u901A\u8FC7\u6D4F\u89C8\u5668\u8FDE\u63A5 arthas")],-1),k=t("Arthas \u76EE\u524D\u652F\u6301 Web Console\uFF0C\u7528\u6237\u5728 attach \u6210\u529F\u4E4B\u540E\uFF0C\u53EF\u4EE5\u76F4\u63A5\u8BBF\u95EE\uFF1A"),v={href:"http://127.0.0.1:8563/",target:"_blank",rel:"noopener noreferrer"},x=t("http://127.0.0.1:8563/"),g=t("\u3002"),C=e("p",null,"\u53EF\u4EE5\u586B\u5165 IP\uFF0C\u8FDC\u7A0B\u8FDE\u63A5\u5176\u5B83\u673A\u5668\u4E0A\u7684 arthas\u3002",-1),w=e("p",null,[e("img",{src:r,alt:""})],-1),L=e("div",{class:"custom-container warning"},[e("p",{class:"custom-container-title"},"\u6CE8\u610F"),e("p",null,[t("\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0Carthas \u53EA listen 127.0.0.1\uFF0C\u6240\u4EE5\u5982\u679C\u60F3\u4ECE\u8FDC\u7A0B\u8FDE\u63A5\uFF0C\u5219\u53EF\u4EE5\u4F7F\u7528 "),e("code",null,"--target-ip"),t("\u53C2\u6570\u6307\u5B9A listen \u7684 IP\uFF0C\u66F4\u591A\u53C2\u8003"),e("code",null,"-h"),t("\u7684\u5E2E\u52A9\u8BF4\u660E\u3002 \u6CE8\u610F\u4F1A\u6709\u5B89\u5168\u98CE\u9669\uFF0C\u8003\u8651\u4E0B\u9762\u7684 tunnel server \u7684\u65B9\u6848\u3002")])],-1),W=t("\u5728 Web Console \u590D\u5236\u7C98\u8D34\u5FEB\u6377\u952E\u53C2\u8003\uFF1A "),I={href:"https://github.com/alibaba/arthas/issues/1056",target:"_blank",rel:"noopener noreferrer"},N=t("https://github.com/alibaba/arthas/issues/1056"),R=_('

    \u63D0\u793A

    3.5.4 \u7248\u672C\u540E\uFF0C\u5728 Web Console \u53EF\u4EE5\u9F20\u6807\u53F3\u952E\u590D\u5236\u7C98\u8D34\u3002

    scrollback URL \u53C2\u6570

    \u63D0\u793A

    3.5.5 \u7248\u672C\u540E\u652F\u6301

    \u9ED8\u8BA4 Web Console \u652F\u6301\u5411\u4E0A\u56DE\u6EDA\u7684\u884C\u6570\u662F 1000\u3002\u53EF\u4EE5\u5728 URL \u91CC\u7528scrollback\u6307\u5B9A\u3002\u6BD4\u5982

    ',4),V={href:"http://127.0.0.1:8563/?scrollback=3000",target:"_blank",rel:"noopener noreferrer"},B=t("http://127.0.0.1:8563/?scrollback=3000"),E=e("h2",{id:"\u4F7F\u7528-arthas-tunnel-server-\u8FDE\u63A5\u8FDC\u7A0B-arthas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u4F7F\u7528-arthas-tunnel-server-\u8FDE\u63A5\u8FDC\u7A0B-arthas","aria-hidden":"true"},"#"),t(" \u4F7F\u7528 arthas tunnel server \u8FDE\u63A5\u8FDC\u7A0B arthas")],-1),A=t("\u53C2\u8003\uFF1A"),P=t("Arthas Tunnel");function T(U,y){const s=a("ExternalLinkIcon"),n=a("RouterLink");return l(),i("div",null,[u,e("p",null,[e("a",p,[b,m,o(s)])]),f,e("p",null,[k,e("a",v,[x,o(s)]),g]),C,w,L,e("ul",null,[e("li",null,[W,e("a",I,[N,o(s)])])]),R,e("p",null,[e("a",V,[B,o(s)])]),E,e("p",null,[A,o(n,{to:"/doc/tunnel.html"},{default:h(()=>[P]),_:1})])])}const q=c(d,[["render",T],["__file","web-console.html.vue"]]);export{q as default}; diff --git a/3.x/assets/web-console.html.cea17e0f.js b/3.x/assets/web-console.html.cea17e0f.js new file mode 100644 index 00000000000..35238821478 --- /dev/null +++ b/3.x/assets/web-console.html.cea17e0f.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-35756382","path":"/en/doc/web-console.html","title":"Web Console","lang":"en-US","frontmatter":{},"excerpt":"","headers":[{"level":2,"title":"Connect arthas through the browser","slug":"connect-arthas-through-the-browser","link":"#connect-arthas-through-the-browser","children":[]},{"level":2,"title":"scrollback URL parameters","slug":"scrollback-url-parameters","link":"#scrollback-url-parameters","children":[]},{"level":2,"title":"Connect remote arthas through arthas tunnel server","slug":"connect-remote-arthas-through-arthas-tunnel-server","link":"#connect-remote-arthas-through-arthas-tunnel-server","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/web-console.md","version":"3.7.3"}');export{e as data}; diff --git a/3.x/doc/advanced-use.html b/3.x/doc/advanced-use.html new file mode 100644 index 00000000000..a0f3cbb6ef3 --- /dev/null +++ b/3.x/doc/advanced-use.html @@ -0,0 +1,70 @@ + + + + + + + + + 其他特性 | arthas + + + + +
    目录

    其他特性

    Arthas 后台异步任务

    当需要排查一个问题,但是这个问题的出现时间不能确定,那我们就可以把检测命令挂在后台运行,并将保存到输出日志。

    执行结果存日志

    所有执行记录的结果完整保存在日志文件中,便于后续进行分析。

    Docker

    Arthas 在 docker 容器中使用配置参考。

    Web Console

    通过 websocket 连接 Arthas。

    Arthas Tunnel

    通过 Arthas Tunnel Server/Client 来远程管理/连接多个服务器下的Java服务。

    ognl 表达式用法

    IDEA Plugin

    IntelliJ IDEA 编译器中更加快捷构建 arhtas 命令。

    Arthas Properties

    Arthas 支持配置项参考。

    以 java agent 方式启动

    Arthas Spring Boot Starter

    随应用一起启动。

    HTTP API

    Http API 提供结构化的数据,支持更复杂的交互功能,方便自定义界面集成 arthas。

    批处理功能

    方便自定义脚本一次性批量运行多个命令,可结合 --select 参数可以指定进程名字一起使用。

    as3.sh 和 arthas-boot3 技巧

    • 通过select功能选择 attach 的进程。

    正常情况下,每次执行as3.sh/arthas-boot3.jar需要选择,或者指定 PID。这样会比较麻烦,因为每次启动应用,它的 PID 会变化。

    比如,已经启动了math-game.jar,使用jps命令查看:

    $ jps
    +58883 math-game.jar
    +58884 Jps
    +

    通过select参数可以指定进程名字,非常方便。

    $ ./as3.sh --select math-game
    +Arthas script version: 3.3.6
    +[INFO] JAVA_HOME: /tmp/java/8.0.222-zulu
    +Arthas home: /Users/admin/.arthas/lib/3.3.6/arthas
    +Calculating attach execution time...
    +Attaching to 59161 using version /Users/admin/.arthas/lib/3.3.6/arthas...
    +
    +real	0m0.572s
    +user	0m0.281s
    +sys	0m0.039s
    +Attach success.
    +telnet connecting to arthas server... current timestamp is 1594280799
    +Trying 127.0.0.1...
    +Connected to localhost.
    +Escape character is '^]'.
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
    +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
    +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
    +
    +
    +wiki      https://arthas.aliyun.com/3.x/doc
    +tutorials https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
    +version   3.3.6
    +pid       58883
    +

    用户数据回报

    3.1.4版本后,增加了用户数据回报功能,方便统一做安全或者历史数据统计。

    在启动时,指定stat-url,就会回报执行的每一行命令,比如: ./as3.sh --stat-url 'http://192.168.10.11:8080/api/stat'

    在 tunnel server 里有一个示例的回报代码,用户可以自己在服务器上实现。

    StatController.java在新窗口打开

    + + + diff --git a/3.x/doc/advice-class.html b/3.x/doc/advice-class.html new file mode 100644 index 00000000000..c843d8ce98b --- /dev/null +++ b/3.x/doc/advice-class.html @@ -0,0 +1,56 @@ + + + + + + + + + 表达式核心变量 | arthas + + + + +

    表达式核心变量

    无论是匹配表达式也好、观察表达式也罢,他们核心判断变量都是围绕着一个 Arthas 中的通用通知对象 Advice 进行。

    它的简略代码结构如下

    public class Advice {
    +
    +    private final ClassLoader loader;
    +    private final Class<?> clazz;
    +    private final ArthasMethod method;
    +    private final Object target;
    +    private final Object[] params;
    +    private final Object returnObj;
    +    private final Throwable throwExp;
    +    private final boolean isBefore;
    +    private final boolean isThrow;
    +    private final boolean isReturn;
    +
    +    // getter/setter
    +}
    +

    这里列一个表格来说明不同变量的含义

    变量名变量解释
    loader本次调用类所在的 ClassLoader
    clazz本次调用类的 Class 引用
    method本次调用方法反射引用
    target本次调用类的实例
    params本次调用参数列表,这是一个数组,如果方法是无参方法则为空数组
    returnObj本次调用返回的对象。当且仅当 isReturn==true 成立时候有效,表明方法调用是以正常返回的方式结束。如果当前方法无返回值 void,则值为 null
    throwExp本次调用抛出的异常。当且仅当 isThrow==true 成立时有效,表明方法调用是以抛出异常的方式结束。
    isBefore辅助判断标记,当前的通知节点有可能是在方法一开始就通知,此时 isBefore==true 成立,同时 isThrow==falseisReturn==false,因为在方法刚开始时,还无法确定方法调用将会如何结束。
    isThrow辅助判断标记,当前的方法调用以抛异常的形式结束。
    isReturn辅助判断标记,当前的方法调用以正常返回的形式结束。

    所有变量都可以在表达式中直接使用,如果在表达式中编写了不符合 OGNL 脚本语法或者引入了不在表格中的变量,则退出命令的执行;用户可以根据当前的异常信息修正条件表达式观察表达式

    + + + diff --git a/3.x/doc/agent.html b/3.x/doc/agent.html new file mode 100644 index 00000000000..751bc1a2520 --- /dev/null +++ b/3.x/doc/agent.html @@ -0,0 +1,42 @@ + + + + + + + + + 以 Java Agent 的方式启动 | arthas + + + + +

    以 Java Agent 的方式启动

    通常 Arthas 是以动态 attach 的方式来诊断应用,但从3.2.0版本起,Arthas 支持直接以 java agent 的方式启动。

    比如下载全量的 arthas zip 包,解压之后以 -javaagent 的参数指定arthas-agent.jar来启动:

    java -javaagent:/tmp/test/arthas-agent.jar -jar math-game.jar
    +

    默认的配置项在解压目录里的arthas.properties文件里。参考:Arthas Properties

    Java Agent 机制参考: https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html

    + + + diff --git a/3.x/doc/arthas-properties.html b/3.x/doc/arthas-properties.html new file mode 100644 index 00000000000..b221b7af68c --- /dev/null +++ b/3.x/doc/arthas-properties.html @@ -0,0 +1,53 @@ + + + + + + + + + Arthas Properties | arthas + + + + +
    目录

    Arthas Properties

    arthas.properties文件在 arthas 的目录下。

    • 如果是自动下载的 arthas,则目录在~/.arthas/lib/3.x.x/arthas/下面
    • 如果是下载的完整包,在 arthas 解压目录下

    支持的配置项

    注意

    注意配置必须是驼峰的,和 spring boot 的-风格不一样。spring boot 应用才同时支持驼峰-风格的配置。

    #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
    +
    • 如果配置 arthas.telnetPort为 -1 ,则不 listen telnet 端口。arthas.httpPort类似。
    • 如果配置 arthas.telnetPort为 0 ,则随机 telnet 端口,在~/logs/arthas/arthas.log里可以找到具体端口日志。arthas.httpPort类似。

    提示

    如果是防止一个机器上启动多个 arthas 端口冲突。可以配置为随机端口,或者配置为 -1,并且通过 tunnel server 来使用 arthas。

    禁止指定命令

    提示

    since 3.5.2

    比如配置:

    arthas.disabledCommands=stop,dump
    +

    也可以在命令行配置: --disabled-commands stop,dump

    提示

    默认情况下,arthas-spring-boot-starter 会禁掉stop命令。

    配置的优先级

    配置的优先级是:命令行参数 > System Env > System Properties > arthas.properties 。

    比如:

    • ./as3.sh --telnet-port 9999 传入的配置会覆盖掉arthas.properties里的默认值arthas.telnetPort=3658
    • 如果应用自身设置了 system properties arthas.telnetPort=8888,则会覆盖掉arthas.properties里的默认值arthas.telnetPort=3658

    如果想要 arthas.properties的优先级最高,则可以配置 arthas.config.overrideAll=true

    + + + diff --git a/3.x/doc/arthas-tutorials.html b/3.x/doc/arthas-tutorials.html new file mode 100644 index 00000000000..b8fd5b3a544 --- /dev/null +++ b/3.x/doc/arthas-tutorials.html @@ -0,0 +1,1224 @@ + + + + + + + + + + + + + + + + Arthas Tutorials + + + + + + + + + + + + + + + +
    + + + + + +
    + +
    +
    + + + + + + + + diff --git a/3.x/doc/arthas3.html b/3.x/doc/arthas3.html new file mode 100644 index 00000000000..556b191c307 --- /dev/null +++ b/3.x/doc/arthas3.html @@ -0,0 +1,89 @@ + + + + + + + + + arthas + + + + +
    目录

    Arthas3.0 的新特性

    在线诊断功能

    Arthas3.0 中最重要的特性,不需要登陆机器就可以对应用进行诊断,体验和本地诊断完全一致

    使用步骤

    TODO

    动图演示

    TODO

    管道支持

    Arthas 3.0 开始支持管道, 率先提供了grep,wc,plaintext的支持。

    去 groovy 依赖

    groovy 表达式在 arthas2.0 中大量使用,例如 watch 表达式

    watch com.alibaba.sample.petstore.web.store.module.screen.ItemList add "params + ' ' + returnObj" params.size()==2
    +

    其中"params + ' ' + returnObj"以及params.size()==2背后其实都使用了 groovy 来进行表达式求值,如果反复大量的运行这些表达式,groovy 会创建大量的 classloader,打满 perm 区从而触发 FGC。

    为了避免这个问题,Arthas 3.0 中使用了 ognl 这个更加轻量的表达式求值库来代替 groovy,彻底解决了 groovy 引起的 FGC 风险。但由于这个替换,导致原来使用 groovy 脚本编写的自定义脚本失效。这个问题留待后续解决。

    在 3.0 中,watch 命令的表达式部分的书写有了一些改变,详见这里在新窗口打开

    提升 rt 统计精度

    Arthas 2.0 中,统计 rt 都是以ms为单位,对于某些比较小的方法调用,耗时在毫秒以下的都会被认为是 0ms,造成 trace 总时间和各方法的时间相加不一致等问题(虽然这里面确实会有误差,主要 Arthas 自身的开销)。Arthas 3.0 中所有 rt 的单位统一改为使用ns来统计,精准捕获你的方法耗时,让 0ms 这样无意义的统计数据不再出现!

    $ 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
    +

    watch/stack/trace 命令支持按耗时过滤

    我们在 trace 的时候,经常会出现某个方法间隙性的 rt 飙高,但是我们只想知道 rt 高的时候,是哪里慢了,对于正常 rt 的方法我们并不关心,Arthas 3.0 支持了按#cost(方法执行耗时,单位为ms)进行过滤,只输出符合条件的 trace 路径,目前,这三个命令的相关文档已经做了更新,增加了该用法的示例。

    sysprop 命令操作 SystemProperty

    sysprop 命令支持查看所有的系统属性,以及针对特定属性进行查看和修改。

    $ 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
    +

    thread 命令支持指定采样时间

    thread 命令计算线程 cpu 占用的逻辑,默认是采样 100ms 内各个线程的 cpu 使用情况并计算 cpu 消耗占比。有时候 100ms 的时间间隔太短,看不出问题所在,Arthas3.0 中 thread 命令支持设置采样间隔(以ms为单位),可以观察任意时间段内的 cpu 消耗占比情况。

    $ 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
    +

    trace 命令自动高亮显示最耗时方法调用

    trace 命令现在会自动显示

    ![Untitled2](TODO /Untitled2.gif)

    + + + diff --git a/3.x/doc/async.html b/3.x/doc/async.html new file mode 100644 index 00000000000..fc42b3fca94 --- /dev/null +++ b/3.x/doc/async.html @@ -0,0 +1,54 @@ + + + + + + + + + Arthas 后台异步任务 | arthas + + + + +
    目录

    Arthas 后台异步任务

    后台异步任务在线教程在新窗口打开

    arthas 中的后台异步任务,使用了仿 linux 系统任务相关的命令。linux 任务相关介绍在新窗口打开

    1. 使用&在后台执行任务

    比如希望执行后台执行 trace 命令,那么调用下面命令

    trace Test t &
    +

    这时命令在后台执行,可以在 console 中继续执行其他命令。

    2. 通过 jobs 查看任务

    如果希望查看当前有哪些 arthas 任务在执行,可以执行 jobs 命令,执行结果如下

    $ jobs
    +[10]*
    +       Stopped           watch com.taobao.container.Test test "params[0].{? #this.name == null }" -x 2
    +       execution count : 19
    +       start time      : Fri Sep 22 09:59:55 CST 2017
    +       timeout date    : Sat Sep 23 09:59:55 CST 2017
    +       session         : 3648e874-5e69-473f-9eed-7f89660b079b (current)
    +

    可以看到目前有一个后台任务在执行。

    • job id 是 10, * 表示此 job 是当前 session 创建
    • 状态是 Stopped
    • execution count 是执行次数,从启动开始已经执行了 19 次
    • timeout date 是超时的时间,到这个时间,任务将会自动超时退出

    3. 任务暂停和取消

    当任务正在前台执行,比如直接调用命令trace Test t或者调用后台执行命令trace Test t &后又通过fg命令将任务转到前台。这时 console 中无法继续执行命令,但是可以接收并处理以下事件:

    • ‘ctrl + z’:将任务暂停。通过jbos查看任务状态将会变为 Stopped,通过bg <job-id>或者fg <job-id>可让任务重新开始执行
    • ‘ctrl + c’:停止任务
    • ‘ctrl + d’:按照 linux 语义应当是退出终端,目前 arthas 中是空实现,不处理

    4. fg、bg 命令,将命令转到前台、后台继续执行

    • 任务在后台执行或者暂停状态(ctrl + z暂停任务)时,执行fg <job-id>将可以把对应的任务转到前台继续执行。在前台执行时,无法在 console 中执行其他命令
    • 当任务处于暂停状态时(ctrl + z暂停任务),执行bg <job-id>将可以把对应的任务在后台继续执行
    • 非当前 session 创建的 job,只能由当前 session fg 到前台执行

    5. 任务输出重定向

    可通过>或者>>将任务输出结果输出到指定的文件中,可以和&一起使用,实现 arthas 命令的后台异步任务。比如:

    $ trace Test t >> test.out &
    +

    这时 trace 命令会在后台执行,并且把结果输出到应用工作目录下面的test.out文件。可继续执行其他命令。并可查看文件中的命令执行结果。可以执行pwd命令查看当前应用的工作目录

    $ cat test.out
    +

    如果没有指定重定向文件,则会把结果输出到~/logs/arthas-cache/目录下,比如:

    $ trace Test t >>  &
    +job id  : 2
    +cache location  : /Users/admin/logs/arthas-cache/28198/2
    +

    此时命令会在后台异步执行,并将结果异步保存在文件(~/logs/arthas-cache/${PID}/${JobId})中;

    • 此时任务的执行不受 session 断开的影响;任务默认超时时间是 1 天,可以通过全局 options 命令修改默认超时时间;
    • 此命令的结果将异步输出到  文件中;此时不管 save-result 是否为 true,都不会再往~/logs/arthas-cache/result.log 中异步写结果。

    6. 停止命令

    异步执行的命令,如果希望停止,可执行kill <job-id>

    7. 其他

    • 最多同时支持 8 个命令使用重定向将结果写日志
    • 请勿同时开启过多的后台异步命令,以免对目标 JVM 性能造成影响
    • 如果不想停止 arthas,继续执行后台任务,可以执行 quit 退出 arthas 控制台(stop 会停止 arthas 服务)
    + + + diff --git a/3.x/doc/auth.html b/3.x/doc/auth.html new file mode 100644 index 00000000000..b4bc94844d3 --- /dev/null +++ b/3.x/doc/auth.html @@ -0,0 +1,53 @@ + + + + + + + + + auth | arthas + + + + +
    目录

    auth

    提示

    验证当前会话

    配置用户名和密码

    在 attach 时,可以在命令行指定密码。比如:

    java -jar arthas-boot3.jar --password ppp
    +
    • 可以通过 --username 选项来指定用户,默认值是arthas

    • 也可以在 arthas.properties 里中配置 username/password。命令行的优先级大于配置文件。

    • 如果只配置username,没有配置password,则会生成随机密码,打印在~/logs/arthas/arthas.log

      Using generated security password: 0vUBJpRIppkKuZ7dYzYqOKtranj4unGh
      +

    本地连接不鉴权

    默认情况下,在arthas.properties文件里有配置:

    arthas.localConnectionNonAuth=true
    +

    当配置密码时,使用本地连接,也不需要鉴权。默认配置值是 true,方便本地连接使用。只有远程连接时,才需要鉴权。

    在 telnet console 里鉴权

    连接到 arthas 后,直接执行命令会提示需要鉴权:

    [arthas@37430]$ help
    +Error! command not permitted, try to use 'auth' command to authenticates.
    +

    使用auth命令来鉴权,成功之后可以执行其它命令。

    [arthas@37430]$ auth ppp
    +Authentication result: true
    +
    • 可以通过 --username 选项来指定用户,默认值是arthas

    Web console 密码验证

    打开浏览器,会有弹窗提示需要输入 用户名 和 密码。

    成功之后,则可以直接连接上 web console。

    HTTP API 验证

    Authorization Header 方式(推荐)

    Arthas 采用的是 HTTP 标准的 Basic Authorization,客户端请求时增加对应的 header 即可。

    例如,用户名是:admin,密码是 admin,则组合为字符串: admin:admin,base64 结果是: YWRtaW46YWRtaW4=,则 HTTP 请求增加Authorization header:

    curl 'http://localhost:8563/api' \
    +  -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
    +  --data-raw '{"action":"exec","command":"version"}'
    +

    URL 参数传递方式

    为了方便各种特殊情况,支持了以 parameters 方式传递 username 和 password。比如:

    curl 'http://localhost:8563/api?password=admin' \
    +  --data-raw '{"action":"exec","command":"version"}'
    +
    + + + diff --git a/3.x/doc/base64.html b/3.x/doc/base64.html new file mode 100644 index 00000000000..2f0543f1c43 --- /dev/null +++ b/3.x/doc/base64.html @@ -0,0 +1,51 @@ + + + + + + + + + base64 | arthas + + + + +
    目录

    base64

    提示

    base64 编码转换,和 linux 里的 base64 命令类似。

    对文件进行 base64 编码

    [arthas@70070]$ echo 'abc' > /tmp/test.txt
    +[arthas@70070]$ cat /tmp/test.txt
    +abc
    +
    +[arthas@70070]$ base64 /tmp/test.txt
    +YWJjCg==
    +

    对文件进行 base64 编码并把结果保存到文件里

    $ base64 --input /tmp/test.txt --output /tmp/result.txt
    +

    用 base64 解码文件

    $ base64 -d /tmp/result.txt
    +abc
    +

    用 base64 解码文件并保存结果到文件里

    $ base64 -d /tmp/result.txt --output /tmp/bbb.txt
    +
    + + + diff --git a/3.x/doc/batch-support.html b/3.x/doc/batch-support.html new file mode 100644 index 00000000000..fb5850b78a4 --- /dev/null +++ b/3.x/doc/batch-support.html @@ -0,0 +1,50 @@ + + + + + + + + + 批处理功能 | arthas + + + + +
    目录

    批处理功能

    提示

    通过批处理功能,arthas 支持一次性批量运行多个命令,并取得命令执行的结果。可结合 --select 参数可以指定进程名字一起使用。

    使用方法

    第一步:创建你的批处理脚本

    这里我们新建了一个test.as脚本,为了规范,我们采用了.as 后缀名,但事实上任意的文本文件都 ok。

    提示

    • 目前需要每个命令占一行
    • dashboard 务必指定执行次数 (-n),否则会导致批处理脚本无法终止
    • watch/tt/trace/monitor/stack 等命令务必指定执行次数 (-n),否则会导致批处理脚本无法终止
    • 可以使用异步后台任务,如 watch c.t.X test returnObj > &,让命令一直在后台运行,通过日志获取结果,获取更多异步任务的信息
    ➜  arthas git:(develop) cat /var/tmp/test.as
    +help
    +dashboard -n 1
    +session
    +thread
    +sc -d org.apache.commons.lang.StringUtils
    +

    第二步:运行你的批处理脚本

    通过-f执行脚本文件,批处理脚本默认会输出到标准输出中,可以将结果重定向到文件中。

    ./as3.sh -f /var/tmp/test.as <pid> > test.out # pid 可以通过 jps 命令查看
    +

    也可以通过 -c 来指定指行的命令,比如

    ./as3.sh -c 'sysprop; thread' <pid> > test.out # pid 可以通过 jps 命令查看
    +

    第三步:查看运行结果

    cat test.out
    +
    + + + diff --git a/3.x/doc/cat.html b/3.x/doc/cat.html new file mode 100644 index 00000000000..6a8d044303f --- /dev/null +++ b/3.x/doc/cat.html @@ -0,0 +1,42 @@ + + + + + + + + + cat | arthas + + + + + + + + diff --git a/3.x/doc/classloader.html b/3.x/doc/classloader.html new file mode 100644 index 00000000000..49b64112e7d --- /dev/null +++ b/3.x/doc/classloader.html @@ -0,0 +1,127 @@ + + + + + + + + + classloader | arthas + + + + +
    目录

    classloader

    classloader在线教程在新窗口打开

    提示

    查看 classloader 的继承树,urls,类加载信息

    classloader 命令将 JVM 中所有的 classloader 的信息统计出来,并可以展示继承树,urls 等。

    可以让指定的 classloader 去 getResources,打印出所有查找到的 resources 的 url。对于ResourceNotFoundException比较有用。

    参数说明

    参数名称参数说明
    [l]按类加载实例进行统计
    [t]打印所有 ClassLoader 的继承树
    [a]列出所有 ClassLoader 加载的类,请谨慎使用
    [c:]ClassLoader 的 hashcode
    [classLoaderClass:]指定执行表达式的 ClassLoader 的 class name
    [c: r:]用 ClassLoader 去查找 resource
    [c: load:]用 ClassLoader 去加载指定的类

    使用参考

    按类加载类型查看统计信息

    $ classloader
    + name                                       numberOfInstances  loadedCountTotal
    + com.taobao.arthas.agent.ArthasClassloader  1                  2115
    + BootstrapClassLoader                       1                  1861
    + sun.reflect.DelegatingClassLoader          5                  5
    + sun.misc.Launcher$AppClassLoader           1                  4
    + sun.misc.Launcher$ExtClassLoader           1                  1
    +Affect(row-cnt:5) cost in 3 ms.
    +

    按类加载实例查看统计信息

    $ classloader -l
    + name                                                loadedCount  hash      parent
    + BootstrapClassLoader                                1861         null      null
    + com.taobao.arthas.agent.ArthasClassloader@68b31f0a  2115         68b31f0a  sun.misc.Launcher$ExtClassLoader@66350f69
    + sun.misc.Launcher$AppClassLoader@3d4eac69           4            3d4eac69  sun.misc.Launcher$ExtClassLoader@66350f69
    + sun.misc.Launcher$ExtClassLoader@66350f69           1            66350f69  null
    +Affect(row-cnt:4) cost in 2 ms.
    +

    查看 ClassLoader 的继承树

    $ classloader -t
    ++-BootstrapClassLoader
    ++-sun.misc.Launcher$ExtClassLoader@66350f69
    +  +-com.taobao.arthas.agent.ArthasClassloader@68b31f0a
    +  +-sun.misc.Launcher$AppClassLoader@3d4eac69
    +Affect(row-cnt:4) cost in 3 ms.
    +

    查看 URLClassLoader 实际的 urls

    $ classloader -c 3d4eac69
    +file:/private/tmp/math-game.jar
    +file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
    +
    +Affect(row-cnt:9) cost in 3 ms.
    +

    注意 hashcode 是变化的,需要先查看当前的 ClassLoader 信息,提取对应 ClassLoader 的 hashcode。

    对于只有唯一实例的 ClassLoader 可以通过 class name 指定,使用起来更加方便:

    $ classloader --classLoaderClass sun.misc.Launcher$AppClassLoader
    +file:/private/tmp/math-game.jar
    +file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
    +
    +Affect(row-cnt:9) cost in 3 ms.
    +

    使用 ClassLoader 去查找 resource

    $ classloader -c 3d4eac69  -r META-INF/MANIFEST.MF
    + jar:file:/System/Library/Java/Extensions/MRJToolkit.jar!/META-INF/MANIFEST.MF
    + jar:file:/private/tmp/math-game.jar!/META-INF/MANIFEST.MF
    + jar:file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar!/META-INF/MANIFEST.MF
    +

    也可以尝试查找类的 class 文件:

    $ classloader -c 1b6d3586 -r java/lang/String.class
    + jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/rt.jar!/java/lang/String.class
    +

    使用 ClassLoader 去加载类

    $ classloader -c 3d4eac69 --load demo.MathGame
    +load class success.
    + class-info        demo.MathGame
    + code-source       /private/tmp/math-game.jar
    + name              demo.MathGame
    + isInterface       false
    + isAnnotation      false
    + isEnum            false
    + isAnonymousClass  false
    + isArray           false
    + isLocalClass      false
    + isMemberClass     false
    + isPrimitive       false
    + isSynthetic       false
    + simple-name       MathGame
    + modifier          public
    + annotation
    + interfaces
    + super-class       +-java.lang.Object
    + class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
    +                     +-sun.misc.Launcher$ExtClassLoader@66350f69
    + classLoaderHash   3d4eac69
    +

    统计 ClassLoader 实际使用 URL 和未使用的 URL

    注意

    注意,基于 JVM 目前已加载的所有类统计,不代表Unused URLs可以从应用中删掉。因为可能将来需要从Unused URLs里加载类,或者需要加载resources

    $ 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
    +
    + + + diff --git a/3.x/doc/cls.html b/3.x/doc/cls.html new file mode 100644 index 00000000000..7a5eb8f0955 --- /dev/null +++ b/3.x/doc/cls.html @@ -0,0 +1,41 @@ + + + + + + + + + cls | arthas + + + + + + + + diff --git a/3.x/doc/commands.html b/3.x/doc/commands.html new file mode 100644 index 00000000000..4f694a16e9e --- /dev/null +++ b/3.x/doc/commands.html @@ -0,0 +1,41 @@ + + + + + + + + + 命令列表 | arthas + + + + +
    目录

    命令列表

    jvm 相关

    • dashboard - 当前系统的实时数据面板
    • getstatic - 查看类的静态属性
    • heapdump - dump java heap, 类似 jmap 命令的 heap dump 功能
    • jvm - 查看当前 JVM 的信息
    • logger - 查看和修改 logger
    • mbean - 查看 Mbean 的信息
    • memory - 查看 JVM 的内存信息
    • ognl - 执行 ognl 表达式
    • perfcounter - 查看当前 JVM 的 Perf Counter 信息
    • sysenv - 查看 JVM 的环境变量
    • sysprop - 查看和修改 JVM 的系统属性
    • thread - 查看当前 JVM 的线程堆栈信息
    • vmoption - 查看和修改 JVM 里诊断相关的 option
    • vmtool - 从 jvm 里查询对象,执行 forceGc

    class/classloader 相关

    • classloader - 查看 classloader 的继承树,urls,类加载信息,使用 classloader 去 getResource
    • dump - dump 已加载类的 byte code 到特定目录
    • jad - 反编译指定已加载类的源码
    • mc - 内存编译器,内存编译.java文件为.class文件
    • redefine - 加载外部的.class文件,redefine 到 JVM 里
    • retransform - 加载外部的.class文件,retransform 到 JVM 里
    • sc - 查看 JVM 已加载的类信息
    • sm - 查看已加载类的方法信息

    monitor/watch/trace 相关

    注意

    请注意,这些命令,都通过字节码增强技术来实现的,会在指定类的方法中插入一些切面来实现数据统计和观测,因此在线上、预发使用时,请尽量明确需要观测的类、方法以及条件,诊断结束要执行 stop 或将增强过的类执行 reset 命令。

    • monitor - 方法执行监控
    • stack - 输出当前方法被调用的调用路径
    • trace - 方法内部调用路径,并输出方法路径上的每个节点上耗时
    • tt - 方法执行数据的时空隧道,记录下指定方法每次调用的入参和返回信息,并能对这些不同的时间下调用进行观测
    • watch - 方法执行数据观测

    profiler/火焰图

    鉴权

    options

    • options - 查看或设置 Arthas 全局开关

    管道

    Arthas 支持使用管道对上述命令的结果进行进一步的处理,如sm java.lang.String * | grep 'index'

    • grep - 搜索满足条件的结果
    • plaintext - 将命令的结果去除 ANSI 颜色
    • wc - 按行统计输出结果

    后台异步任务

    当线上出现偶发的问题,比如需要 watch 某个条件,而这个条件一天可能才会出现一次时,异步后台任务就派上用场了,详情请参考这里

    • 使用 > 将结果重写向到日志文件,使用 & 指定命令是后台运行,session 断开不影响任务执行(生命周期默认为 1 天)
    • jobs - 列出所有 job
    • kill - 强制终止任务
    • fg - 将暂停的任务拉到前台执行
    • bg - 将暂停的任务放到后台执行

    基础命令

    • base64 - base64 编码转换,和 linux 里的 base64 命令类似
    • cat - 打印文件内容,和 linux 里的 cat 命令类似
    • cls - 清空当前屏幕区域
    • echo - 打印参数,和 linux 里的 echo 命令类似
    • grep - 匹配查找,和 linux 里的 grep 命令类似
    • help - 查看命令帮助信息
    • history - 打印命令历史
    • keymap - Arthas 快捷键列表及自定义快捷键
    • pwd - 返回当前的工作目录,和 linux 命令类似
    • quit - 退出当前 Arthas 客户端,其他 Arthas 客户端不受影响
    • reset - 重置增强类,将被 Arthas 增强过的类全部还原,Arthas 服务端关闭时会重置所有增强过的类
    • session - 查看当前会话的信息
    • stop - 关闭 Arthas 服务端,所有 Arthas 客户端全部退出
    • tee - 复制标准输入到标准输出和指定的文件,和 linux 里的 tee 命令类似
    • version - 输出当前目标 Java 进程所加载的 Arthas 版本号
    + + + diff --git a/3.x/doc/contact-us.html b/3.x/doc/contact-us.html new file mode 100644 index 00000000000..a6692fc68a1 --- /dev/null +++ b/3.x/doc/contact-us.html @@ -0,0 +1,41 @@ + + + + + + + + + 联系我们 | arthas + + + + +
    目录

    联系我们

    招聘

    Issues

    使用疑问,意见可以直接在 Issues 里提出: https://github.com/alibaba/arthas/issues在新窗口打开

    微信公众号

    欢迎关注公众号,获取 Arthas 项目的信息、源码分析、案例实践。

    钉钉群

    • Arthas 开源交流钉钉群: 21965291 ,搜索群号即可加入。(如果满了无法加入,请加 3 群)

    • Arthas 开源交流钉钉群 2: 30707824 ,搜索群号即可加入。(如果满了无法加入,请加 3 群)

    • Arthas 开源交流钉钉群 3: 17605006847 ,搜索群号即可加入。

    QQ 群

    Arthas 开源交流 QQ 群: 916328269 (如果满了无法加入,请加 3 群)

    Arthas 开源交流 QQ 群 2: 854625984

    Arthas 开源交流 QQ 群 3: 672077388

    + + + diff --git a/3.x/doc/dashboard.html b/3.x/doc/dashboard.html new file mode 100644 index 00000000000..3666ccefe55 --- /dev/null +++ b/3.x/doc/dashboard.html @@ -0,0 +1,73 @@ + + + + + + + + + dashboard | arthas + + + + +
    目录

    dashboard

    dashboard在线教程在新窗口打开

    提示

    当前系统的实时数据面板,按 ctrl+c 退出。

    当运行在 Ali-tomcat 时,会显示当前 tomcat 的实时信息,如 HTTP 请求的 qps, rt, 错误数, 线程池信息等等。

    参数说明

    参数名称参数说明
    [i:]刷新实时数据的时间间隔 (ms),默认 5000ms
    [n:]刷新实时数据的次数

    使用参考

    $ 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
    +

    数据说明

    • ID: Java 级别的线程 ID,注意这个 ID 不能跟 jstack 中的 nativeID 一一对应。
    • NAME: 线程名
    • GROUP: 线程组名
    • PRIORITY: 线程优先级, 1~10 之间的数字,越大表示优先级越高
    • STATE: 线程的状态
    • CPU%: 线程的 cpu 使用率。比如采样间隔 1000ms,某个线程的增量 cpu 时间为 100ms,则 cpu 使用率=100/1000=10%
    • DELTA_TIME: 上次采样之后线程运行增量 CPU 时间,数据格式为
    • TIME: 线程运行总 CPU 时间,数据格式为分:秒
    • INTERRUPTED: 线程当前的中断位状态
    • DAEMON: 是否是 daemon 线程

    JVM 内部线程

    Java 8 之后支持获取 JVM 内部线程 CPU 时间,这些线程只有名称和 CPU 时间,没有 ID 及状态等信息(显示 ID 为-1)。 通过内部线程可以观测到 JVM 活动,如 GC、JIT 编译等占用 CPU 情况,方便了解 JVM 整体运行状况。

    • 当 JVM 堆(heap)/元数据(metaspace)空间不足或 OOM 时,可以看到 GC 线程的 CPU 占用率明显高于其他的线程。
    • 当执行trace/watch/tt/redefine等命令后,可以看到 JIT 线程活动变得更频繁。因为 JVM 热更新 class 字节码时清除了此 class 相关的 JIT 编译结果,需要重新编译。

    JVM 内部线程包括下面几种:

    • JIT 编译线程: 如 C1 CompilerThread0, C2 CompilerThread0
    • GC 线程: 如GC Thread0, G1 Young RemSet Sampling
    • 其它内部线程: 如VM Periodic Task Thread, VM Thread, Service Thread

    截图展示

    + + + diff --git a/3.x/doc/docker.html b/3.x/doc/docker.html new file mode 100644 index 00000000000..528b20875a9 --- /dev/null +++ b/3.x/doc/docker.html @@ -0,0 +1,90 @@ + + + + + + + + + Docker | arthas + + + + +
    目录

    Docker

    在 Docker 里使用 JDK

    很多时候,应用在 docker 里出现 arthas 无法工作的问题,是因为应用没有安装 JDK ,而是安装了 JRE 。如果只安装了 JRE,则会缺少很多 JAVA 的命令行工具和类库,Arthas 也没办法正常工作。下面介绍两种常见的在 Docker 里使用 JDK 的方式。

    使用公开的 JDK 镜像

    • https://hub.docker.com/_/openjdk/

    比如:

    FROM openjdk:8-jdk
    +

    或者:

    FROM openjdk:8-jdk-alpine
    +

    通过包管理软件来安装

    比如:

    # Install OpenJDK-8
    +RUN apt-get update && \
    +    apt-get install -y openjdk-8-jdk && \
    +    apt-get install -y ant && \
    +    apt-get clean;
    +
    +# Fix certificate issues
    +RUN apt-get update && \
    +    apt-get install ca-certificates-java && \
    +    apt-get clean && \
    +    update-ca-certificates -f;
    +
    +# Setup JAVA_HOME -- useful for docker commandline
    +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
    +RUN export JAVA_HOME
    +

    或者:

    RUN yum install -y \
    +   java-1.8.0-openjdk \
    +   java-1.8.0-openjdk-devel
    +
    +ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk/
    +RUN export JAVA_HOME
    +

    通过 Docker 快速入门

    1. 删除本地已有的math-game docker container(非必要)

      $ docker stop math-game || true && docker rm math-game || true
      +
    2. 启动math-game

      $ docker run --name math-game -it hengyunabc/arthas:latest /bin/sh -c "java -jar /opt/arthas/math-game.jar"
      +
    3. 启动arthas-boot3来进行诊断

      $ docker exec -it math-game /bin/sh -c "java -jar /opt/arthas/arthas-boot3.jar"
      +* [1]: 9 jar
      +
      +[INFO] arthas home: /opt/arthas
      +[INFO] Try to attach process 9
      +[INFO] Attach process 9 success.
      +[INFO] arthas-client connect 127.0.0.1 3658
      +,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
      +/  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
      +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
      +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
      +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
      +
      +
      +wiki: https://arthas.aliyun.com/3.x/doc
      +version: 3.0.5
      +pid: 9
      +time: 2018-12-18 11:30:36
      +

    诊断 Docker 里的 Java 进程

    docker exec -it  ${containerId} /bin/bash -c "wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"
    +

    诊断 k8s 里容器里的 Java 进程

    kubectl exec -it ${pod} --container ${containerId} -- /bin/bash -c "wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"
    +

    把 Arthas 安装到基础镜像里

    可以很简单把 Arthas 安装到你的 Docker 镜像里。

    FROM openjdk:8-jdk-alpine
    +
    +# copy arthas
    +COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas
    +

    如果想指定版本,可以查看具体的 tags:

    https://hub.docker.com/r/hengyunabc/arthas/tags在新窗口打开

    + + + diff --git a/3.x/doc/download.html b/3.x/doc/download.html new file mode 100644 index 00000000000..06f601b8b49 --- /dev/null +++ b/3.x/doc/download.html @@ -0,0 +1,45 @@ + + + + + + + + + 下载 | arthas + + + + +
    目录

    下载

    下载全量包

    从 Github Releases 页下载

    https://github.com/alibaba/arthas/releases在新窗口打开

    用 as3.sh 启动

    解压后,在文件夹里有as3.sh,直接用./as3.sh的方式启动:

    ./as3.sh
    +

    打印帮助信息:

    ./as3.sh -h
    +

    用 arthas-boot3 启动

    或者在解压后,在文件夹里有arthas-boot3.jar,直接用java -jar的方式启动:

    java -jar arthas-boot3.jar
    +

    打印帮助信息:

    java -jar arthas-boot3.jar -h
    +
    + + + diff --git a/3.x/doc/dump.html b/3.x/doc/dump.html new file mode 100644 index 00000000000..95051418f65 --- /dev/null +++ b/3.x/doc/dump.html @@ -0,0 +1,60 @@ + + + + + + + + + dump | arthas + + + + +
    目录

    dump

    dump在线教程在新窗口打开

    提示

    dump 已加载类的 bytecode 到特定目录

    dump 命令将 JVM 中实际运行的 class 的 byte code dump 到指定目录,适用场景批量下载指定包目录的 class 字节码;如需反编译单一类、实时查看类信息,可参考 jad

    参数说明

    参数名称参数说明
    class-pattern类名表达式匹配
    [c:]类所属 ClassLoader 的 hashcode
    [classLoaderClass:]指定执行表达式的 ClassLoader 的 class name
    [d:]设置类文件的目标目录
    [E]开启正则表达式匹配,默认为通配符匹配

    使用参考

    $ dump java.lang.String
    + HASHCODE  CLASSLOADER  LOCATION
    + null                   /Users/admin/logs/arthas/classdump/java/lang/String.class
    +Affect(row-cnt:1) cost in 119 ms.
    +
    $ dump demo.*
    + HASHCODE  CLASSLOADER                                    LOCATION
    + 3d4eac69  +-sun.misc.Launcher$AppClassLoader@3d4eac69    /Users/admin/logs/arthas/classdump/sun.misc.Launcher$AppClassLoader-3d4eac69/demo/MathGame.class
    +             +-sun.misc.Launcher$ExtClassLoader@66350f69
    +Affect(row-cnt:1) cost in 39 ms.
    +
    $ dump -d /tmp/output java.lang.String
    + HASHCODE  CLASSLOADER  LOCATION
    + null                   /tmp/output/java/lang/String.class
    +Affect(row-cnt:1) cost in 138 ms.
    +
    • 指定 classLoader

    注意 hashcode 是变化的,需要先查看当前的 ClassLoader 信息,提取对应 ClassLoader 的 hashcode。

    如果你使用-c,你需要手动输入 hashcode:-c <hashcode>

    $ dump -c 3d4eac69 demo.*
    +

    对于只有唯一实例的 ClassLoader 可以通过--classLoaderClass指定 class name,使用起来更加方便:

    $ dump --classLoaderClass sun.misc.Launcher$AppClassLoader demo.*
    + HASHCODE  CLASSLOADER                                    LOCATION
    + 3d4eac69  +-sun.misc.Launcher$AppClassLoader@3d4eac69    /Users/admin/logs/arthas/classdump/sun.misc.Launcher$AppClassLoader-3d4eac69/demo/MathGame.class
    +             +-sun.misc.Launcher$ExtClassLoader@66350f69
    +Affect(row-cnt:1) cost in 39 ms.
    +
    • 注:这里 classLoaderClass 在 java 8 是 sun.misc.Launcher$AppClassLoader,而 java 11 的 classloader 是 jdk.internal.loader.ClassLoaders$AppClassLoader,killercoda 目前环境是 java11。

    --classLoaderClass 的值是 ClassLoader 的类名,只有匹配到唯一的 ClassLoader 实例时才能工作,目的是方便输入通用命令,而-c <hashcode>是动态变化的。

    + + + diff --git a/3.x/doc/echo.html b/3.x/doc/echo.html new file mode 100644 index 00000000000..db1fd289ec9 --- /dev/null +++ b/3.x/doc/echo.html @@ -0,0 +1,42 @@ + + + + + + + + + echo | arthas + + + + + + + + diff --git a/3.x/doc/en/advanced-use.html b/3.x/doc/en/advanced-use.html new file mode 100644 index 00000000000..f6859d976d9 --- /dev/null +++ b/3.x/doc/en/advanced-use.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/advice-class.html b/3.x/doc/en/advice-class.html new file mode 100644 index 00000000000..98532e8b09a --- /dev/null +++ b/3.x/doc/en/advice-class.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/agent.html b/3.x/doc/en/agent.html new file mode 100644 index 00000000000..7af7354a338 --- /dev/null +++ b/3.x/doc/en/agent.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/arthas-properties.html b/3.x/doc/en/arthas-properties.html new file mode 100644 index 00000000000..e2288007179 --- /dev/null +++ b/3.x/doc/en/arthas-properties.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/async.html b/3.x/doc/en/async.html new file mode 100644 index 00000000000..7bfe71570c2 --- /dev/null +++ b/3.x/doc/en/async.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/auth.html b/3.x/doc/en/auth.html new file mode 100644 index 00000000000..9ac12db6ff8 --- /dev/null +++ b/3.x/doc/en/auth.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/base64.html b/3.x/doc/en/base64.html new file mode 100644 index 00000000000..1cf4d85bd18 --- /dev/null +++ b/3.x/doc/en/base64.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/batch-support.html b/3.x/doc/en/batch-support.html new file mode 100644 index 00000000000..57635307c48 --- /dev/null +++ b/3.x/doc/en/batch-support.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/cat.html b/3.x/doc/en/cat.html new file mode 100644 index 00000000000..84ead543456 --- /dev/null +++ b/3.x/doc/en/cat.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/classloader.html b/3.x/doc/en/classloader.html new file mode 100644 index 00000000000..34cc12dc454 --- /dev/null +++ b/3.x/doc/en/classloader.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/cls.html b/3.x/doc/en/cls.html new file mode 100644 index 00000000000..ec921f1586b --- /dev/null +++ b/3.x/doc/en/cls.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/commands.html b/3.x/doc/en/commands.html new file mode 100644 index 00000000000..46b8e188ec5 --- /dev/null +++ b/3.x/doc/en/commands.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/contact-us.html b/3.x/doc/en/contact-us.html new file mode 100644 index 00000000000..6abf1b7540c --- /dev/null +++ b/3.x/doc/en/contact-us.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/dashboard.html b/3.x/doc/en/dashboard.html new file mode 100644 index 00000000000..3c7193a3be4 --- /dev/null +++ b/3.x/doc/en/dashboard.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/docker.html b/3.x/doc/en/docker.html new file mode 100644 index 00000000000..aa4992ca82f --- /dev/null +++ b/3.x/doc/en/docker.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/download.html b/3.x/doc/en/download.html new file mode 100644 index 00000000000..ae1ea48c21d --- /dev/null +++ b/3.x/doc/en/download.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/dump.html b/3.x/doc/en/dump.html new file mode 100644 index 00000000000..9cd73026221 --- /dev/null +++ b/3.x/doc/en/dump.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/echo.html b/3.x/doc/en/echo.html new file mode 100644 index 00000000000..2f2de491041 --- /dev/null +++ b/3.x/doc/en/echo.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/faq.html b/3.x/doc/en/faq.html new file mode 100644 index 00000000000..b2dab170d87 --- /dev/null +++ b/3.x/doc/en/faq.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/getstatic.html b/3.x/doc/en/getstatic.html new file mode 100644 index 00000000000..20ba863341e --- /dev/null +++ b/3.x/doc/en/getstatic.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/grep.html b/3.x/doc/en/grep.html new file mode 100644 index 00000000000..5fefdc99705 --- /dev/null +++ b/3.x/doc/en/grep.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/groovy.html b/3.x/doc/en/groovy.html new file mode 100644 index 00000000000..233883cc327 --- /dev/null +++ b/3.x/doc/en/groovy.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/heapdump.html b/3.x/doc/en/heapdump.html new file mode 100644 index 00000000000..ac2ccac57f0 --- /dev/null +++ b/3.x/doc/en/heapdump.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/help.html b/3.x/doc/en/help.html new file mode 100644 index 00000000000..ec42fb3556f --- /dev/null +++ b/3.x/doc/en/help.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/history.html b/3.x/doc/en/history.html new file mode 100644 index 00000000000..df8aaf8ef5a --- /dev/null +++ b/3.x/doc/en/history.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/http-api.html b/3.x/doc/en/http-api.html new file mode 100644 index 00000000000..557040320e3 --- /dev/null +++ b/3.x/doc/en/http-api.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/idea-plugin.html b/3.x/doc/en/idea-plugin.html new file mode 100644 index 00000000000..dd1a9c0c60d --- /dev/null +++ b/3.x/doc/en/idea-plugin.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/index.html b/3.x/doc/en/index.html new file mode 100644 index 00000000000..e0d5d6f065e --- /dev/null +++ b/3.x/doc/en/index.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/install-detail.html b/3.x/doc/en/install-detail.html new file mode 100644 index 00000000000..aba40a0be74 --- /dev/null +++ b/3.x/doc/en/install-detail.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/jad.html b/3.x/doc/en/jad.html new file mode 100644 index 00000000000..66d069ff11e --- /dev/null +++ b/3.x/doc/en/jad.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/jfr.html b/3.x/doc/en/jfr.html new file mode 100644 index 00000000000..38cef7b7ac4 --- /dev/null +++ b/3.x/doc/en/jfr.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/jvm.html b/3.x/doc/en/jvm.html new file mode 100644 index 00000000000..4f56cfa8538 --- /dev/null +++ b/3.x/doc/en/jvm.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/keymap.html b/3.x/doc/en/keymap.html new file mode 100644 index 00000000000..17543e5892a --- /dev/null +++ b/3.x/doc/en/keymap.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/logger.html b/3.x/doc/en/logger.html new file mode 100644 index 00000000000..8e0e2ab77c7 --- /dev/null +++ b/3.x/doc/en/logger.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/manual-install.html b/3.x/doc/en/manual-install.html new file mode 100644 index 00000000000..4be1c3ce242 --- /dev/null +++ b/3.x/doc/en/manual-install.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/mbean.html b/3.x/doc/en/mbean.html new file mode 100644 index 00000000000..59057c1b2c5 --- /dev/null +++ b/3.x/doc/en/mbean.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/mc.html b/3.x/doc/en/mc.html new file mode 100644 index 00000000000..54b30822ecf --- /dev/null +++ b/3.x/doc/en/mc.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/memory.html b/3.x/doc/en/memory.html new file mode 100644 index 00000000000..25e224c8681 --- /dev/null +++ b/3.x/doc/en/memory.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/monitor.html b/3.x/doc/en/monitor.html new file mode 100644 index 00000000000..3c97526ec19 --- /dev/null +++ b/3.x/doc/en/monitor.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/ognl.html b/3.x/doc/en/ognl.html new file mode 100644 index 00000000000..177d725571d --- /dev/null +++ b/3.x/doc/en/ognl.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/options.html b/3.x/doc/en/options.html new file mode 100644 index 00000000000..a6e995d6eff --- /dev/null +++ b/3.x/doc/en/options.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/perfcounter.html b/3.x/doc/en/perfcounter.html new file mode 100644 index 00000000000..12bf2a8959e --- /dev/null +++ b/3.x/doc/en/perfcounter.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/profiler.html b/3.x/doc/en/profiler.html new file mode 100644 index 00000000000..0a68f160e69 --- /dev/null +++ b/3.x/doc/en/profiler.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/pwd.html b/3.x/doc/en/pwd.html new file mode 100644 index 00000000000..507f83c8785 --- /dev/null +++ b/3.x/doc/en/pwd.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/quick-start.html b/3.x/doc/en/quick-start.html new file mode 100644 index 00000000000..a88eab75933 --- /dev/null +++ b/3.x/doc/en/quick-start.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/quit.html b/3.x/doc/en/quit.html new file mode 100644 index 00000000000..21080e39bb2 --- /dev/null +++ b/3.x/doc/en/quit.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/redefine.html b/3.x/doc/en/redefine.html new file mode 100644 index 00000000000..0bbda21088c --- /dev/null +++ b/3.x/doc/en/redefine.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/release-notes.html b/3.x/doc/en/release-notes.html new file mode 100644 index 00000000000..7228b1a9343 --- /dev/null +++ b/3.x/doc/en/release-notes.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/reset.html b/3.x/doc/en/reset.html new file mode 100644 index 00000000000..4c34a794278 --- /dev/null +++ b/3.x/doc/en/reset.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/retransform.html b/3.x/doc/en/retransform.html new file mode 100644 index 00000000000..ae577764eb3 --- /dev/null +++ b/3.x/doc/en/retransform.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/save-log.html b/3.x/doc/en/save-log.html new file mode 100644 index 00000000000..1dc7d7fc69b --- /dev/null +++ b/3.x/doc/en/save-log.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/sc.html b/3.x/doc/en/sc.html new file mode 100644 index 00000000000..908179f3476 --- /dev/null +++ b/3.x/doc/en/sc.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/session.html b/3.x/doc/en/session.html new file mode 100644 index 00000000000..0c93df3caae --- /dev/null +++ b/3.x/doc/en/session.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/sm.html b/3.x/doc/en/sm.html new file mode 100644 index 00000000000..3983264e73a --- /dev/null +++ b/3.x/doc/en/sm.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/spring-boot-starter.html b/3.x/doc/en/spring-boot-starter.html new file mode 100644 index 00000000000..1b0545e03f5 --- /dev/null +++ b/3.x/doc/en/spring-boot-starter.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/stack.html b/3.x/doc/en/stack.html new file mode 100644 index 00000000000..9661b5f8484 --- /dev/null +++ b/3.x/doc/en/stack.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/start-arthas.html b/3.x/doc/en/start-arthas.html new file mode 100644 index 00000000000..8d39cccdd6d --- /dev/null +++ b/3.x/doc/en/start-arthas.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/stop.html b/3.x/doc/en/stop.html new file mode 100644 index 00000000000..258d8f57e62 --- /dev/null +++ b/3.x/doc/en/stop.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/sysenv.html b/3.x/doc/en/sysenv.html new file mode 100644 index 00000000000..b0522dcb047 --- /dev/null +++ b/3.x/doc/en/sysenv.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/sysprop.html b/3.x/doc/en/sysprop.html new file mode 100644 index 00000000000..77364877159 --- /dev/null +++ b/3.x/doc/en/sysprop.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/tee.html b/3.x/doc/en/tee.html new file mode 100644 index 00000000000..5c8ab65df96 --- /dev/null +++ b/3.x/doc/en/tee.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/thread.html b/3.x/doc/en/thread.html new file mode 100644 index 00000000000..9747fbb809f --- /dev/null +++ b/3.x/doc/en/thread.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/trace.html b/3.x/doc/en/trace.html new file mode 100644 index 00000000000..44538c3f537 --- /dev/null +++ b/3.x/doc/en/trace.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/tt.html b/3.x/doc/en/tt.html new file mode 100644 index 00000000000..da66bb25089 --- /dev/null +++ b/3.x/doc/en/tt.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/tunnel.html b/3.x/doc/en/tunnel.html new file mode 100644 index 00000000000..5d7a8fcc791 --- /dev/null +++ b/3.x/doc/en/tunnel.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/version.html b/3.x/doc/en/version.html new file mode 100644 index 00000000000..bb3e66474ee --- /dev/null +++ b/3.x/doc/en/version.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/vmoption.html b/3.x/doc/en/vmoption.html new file mode 100644 index 00000000000..1e25e3f77b0 --- /dev/null +++ b/3.x/doc/en/vmoption.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/vmtool.html b/3.x/doc/en/vmtool.html new file mode 100644 index 00000000000..8963699d99d --- /dev/null +++ b/3.x/doc/en/vmtool.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/watch.html b/3.x/doc/en/watch.html new file mode 100644 index 00000000000..df0ada2c51a --- /dev/null +++ b/3.x/doc/en/watch.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/en/web-console.html b/3.x/doc/en/web-console.html new file mode 100644 index 00000000000..36e28b27327 --- /dev/null +++ b/3.x/doc/en/web-console.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/doc/faq.html b/3.x/doc/faq.html new file mode 100644 index 00000000000..5a36451476e --- /dev/null +++ b/3.x/doc/faq.html @@ -0,0 +1,47 @@ + + + + + + + + + FAQ | arthas + + + + +
    目录

    FAQ

    提示

    不在本列表里的问题,请到 issue 里搜索。 https://github.com/alibaba/arthas/issues在新窗口打开

    日志文件在哪里?

    日志文件路径: ~/logs/arthas/arthas.log

    Arthas attach 之后对原进程性能有多大的影响

    https://github.com/alibaba/arthas/issues/44在新窗口打开

    target process not responding or HotSpot VM not loaded

    com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded

    1. 检查当前用户和目标 java 进程是否一致。如果不一致,则切换到同一用户。JVM 只能 attach 同样用户下的 java 进程。
    2. 尝试使用 jstack -l $pid,如果进程没有反应,则说明进程可能假死,无法响应 JVM attach 信号。所以同样基于 attach 机制的 Arthas 无法工作。尝试使用jmap heapdump 后分析。
    3. 尝试按quick-start里的方式 attach math-game。
    4. 更多情况参考: https://github.com/alibaba/arthas/issues/347在新窗口打开

    trace/watch 等命令能否增强 jdk 里的类?

    默认情况下会过滤掉java.开头的类和被BootStrap ClassLoader加载的类。可以通过参数开启。

    options unsafe true
    +

    更多参考 options

    提示

    通过 java.lang.instrument.Instrumentation#appendToBootstrapClassLoaderSearch append 到Bootstrap ClassLoader的 jar 包需要开启 unsafe。

    怎么以json格式查看结果

    options json-format true
    +

    更多参考 options

    Arthas 能否跟踪 native 函数

    不能。

    能不能查看内存里某个变量的值

    1. 可以使用vmtool命令。
    2. 可以用一些技巧,用tt命令拦截到对象,或者从静态函数里取到对象。

    方法同名过滤

    同名方法过滤可以通过匹配表达式,可以使用表达式核心变量中所有变量作为已知条件,可以通过判断参数个数params.length ==1, 参数类型params[0] instanceof java.lang.Integer、返回值类型 returnObj instanceof java.util.List 等等一种或者多种组合进行过滤。

    可以使用 -v 查看观察匹配表达式的执行结果 https://github.com/alibaba/arthas/issues/1348在新窗口打开

    例子math-game

    watch demo.MathGame primeFactors '{params,returnObj,throwExp}' 'params.length >0 && returnObj instanceof java.util.List' -v
    +

    怎么 watch、trace 构造函数 ?

    watch demo.MathGame <init> '{params,returnObj,throwExp}' -v
    +

    怎样 watch、trace 内部类?

    在 JVM 规范里内部类的格式是OuterClass$InnerClass

    watch OuterClass$InnerClass
    +

    输入中文/Unicode 字符

    把中文/Unicode 字符转为\u表示方法:

    ognl '@java.lang.System@out.println("Hello \u4e2d\u6587")'
    +

    java.lang.ClassFormatError: null、skywalking arthas 兼容使用

    当出现这个错误日志java.lang.ClassFormatError: null,通常情况下都是被其他字节码工具修改过与 arthas 修改字节码不兼容。

    比如: 使用 skywalking V8.1.0 以下版本 无法 trace、watch 被 skywalking agent 增强过的类在新窗口打开, V8.1.0 以上版本可以兼容使用,更多参考 skywalking 配置 skywalking compatible with other javaagent bytecode processing在新窗口打开

    class redefinition failed: attempted to change the schema (add/remove fields)

    参考: https://github.com/alibaba/arthas/issues/2165在新窗口打开

    Arthas 能不能离线使用

    可以。下载全量包解压即可,参考: 下载

    Attach docker/k8s 里的 pid 为 1 的进程失败

    参考: https://github.com/alibaba/arthas/issues/362#issuecomment-448185416在新窗口打开

    为什么下载了新版本的 Arthas,连接的却是旧版本?

    比如启动的 as3.sh/arthas-boot3.jar 版本是 3.5._ 的,但是连接上之后,打印的 arthas 版本是 3.4._ 的。

    可能是之前使用旧版本的 arthas 诊断过目标进程。可以先执行stop停止掉旧版本的 arthas,再重新使用新版本 attach。

    + + + diff --git a/3.x/doc/getstatic.html b/3.x/doc/getstatic.html new file mode 100644 index 00000000000..76613beea25 --- /dev/null +++ b/3.x/doc/getstatic.html @@ -0,0 +1,74 @@ + + + + + + + + + getstatic | arthas + + + + +
    目录

    getstatic

    getstatic在线教程在新窗口打开

    使用参考

    • 推荐直接使用ognl命令,更加灵活。

    通过 getstatic 命令可以方便的查看类的静态属性。使用方法为getstatic class_name field_name

    $ getstatic demo.MathGame random
    +field: random
    +@Random[
    +    serialVersionUID=@Long[3905348978240129619],
    +    seed=@AtomicLong[120955813885284],
    +    multiplier=@Long[25214903917],
    +    addend=@Long[11],
    +    mask=@Long[281474976710655],
    +    DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +    BadBound=@String[bound must be positive],
    +    BadRange=@String[bound must be greater than origin],
    +    BadSize=@String[size must be non-negative],
    +    seedUniquifier=@AtomicLong[-3282039941672302964],
    +    nextNextGaussian=@Double[0.0],
    +    haveNextNextGaussian=@Boolean[false],
    +    serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +    unsafe=@Unsafe[sun.misc.Unsafe@2eaa1027],
    +    seedOffset=@Long[24],
    +]
    +
    • 指定 classLoader

    注意 hashcode 是变化的,需要先查看当前的 ClassLoader 信息,使用sc -d <ClassName>提取对应 ClassLoader 的 hashcode。

    如果你使用-c,你需要手动输入 hashcode:-c <hashcode>

    $ getstatic -c 3d4eac69 demo.MathGame random
    +

    对于只有唯一实例的 ClassLoader 可以通过--classLoaderClass指定 class name,使用起来更加方便:

    getstatic --classLoaderClass sun.misc.Launcher$AppClassLoader demo.MathGame random

    • 注: 这里 classLoaderClass 在 java 8 是 sun.misc.Launcher$AppClassLoader,而java 11的classloader是jdk.internal.loader.ClassLoaders$AppClassLoader,killercoda 目前环境是 java11。

    --classLoaderClass 的值是 ClassLoader 的类名,只有匹配到唯一的 ClassLoader 实例时才能工作,目的是方便输入通用命令,而-c <hashcode>是动态变化的。

    如果该静态属性是一个复杂对象,还可以支持在该属性上通过 ognl 表示进行遍历,过滤,访问对象的内部属性等操作。

    例如,假设 n 是一个 Map,Map 的 Key 是一个 Enum,我们想过滤出 Map 中 Key 为某个 Enum 的值,可以写如下命令

    $ 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],
    +]
    +
    + + + diff --git a/3.x/doc/grep.html b/3.x/doc/grep.html new file mode 100644 index 00000000000..7f61c445789 --- /dev/null +++ b/3.x/doc/grep.html @@ -0,0 +1,70 @@ + + + + + + + + + grep | arthas + + + + +
    目录

    grep

    grep在线教程在新窗口打开

    提示

    类似传统的grep命令。

    使用参考

     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
    +
    + + + diff --git a/3.x/doc/groovy.html b/3.x/doc/groovy.html new file mode 100644 index 00000000000..b95dfa1ed0a --- /dev/null +++ b/3.x/doc/groovy.html @@ -0,0 +1,164 @@ + + + + + + + + + groovy | arthas + + + + +
    目录

    groovy

    提示

    Arthas 支持 groovy 脚本增强,允许像 BTrace 一样编写脚本来解决问题,可以在 groovy 脚本中进行 if/for/switch/while 等控制语句,不受限制,但相比 BTrace 而言拥有更多的限制范围。

    限制内容

    1. 禁止改变原有逻辑,与 watch 等命令一样,重点保证的是监听和观察。
    2. 只允许在方法的 before/success/exception/finish 四个环节进行监听。

    参数说明

    参数名称参数说明
    class-pattern类名表达式匹配
    method-pattern方法名表达式匹配
    script-filepathgroovy 脚本的绝对路径
    [S]匹配所有的子类
    [E]开启正则表达式匹配,默认为通配符匹配

    需要说明的是,第三个输入参数是脚本的绝对路径,比如 /tmp/test.groovy,不建议输入相对路径,比如 ./test.groovy

    五个关键函数声明

    /**
    + * 增强脚本监听器
    + */
    +interface ScriptListener {
    +
    +    /**
    +     * 脚本创建
    +     *
    +     * @param output 输出器
    +     */
    +    void create(Output output);
    +
    +    /**
    +     * 脚本销毁
    +     *
    +     * @param output 输出器
    +     */
    +    void destroy(Output output);
    +
    +    /**
    +     * 方法执行前
    +     *
    +     * @param output 输出器
    +     * @param advice 通知点
    +     */
    +    void before(Output output, Advice advice);
    +
    +    /**
    +     * 方法正常返回
    +     *
    +     * @param output 输出器
    +     * @param advice 通知点
    +     */
    +    void afterReturning(Output output, Advice advice);
    +
    +    /**
    +     * 方法异常返回
    +     *
    +     * @param output 输出器
    +     * @param advice 通知点
    +     */
    +    void afterThrowing(Output output, Advice advice);
    +
    +}
    +

    参数 Advice 说明

    Advice 参数最主要是封装了通知节点的所有信息。参考表达式核心变量中关于该节点的描述。

    参数 Output 说明

    Output 参数只拥有三个方法,主要的工作还是输出对应的文本信息

    /**
    + * 输出器
    + */
    +interface Output {
    +
    +    /**
    +     * 输出字符串(不换行)
    +     *
    +     * @param string 待输出字符串
    +     * @return this
    +     */
    +    Output print(String string);
    +
    +    /**
    +     * 输出字符串(换行)
    +     *
    +     * @param string 待输出字符串
    +     * @return this
    +     */
    +    Output println(String string);
    +
    +    /**
    +     * 结束当前脚本
    +     *
    +     * @return this
    +     */
    +    Output finish();
    +
    +}
    +

    一个输出日志的 groovy 脚本示例

    import com.taobao.arthas.core.command.ScriptSupportCommand
    +import com.taobao.arthas.core.util.Advice
    +
    +import static java.lang.String.format
    +
    +/**
    + * 输出方法日志
    + */
    +public class Logger implements ScriptSupportCommand.ScriptListener {
    +
    +    @Override
    +    void create(ScriptSupportCommand.Output output) {
    +        output.println("script create.");
    +    }
    +
    +    @Override
    +    void destroy(ScriptSupportCommand.Output output) {
    +        output.println("script destroy.");
    +    }
    +
    +    @Override
    +    void before(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("before:class=%s;method=%s;paramslen=%d;%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName(),
    +                advice.getParams().length, advice.getParams()))
    +    }
    +
    +    @Override
    +    void afterReturning(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("returning:class=%s;method=%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName()))
    +    }
    +
    +    @Override
    +    void afterThrowing(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("throwing:class=%s;method=%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName()))
    +    }
    +}
    +

    使用示例:

    $ 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;
    +
    + + + diff --git a/3.x/doc/heapdump.html b/3.x/doc/heapdump.html new file mode 100644 index 00000000000..527f933bc3c --- /dev/null +++ b/3.x/doc/heapdump.html @@ -0,0 +1,50 @@ + + + + + + + + + heapdump | arthas + + + + +
    目录

    heapdump

    heapdump在线教程在新窗口打开

    提示

    dump java heap, 类似 jmap 命令的 heap dump 功能。

    使用参考

    dump 到指定文件

    [arthas@58205]$ heapdump arthas-output/dump.hprof
    +Dumping heap to arthas-output/dump.hprof ...
    +Heap dump file created
    +

    提示

    生成文件在arthas-output目录,可以通过浏览器下载: http://localhost:8563/arthas-output/

    只 dump live 对象

    [arthas@58205]$ heapdump --live /tmp/dump.hprof
    +Dumping heap to /tmp/dump.hprof ...
    +Heap dump file created
    +

    dump 到临时文件

    [arthas@58205]$ heapdump
    +Dumping heap to /var/folders/my/wy7c9w9j5732xbkcyt1mb4g40000gp/T/heapdump2019-09-03-16-385121018449645518991.hprof...
    +Heap dump file created
    +
    + + + diff --git a/3.x/doc/help.html b/3.x/doc/help.html new file mode 100644 index 00000000000..718a2fe4cd7 --- /dev/null +++ b/3.x/doc/help.html @@ -0,0 +1,106 @@ + + + + + + + + + help | arthas + + + + +
    目录

    help

    查看命令帮助信息,可以查看当前 arthas 版本支持的指令,或者查看具体指令的使用说明。

    提示

    [help 指令]的等同于[指令 -help],都是查看具体指令的使用说明。

    参数说明

    参数名称参数说明
    不接参数查询当前 arthas 版本支持的指令以及指令描述
    [name:]查询具体指令的使用说明

    使用参考

    $ help
    + NAME         DESCRIPTION
    + help         Display Arthas Help
    + auth         Authenticates the current session
    + keymap       Display all the available keymap for the specified connection.
    + sc           Search all the classes loaded by JVM
    + sm           Search the method of classes loaded by JVM
    + classloader  Show classloader info
    + jad          Decompile class
    + getstatic    Show the static field of a class
    + monitor      Monitor method execution statistics, e.g. total/success/failure count, average rt, fail rate, etc.
    + stack        Display the stack trace for the specified class and method
    + thread       Display thread info, thread stack
    + trace        Trace the execution time of specified method invocation.
    + watch        Display the input/output parameter, return object, and thrown exception of specified method invocation
    + tt           Time Tunnel
    + jvm          Display the target JVM information
    + perfcounter  Display the perf counter information.
    + ognl         Execute ognl expression.
    + mc           Memory compiler, compiles java files into bytecode and class files in memory.
    + redefine     Redefine classes. @see Instrumentation#redefineClasses(ClassDefinition...)
    + retransform  Retransform classes. @see Instrumentation#retransformClasses(Class...)
    + dashboard    Overview of target jvm's thread, memory, gc, vm, tomcat info.
    + dump         Dump class byte array from JVM
    + heapdump     Heap dump
    + options      View and change various Arthas options
    + cls          Clear the screen
    + reset        Reset all the enhanced classes
    + version      Display Arthas version
    + session      Display current session information
    + sysprop      Display, and change the system properties.
    + sysenv       Display the system env.
    + vmoption     Display, and update the vm diagnostic options.
    + logger       Print logger info, and update the logger level
    + history      Display command history
    + cat          Concatenate and print files
    + base64       Encode and decode using Base64 representation
    + echo         write arguments to the standard output
    + pwd          Return working directory name
    + mbean        Display the mbean information
    + grep         grep command for pipes.
    + tee          tee command for pipes.
    + profiler     Async Profiler. https://github.com/jvm-profiling-tools/async-profiler
    + stop         Stop/Shutdown Arthas server and exit the console.
    +
    +
    +
     $ help dashboard
    +  USAGE:
    +   dashboard [-h] [-i <value>] [-n <value>]
    +
    + SUMMARY:
    +   Overview of target jvm's thread, memory, gc, vm, tomcat info.
    +
    + EXAMPLES:
    +   dashboard
    +   dashboard -n 10
    +   dashboard -i 2000
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/dashboard
    +
    + OPTIONS:
    + -h, --help                              this help
    + -i, --interval <value>                  The interval (in ms) between two executions, default is 5000 ms.
    + -n, --number-of-execution <value>       The number of times this command will be executed.
    +
    + + + diff --git a/3.x/doc/history.html b/3.x/doc/history.html new file mode 100644 index 00000000000..d834fd1d646 --- /dev/null +++ b/3.x/doc/history.html @@ -0,0 +1,50 @@ + + + + + + + + + history | arthas + + + + +
    目录

    history

    打印命令历史。

    提示

    历史指令会通过一个名叫 history 的文件持久化,所以 history 指令可以查看当前 arthas 服务器的所有历史命令,而不仅只是当前次会话使用过的命令。

    参数说明

    参数名称参数说明
    [c:]清空历史指令
    [n:]显示最近执行的 n 条指令

    使用参考

    #查看最近执行的3条指令
    +$ history 3
    +  269  thread
    +  270  cls
    +  271  history 3
    +
     #清空指令
    + $ history -c
    + $ history 3
    +  1  history 3
    +
    + + + diff --git a/3.x/doc/http-api.html b/3.x/doc/http-api.html new file mode 100644 index 00000000000..b3bef1f985d --- /dev/null +++ b/3.x/doc/http-api.html @@ -0,0 +1,384 @@ + + + + + + + + + Http API | arthas + + + + +
    目录

    Http API

    Http API在线教程在新窗口打开

    概览

    Http API 提供类似 RESTful 的交互接口,请求和响应均为 JSON 格式的数据。相对于 Telnet/WebConsole 的输出非结构化文本数据,Http API 可以提供结构化的数据,支持更复杂的交互功能,比如特定应用场景的一系列诊断操作。

    访问地址

    Http API 接口地址为:http://ip:port/api,必须使用 POST 方式提交请求参数。如 POST http://127.0.0.1:8563/api

    注意:telnet 服务的 3658 端口与 Chrome 浏览器有兼容性问题,建议使用 http 端口 8563 来访问 http 接口。

    请求数据格式

    {
    +  "action": "exec",
    +  "requestId": "req112",
    +  "sessionId": "94766d3c-8b39-42d3-8596-98aee3ccbefb",
    +  "consumerId": "955dbd1325334a84972b0f3ac19de4f7_2",
    +  "command": "version",
    +  "execTimeout": "10000"
    +}
    +

    请求数据格式说明:

    • action : 请求的动作/行为,可选值请参考"请求 Action"小节。
    • requestId : 可选请求 ID,由客户端生成。
    • sessionId : Arthas 会话 ID,一次性命令不需要设置会话 ID。
    • consumerId : Arthas 消费者 ID,用于多人共享会话。
    • command : Arthas command line 。
    • execTimeout : 命令同步执行的超时时间(ms),默认为 30000。

    注意: 不同的 action 使用到参数不同,根据具体的 action 来设置参数。

    请求 Action

    目前支持的请求 Action 如下:

    • exec : 同步执行命令,命令正常结束或者超时后中断命令执行后返回命令的执行结果。
    • async_exec : 异步执行命令,立即返回命令的调度结果,命令执行结果通过pull_results获取。
    • interrupt_job : 中断会话当前的命令,类似 Telnet Ctrl + c的功能。
    • pull_results : 获取异步执行的命令的结果,以 http 长轮询(long-polling)方式重复执行
    • init_session : 创建会话
    • join_session : 加入会话,用于支持多人共享同一个 Arthas 会话
    • close_session : 关闭会话

    响应状态

    响应中的 state 属性表示请求处理状态,取值如下:

    • SCHEDULED:异步执行命令时表示已经创建 job 并已提交到命令执行队列,命令可能还没开始执行或者执行中;
    • SUCCEEDED:请求处理成功(完成状态);
    • FAILED:请求处理失败(完成状态),通常附带 message 说明原因;
    • REFUSED:请求被拒绝(完成状态),通常附带 message 说明原因;

    一次性命令

    与执行批处理命令类似,一次性命令以同步方式执行。不需要创建会话,不需要设置sessionId选项。

    {
    +  "action": "exec",
    +  "command": "<Arthas command line>"
    +}
    +

    比如获取 Arthas 版本号:

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"exec",
    +  "command":"version"
    +}
    +'
    +

    响应内容如下:

    {
    +  "state": "SUCCEEDED",
    +  "sessionId": "ee3bc004-4586-43de-bac0-b69d6db7a869",
    +  "body": {
    +    "results": [
    +      {
    +        "type": "version",
    +        "version": "3.3.7",
    +        "jobId": 5
    +      },
    +      {
    +        "jobId": 5,
    +        "statusCode": 0,
    +        "type": "status"
    +      }
    +    ],
    +    "timeExpired": false,
    +    "command": "version",
    +    "jobStatus": "TERMINATED",
    +    "jobId": 5
    +  }
    +}
    +

    响应数据解析:

    • state: 请求处理状态,参考“接口响应状态”说明
    • sessionId : Arthas 会话 ID,一次性命令自动创建及销毁临时会话
    • body.jobId: 命令的任务 ID,同一任务输出的所有 Result 都是相同的 jobId
    • body.jobStatus: 任务状态,同步执行正常结束为TERMINATED
    • body.timeExpired: 任务执行是否超时
    • body/results: 命令执行的结果列表

    命令结果格式说明

    [
    +  {
    +    "type": "version",
    +    "version": "3.3.7",
    +    "jobId": 5
    +  },
    +  {
    +    "jobId": 5,
    +    "statusCode": 0,
    +    "type": "status"
    +  }
    +]
    +
    • type : 命令结果类型,除了status等特殊的几个外,其它的保持与 Arthas 命令名称一致。请参考"特殊命令结果"小节。
    • jobId : 处理命令的任务 ID。
    • 其它字段为每个不同命令的数据。

    注意:也可以使用一次性命令的方式执行 watch/trace 等连续输出的命令,但不能中断命令执行,可能出现长时间没有结束的问题。请参考"watch 命令输出 map 对象"小节的示例。

    请尽量按照以下方式处理:

    • 设置合理的execTimeout,到达超时时间后强制中断命令执行,避免长时间挂起。
    • 通过-n参数指定较少的执行次数。
    • 保证命令匹配的方法可以成功命中和 condition-express 编写正确,如果 watch/trace 没有命中就算指定-n 1也会挂起等待到执行超时。

    会话交互

    由用户创建及管理 Arthas 会话,适用于复杂的交互过程。访问流程如下:

    • 创建会话
    • 加入会话(可选)
    • 拉取命令结果
    • 执行一系列命令
    • 中断命令执行
    • 关闭会话

    创建会话

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"init_session"
    +}
    +'
    +

    响应结果:

    {
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId": "5ae4e5fbab8b4e529ac404f260d4e2d1_1",
    +  "state": "SUCCEEDED"
    +}
    +

    当前会话 ID 为: b09f1353-202c-407b-af24-701b744f971e, 当前消费者 ID 为:5ae4e5fbab8b4e529ac404f260d4e2d1_1

    加入会话

    指定要加入的会话 ID,服务端将分配一个新的消费者 ID。多个消费者可以接收到同一个会话的命令结果。本接口用于支持多人共享同一个会话或刷新页面后重新拉取会话历史记录。

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"join_session",
    +  "sessionId" : "b09f1353-202c-407b-af24-701b744f971e"
    +}
    +'
    +

    响应结果:

    {
    +  "consumerId": "8f7f6ad7bc2d4cb5aa57a530927a95cc_2",
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "state": "SUCCEEDED"
    +}
    +

    新的消费者 ID 为8f7f6ad7bc2d4cb5aa57a530927a95cc_2

    拉取命令结果

    拉取命令结果消息的 action 为pull_results。请使用 Http long-polling 方式,定时循环拉取结果消息。 消费者的超时时间为 5 分钟,超时后需要调用join_session分配新的消费者。每个消费者单独分配一个缓存队列,按顺序拉取命令结果,不会影响到其它消费者。

    请求参数需要指定会话 ID 及消费者 ID:

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"pull_results",
    +  "sessionId" : "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId" : "8f7f6ad7bc2d4cb5aa57a530927a95cc_2"
    +}
    +'
    +

    用 Bash 脚本定时拉取结果消息:

    while true; do curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"pull_results",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +  "consumerId" : "8ecb9cb7c7804d5d92e258b23d5245cc_1"
    +}
    +' | json_pp; sleep 2; done
    +

    注: json_pp 工具将输出内容格式化为 pretty json。

    响应内容如下:

    {
    +  "body": {
    +    "results": [
    +      {
    +        "inputStatus": "DISABLED",
    +        "jobId": 0,
    +        "type": "input_status"
    +      },
    +      {
    +        "type": "message",
    +        "jobId": 0,
    +        "message": "Welcome to arthas!"
    +      },
    +      {
    +        "tutorials": "https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html",
    +        "time": "2020-08-06 15:56:43",
    +        "type": "welcome",
    +        "jobId": 0,
    +        "pid": "7909",
    +        "wiki": "https://arthas.aliyun.com/3.x/doc",
    +        "version": "3.3.7"
    +      },
    +      {
    +        "inputStatus": "ALLOW_INPUT",
    +        "type": "input_status",
    +        "jobId": 0
    +      }
    +    ]
    +  },
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId": "8f7f6ad7bc2d4cb5aa57a530927a95cc_2",
    +  "state": "SUCCEEDED"
    +}
    +

    异步执行命令

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"async_exec",
    +  "command":"watch demo.MathGame primeFactors \"{params, returnObj, throwExp}\" ",
    +   "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +

    async_exec 的结果:

    {
    +  "sessionId": "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +  "state": "SCHEDULED",
    +  "body": {
    +    "jobStatus": "READY",
    +    "jobId": 3,
    +    "command": "watch demo.MathGame primeFactors \"{params, returnObj, throwExp}\" "
    +  }
    +}
    +
    • state : SCHEDULED 状态表示已经解析命令生成任务,但未开始执行。
    • body.jobId : 异步执行命令的任务 ID,可以根据此任务 ID 来过滤在pull_results输出的命令结果。
    • body.jobStatus : 任务状态READY表示未开始执行。

    查看上面自动拉取结果消息脚本的 shell 输出:

    {
    +   "body" : {
    +      "results" : [
    +         {
    +            "type" : "command",
    +            "jobId" : 3,
    +            "state" : "SCHEDULED",
    +            "command" : "watch demo.MathGame primeFactors \"{params, returnObj, throwExp}\" "
    +         },
    +         {
    +            "inputStatus" : "ALLOW_INTERRUPT",
    +            "jobId" : 0,
    +            "type" : "input_status"
    +         },
    +         {
    +            "success" : true,
    +            "jobId" : 3,
    +            "effect" : {
    +               "listenerId" : 3,
    +               "cost" : 24,
    +               "classCount" : 1,
    +               "methodCount" : 1
    +            },
    +            "type" : "enhancer"
    +         },
    +         {
    +            "sizeLimit" : 10485760,
    +            "expand" : 1,
    +            "jobId" : 3,
    +            "type" : "watch",
    +            "cost" : 0.071499,
    +            "ts" : 1596703453237,
    +            "value" : [
    +               [
    +                  -170365
    +               ],
    +               null,
    +               {
    +                  "stackTrace" : [
    +                     {
    +                        "className" : "demo.MathGame",
    +                        "classLoaderName" : "app",
    +                        "methodName" : "primeFactors",
    +                        "nativeMethod" : false,
    +                        "lineNumber" : 46,
    +                        "fileName" : "MathGame.java"
    +                     },
    +                     ...
    +                  ],
    +                  "localizedMessage" : "number is: -170365, need >= 2",
    +                  "@type" : "java.lang.IllegalArgumentException",
    +                  "message" : "number is: -170365, need >= 2"
    +               }
    +            ]
    +         },
    +         {
    +            "type" : "watch",
    +            "cost" : 0.033375,
    +            "jobId" : 3,
    +            "ts" : 1596703454241,
    +            "value" : [
    +               [
    +                  1
    +               ],
    +               [
    +                  2,
    +                  2,
    +                  2,
    +                  2,
    +                  13,
    +                  491
    +               ],
    +               null
    +            ],
    +            "sizeLimit" : 10485760,
    +            "expand" : 1
    +         }
    +      ]
    +   },
    +   "consumerId" : "8ecb9cb7c7804d5d92e258b23d5245cc_1",
    +   "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +   "state" : "SUCCEEDED"
    +}
    +

    watch 命令结果的value为 watch-experss 的值,上面命令中为{params, returnObj, throwExp},所以 watch 结果的 value 为一个长度为 3 的数组,每个元素分别对应相应顺序的表达式。 请参考"watch 命令输出 map 对象"小节。

    中断命令执行

    中断会话正在运行的前台 Job(前台任务):

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"interrupt_job",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +
    {
    +   "state" : "SUCCEEDED",
    +   "body" : {
    +      "jobStatus" : "TERMINATED",
    +      "jobId" : 3
    +   }
    +}
    +

    关闭会话

    指定会话 ID,关闭会话。

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"close_session",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +
    {
    +  "state": "SUCCEEDED"
    +}
    +

    鉴权

    参考: auth

    Web UI

    一个基于 Http API 接口实现的 Web UI,访问地址为: http://127.0.0.1:8563/ui在新窗口打开

    已实现功能:

    • 创建会话
    • 复制并打开 url 加入会话,多人共享会话
    • 周期性拉取会话命令结果消息
    • 刷新页面或者加入会话拉取会话历史命令消息
    • 输入命令/中断命令状态控制

    待开发功能:

    • 改进将命令结果消息可读性
    • 命令输入支持自动完成及命令模板
    • 提供命令帮助
    • 支持个人选项设置

    特殊命令结果

    status

    {
    +  "jobId": 5,
    +  "statusCode": 0,
    +  "type": "status"
    +}
    +

    typestatus表示命令执行状态:

    每个命令执行结束后都有唯一一个 status 结果。statusCode 为 0 表示执行成功,statusCode 为非 0 值表示执行失败,类似进程退出码(exit code)。

    命令执行失败时一般会提供错误消息,如:

    {
    +  "jobId": 3,
    +  "message": "The argument 'class-pattern' is required",
    +  "statusCode": -10,
    +  "type": "status"
    +}
    +

    input_status

    {
    +  "inputStatus": "ALLOW_INPUT",
    +  "type": "input_status",
    +  "jobId": 0
    +}
    +

    typeinput_status表示输入状态:

    用于 UI 交互时控制用户输入,每次执行命令前后会发送改变的消息。 inputStatus 的值说明:

    • ALLOW_INPUT : 允许用户输入命令,表示会话没有在执行的前台命令,可以接受新的命令。
    • ALLOW_INTERRUPT : 允许用户中断命令执行,表示当前正在执行命令,用户可以发送interrupt_job中断执行。
    • DISABLED : 禁用状态,不能输入命令也不能中断命令。

    command

    {
    +  "type": "command",
    +  "jobId": 3,
    +  "state": "SCHEDULED",
    +  "command": "watch demo.MathGame primeFactors \"{params, returnObj, throwExp}\" "
    +}
    +

    typecommand表示输入的命令数据:

    用于交互 UI 回显用户输入的命令,拉取的会话命令消息历史会包含command类型的消息,按顺序处理即可。

    enhancer

    {
    +  "success": true,
    +  "jobId": 3,
    +  "effect": {
    +    "listenerId": 3,
    +    "cost": 24,
    +    "classCount": 1,
    +    "methodCount": 1
    +  },
    +  "type": "enhancer"
    +}
    +

    typeenhancer表示类增强结果:

    trace/watch/jad/tt等命令需要对类进行增强,会接收到这个enhancer结果。可能出现enhancer结果成功,但没有命中方法的情况,客户端可以根据enhancer结果提示用户。

    案例

    获取 Java 应用的 Classpath

    通过 Http api 查询 Java 应用的 System properties,提取java.class.path的值。

    json_data=$(curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"exec",
    +  "command":"sysprop"
    +}')
    +
    • 使用sed提取值:
    class_path=$(echo $json_data | tr -d '\n' | sed 's/.*"java.class.path":"\([^"]*\).*/\1/')
    +echo "classpath: $class_path"
    +
    • 使用json_pp/awk提取值
    class_path=$(echo $json_data | tr -d '\n' | json_pp | grep java.class.path | awk -F'"' '{ print $4 }')
    +echo "classpath: $class_path"
    +

    输出内容:

    classpath: demo-arthas-spring-boot.jar
    +

    注意:

    • echo $json_data | tr -d '\n' : 删除换行符(line.separator的值),避免影响sed/json_pp命令处理。
    • awk -F'"' '{ print $4 }' : 使用双引号作为分隔符号

    watch 命令输出 map 对象

    watch 的结果值由计算watch-express ognl 表达式产生,可以通过改变 ognl 表达式来生成想要的值,请参考OGNL 文档在新窗口打开

    提示

    Maps can also be created using a special syntax.

    #{ "foo" : "foo value", "bar" : "bar value" }

    This creates a Map initialized with mappings for "foo" and "bar".

    下面的命令生成 map 格式的值:

    watch *MathGame prime* '#{ "params" : params, "returnObj" : returnObj, "throwExp": throwExp}' -x 2 -n 5
    +

    在 Telnet shell/WebConsole 中执行上面的命令,输出的结果:

    ts=2020-08-06 16:57:20; [cost=0.241735ms] result=@LinkedHashMap[
    +    @String[params]:@Object[][
    +        @Integer[1],
    +    ],
    +    @String[returnObj]:@ArrayList[
    +        @Integer[2],
    +        @Integer[241],
    +        @Integer[379],
    +    ],
    +    @String[throwExp]:null,
    +]
    +

    用 Http api 执行上面的命令,注意对 JSON 双引号转义:

    curl -Ss -XPOST http://localhost:8563/api -d @- << EOF
    +{
    +  "action":"exec",
    +  "execTimeout": 30000,
    +  "command":"watch *MathGame prime* '#{ \"params\" : params, \"returnObj\" : returnObj, \"throwExp\": throwExp}' -n 3 "
    +}
    +EOF
    +

    Http api 执行结果:

    {
    +    "body": {
    +         ...
    +        "results": [
    +            ...
    +            {
    +                ...
    +                "type": "watch",
    +                "value": {
    +                    "params": [
    +                        1
    +                    ],
    +                    "returnObj": [
    +                        2,
    +                        5,
    +                        17,
    +                        23,
    +                        23
    +                    ]
    +                }
    +            },
    +            {
    +                ...
    +                "type": "watch",
    +                "value": {
    +                    "params": [
    +                        -98278
    +                    ],
    +                    "throwExp": {
    +                        "@type": "java.lang.IllegalArgumentException",
    +                        "localizedMessage": "number is: -98278, need >= 2",
    +                        "message": "number is: -98278, need >= 2",
    +                        "stackTrace": [
    +                            ...
    +                        ]
    +                    }
    +                }
    +            },
    +            ...
    +}
    +

    可以看到 watch 结果的 value 变成 map 对象,程序可以通过 key 读取结果。

    + + + diff --git a/3.x/doc/idea-plugin.html b/3.x/doc/idea-plugin.html new file mode 100644 index 00000000000..660f07eb86b --- /dev/null +++ b/3.x/doc/idea-plugin.html @@ -0,0 +1,41 @@ + + + + + + + + + IDEA Plugin | arthas + + + + +
    目录

    IDEA Plugin

    Arthas-idea(部分命令可视化)

    提示

    插件由社区开发者提供。

    Alibaba Cloud Toolkit 热部署组件(一键 retransform)

    提示

    热部署组件支持一键将编辑器中修改的 Java 源码快速编译,并更新到远端应用服务中,免去手动 dump、mc 的过程。此外,也可以一键还原 retransform 的类文件。

    + + + diff --git a/3.x/doc/index.html b/3.x/doc/index.html new file mode 100644 index 00000000000..4f1ca3ba964 --- /dev/null +++ b/3.x/doc/index.html @@ -0,0 +1,41 @@ + + + + + + + + + 简介 | arthas + + + + +
    目录

    简介

    Arthas 是一款线上监控诊断产品,通过全局视角实时查看应用 load、内存、gc、线程的状态信息,并能在不修改应用代码的情况下,对业务问题进行诊断,包括查看方法调用的出入参、异常,监测方法执行耗时,类加载信息等,大大提升线上问题排查效率。

    背景

    通常,本地开发环境无法访问生产环境。如果在生产环境中遇到问题,则无法使用 IDE 远程调试。更糟糕的是,在生产环境中调试是不可接受的,因为它会暂停所有线程,导致服务暂停。

    开发人员可以尝试在测试环境或者预发环境中复现生产环境中的问题。但是,某些问题无法在不同的环境中轻松复现,甚至在重新启动后就消失了。

    如果您正在考虑在代码中添加一些日志以帮助解决问题,您将必须经历以下阶段:测试、预发,然后生产。这种方法效率低下,更糟糕的是,该问题可能无法解决,因为一旦 JVM 重新启动,它可能无法复现,如上文所述。

    Arthas 旨在解决这些问题。开发人员可以在线解决生产问题。无需 JVM 重启,无需代码更改。 Arthas 作为观察者永远不会暂停正在运行的线程。

    Arthas(阿尔萨斯)能为你做什么?

    Arthas 是 Alibaba 开源的 Java 诊断工具,深受开发者喜爱。

    当你遇到以下类似问题而束手无策时,Arthas可以帮助你解决:

    1. 这个类从哪个 jar 包加载的?为什么会报各种类相关的 Exception?
    2. 我改的代码为什么没有执行到?难道是我没 commit?分支搞错了?
    3. 遇到问题无法在线上 debug,难道只能通过加日志再重新发布吗?
    4. 线上遇到某个用户的数据处理有问题,但线上同样无法 debug,线下无法重现!
    5. 是否有一个全局视角来查看系统的运行状况?
    6. 有什么办法可以监控到 JVM 的实时运行状态?
    7. 怎么快速定位应用的热点,生成火焰图?
    8. 怎样直接从 JVM 内查找某个类的实例?

    Arthas 支持 JDK 6+,支持 Linux/Mac/Windows,采用命令行交互模式,同时提供丰富的 Tab 自动补全功能,进一步方便进行问题的定位和诊断。

    如果您在使用 Arthas,请让我们知道,您的使用对我们非常重要:查看在新窗口打开

    Contributors

    在新窗口打开

    + + + diff --git a/3.x/doc/install-detail.html b/3.x/doc/install-detail.html new file mode 100644 index 00000000000..0418fb62232 --- /dev/null +++ b/3.x/doc/install-detail.html @@ -0,0 +1,53 @@ + + + + + + + + + Arthas Install | arthas + + + + +
    目录

    Arthas Install

    快速安装

    使用arthas-boot3(推荐)

    下载arthas-boot3.jar,然后用java -jar的方式启动:

    curl -O https://arthas.aliyun.com/arthas-boot3.jar
    +java -jar arthas-boot3.jar
    +

    打印帮助信息:

    java -jar arthas-boot3.jar -h
    +
    • 如果下载速度比较慢,可以使用 aliyun 的镜像:

      java -jar arthas-boot3.jar --repo-mirror aliyun --use-http
      +

    使用as3.sh

    Arthas 支持在 Linux/Unix/Mac 等平台上一键安装,请复制以下内容,并粘贴到命令行中,敲 回车 执行即可:

    curl -L https://arthas.aliyun.com/install3.sh | sh
    +

    上述命令会下载启动脚本文件 as3.sh 到当前目录,你可以放在任何地方或将其加入到 $PATH 中。

    直接在 shell 下面执行./as3.sh,就会进入交互界面。

    也可以执行./as3.sh -h来获取更多参数信息。

    全量安装

    从 Github Releases 页下载

    https://github.com/alibaba/arthas/releases在新窗口打开

    解压后,在文件夹里有arthas-boot3.jar,直接用java -jar的方式启动:

    java -jar arthas-boot3.jar
    +

    打印帮助信息:

    java -jar arthas-boot3.jar -h
    +

    手动安装

    手动安装

    通过 rpm/deb 来安装

    在 releases 页面下载 rpm/deb 包: https://github.com/alibaba/arthas/releases

    安装 deb

    sudo dpkg -i arthas*.deb
    +

    安装 rpm

    sudo rpm -i arthas*.rpm
    +

    deb/rpm 安装的用法

    在安装后,可以直接执行:

    as3.sh
    +

    通过 Cloud Toolkit 插件使用 Arthas

    卸载

    • 在 Linux/Unix/Mac 平台

      删除下面文件:

      rm -rf ~/.arthas/
      +rm -rf ~/logs/arthas
      +
    • Windows 平台直接删除 user home 下面的.arthaslogs/arthas目录

    + + + diff --git a/3.x/doc/jad.html b/3.x/doc/jad.html new file mode 100644 index 00000000000..495ff7ef438 --- /dev/null +++ b/3.x/doc/jad.html @@ -0,0 +1,159 @@ + + + + + + + + + jad | arthas + + + + +
    目录

    jad

    jad在线教程在新窗口打开

    提示

    反编译指定已加载类的源码

    jad 命令将 JVM 中实际运行的 class 的 byte code 反编译成 java 代码,便于你理解业务逻辑;如需批量下载指定包的目录的 class 字节码可以参考 dump

    • 在 Arthas Console 上,反编译出来的源码是带语法高亮的,阅读更方便
    • 当然,反编译出来的 java 代码可能会存在语法错误,但不影响你进行阅读理解

    参数说明

    参数名称参数说明
    class-pattern类名表达式匹配
    [c:]类所属 ClassLoader 的 hashcode
    [classLoaderClass:]指定执行表达式的 ClassLoader 的 class name
    [E]开启正则表达式匹配,默认为通配符匹配

    使用参考

    反编译java.lang.String

    $ jad java.lang.String
    +
    +ClassLoader:
    +
    +Location:
    +
    +
    +        /*
    +         * Decompiled with CFR.
    +         */
    +        package java.lang;
    +
    +        import java.io.ObjectStreamField;
    +        import java.io.Serializable;
    +...
    +        public final class String
    +        implements Serializable,
    +        Comparable<String>,
    +        CharSequence {
    +            private final char[] value;
    +            private int hash;
    +            private static final long serialVersionUID = -6849794470754667710L;
    +            private static final ObjectStreamField[] serialPersistentFields = new ObjectStreamField[0];
    +            public static final Comparator<String> CASE_INSENSITIVE_ORDER = new CaseInsensitiveComparator();
    +...
    +            public String(byte[] byArray, int n, int n2, Charset charset) {
    +/*460*/         if (charset == null) {
    +                    throw new NullPointerException("charset");
    +                }
    +/*462*/         String.checkBounds(byArray, n, n2);
    +/*463*/         this.value = StringCoding.decode(charset, byArray, n, n2);
    +            }
    +...
    +

    反编译时只显示源代码

    默认情况下,反编译结果里会带有ClassLoader信息,通过--source-only选项,可以只打印源代码。方便和mc/retransform命令结合使用。

    $ jad --source-only demo.MathGame
    +/*
    + * Decompiled with CFR 0_132.
    + */
    +package demo;
    +
    +import java.io.PrintStream;
    +import java.util.ArrayList;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.Random;
    +import java.util.concurrent.TimeUnit;
    +
    +public class MathGame {
    +    private static Random random = new Random();
    +    public int illegalArgumentCount = 0;
    +...
    +

    反编译指定的函数

    $ jad demo.MathGame main
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@232204a1
    +  +-sun.misc.Launcher$ExtClassLoader@7f31245a
    +
    +Location:
    +/private/tmp/math-game.jar
    +
    +       public static void main(String[] args) throws InterruptedException {
    +           MathGame game = new MathGame();
    +           while (true) {
    +/*16*/         game.run();
    +/*17*/         TimeUnit.SECONDS.sleep(1L);
    +           }
    +       }
    +

    反编译时不显示行号

    --lineNumber 参数默认值为 true,显示指定为 false 则不打印行号。

    $ jad demo.MathGame main --lineNumber false
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@232204a1
    +  +-sun.misc.Launcher$ExtClassLoader@7f31245a
    +
    +Location:
    +/private/tmp/math-game.jar
    +
    +public static void main(String[] args) throws InterruptedException {
    +    MathGame game = new MathGame();
    +    while (true) {
    +        game.run();
    +        TimeUnit.SECONDS.sleep(1L);
    +    }
    +}
    +

    反编译时指定 ClassLoader

    提示

    当有多个 ClassLoader 都加载了这个类时,jad 命令会输出对应 ClassLoader 实例的 hashcode,然后你只需要重新执行 jad 命令,并使用参数 -c <hashcode> 就可以反编译指定 ClassLoader 加载的那个类了;

    $ jad org.apache.log4j.Logger
    +
    +Found more than one class for: org.apache.log4j.Logger, Please use jad -c hashcode org.apache.log4j.Logger
    +HASHCODE  CLASSLOADER
    +69dcaba4  +-monitor's ModuleClassLoader
    +6e51ad67  +-java.net.URLClassLoader@6e51ad67
    +            +-sun.misc.Launcher$AppClassLoader@6951a712
    +            +-sun.misc.Launcher$ExtClassLoader@6fafc4c2
    +2bdd9114  +-pandora-qos-service's ModuleClassLoader
    +4c0df5f8  +-pandora-framework's ModuleClassLoader
    +
    +Affect(row-cnt:0) cost in 38 ms.
    +$ jad org.apache.log4j.Logger -c 69dcaba4
    +
    +ClassLoader:
    ++-monitor's ModuleClassLoader
    +
    +Location:
    +/Users/admin/app/log4j-1.2.14.jar
    +
    +package org.apache.log4j;
    +
    +import org.apache.log4j.spi.*;
    +
    +public class Logger extends Category
    +{
    +    private static final String FQCN;
    +
    +    protected Logger(String name)
    +    {
    +        super(name);
    +    }
    +
    +...
    +
    +Affect(row-cnt:1) cost in 190 ms.
    +

    对于只有唯一实例的 ClassLoader 还可以通过--classLoaderClass指定 class name,使用起来更加方便:

    --classLoaderClass 的值是 ClassLoader 的类名,只有匹配到唯一的 ClassLoader 实例时才能工作,目的是方便输入通用命令,而-c <hashcode>是动态变化的。

    + + + diff --git a/3.x/doc/jfr.html b/3.x/doc/jfr.html new file mode 100644 index 00000000000..5ef88ea64b1 --- /dev/null +++ b/3.x/doc/jfr.html @@ -0,0 +1,62 @@ + + + + + + + + + jfr | arthas + + + + +
    目录

    jfr

    jfr在线教程在新窗口打开

    提示

    Java Flight Recorder (JFR) 是一种用于收集有关正在运行的 Java 应用程序的诊断和分析数据的工具。它集成到 Java 虚拟机 (JVM) 中,几乎不会造成性能开销,因此即使在负载较重的生产环境中也可以使用。

    jfr 命令支持在程序动态运行过程中开启和关闭 JFR 记录。 记录收集有关 event 的数据。事件在特定时间点发生在 JVM 或 Java 应用程序中。每个事件都有一个名称、一个时间戳和一个可选的有效负载。负载是与事件相关的数据,例如 CPU 使用率、事件前后的 Java 堆大小、锁持有者的线程 ID 等。

    jfr 命令基本运行结构是 jfr cmd [actionArg]

    注意: JDK8 的 8u262 版本之后才支持 jfr

    参数说明

    参数名称参数说明
    cmd要执行的操作 支持的命令【start,status,dump,stop】
    actionArg属性名模式
    [n:]记录名称
    [r:]记录 id 值
    [dumponexit:]程序退出时,是否要 dump 出 .jfr 文件,默认为 false
    [d:]延迟多久后启动 JFR 记录,支持带单位配置,eg: 60s, 2m, 5h, 3d. 不带单位就是秒,默认无延迟
    [duration:]JFR 记录持续时间,支持单位配置,不带单位就是秒,默认一直记录
    [s:]采集 Event 的详细配置文件,默认是 default.jfc 位于 $JAVA_HOME/lib/jfr/default.jfc
    [f:]将输出转储到指定路径
    [maxage:]缓冲区数据最大文件记录保存时间,支持单位配置,不带单位就是秒,默认是不限制
    [maxsize:]缓冲区的最大文件大小,支持单位配置, 不带单位是字节,m 或者 M 代表 MB,g 或者 G 代表 GB。
    [state:]jfr 记录状态

    启动 JFR 记录

    $ jfr start
    +Started recording 1. No limit specified, using maxsize=250MB as default.
    +

    提示

    默认情况下,开启的是默认参数的 jfr 记录

    启动 jfr 记录,指定记录名,记录持续时间,记录文件保存路径。

    $ jfr start -n myRecording --duration 60s -f /tmp/myRecording.jfr
    +Started recording 2. The result will be written to:
    +/tmp/myRecording.jfr
    +

    查看 JFR 记录状态

    默认是查看所有 JFR 记录信息

    $ jfr status
    +Recording: recording=1 name=Recording-1 (running)
    +Recording: recording=2 name=myRecording duration=PT1M (closed)
    +

    查看指定记录 id 的记录信息

    $ jfr status -r 1
    +Recording: recording=1 name=Recording-1 (running)
    +

    查看指定状态的记录信息

    $ jfr status --state closed
    +Recording: recording=2 name=myRecording duration=PT1M (closed)
    +

    dump jfr 记录

    jfr dump 会输出从开始到运行该命令这段时间内的记录到 JFR 文件,且不会停止 jfr 的记录
    指定记录输出路径

    $ jfr dump -r 1 -f /tmp/myRecording1.jfr
    +Dump recording 1, The result will be written to:
    +/tmp/myRecording1.jfr
    +

    不指定文件输出路径,默认是保存到arthas-output目录下

    $ jfr dump -r 1
    +Dump recording 1, The result will be written to:
    +/tmp/test/arthas-output/20220819-200915.jfr
    +

    停止 jfr 记录

    不指定记录输出路径,默认是保存到arthas-output目录下

    $ jfr stop -r 1
    +Stop recording 1, The result will be written to:
    +/tmp/test/arthas-output/20220819-202049.jfr
    +

    注意一条记录只能停止一次。

    也可以指定记录输出路径。

    通过浏览器查看 arthas-output 下面 JFR 记录的结果

    默认情况下,arthas 使用 8563 端口,则可以打开: http://localhost:8563/arthas-output/在新窗口打开 查看到arthas-output目录下面的 JFR 记录结果:

    生成的结果可以用支持 jfr 格式的工具来查看。比如:

    • JDK Mission Control : https://github.com/openjdk/jmc
    + + + diff --git a/3.x/doc/jvm.html b/3.x/doc/jvm.html new file mode 100644 index 00000000000..4bcd68242ae --- /dev/null +++ b/3.x/doc/jvm.html @@ -0,0 +1,140 @@ + + + + + + + + + jvm | arthas + + + + +
    目录

    jvm

    jvm在线教程在新窗口打开

    提示

    查看当前 JVM 信息

    使用参考

    $ jvm
    +RUNTIME
    +--------------------------------------------------------------------------------------------------------------
    + MACHINE-NAME                   37@ff267334bb65
    + JVM-START-TIME                 2020-07-23 07:50:36
    + MANAGEMENT-SPEC-VERSION        1.2
    + SPEC-NAME                      Java Virtual Machine Specification
    + SPEC-VENDOR                    Oracle Corporation
    + SPEC-VERSION                   1.8
    + VM-NAME                        Java HotSpot(TM) 64-Bit Server VM
    + VM-VENDOR                      Oracle Corporation
    + VM-VERSION                     25.201-b09
    + INPUT-ARGUMENTS                []
    + CLASS-PATH                     demo-arthas-spring-boot.jar
    + BOOT-CLASS-PATH                /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/j
    +                                re/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/
    +                                java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/us
    +                                r/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/l
    +                                ib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes
    + LIBRARY-PATH                   /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
    +
    +--------------------------------------------------------------------------------------------------------------
    + CLASS-LOADING
    +--------------------------------------------------------------------------------------------------------------
    + LOADED-CLASS-COUNT             7529
    + TOTAL-LOADED-CLASS-COUNT       7529
    + UNLOADED-CLASS-COUNT           0
    + IS-VERBOSE                     false
    +
    +--------------------------------------------------------------------------------------------------------------
    + COMPILATION
    +--------------------------------------------------------------------------------------------------------------
    + NAME                           HotSpot 64-Bit Tiered Compilers
    + TOTAL-COMPILE-TIME             14921(ms)
    +
    +--------------------------------------------------------------------------------------------------------------
    + GARBAGE-COLLECTORS
    +--------------------------------------------------------------------------------------------------------------
    + PS Scavenge                            name : PS Scavenge
    + [count/time (ms)]                      collectionCount : 7
    +                                        collectionTime : 68
    +
    + PS MarkSweep                           name : PS MarkSweep
    + [count/time (ms)]                      collectionCount : 1
    +                                        collectionTime : 47
    +
    +--------------------------------------------------------------------------------------------------------------
    + MEMORY-MANAGERS
    +--------------------------------------------------------------------------------------------------------------
    + CodeCacheManager               Code Cache
    +
    + Metaspace Manager              Metaspace
    +                                Compressed Class Space
    +
    + Copy                           Eden Space
    +                                Survivor Space
    +
    + MarkSweepCompact               Eden Space
    +                                Survivor Space
    +                                Tenured Gen
    +
    +
    +--------------------------------------------------------------------------------------------------------------
    + MEMORY
    +--------------------------------------------------------------------------------------------------------------
    + HEAP-MEMORY-USAGE                      init : 268435456(256.0 MiB)
    + [memory in bytes]                      used : 18039504(17.2 MiB)
    +                                        committed : 181403648(173.0 MiB)
    +                                        max : 3817865216(3.6 GiB)
    +
    + NO-HEAP-MEMORY-USAGE                   init : 2555904(2.4 MiB)
    + [memory in bytes]                      used : 33926216(32.4 MiB)
    +                                        committed : 35176448(33.5 MiB)
    +                                        max : -1(-1 B)
    +
    +--------------------------------------------------------------------------------------------------------------
    + OPERATING-SYSTEM
    +--------------------------------------------------------------------------------------------------------------
    + OS                             Linux
    + ARCH                           amd64
    + PROCESSORS-COUNT               3
    + LOAD-AVERAGE                   29.53
    + VERSION                        4.15.0-52-generic
    +
    +--------------------------------------------------------------------------------------------------------------
    + THREAD
    +--------------------------------------------------------------------------------------------------------------
    + COUNT                          30
    + DAEMON-COUNT                   24
    + PEAK-COUNT                     31
    + STARTED-COUNT                  36
    + DEADLOCK-COUNT                 0
    +
    +--------------------------------------------------------------------------------------------------------------
    + FILE-DESCRIPTOR
    +--------------------------------------------------------------------------------------------------------------
    + MAX-FILE-DESCRIPTOR-COUNT      1048576
    + OPEN-FILE-DESCRIPTOR-COUNT     100
    +Affect(row-cnt:0) cost in 88 ms.
    +

    THREAD 相关

    • COUNT: JVM 当前活跃的线程数
    • DAEMON-COUNT: JVM 当前活跃的守护线程数
    • PEAK-COUNT: 从 JVM 启动开始曾经活着的最大线程数
    • STARTED-COUNT: 从 JVM 启动开始总共启动过的线程次数
    • DEADLOCK-COUNT: JVM 当前死锁的线程数

    文件描述符相关

    • MAX-FILE-DESCRIPTOR-COUNT:JVM 进程最大可以打开的文件描述符数
    • OPEN-FILE-DESCRIPTOR-COUNT:JVM 当前打开的文件描述符数
    + + + diff --git a/3.x/doc/keymap.html b/3.x/doc/keymap.html new file mode 100644 index 00000000000..b75221c2176 --- /dev/null +++ b/3.x/doc/keymap.html @@ -0,0 +1,60 @@ + + + + + + + + + keymap | arthas + + + + +
    目录

    keymap

    keymap在线教程在新窗口打开

    keymap命令输出当前的快捷键映射表:

    默认的快捷键如下:

    快捷键快捷键说明命令名称命令说明
    "\C-a"ctrl + abeginning-of-line跳到行首
    "\C-e"ctrl + eend-of-line跳到行尾
    "\C-f"ctrl + fforward-word向前移动一个单词
    "\C-b"ctrl + bbackward-word向后移动一个单词
    "\e[D"键盘左方向键backward-char光标向前移动一个字符
    "\e[C"键盘右方向键forward-char光标向后移动一个字符
    "\e[B"键盘下方向键next-history下翻显示下一个命令
    "\e[A"键盘上方向键previous-history上翻显示上一个命令
    "\C-h"ctrl + hbackward-delete-char向后删除一个字符
    "\C-?"ctrl + shift + /backward-delete-char向后删除一个字符
    "\C-u"ctrl + uundo撤销上一个命令,相当于清空当前行
    "\C-d"ctrl + ddelete-char删除当前光标所在字符
    "\C-k"ctrl + kkill-line删除当前光标到行尾的所有字符
    "\C-i"ctrl + icomplete自动补全,相当于敲TAB
    "\C-j"ctrl + jaccept-line结束当前行,相当于敲回车
    "\C-m"ctrl + maccept-line结束当前行,相当于敲回车
    "\C-w"backward-delete-word
    "\C-x\e[3~"backward-kill-line
    "\e\C-?"backward-kill-word
    • 任何时候 tab 键,会根据当前的输入给出提示
    • 命令后敲 --- ,然后按 tab 键,可以展示出此命令具体的选项

    自定义快捷键

    在当前用户目录下新建$USER_HOME/.arthas/conf/inputrc文件,加入自定义配置。

    假设我是 vim 的重度用户,我要把ctrl+h设置为光标向前一个字符,则设置如下,首先拷贝默认配置

    "\C-a": beginning-of-line
    +"\C-e": end-of-line
    +"\C-f": forward-word
    +"\C-b": backward-word
    +"\e[D": backward-char
    +"\e[C": forward-char
    +"\e[B": next-history
    +"\e[A": previous-history
    +"\C-h": backward-delete-char
    +"\C-?": backward-delete-char
    +"\C-u": undo
    +"\C-d": delete-char
    +"\C-k": kill-line
    +"\C-i": complete
    +"\C-j": accept-line
    +"\C-m": accept-line
    +"\C-w": backward-delete-word
    +"\C-x\e[3~": backward-kill-line
    +"\e\C-?": backward-kill-word
    +

    然后把"\C-h": backward-delete-char换成"\C-h": backward-char,然后重新连接即可。

    后台异步命令相关快捷键

    • ctrl + c: 终止当前命令
    • ctrl + z: 挂起当前命令,后续可以 bg/fg 重新支持此命令,或 kill 掉
    • ctrl + a: 回到行首
    • ctrl + e: 回到行尾
    + + + diff --git a/3.x/doc/logger.html b/3.x/doc/logger.html new file mode 100644 index 00000000000..e27dddb2983 --- /dev/null +++ b/3.x/doc/logger.html @@ -0,0 +1,176 @@ + + + + + + + + + logger | arthas + + + + +
    目录

    logger

    logger在线教程在新窗口打开

    提示

    查看 logger 信息,更新 logger level

    使用参考

    查看所有 logger 信息

    以下面的logback.xml为例:

    <?xml version="1.0" encoding="UTF-8"?>
    +<configuration>
    +    <appender name="APPLICATION" class="ch.qos.logback.core.rolling.RollingFileAppender">
    +        <file>app.log</file>
    +        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
    +            <fileNamePattern>mylog-%d{yyyy-MM-dd}.%i.txt</fileNamePattern>
    +            <maxFileSize>100MB</maxFileSize>
    +            <maxHistory>60</maxHistory>
    +            <totalSizeCap>2GB</totalSizeCap>
    +        </rollingPolicy>
    +        <encoder>
    +            <pattern>%logger{35} - %msg%n</pattern>
    +        </encoder>
    +    </appender>
    +
    +    <appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
    +        <appender-ref ref="APPLICATION" />
    +    </appender>
    +
    +    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
    +        <encoder>
    +            <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n
    +            </pattern>
    +            <charset>utf8</charset>
    +        </encoder>
    +    </appender>
    +
    +    <root level="INFO">
    +        <appender-ref ref="CONSOLE" />
    +        <appender-ref ref="ASYNC" />
    +    </root>
    +</configuration>
    +

    使用logger命令打印的结果是:

    [arthas@2062]$ logger
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  INFO
    + effectiveLevel                         INFO
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +

    appenders的信息里,可以看到

    • CONSOLE logger 的 target 是System.out
    • APPLICATION logger 是RollingFileAppender,它的 file 是app.log
    • ASYNC它的appenderRefAPPLICATION,即异步输出到文件里

    查看指定名字的 logger 信息

    [arthas@2062]$ logger -n org.springframework.web
    + name                                   org.springframework.web
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         INFO
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +

    查看指定 classloader 的 logger 信息

    注意 hashcode 是变化的,需要先查看当前的 ClassLoader 信息,提取对应 ClassLoader 的 hashcode。

    如果你使用-c,你需要手动输入 hashcode:-c <hashcode>

    [arthas@2062]$ logger -c 2a139a55
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  DEBUG
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +

    对于只有唯一实例的 ClassLoader 可以通过--classLoaderClass指定 class name,使用起来更加方便:

    logger --classLoaderClass sun.misc.Launcher$AppClassLoader

    • 注: 这里 classLoaderClass 在 java 8 是 sun.misc.Launcher$AppClassLoader,而java 11的classloader是jdk.internal.loader.ClassLoaders$AppClassLoader。

    --classLoaderClass 的值是 ClassLoader 的类名,只有匹配到唯一的 ClassLoader 实例时才能工作,目的是方便输入通用命令,而-c <hashcode>是动态变化的。

    更新 logger level

    [arthas@2062]$ logger --name ROOT --level debug
    +update logger level success.
    +

    指定 classloader 更新 logger level

    默认情况下,logger 命令会在 SystemClassloader 下执行,如果应用是传统的war应用,或者 spring boot fat jar 启动的应用,那么需要指定 classloader。

    可以先用 sc -d yourClassName 来查看具体的 classloader hashcode,然后在更新 level 时指定 classloader:

    [arthas@2062]$ logger -c 2a139a55 --name ROOT --level debug
    +

    查看没有 appender 的 logger 的信息

    默认情况下,logger命令只打印有 appender 的 logger 的信息。如果想查看没有appender的 logger 的信息,可以加上参数--include-no-appender

    注意,通常输出结果会很长。

    [arthas@2062]$ logger --include-no-appender
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  DEBUG
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +
    + name                                   com
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +
    + name                                   com.alibaba
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +...
    +
    + + + diff --git a/3.x/doc/manual-install.html b/3.x/doc/manual-install.html new file mode 100644 index 00000000000..072121ede0b --- /dev/null +++ b/3.x/doc/manual-install.html @@ -0,0 +1,60 @@ + + + + + + + + + 手动安装 Arthas | arthas + + + + +
    目录

    手动安装 Arthas

    1. 下载最新版本

    从 Github Releases 页下载

    https://github.com/alibaba/arthas/releases在新窗口打开

    1. 解压缩 arthas 的压缩包

      unzip arthas-packaging-bin.zip
      +
    2. 安装 Arthas

      安装之前最好把所有老版本的 Arthas 全都删掉

      sudo su admin
      +rm -rf /home/admin/.arthas/lib/*
      +cd arthas
      +./install-local3.sh
      +

      注意

      注意,这里根据你需要诊断的 Java 进程的所属用户进行切换

    3. 启动 Arthas

      启动之前,请确保老版本的 Arthas 已经stop.

      ./as3.sh
      +

    以脚本的方式启动 as3.sh/as.bat

    Linux/Unix/Mac

    Arthas 支持在 Linux/Unix/Mac 等平台上一键安装,请复制以下内容,并粘贴到命令行中,敲 回车 执行即可:

    curl -L https://arthas.aliyun.com/install3.sh | sh
    +

    上述命令会下载启动脚本文件 as3.sh 到当前目录,你可以放在任何地方或将其加入到 $PATH 中。

    直接在 shell 下面执行./as3.sh,就会进入交互界面。

    也可以执行./as3.sh -h来获取更多参数信息。

    Windows

    最新版本,点击下载:在新窗口打开

    下载解压后在 bin 目录有 as.bat。此脚本暂时只接受一个参数 pid,即只能诊断本机上的 Java 进程。(欢迎精通 bat 脚本的开发者改进)

    as.bat <pid>
    +

    使用以下命令诊断 windows 服务模式运行的 Java 进程 (--interact 打开服务 UI 交互模式,方便诊断问题):

    as-service.bat -port <port>
    +as-service.bat -pid <pid>
    +as-service.bat -pid <pid> --interact
    +

    清理 arthas windows 服务执行以下命令:

    as-service.bat -remove
    +

    手动拼接命令行启动

    如果启动遇到问题,可以尝试手动拼接出命令行参数来启动。

    1. 查找目录 jvm 的 java 文件路径。

      在 linux/mac 上执行ps aux | grep java,在 windows 上可以通过进程管理器来查看。假设是/opt/jdk1.8/bin/java

    2. 拼接出命令行

      /opt/jdk1.8/bin/java -Xbootclasspath/a:/opt/jdk1.8/lib/tools.jar \
      + -jar /tmp/arthas-packaging/arthas-core.jar \
      + -pid 15146 \
      + -target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 \
      + -core /tmp/arthas-packaging/arthas-core.jar \
      + -agent /tmp/arthas-packaging/arthas/arthas-agent.jar
      +

      命令行分几部分组成:

      • -Xbootclasspath 增加 tools.jar
      • -jar /tmp/arthas-packaging/arthas-core.jar 指定 main 函数入口
      • -pid 15146 指定目标 java 进程 ID
      • -target-ip 127.0.0.1 指定 IP
      • -telnet-port 3658 -http-port 8563 指定 telnet 和 http 端口
      • -core /tmp/arthas-packaging/arthas-core.jar -agent /tmp/arthas-packaging/arthas/arthas-agent.jar 指定 core/agent jar 包

      如果是jdk > 9,即 9/10/11 以上的版本,不需要指定tools.jar,直接去掉-Xbootclasspath 的配置即可。

      启动目志输出在~/logs/arthas/arthas.log里。

    3. attach 成功之后,使用 telnet 连接

      telnet 127.0.0.1 3658
      +
    + + + diff --git a/3.x/doc/mbean.html b/3.x/doc/mbean.html new file mode 100644 index 00000000000..ea8b40ff6bf --- /dev/null +++ b/3.x/doc/mbean.html @@ -0,0 +1,49 @@ + + + + + + + + + mbean | arthas + + + + +
    目录

    mbean

    mbean在线教程在新窗口打开

    提示

    查看 Mbean 的信息

    这个命令可以便捷的查看或监控 Mbean 的属性信息。

    参数说明

    参数名称参数说明
    name-pattern名称表达式匹配
    attribute-pattern属性名表达式匹配
    [m]查看元信息
    [i:]刷新属性值的时间间隔 (ms)
    [n:]刷新属性值的次数
    [E]开启正则表达式匹配,默认为通配符匹配。仅对属性名有效

    使用参考

    列出所有 Mbean 的名称:

    mbean
    +

    查看 Mbean 的元信息:

    mbean -m java.lang:type=Threading
    +

    查看 mbean 属性信息:

    mbean java.lang:type=Threading
    +

    mbean 的 name 支持通配符匹配:

    mbean java.lang:type=Th*
    +

    注意

    注意:ObjectName 的匹配规则与正常的通配符存在差异,详细参见:javax.management.ObjectName在新窗口打开

    通配符匹配特定的属性字段:

    mbean java.lang:type=Threading *Count
    +

    使用-E命令切换为正则匹配:

    mbean -E java.lang:type=Threading PeakThreadCount|ThreadCount|DaemonThreadCount
    +

    使用-i命令实时监控:

    mbean -i 1000 java.lang:type=Threading *Count
    +

    实时监控使用-i,使用-n命令执行命令的次数(默认为 100 次):

    mbean -i 1000 -n 50 java.lang:type=Threading *Count
    +
    + + + diff --git a/3.x/doc/mc.html b/3.x/doc/mc.html new file mode 100644 index 00000000000..e3a12238035 --- /dev/null +++ b/3.x/doc/mc.html @@ -0,0 +1,48 @@ + + + + + + + + + mc | arthas + + + + +
    目录

    mc

    mc-retransform在线教程在新窗口打开

    使用参考

    提示

    Memory Compiler/内存编译器,编译.java文件生成.class

    mc /tmp/Test.java
    +

    可以通过-c参数指定 classloader:

    mc -c 327a647b /tmp/Test.java
    +

    也可以通过--classLoaderClass参数指定 ClassLoader:

    $ mc --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader /tmp/UserController.java -d /tmp
    +Memory compiler output:
    +/tmp/com/example/demo/arthas/user/UserController.class
    +Affect(row-cnt:1) cost in 346 ms
    +

    可以通过-d命令指定输出目录:

    mc -d /tmp/output /tmp/ClassA.java /tmp/ClassB.java
    +

    编译生成.class文件之后,可以结合retransform命令实现热更新代码。

    注意

    注意,mc 命令有可能失败。如果编译失败可以在本地编译好.class文件,再上传到服务器。具体参考retransform命令说明。

    + + + diff --git a/3.x/doc/memory.html b/3.x/doc/memory.html new file mode 100644 index 00000000000..f2a0bc8379a --- /dev/null +++ b/3.x/doc/memory.html @@ -0,0 +1,55 @@ + + + + + + + + + memory | arthas + + + + +
    目录

    memory

    查看 JVM 内存信息。

    使用参考

    $ memory
    +Memory                           used      total      max        usage
    +heap                             32M       256M       4096M      0.79%
    +g1_eden_space                    11M       68M        -1         16.18%
    +g1_old_gen                       17M       184M       4096M      0.43%
    +g1_survivor_space                4M        4M         -1         100.00%
    +nonheap                          35M       39M        -1         89.55%
    +codeheap_'non-nmethods'          1M        2M         5M         20.53%
    +metaspace                        26M       27M        -1         96.88%
    +codeheap_'profiled_nmethods'     4M        4M         117M       3.57%
    +compressed_class_space           2M        3M         1024M      0.29%
    +codeheap_'non-profiled_nmethods' 685K      2496K      120032K    0.57%
    +mapped                           0K        0K         -          0.00%
    +direct                           48M       48M        -          100.00%
    +
    + + + diff --git a/3.x/doc/monitor.html b/3.x/doc/monitor.html new file mode 100644 index 00000000000..d7444f2b956 --- /dev/null +++ b/3.x/doc/monitor.html @@ -0,0 +1,121 @@ + + + + + + + + + monitor | arthas + + + + +
    目录

    monitor

    monitor在线教程在新窗口打开

    提示

    方法执行监控

    对匹配 class-patternmethod-patterncondition-express的类、方法的调用进行监控。

    monitor 命令是一个非实时返回命令.

    实时返回命令是输入之后立即返回,而非实时返回的命令,则是不断的等待目标 Java 进程返回信息,直到用户输入 Ctrl+C 为止。

    服务端是以任务的形式在后台跑任务,植入的代码随着任务的中止而不会被执行,所以任务关闭后,不会对原有性能产生太大影响,而且原则上,任何 Arthas 命令不会引起原有业务逻辑的改变。

    监控的维度说明

    监控项说明
    timestamp时间戳
    classJava 类
    method方法(构造方法、普通方法)
    total调用次数
    success成功次数
    fail失败次数
    rt平均 RT
    fail-rate失败率

    参数说明

    方法拥有一个命名参数 [c:],意思是统计周期(cycle of output),拥有一个整型的参数值

    参数名称参数说明
    class-pattern类名表达式匹配
    method-pattern方法名表达式匹配
    condition-express条件表达式
    [E]开启正则表达式匹配,默认为通配符匹配
    [c:]统计周期,默认值为 120 秒
    [b]方法调用之前计算 condition-express
    [m <arg>]指定 Class 最大匹配数量,默认值为 50。长格式为[maxMatch <arg>]

    使用参考

    $ monitor -c 5 demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 94 ms.
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:38  demo.MathGame  primeFactors  5      1        4     1.15        80.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:43  demo.MathGame  primeFactors  5      3        2     42.29       40.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:48  demo.MathGame  primeFactors  5      3        2     67.92       40.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:53  demo.MathGame  primeFactors  5      2        3     0.25        60.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:58  demo.MathGame  primeFactors  1      1        0     0.45        0.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:07:03  demo.MathGame  primeFactors  2      2        0     3182.72     0.00%
    +

    指定 Class 最大匹配数量

    $ monitor -c 1 -m 1 demo.MathGame primeFactors
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 384 ms, listenerId: 6.
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2022-12-25 21:12:58  demo.MathGame  primeFactors  1      1        0     0.18        0.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2022-12-25 21:12:59  demo.MathGame  primeFactors  0      0        0     0.00       0.00%
    +

    计算条件表达式过滤统计结果(方法执行完毕之后)

    monitor -c 5 demo.MathGame primeFactors "params[0] <= 2"
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 19 ms, listenerId: 5
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:36  demo.MathGame  primeFactors    5       3       2      0.09       40.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:41  demo.MathGame  primeFactors    5       2       3      0.11       60.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:46  demo.MathGame  primeFactors    5       1       4      0.06       80.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:51  demo.MathGame  primeFactors    5       1       4      0.12       80.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:56  demo.MathGame  primeFactors    5       3       2      0.15       40.00%
    +

    计算条件表达式过滤统计结果(方法执行完毕之前)

    monitor -b -c 5 com.test.testes.MathGame primeFactors "params[0] <= 2"
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 21 ms, listenerId: 4
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:41:57  demo.MathGame  primeFactors    1       0        1      0.10      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:02  demo.MathGame  primeFactors    3       0        3      0.06      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:07  demo.MathGame  primeFactors    2       0        2      0.06      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:12  demo.MathGame  primeFactors    1       0        1      0.05      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:17  demo.MathGame  primeFactors    2       0        2      0.10      100.00%
    +
    + + + diff --git a/3.x/doc/ognl.html b/3.x/doc/ognl.html new file mode 100644 index 00000000000..e5cb6074fe5 --- /dev/null +++ b/3.x/doc/ognl.html @@ -0,0 +1,86 @@ + + + + + + + + + ognl | arthas + + + + +
    目录

    ognl

    ognl在线教程在新窗口打开

    提示

    执行 ognl 表达式

    从 3.0.5 版本增加

    参数说明

    参数名称参数说明
    express执行的表达式
    [c:]执行表达式的 ClassLoader 的 hashcode,默认值是 SystemClassLoader
    [classLoaderClass:]指定执行表达式的 ClassLoader 的 class name
    [x]结果对象的展开层次,默认值 1

    使用参考

    调用静态函数:

    $ ognl '@java.lang.System@out.println("hello")'
    +null
    +

    获取静态类的静态字段:

    $ ognl '@demo.MathGame@random'
    +@Random[
    +    serialVersionUID=@Long[3905348978240129619],
    +    seed=@AtomicLong[125451474443703],
    +    multiplier=@Long[25214903917],
    +    addend=@Long[11],
    +    mask=@Long[281474976710655],
    +    DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +    BadBound=@String[bound must be positive],
    +    BadRange=@String[bound must be greater than origin],
    +    BadSize=@String[size must be non-negative],
    +    seedUniquifier=@AtomicLong[-3282039941672302964],
    +    nextNextGaussian=@Double[0.0],
    +    haveNextNextGaussian=@Boolean[false],
    +    serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +    unsafe=@Unsafe[sun.misc.Unsafe@28ea5898],
    +    seedOffset=@Long[24],
    +]
    +

    通过 hashcode 指定 ClassLoader:

    $ classloader -t
    ++-BootstrapClassLoader
    ++-jdk.internal.loader.ClassLoaders$PlatformClassLoader@301ec38b
    +  +-com.taobao.arthas.agent.ArthasClassloader@472067c7
    +  +-jdk.internal.loader.ClassLoaders$AppClassLoader@4b85612c
    +    +-org.springframework.boot.loader.LaunchedURLClassLoader@7f9a81e8
    +
    +$ ognl -c 7f9a81e8 @org.springframework.boot.SpringApplication@logger
    +@Slf4jLocationAwareLog[
    +    FQCN=@String[org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog],
    +    name=@String[org.springframework.boot.SpringApplication],
    +    logger=@Logger[Logger[org.springframework.boot.SpringApplication]],
    +]
    +$
    +

    注意 hashcode 是变化的,需要先查看当前的 ClassLoader 信息,提取对应 ClassLoader 的 hashcode。

    对于只有唯一实例的 ClassLoader 可以通过 class name 指定,使用起来更加方便:

    $ ognl --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader  @org.springframework.boot.SpringApplication@logger
    +@Slf4jLocationAwareLog[
    +    FQCN=@String[org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog],
    +    name=@String[org.springframework.boot.SpringApplication],
    +    logger=@Logger[Logger[org.springframework.boot.SpringApplication]],
    +]
    +

    执行多行表达式,赋值给临时变量,返回一个 List:

    $ ognl '#value1=@System@getProperty("java.home"), #value2=@System@getProperty("java.runtime.name"), {#value1, #value2}'
    +@ArrayList[
    +    @String[/opt/java/8.0.181-zulu/jre],
    +    @String[OpenJDK Runtime Environment],
    +]
    +
    + + + diff --git a/3.x/doc/options.html b/3.x/doc/options.html new file mode 100644 index 00000000000..10bae61ff9b --- /dev/null +++ b/3.x/doc/options.html @@ -0,0 +1,101 @@ + + + + + + + + + options | arthas + + + + +
    目录

    options

    options在线教程在新窗口打开

    提示

    全局开关

    名称默认值描述
    unsafefalse是否支持对系统级别的类进行增强,打开该开关可能导致把 JVM 搞挂,请慎重选择!
    dumpfalse是否支持被增强了的类 dump 到外部文件中,如果打开开关,class 文件会被 dump 到/${application working dir}/arthas-class-dump/目录下,具体位置详见控制台输出
    batch-re-transformtrue是否支持批量对匹配到的类执行 retransform 操作
    json-formatfalse是否支持 json 化的输出
    disable-sub-classfalse是否禁用子类匹配,默认在匹配目标类的时候会默认匹配到其子类,如果想精确匹配,可以关闭此开关
    support-default-methodtrue是否支持匹配到 default method, 默认会查找 interface,匹配里面的 default method。参考 #1105在新窗口打开
    save-resultfalse是否打开执行结果存日志功能,打开之后所有命令的运行结果都将保存到~/logs/arthas-cache/result.log
    job-timeout1d异步后台任务的默认超时时间,超过这个时间,任务自动停止;比如设置 1d, 2h, 3m, 25s,分别代表天、小时、分、秒
    print-parent-fieldstrue是否打印在 parent class 里的 filed
    verbosefalse是否打印更多详细信息
    stricttrue是否启用 strict 模式

    查看所有的 options

    $ options
    + LEVEL  TYPE    NAME          VALUE   SUMMARY               DESCRIPTION
    +-------------------------------------------------------------------------------------------------------
    + 0      boolea  unsafe        false   Option to support sy  This option enables to proxy functionality
    +        n                             stem-level class       of JVM classes. Due to serious security r
    +                                                            isk a JVM crash is possibly be introduced.
    +                                                             Do not activate it unless you are able to
    +                                                             manage.
    + 1      boolea  dump          false   Option to dump the e  This option enables the enhanced classes t
    +        n                             nhanced classes       o be dumped to external file for further d
    +                                                            e-compilation and analysis.
    + 1      boolea  batch-re-tra  true    Option to support ba  This options enables to reTransform classe
    +        n       nsform                tch reTransform Clas  s with batch mode.
    +                                      s
    + 2      boolea  json-format   false   Option to support JS  This option enables to format object outpu
    +        n                             ON format of object   t with JSON when -x option selected.
    +                                      output
    + 1      boolea  disable-sub-  false   Option to control in  This option disable to include sub class w
    +        n       class                 clude sub class when  hen matching class.
    +                                       class matching
    + 1      boolea  support-defa  true    Option to control in  This option disable to include default met
    +        n       ult-method            clude default method  hod in interface when matching class.
    +                                       in interface when c
    +                                      lass matching
    + 1      boolea  save-result   false   Option to print comm  This option enables to save each command's
    +        n                             and's result to log    result to log file, which path is ${user.
    +                                      file                  home}/logs/arthas-cache/result.log.
    + 2      String  job-timeout   1d      Option to job timeou  This option setting job timeout,The unit c
    +                                      t                     an be d, h, m, s for day, hour, minute, se
    +                                                            cond. 1d is one day in default
    + 1      boolea  print-parent  true    Option to print all   This option enables print files in parent
    +        n       -fields               fileds in parent cla  class, default value true.
    +                                      ss
    + 1      boolea  verbose       false   Option to print verb  This option enables print verbose informat
    +        n                             ose information       ion, default value false.
    + 1      boolea  strict        true    Option to strict mod  By default, strict mode is true, not allow
    +        n                             e                     ed to set object properties. Want to set o
    +                                                            bject properties, execute `options strict
    +                                                            false`
    +

    获取 option 的值

    $ options json-format
    + LEVEL  TYPE  NAME         VALUE  SUMMARY             DESCRIPTION
    +--------------------------------------------------------------------------------------------
    + 2      bool  json-format  false  Option to support   This option enables to format object
    +        ean                       JSON format of obj  output with JSON when -x option selec
    +                                  ect output          ted.
    +

    提示

    默认情况下json-format为 false,如果希望watch/tt等命令结果以 json 格式输出,则可以设置json-format为 true。

    设置指定的 option

    例如,想打开执行结果存日志功能,输入如下命令即可:

    $ options save-result true
    + NAME         BEFORE-VALUE  AFTER-VALUE
    +----------------------------------------
    + save-result  false         true
    +

    打开 unsafe 开关,支持 jdk package 下的类

    默认情况下,watch/trace/tt/trace/monitor等命令不支持java.* package 下的类。可以设置unsafe为 true,则可以增强。

    $ options unsafe true
    + NAME    BEFORE-VALUE  AFTER-VALUE
    +-----------------------------------
    + unsafe  false         true
    +
    $ watch java.lang.invoke.Invokers callSiteForm
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 61 ms, listenerId: 1
    +

    关闭 strict 模式,允许在 ognl 表达式里设置对象属性

    提示

    since 3.6.0

    对于新用户,在编写 ognl 表达式时,可能会出现误用。

    比如对于Student,判断年龄等于 18 时,可能条件表达式会误写为target.age=18,这个表达式实际上是把当前对象的age设置为 18 了。正确的写法是target.age==18

    为了防止出现类似上面的误用,Arthas 默认启用strict模式,在ognl表达式里,禁止更新对象的 Property 或者调用setter函数。

    MathGame为例,会出现以下的错误提示。

    $ watch demo.MathGame primeFactors 'target' 'target.illegalArgumentCount=1'
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 206 ms, listenerId: 1
    +watch failed, condition is: target.illegalArgumentCount=1, express is: target, By default, strict mode is true, not allowed to set object properties. Want to set object properties, execute `options strict false`, visit /Users/admin/logs/arthas/arthas.log for more details.
    +

    用户如果确定要在ognl表达式里更新对象,可以执行options strict false,关闭strict模式。

    • 更多信息参考: https://github.com/alibaba/arthas/issues/2128
    + + + diff --git a/3.x/doc/perfcounter.html b/3.x/doc/perfcounter.html new file mode 100644 index 00000000000..1b535ff6e33 --- /dev/null +++ b/3.x/doc/perfcounter.html @@ -0,0 +1,60 @@ + + + + + + + + + perfcounter | arthas + + + + +
    目录

    perfcounter

    perfcounter在线教程在新窗口打开

    提示

    查看当前 JVM 的 Perf Counter 信息

    使用参考

    $ perfcounter
    + java.ci.totalTime                            2325637411
    + java.cls.loadedClasses                       3403
    + java.cls.sharedLoadedClasses                 0
    + java.cls.sharedUnloadedClasses               0
    + java.cls.unloadedClasses                     0
    + java.property.java.version                   11.0.4
    + java.property.java.vm.info                   mixed mode
    + java.property.java.vm.name                   OpenJDK 64-Bit Server VM
    +...
    +

    可以用-d参数打印更多信息:

    $ perfcounter -d
    + Name                                   Variability   Units        Value
    +---------------------------------------------------------------------------------
    + java.ci.totalTime                      Monotonic     Ticks        3242526906
    + java.cls.loadedClasses                 Monotonic     Events       3404
    + java.cls.sharedLoadedClasses           Monotonic     Events       0
    + java.cls.sharedUnloadedClasses         Monotonic     Events       0
    + java.cls.unloadedClasses               Monotonic     Events       0
    +

    jdk9 以上的应用

    如果没有打印出信息,应用在启动时,加下面的参数:

    --add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter=ALL-UNNAMED
    +
    + + + diff --git a/3.x/doc/profiler.html b/3.x/doc/profiler.html new file mode 100644 index 00000000000..285d63e9c74 --- /dev/null +++ b/3.x/doc/profiler.html @@ -0,0 +1,93 @@ + + + + + + + + + profiler | arthas + + + + +
    目录

    profiler

    profiler在线教程在新窗口打开

    提示

    使用async-profiler在新窗口打开生成火焰图

    profiler 命令支持生成应用热点的火焰图。本质上是通过不断的采样,然后把收集到的采样结果生成火焰图。

    profiler 命令基本运行结构是 profiler action [actionArg]

    参数说明

    参数名称参数说明
    action要执行的操作
    actionArg属性名模式
    [i:]采样间隔(单位:ns)(默认值:10'000'000,即 10 ms)
    [f:]将输出转储到指定路径
    [d:]运行评测指定秒
    [e:]要跟踪哪个事件(cpu, alloc, lock, cache-misses 等),默认是 cpu

    启动 profiler

    $ profiler start
    +Started [cpu] profiling
    +

    提示

    默认情况下,生成的是 cpu 的火焰图,即 event 为cpu。可以用--event参数来指定。

    获取已采集的 sample 的数量

    $ profiler getSamples
    +23
    +

    查看 profiler 状态

    $ profiler status
    +[cpu] profiling is running for 4 seconds
    +

    可以查看当前 profiler 在采样哪种event和采样时间。

    停止 profiler

    生成 html 格式结果

    默认情况下,结果文件是html格式,也可以用--format参数指定:

    $ profiler stop --format html
    +profiler output file: /tmp/test/arthas-output/20211207-111550.html
    +OK
    +

    或者在--file参数里用文件名指名格式。比如--file /tmp/result.html

    通过浏览器查看 arthas-output 下面的 profiler 结果

    默认情况下,arthas 使用 3658 端口,则可以打开: http://localhost:3658/arthas-output/在新窗口打开 查看到arthas-output目录下面的 profiler 结果:

    点击可以查看具体的结果:

    提示

    如果是 chrome 浏览器,可能需要多次刷新。

    profiler 支持的 events

    在不同的平台,不同的 OS 下面,支持的 events 各有不同。比如在 macos 下面:

    $ profiler list
    +Basic events:
    +  cpu
    +  alloc
    +  lock
    +  wall
    +  itimer
    +

    在 linux 下面

    $ profiler list
    +Basic events:
    +  cpu
    +  alloc
    +  lock
    +  wall
    +  itimer
    +Perf events:
    +  page-faults
    +  context-switches
    +  cycles
    +  instructions
    +  cache-references
    +  cache-misses
    +  branches
    +  branch-misses
    +  bus-cycles
    +  L1-dcache-load-misses
    +  LLC-load-misses
    +  dTLB-load-misses
    +  mem:breakpoint
    +  trace:tracepoint
    +

    如果遇到 OS 本身的权限/配置问题,然后  缺少部分 event,可以参考async-profiler本身文档:async-profiler在新窗口打开

    可以用--event参数指定要采样的事件,比如对alloc事件进入采样:

    $ profiler start --event alloc
    +

    恢复采样

    $ profiler resume
    +Started [cpu] profiling
    +

    startresume的区别是:start是新开始采样,resume会保留上次stop时的数据。

    通过执行profiler getSamples可以查看 samples 的数量来验证。

    使用execute来执行复杂的命令

    比如开始采样:

    profiler execute 'start,framebuf=5000000'
    +

    停止采样,并保存到指定文件里:

    profiler execute 'stop,file=/tmp/result.html'
    +

    具体的格式参考: arguments.cpp在新窗口打开

    查看所有支持的 action

    $ profiler actions
    +Supported Actions: [resume, dumpCollapsed, getSamples, start, list, execute, version, stop, load, dumpFlat, actions, dumpTraces, status]
    +

    查看版本

    $ profiler version
    +Async-profiler 1.6 built on Sep  9 2019
    +Copyright 2019 Andrei Pangin
    +

    配置 framebuf 参数

    如果遇到生成的火焰图有 [frame_buffer_overflow],则需要增大 framebuf(默认值是 1'000'000),可以显式配置,比如:

    profiler start --framebuf 5000000
    +

    配置 include/exclude 来过滤数据

    如果应用比较复杂,生成的内容很多,想只关注部分数据,可以通过 include/exclude 来过滤。比如

    profiler start --include 'java/*' --include 'demo/*' --exclude '*Unsafe.park*'
    +

    include/exclude 都支持设置多个值 ,但是需要配置在命令行的最后。

    指定执行时间

    比如,希望 profiler 执行 300 秒自动结束,可以用 -d/--duration 参数指定:

    profiler start --duration 300
    +

    生成 jfr 格式结果

    注意,jfr 只支持在 start时配置。如果是在stop时指定,则不会生效。

    profiler start --file /tmp/test.jfr
    +

    file参数支持一些变量:

    • 时间戳: --file /tmp/test-%t.jfr
    • 进程 ID: --file /tmp/test-%p.jfr

    生成的结果可以用支持 jfr 格式的工具来查看。比如:

    • JDK Mission Control : https://github.com/openjdk/jmc
    • JProfiler : https://github.com/alibaba/arthas/issues/1416

    生成的火焰图里的 unknown

    • https://github.com/jvm-profiling-tools/async-profiler/discussions/409
    + + + diff --git a/3.x/doc/pwd.html b/3.x/doc/pwd.html new file mode 100644 index 00000000000..0586461e26f --- /dev/null +++ b/3.x/doc/pwd.html @@ -0,0 +1,42 @@ + + + + + + + + + pwd | arthas + + + + + + + + diff --git a/3.x/doc/quick-start.html b/3.x/doc/quick-start.html new file mode 100644 index 00000000000..b169189d786 --- /dev/null +++ b/3.x/doc/quick-start.html @@ -0,0 +1,205 @@ + + + + + + + + + 快速入门 | arthas + + + + +
    目录

    快速入门

    可以通过下面的方式自己动手实践,也可以通过我们的在线教程在新窗口打开,跟随教程快速入门。

    1. 启动 math-game

    curl -O https://arthas.aliyun.com/math-game.jar
    +java -jar math-game.jar
    +

    math-game是一个简单的程序,每隔一秒生成一个随机数,再执行质因数分解,并打印出分解结果。

    math-game源代码:查看在新窗口打开

    2. 启动 arthas

    在命令行下面执行(使用和目标进程一致的用户启动,否则可能 attach 失败):

    curl -O https://arthas.aliyun.com/arthas-boot3.jar
    +java -jar arthas-boot3.jar
    +
    • 执行该程序的用户需要和目标进程具有相同的权限。比如以admin用户来执行:sudo su admin && java -jar arthas-boot3.jarsudo -u admin -EH java -jar arthas-boot3.jar
    • 如果 attach 不上目标进程,可以查看~/logs/arthas/ 目录下的日志。
    • 如果下载速度比较慢,可以使用 aliyun 的镜像:java -jar arthas-boot3.jar --repo-mirror aliyun --use-http
    • java -jar arthas-boot3.jar -h 打印更多参数信息。

    选择应用 java 进程:

    $ $ java -jar arthas-boot3.jar
    +* [1]: 35542
    +  [2]: 71560 math-game.jar
    +

    math-game进程是第 2 个,则输入 2,再输入回车/enter。Arthas 会 attach 到目标进程上,并输出日志:

    [INFO] Try to attach process 71560
    +[INFO] Attach process 71560 success.
    +[INFO] arthas-client connect 127.0.0.1 3658
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
    +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
    +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
    +
    +
    +wiki: https://arthas.aliyun.com/3.x/doc
    +version: 3.0.5.20181127201536
    +pid: 71560
    +time: 2018-11-28 19:16:24
    +
    +$
    +

    3. 查看 dashboard

    输入dashboard,按回车/enter,会展示当前进程的信息,按ctrl+c可以中断执行。

    $ dashboard
    +ID     NAME                   GROUP          PRIORI STATE  %CPU    TIME   INTERRU DAEMON
    +17     pool-2-thread-1        system         5      WAITIN 67      0:0    false   false
    +27     Timer-for-arthas-dashb system         10     RUNNAB 32      0:0    false   true
    +11     AsyncAppender-Worker-a system         9      WAITIN 0       0:0    false   true
    +9      Attach Listener        system         9      RUNNAB 0       0:0    false   true
    +3      Finalizer              system         8      WAITIN 0       0:0    false   true
    +2      Reference Handler      system         10     WAITIN 0       0:0    false   true
    +4      Signal Dispatcher      system         9      RUNNAB 0       0:0    false   true
    +26     as-command-execute-dae system         10     TIMED_ 0       0:0    false   true
    +13     job-timeout            system         9      TIMED_ 0       0:0    false   true
    +1      main                   main           5      TIMED_ 0       0:0    false   false
    +14     nioEventLoopGroup-2-1  system         10     RUNNAB 0       0:0    false   false
    +18     nioEventLoopGroup-2-2  system         10     RUNNAB 0       0:0    false   false
    +23     nioEventLoopGroup-2-3  system         10     RUNNAB 0       0:0    false   false
    +15     nioEventLoopGroup-3-1  system         10     RUNNAB 0       0:0    false   false
    +Memory             used   total max    usage GC
    +heap               32M    155M  1820M  1.77% gc.ps_scavenge.count  4
    +ps_eden_space      14M    65M   672M   2.21% gc.ps_scavenge.time(m 166
    +ps_survivor_space  4M     5M    5M           s)
    +ps_old_gen         12M    85M   1365M  0.91% gc.ps_marksweep.count 0
    +nonheap            20M    23M   -1           gc.ps_marksweep.time( 0
    +code_cache         3M     5M    240M   1.32% ms)
    +Runtime
    +os.name                Mac OS X
    +os.version             10.13.4
    +java.version           1.8.0_162
    +java.home              /Library/Java/JavaVir
    +                       tualMachines/jdk1.8.0
    +                       _162.jdk/Contents/Hom
    +                       e/jre
    +

    4. 通过 thread 命令来获取到math-game进程的 Main Class

    thread 1会打印线程 ID 1 的栈,通常是 main 函数的线程。

    $ thread 1 | grep 'main('
    +    at demo.MathGame.main(MathGame.java:17)
    +

    5. 通过 jad 来反编译 Main Class

    $ jad demo.MathGame
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@3d4eac69
    +  +-sun.misc.Launcher$ExtClassLoader@66350f69
    +
    +Location:
    +/tmp/math-game.jar
    +
    +/*
    + * Decompiled with CFR 0_132.
    + */
    +package demo;
    +
    +import java.io.PrintStream;
    +import java.util.ArrayList;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.Random;
    +import java.util.concurrent.TimeUnit;
    +
    +public class MathGame {
    +    private static Random random = new Random();
    +    private int illegalArgumentCount = 0;
    +
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        do {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1L);
    +        } while (true);
    +    }
    +
    +    public void run() throws InterruptedException {
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = this.primeFactors(number);
    +            MathGame.print(number, primeFactors);
    +        }
    +        catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", this.illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +
    +    public static void print(int number, List<Integer> primeFactors) {
    +        StringBuffer sb = new StringBuffer("" + number + "=");
    +        Iterator<Integer> iterator = primeFactors.iterator();
    +        while (iterator.hasNext()) {
    +            int factor = iterator.next();
    +            sb.append(factor).append('*');
    +        }
    +        if (sb.charAt(sb.length() - 1) == '*') {
    +            sb.deleteCharAt(sb.length() - 1);
    +        }
    +        System.out.println(sb);
    +    }
    +
    +    public List<Integer> primeFactors(int number) {
    +        if (number < 2) {
    +            ++this.illegalArgumentCount;
    +            throw new IllegalArgumentException("number is: " + number + ", need >= 2");
    +        }
    +        ArrayList<Integer> result = new ArrayList<Integer>();
    +        int i = 2;
    +        while (i <= number) {
    +            if (number % i == 0) {
    +                result.add(i);
    +                number /= i;
    +                i = 2;
    +                continue;
    +            }
    +            ++i;
    +        }
    +        return result;
    +    }
    +}
    +
    +Affect(row-cnt:1) cost in 970 ms.
    +

    6. watch

    通过watch命令来查看demo.MathGame#primeFactors函数的返回值:

    $ watch demo.MathGame primeFactors returnObj
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 107 ms.
    +ts=2018-11-28 19:22:30; [cost=1.715367ms] result=null
    +ts=2018-11-28 19:22:31; [cost=0.185203ms] result=null
    +ts=2018-11-28 19:22:32; [cost=19.012416ms] result=@ArrayList[
    +    @Integer[5],
    +    @Integer[47],
    +    @Integer[2675531],
    +]
    +ts=2018-11-28 19:22:33; [cost=0.311395ms] result=@ArrayList[
    +    @Integer[2],
    +    @Integer[5],
    +    @Integer[317],
    +    @Integer[503],
    +    @Integer[887],
    +]
    +ts=2018-11-28 19:22:34; [cost=10.136007ms] result=@ArrayList[
    +    @Integer[2],
    +    @Integer[2],
    +    @Integer[3],
    +    @Integer[3],
    +    @Integer[31],
    +    @Integer[717593],
    +]
    +ts=2018-11-28 19:22:35; [cost=29.969732ms] result=@ArrayList[
    +    @Integer[5],
    +    @Integer[29],
    +    @Integer[7651739],
    +]
    +

    更多的功能可以查看进阶教程在新窗口打开

    7. 退出 arthas

    如果只是退出当前的连接,可以用quit或者exit命令。Attach 到目标进程上的 arthas 还会继续运行,端口会保持开放,下次连接时可以直接连接上。

    如果想完全退出 arthas,可以执行stop命令。

    + + + diff --git a/3.x/doc/quit.html b/3.x/doc/quit.html new file mode 100644 index 00000000000..6d663905388 --- /dev/null +++ b/3.x/doc/quit.html @@ -0,0 +1,41 @@ + + + + + + + + + quit | arthas + + + + + + + + diff --git a/3.x/doc/redefine.html b/3.x/doc/redefine.html new file mode 100644 index 00000000000..3fbcd39a45a --- /dev/null +++ b/3.x/doc/redefine.html @@ -0,0 +1,75 @@ + + + + + + + + + redefine | arthas + + + + +
    目录

    redefine

    提示

    推荐使用 retransform 命令

    mc-redefine在线教程在新窗口打开

    提示

    加载外部的.class文件,redefine jvm 已加载的类。

    参考:Instrumentation#redefineClasses在新窗口打开

    常见问题

    提示

    推荐使用 retransform 命令

    • redefine 的 class 不能修改、添加、删除类的 field 和 method,包括方法参数、方法名称及返回值

    • 如果 mc 失败,可以在本地开发环境编译好 class 文件,上传到目标系统,使用 redefine 热加载 class

    • 目前 redefine 和 watch/trace/jad/tt 等命令冲突,以后重新实现 redefine 功能会解决此问题

    注意

    注意, redefine 后的原来的类不能恢复,redefine 有可能失败(比如增加了新的 field),参考 jdk 本身的文档。

    提示

    reset命令对redefine的类无效。如果想重置,需要redefine原始的字节码。

    提示

    redefine命令和jad/watch/trace/monitor/tt等命令会冲突。执行完redefine之后,如果再执行上面提到的命令,则会把redefine的字节码重置。 原因是 jdk 本身 redefine 和 Retransform 是不同的机制,同时使用两种机制来更新字节码,只有最后修改的会生效。

    参数说明

    参数名称参数说明
    [c:]ClassLoader 的 hashcode
    [classLoaderClass:]指定执行表达式的 ClassLoader 的 class name

    使用参考

       redefine /tmp/Test.class
    +   redefine -c 327a647b /tmp/Test.class /tmp/Test\$Inner.class
    +   redefine --classLoaderClass sun.misc.Launcher$AppClassLoader /tmp/Test.class /tmp/Test\$Inner.class
    +

    结合 jad/mc 命令使用

    jad --source-only com.example.demo.arthas.user.UserController > /tmp/UserController.java
    +
    +mc /tmp/UserController.java -d /tmp
    +
    +redefine /tmp/com/example/demo/arthas/user/UserController.class
    +
    • jad 命令反编译,然后可以用其它编译器,比如 vim 来修改源码
    • mc 命令来内存编译修改过的代码
    • 用 redefine 命令加载新的字节码

    上传 .class 文件到服务器的技巧

    使用mc命令来编译jad的反编译的代码有可能失败。可以在本地修改代码,编译好后再上传到服务器上。有的服务器不允许直接上传文件,可以使用base64命令来绕过。

    1. 在本地先转换.class文件为 base64,再保存为 result.txt

      base64 < Test.class > result.txt
      +
    2. 到服务器上,新建并编辑result.txt,复制本地的内容,粘贴再保存

    3. 把服务器上的 result.txt还原为.class

      base64 -d < result.txt > Test.class
      +
    4. 用 md5 命令计算哈希值,校验是否一致

    redefine 的限制

    • 不允许新增加 field/method
    • 正在跑的函数,没有退出不能生效,比如下面新增加的System.out.println,只有run()函数里的会生效
    public class MathGame {
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        while (true) {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1);
    +            // 这个不生效,因为代码一直跑在 while里
    +            System.out.println("in loop");
    +        }
    +    }
    +
    +    public void run() throws InterruptedException {
    +        // 这个生效,因为run()函数每次都可以完整结束
    +        System.out.println("call run()");
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = primeFactors(number);
    +            print(number, primeFactors);
    +
    +        } catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +}
    +
    + + + diff --git a/3.x/doc/release-notes.html b/3.x/doc/release-notes.html new file mode 100644 index 00000000000..a3c77d0ff68 --- /dev/null +++ b/3.x/doc/release-notes.html @@ -0,0 +1,41 @@ + + + + + + + + + Release Notes | arthas + + + + +
    目录

    Release Notes

    v3.1.1

    v3.1.0

    v3.0.5

    v3.0.4

    v2017-11-03

    • 增加 getstatic 方法获取静态变量
    • 修复 arthas classloader 加载到应用日志的问题
    • 增加 ognl custom classloader 便于调用静态方法
    • 优化 termd 输出大字符串的性能问题
    • classloader 命令默认按类加载器类型分类编译
    • 修复 wc 命令统计错误的问题
    • 禁止增强特定 JDK 类,如 Classloader, Method, Integer 等
    • 支持 OGNL 表达式出错直接退出命令
    • 修复管道类命令单独出错的问题
    • 优化命令重定向功能,使用异步日志输出结果
    • trace 命令增加过滤 jdk 方法调用的功能

    v2017-09-22

    • 优化 agent server 启动时的异常信息
    • 修复异步命令的一些 bug

    v2017-09-11

    • 支持异步后后命令
    • jad 命令优化,支持 JDK8 及内部类
    • 修复中文乱码问题

    v2017-05-11

    • tt 命令默认只展开 1 层,防止对象过大造成卡顿
    • 修复中文无法展示的问题

    v2017-05-12

    • Arthas 3.0 release

    v2016-12-09

    • as.sh 支持-h 输出帮助
    • [#121] 修复残留的临时文件导致 arthas 启动失败的问题
    • [#123] 修复反复 attach/shutdown 造成 classloader 泄露的问题
    • 优化命令中的帮助提示信息
    • [#126] 修复 tm 命令文档链接错乱的问题
    • [#122] classloader 命令中过滤掉sun.reflect.DelegatingClassLoader
    • [#129] 修复 classloader 层次展示的问题
    • [#125] arthas 输出的 log 不主动换行,对于日志解析更加友好
    • [#96] sc 等命令支持 com/taobao/xxx/TestClass 这样的格式,以后复制粘贴不需要在把'/'替换成'.'啦
    • [#124] 修复某些情况下 trace 的时间为负值的问题
    • [#128] tt 命令的结果默认自动展开,不需要再增加-x 2来看到参数,异常的详细信息了。
    • [#130] 修复当端口冲突时,没有很好地打印错误,而是进入了一个出错的交互界面的问题
    • [#98] 修复 Arthas 启动时,如果下载更新失败,导致启动失败的问题
    • [#139] 修复某些特殊情况下 agent attach 失败的问题
    • [#156] jd-core-java 延迟初始化,避免 arthas 启动时出错
    • 修复线程名重复的问题
    • [#150] trace 命令支持按运行总耗时过滤
    • 修复 sc 查找 SystemClassloader 时可能出现的 NPE
    • [#180] 修复第一次 Attach 成功之后,删除之前 Arthas 的安装包,重新编译打包,再次 attach 失败的问题

    v2016-06-07

    • 修复以资源方式加载 spy 类时出现 NPE 的问题
    • 支持一键找出线程中获得锁并阻塞住其他线程的线程
    • 优化 Thread 输出,按线程名排序
    • 获取 topN 忙的线程时,支持指定刷新间隔

    v2016-04-08

    • New feature:

      • dashboard 支持指定刷新频率,支持指定执行次数
      • 命令执行结果保存到日志文件,方便后续查看
      • 启动速度优化,第一次 attach 的速度提升一倍
      • 支持批处理功能,支持执行脚本文件
      • 优化启动逻辑,arthas 脚本启动时交互式选择进程
      • 类默认启用继承关系查询,查找类时默认会查找子类,如果需要关闭,则通过全局开关 Options disable-sub-class 关闭
      • 支持在彩色模式和文本模式中切换
    • UI Improvement:

      • 合并 exit 和 quit 命令
      • 命令帮助信息增加 wiki 链接
      • 优化 watch 的逻辑,更加符合大家的直觉
      • thread 命令增加 example 说明
      • 自动补全的时候,忽略大小写
    • Bugfix:

      • 修复 trace 命令遇到循环造成输出太长
      • 修复 trace 命令在方法调用中抛出了异常,会让 trace 的节点错位
      • 修正增强 BootstrapClassLoader 加载的类,找不到 Spy 的问题
      • 修复某些配色方案下,结果显示不友好的问题

    v2016-03-07

    • 支持一键查看当前最忙的前 N 个线程及其堆栈
    • 修复 openjdk 下启动 arthas 失败的问题(需要重新安装 as.sh)
    • 一些体验优化

    v2016-01-18

    • 优化 jad,实时 dump 内存 byte array,并使用 jd-core-java 反编译,支持行号显示
    • 修复 tt 命令在监控与线程上下文相关的方法调用时,显示/重做等场景下的 bug

    v2016-01-08

    • 修复一些 bug
      • jad NPE
      • watch/monitor NPE
      • 不需要转义
      • 数据统计问题修复
      • sc 查看静态变量内部层次结构

    v2015-12-29

    • Arthas 2.0 测试版本发布!
    + + + diff --git a/3.x/doc/reset.html b/3.x/doc/reset.html new file mode 100644 index 00000000000..6088292e9eb --- /dev/null +++ b/3.x/doc/reset.html @@ -0,0 +1,76 @@ + + + + + + + + + reset | arthas + + + + +
    目录

    reset

    reset在线教程在新窗口打开

    提示

    重置增强类,将被 Arthas 增强过的类全部还原,Arthas 服务端stop时会重置所有增强过的类

    使用参考

    $ reset -h
    + USAGE:
    +   reset [-h] [-E] [class-pattern]
    +
    + SUMMARY:
    +   Reset all the enhanced classes
    +
    + EXAMPLES:
    +   reset
    +   reset *List
    +   reset -E .*List
    +
    + OPTIONS:
    + -h, --help                                                         this help
    + -E, --regex                                                        Enable regular expression to match (wildcard matching by default)
    + <class-pattern>                                                    Path and classname of Pattern Matching
    +

    还原指定类

    $ trace Test test
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 57 ms.
    +`---ts=2017-10-26 17:10:33;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    `---[0.590102ms] Test:test()
    +
    +`---ts=2017-10-26 17:10:34;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    `---[0.068692ms] Test:test()
    +
    +$ reset Test
    +Affect(class-cnt:1 , method-cnt:0) cost in 11 ms.
    +

    还原所有类

    $ trace Test test
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 15 ms.
    +`---ts=2017-10-26 17:12:06;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    `---[0.128518ms] Test:test()
    +
    +$ reset
    +Affect(class-cnt:1 , method-cnt:0) cost in 9 ms.
    +
    + + + diff --git a/3.x/doc/retransform.html b/3.x/doc/retransform.html new file mode 100644 index 00000000000..bd90f2e8f3b --- /dev/null +++ b/3.x/doc/retransform.html @@ -0,0 +1,90 @@ + + + + + + + + + retransform | arthas + + + + +
    目录

    retransform

    mc-retransform在线教程在新窗口打开

    提示

    加载外部的.class文件,retransform jvm 已加载的类。

    参考:Instrumentation#retransformClasses在新窗口打开

    使用参考

       retransform /tmp/Test.class
    +   retransform -l
    +   retransform -d 1                    # delete retransform entry
    +   retransform --deleteAll             # delete all retransform entries
    +   retransform --classPattern demo.*   # triger retransform classes
    +   retransform -c 327a647b /tmp/Test.class /tmp/Test\$Inner.class
    +   retransform --classLoaderClass 'sun.misc.Launcher$AppClassLoader' /tmp/Test.class
    +

    retransform 指定的 .class 文件

    $ retransform /tmp/MathGame.class
    +retransform success, size: 1, classes:
    +demo.MathGame
    +

    加载指定的 .class 文件,然后解析出 class name,再 retransform jvm 中已加载的对应的类。每加载一个 .class 文件,则会记录一个 retransform entry.

    提示

    如果多次执行 retransform 加载同一个 class 文件,则会有多条 retransform entry.

    查看 retransform entry

    $ retransform -l
    +Id              ClassName       TransformCount  LoaderHash      LoaderClassName
    +1               demo.MathGame   1               null            null
    +
    • TransformCount 统计在 ClassFileTransformer#transform 函数里尝试返回 entry 对应的 .class 文件的次数,但并不表明 transform 一定成功。

    删除指定 retransform entry

    需要指定 id:

    retransform -d 1
    +

    删除所有 retransform entry

    retransform --deleteAll
    +

    显式触发 retransform

    $ retransform --classPattern demo.MathGame
    +retransform success, size: 1, classes:
    +demo.MathGame
    +

    注意:对于同一个类,当存在多个 retransform entry 时,如果显式触发 retransform ,则最后添加的 entry 生效(id 最大的)。

    消除 retransform 的影响

    如果对某个类执行 retransform 之后,想消除影响,则需要:

    • 删除这个类对应的 retransform entry
    • 重新触发 retransform

    提示

    如果不清除掉所有的 retransform entry,并重新触发 retransform ,则 arthas stop 时,retransform 过的类仍然生效。

    结合 jad/mc 命令使用

    jad --source-only com.example.demo.arthas.user.UserController > /tmp/UserController.java
    +
    +mc /tmp/UserController.java -d /tmp
    +
    +retransform /tmp/com/example/demo/arthas/user/UserController.class
    +
    • jad 命令反编译,然后可以用其它编译器,比如 vim 来修改源码
    • mc 命令来内存编译修改过的代码
    • 用 retransform 命令加载新的字节码

    上传 .class 文件到服务器的技巧

    使用mc命令来编译jad的反编译的代码有可能失败。可以在本地修改代码,编译好后再上传到服务器上。有的服务器不允许直接上传文件,可以使用base64命令来绕过。

    1. 在本地先转换.class文件为 base64,再保存为 result.txt

      base64 < Test.class > result.txt
      +
    2. 到服务器上,新建并编辑result.txt,复制本地的内容,粘贴再保存

    3. 把服务器上的 result.txt还原为.class

      base64 -d < result.txt > Test.class
      +
    4. 用 md5 命令计算哈希值,校验是否一致

    retransform 的限制

    • 不允许新增加 field/method
    • 正在跑的函数,没有退出不能生效,比如下面新增加的System.out.println,只有run()函数里的会生效
    public class MathGame {
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        while (true) {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1);
    +            // 这个不生效,因为代码一直跑在 while里
    +            System.out.println("in loop");
    +        }
    +    }
    +
    +    public void run() throws InterruptedException {
    +        // 这个生效,因为run()函数每次都可以完整结束
    +        System.out.println("call run()");
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = primeFactors(number);
    +            print(number, primeFactors);
    +
    +        } catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +}
    +
    + + + diff --git a/3.x/doc/save-log.html b/3.x/doc/save-log.html new file mode 100644 index 00000000000..21294ca172a --- /dev/null +++ b/3.x/doc/save-log.html @@ -0,0 +1,46 @@ + + + + + + + + + 执行结果存日志 | arthas + + + + +
    目录

    执行结果存日志

    执行结果存日志在线教程在新窗口打开

    提示

    将命令的结果完整保存在日志文件中,便于后续进行分析

    • 默认情况下,该功能是关闭的,如果需要开启,请执行以下命令:
    $ options save-result true
    + NAME         BEFORE-VALUE  AFTER-VALUE
    +----------------------------------------
    + save-result  false         true
    +Affect(row-cnt:1) cost in 3 ms.
    +

    看到上面的输出,即表示成功开启该功能;

    • 日志文件路径

    结果会异步保存在:{user.home}/logs/arthas-cache/result.log,请定期进行清理,以免占据磁盘空间

    使用 Arthas 的异步后台任务将结果存日志文件

    参考:async

    + + + diff --git a/3.x/doc/sc.html b/3.x/doc/sc.html new file mode 100644 index 00000000000..cfe2c606e1d --- /dev/null +++ b/3.x/doc/sc.html @@ -0,0 +1,105 @@ + + + + + + + + + sc | arthas + + + + +
    目录

    sc

    sc在线教程在新窗口打开

    提示

    查看 JVM 已加载的类信息

    “Search-Class” 的简写,这个命令能搜索出所有已经加载到 JVM 中的 Class 信息,这个命令支持的参数有 [d][E][f][x:]

    参数说明

    参数名称参数说明
    class-pattern类名表达式匹配
    method-pattern方法名表达式匹配
    [d]输出当前类的详细信息,包括这个类所加载的原始文件来源、类的声明、加载的 ClassLoader 等详细信息。
    如果一个类被多个 ClassLoader 所加载,则会出现多次
    [E]开启正则表达式匹配,默认为通配符匹配
    [f]输出当前类的成员变量信息(需要配合参数-d 一起使用)
    [x:]指定输出静态变量时属性的遍历深度,默认为 0,即直接使用 toString 输出
    [c:]指定 class 的 ClassLoader 的 hashcode
    [classLoaderClass:]指定执行表达式的 ClassLoader 的 class name
    [n:]具有详细信息的匹配类的最大数量(默认为 100)
    [cs <arg>]指定 class 的 ClassLoader#toString() 返回值。长格式[classLoaderStr <arg>]

    提示

    class-pattern 支持全限定名,如 com.taobao.test.AAA,也支持 com/taobao/test/AAA 这样的格式,这样,我们从异常堆栈里面把类名拷贝过来的时候,不需要在手动把/替换为.啦。

    提示

    sc 默认开启了子类匹配功能,也就是说所有当前类的子类也会被搜索出来,想要精确的匹配,请打开options disable-sub-class true开关

    使用参考

    • 模糊搜索

      $ sc demo.*
      +demo.MathGame
      +Affect(row-cnt:1) cost in 55 ms.
      +
    • 打印类的详细信息

      $ sc -d demo.MathGame
      +class-info        demo.MathGame
      +code-source       /private/tmp/math-game.jar
      +name              demo.MathGame
      +isInterface       false
      +isAnnotation      false
      +isEnum            false
      +isAnonymousClass  false
      +isArray           false
      +isLocalClass      false
      +isMemberClass     false
      +isPrimitive       false
      +isSynthetic       false
      +simple-name       MathGame
      +modifier          public
      +annotation
      +interfaces
      +super-class       +-java.lang.Object
      +class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
      +                    +-sun.misc.Launcher$ExtClassLoader@66350f69
      +classLoaderHash   3d4eac69
      +
      +Affect(row-cnt:1) cost in 875 ms.
      +
    • 打印出类的 Field 信息

      $ sc -d -f demo.MathGame
      +class-info        demo.MathGame
      +code-source       /private/tmp/math-game.jar
      +name              demo.MathGame
      +isInterface       false
      +isAnnotation      false
      +isEnum            false
      +isAnonymousClass  false
      +isArray           false
      +isLocalClass      false
      +isMemberClass     false
      +isPrimitive       false
      +isSynthetic       false
      +simple-name       MathGame
      +modifier          public
      +annotation
      +interfaces
      +super-class       +-java.lang.Object
      +class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
      +                    +-sun.misc.Launcher$ExtClassLoader@66350f69
      +classLoaderHash   3d4eac69
      +fields            modifierprivate,static
      +                  type    java.util.Random
      +                  name    random
      +                  value   java.util.Random@522b4
      +                          08a
      +
      +                  modifierprivate
      +                  type    int
      +                  name    illegalArgumentCount
      +
      +
      +Affect(row-cnt:1) cost in 19 ms.
      +
    • 通过 ClassLoader#toString 查找类(前提:有一个 toString()返回值是apo的类加载器,加载的类中包含demo.MathGame, demo.MyBar, demo.MyFoo3 个类)

      $ sc -cs apo *demo*
      +demo.MathGame
      +demo.MyBar
      +demo.MyFoo
      +Affect(row-cnt:3) cost in 56 ms.
      +
    + + + diff --git a/3.x/doc/session.html b/3.x/doc/session.html new file mode 100644 index 00000000000..ff5fc59bced --- /dev/null +++ b/3.x/doc/session.html @@ -0,0 +1,47 @@ + + + + + + + + + session | arthas + + + + +
    目录

    session

    查看当前会话的信息,显示当前绑定的 pid 以及会话 id。

    提示

    如果配置了 tunnel server,会追加打印 代理 id、tunnel 服务器的 url 以及连接状态。

    如果使用了 staturl 做统计,会追加显示 statUrl 地址。

    使用参考

    $ session
    +  Name        Value
    +--------------------------------------------------
    + JAVA_PID    14584
    + SESSION_ID  c2073d3b-443a-4a9b-9249-0c5d24a5756c
    +
    +
    + + + diff --git a/3.x/doc/sm.html b/3.x/doc/sm.html new file mode 100644 index 00000000000..7f1e7276a06 --- /dev/null +++ b/3.x/doc/sm.html @@ -0,0 +1,97 @@ + + + + + + + + + sm | arthas + + + + +
    目录

    sm

    sm在线教程在新窗口打开

    提示

    查看已加载类的方法信息

    “Search-Method” 的简写,这个命令能搜索出所有已经加载了 Class 信息的方法信息。

    sm 命令只能看到由当前类所声明 (declaring) 的方法,父类则无法看到。

    参数说明

    参数名称参数说明
    class-pattern类名表达式匹配
    method-pattern方法名表达式匹配
    [d]展示每个方法的详细信息
    [E]开启正则表达式匹配,默认为通配符匹配
    [c:]指定 class 的 ClassLoader 的 hashcode
    [classLoaderClass:]指定执行表达式的 ClassLoader 的 class name
    [n:]具有详细信息的匹配类的最大数量(默认为 100)

    使用参考

    $ sm java.lang.String
    +java.lang.String-><init>
    +java.lang.String->equals
    +java.lang.String->toString
    +java.lang.String->hashCode
    +java.lang.String->compareTo
    +java.lang.String->indexOf
    +java.lang.String->valueOf
    +java.lang.String->checkBounds
    +java.lang.String->length
    +java.lang.String->isEmpty
    +java.lang.String->charAt
    +java.lang.String->codePointAt
    +java.lang.String->codePointBefore
    +java.lang.String->codePointCount
    +java.lang.String->offsetByCodePoints
    +java.lang.String->getChars
    +java.lang.String->getBytes
    +java.lang.String->contentEquals
    +java.lang.String->nonSyncContentEquals
    +java.lang.String->equalsIgnoreCase
    +java.lang.String->compareToIgnoreCase
    +java.lang.String->regionMatches
    +java.lang.String->startsWith
    +java.lang.String->endsWith
    +java.lang.String->indexOfSupplementary
    +java.lang.String->lastIndexOf
    +java.lang.String->lastIndexOfSupplementary
    +java.lang.String->substring
    +java.lang.String->subSequence
    +java.lang.String->concat
    +java.lang.String->replace
    +java.lang.String->matches
    +java.lang.String->contains
    +java.lang.String->replaceFirst
    +java.lang.String->replaceAll
    +java.lang.String->split
    +java.lang.String->join
    +java.lang.String->toLowerCase
    +java.lang.String->toUpperCase
    +java.lang.String->trim
    +java.lang.String->toCharArray
    +java.lang.String->format
    +java.lang.String->copyValueOf
    +java.lang.String->intern
    +Affect(row-cnt:44) cost in 1342 ms.
    +
    $ sm -d java.lang.String toString
    + declaring-class  java.lang.String
    + method-name      toString
    + modifier         public
    + annotation
    + parameters
    + return           java.lang.String
    + exceptions
    +
    +Affect(row-cnt:1) cost in 3 ms.
    +
    + + + diff --git a/3.x/doc/spring-boot-starter.html b/3.x/doc/spring-boot-starter.html new file mode 100644 index 00000000000..e9e3903dc8e --- /dev/null +++ b/3.x/doc/spring-boot-starter.html @@ -0,0 +1,77 @@ + + + + + + + + + Arthas Spring Boot Starter | arthas + + + + +
    目录

    Arthas Spring Boot Starter

    提示

    只支持 spring boot 2

    最新版本:查看在新窗口打开

    配置 maven 依赖:

            <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-spring-boot-starter</artifactId>
    +            <version>${arthas.version}</version>
    +        </dependency>
    +

    应用启动后,spring 会启动 arthas,并且 attach 自身进程。

    提示

    一键创建包含 Arthas Spring Boot Starter 的工程:点击

    配置属性

    比如,通过配置 tunnel server 实现远程管理:

    arthas.agent-id=hsehdfsfghhwertyfad
    +arthas.tunnel-server=ws://47.75.156.201:7777/ws
    +

    全部支持的配置项:参考在新窗口打开

    提示

    默认情况下,arthas-spring-boot-starter 会禁掉stop命令。

    参考:Arthas Properties

    查看 Endpoint 信息

    提示

    需要配置 spring boot 暴露 endpoint:参考在新窗口打开

    假定 endpoint 端口是 8080,则通过下面 url 可以查看:

    http://localhost:8080/actuator/arthas

    {
    +    "arthasConfigMap": {
    +        "agent-id": "hsehdfsfghhwertyfad",
    +        "tunnel-server": "ws://47.75.156.201:7777/ws",
    +    }
    +}
    +

    非 spring boot 应用使用方式

    非 Spring Boot 应用,可以通过下面的方式来使用:

            <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-agent-attach</artifactId>
    +            <version>${arthas.version}</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-packaging</artifactId>
    +            <version>${arthas.version}</version>
    +        </dependency>
    +
    import com.taobao.arthas.agent.attach.ArthasAgent;
    +
    +public class ArthasAttachExample {
    +
    +	public static void main(String[] args) {
    +		ArthasAgent.attach();
    +	}
    +
    +}
    +

    也可以配置属性:

            HashMap<String, String> configMap = new HashMap<String, String>();
    +        configMap.put("arthas.appName", "demo");
    +        configMap.put("arthas.tunnelServer", "ws://127.0.0.1:7777/ws");
    +        ArthasAgent.attach(configMap);
    +

    注意

    注意配置必须是驼峰的,和 spring boot 的-风格不一样。spring boot 应用才同时支持驼峰-风格的配置。

    + + + diff --git a/3.x/doc/stack.html b/3.x/doc/stack.html new file mode 100644 index 00000000000..aa2872f6825 --- /dev/null +++ b/3.x/doc/stack.html @@ -0,0 +1,72 @@ + + + + + + + + + stack | arthas + + + + +
    目录

    stack

    stack在线教程在新窗口打开

    提示

    输出当前方法被调用的调用路径

    很多时候我们都知道一个方法被执行,但这个方法被执行的路径非常多,或者你根本就不知道这个方法是从那里被执行了,此时你需要的是 stack 命令。

    参数说明

    参数名称参数说明
    class-pattern类名表达式匹配
    method-pattern方法名表达式匹配
    condition-express条件表达式
    [E]开启正则表达式匹配,默认为通配符匹配
    [n:]执行次数限制
    [m <arg>]指定 Class 最大匹配数量,默认值为 50。长格式为[maxMatch <arg>]

    这里重点要说明的是观察表达式,观察表达式的构成主要由 ognl 表达式组成,所以你可以这样写"{params,returnObj}",只要是一个合法的 ognl 表达式,都能被正常支持。

    观察的维度也比较多,主要体现在参数 advice 的数据结构上。Advice 参数最主要是封装了通知节点的所有信息。

    请参考表达式核心变量中关于该节点的描述。

    使用例子

    启动 Demo

    启动快速入门里的math-game

    stack

    $ stack demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 36 ms.
    +ts=2018-12-04 01:32:19;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +

    指定 Class 最大匹配数量

    $ stack demo.MathGame primeFactors -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 561 ms, listenerId: 5.
    +ts=2022-12-25 21:07:07;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    @demo.MathGame.primeFactors()
    +        at demo.MathGame.run(MathGame.java:46)
    +        at demo.MathGame.main(MathGame.java:38)
    +

    据条件表达式来过滤

    $ stack demo.MathGame primeFactors 'params[0]<0' -n 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 30 ms.
    +ts=2018-12-04 01:34:27;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    +ts=2018-12-04 01:34:30;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    +Command execution times exceed limit: 2, so command will exit. You can set it with -n option.
    +

    据执行时间来过滤

    $ stack demo.MathGame primeFactors '#cost>5'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 35 ms.
    +ts=2018-12-04 01:35:58;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    + + + diff --git a/3.x/doc/start-arthas.html b/3.x/doc/start-arthas.html new file mode 100644 index 00000000000..4c6a08f9ded --- /dev/null +++ b/3.x/doc/start-arthas.html @@ -0,0 +1,58 @@ + + + + + + + + + 启动 Arthas | arthas + + + + +
    目录

    启动 Arthas

    交互模式启动

    ./as3.sh
    +
    ➜  bin git:(develop) ✗ ./as3.sh
    +Found existing java process, please choose one and input the serial number of the process, eg: 1 . Then hit ENTER.
    +  [1]: 3088 org.jetbrains.idea.maven.server.RemoteMavenServer
    +* [2]: 12872 org.apache.catalina.startup.Bootstrap
    +  [3]: 2455
    +Attaching to 12872...
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
    +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
    +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
    +$
    +

    非交互模式启动

    启动脚本如下:

    ./as3.sh <PID>[@IP:PORT]
    +

    参数说明

    • PID:目标 Java 进程 ID(请确保执行当前执行命令的用户必须有足够的权限操作对应的 Java 进程)
    • IP:Arthas Server 侦听的地址,默认值是 127.00.1。Arthas 允许多个用户同时访问,并且各自的命令不会相互干扰执行
    • PORT:目标服务器 Arthas Server 的端口号,默认的端口号是 3658

    示例

    • 如果不指定 IP 和 PORT,默认是 127.0.0.1 和 3658

      ./as3.sh 12345

      上述命令等价于:

      ./as3.sh 12356@127.0.0.1:3658

    远程诊断

    服务器启动 Arthas Server 后,其他人可以使用 telnet 远程连接上去进程诊断,例如:

    telnet 192.168.1.119 3658
    +

    sudo 支持

    成熟的线上管理环境一般都不会直接开放 JVM 部署用户权限给你,而是通过 sudo-list 来控制和监控用户的越权操作。由于 as3.sh 脚本中会对当前用户的环境变量产生感知,所以需要加上 -H 参数

    sudo -u admin -H ./as3.sh 12345
    +

    Windows 环境支持

    目前as.bat脚本只支持一个参数:pid

    as.bat <pid>
    +
    + + + diff --git a/3.x/doc/stop.html b/3.x/doc/stop.html new file mode 100644 index 00000000000..752fea9e594 --- /dev/null +++ b/3.x/doc/stop.html @@ -0,0 +1,41 @@ + + + + + + + + + stop | arthas + + + + + + + + diff --git a/3.x/doc/sysenv.html b/3.x/doc/sysenv.html new file mode 100644 index 00000000000..ecd8719a684 --- /dev/null +++ b/3.x/doc/sysenv.html @@ -0,0 +1,92 @@ + + + + + + + + + sysenv | arthas + + + + +
    目录

    sysenv

    sysenv在线教程在新窗口打开

    提示

    查看当前 JVM 的环境属性(System Environment Variables)

    使用参考

     USAGE:
    +   sysenv [-h] [env-name]
    +
    + SUMMARY:
    +   Display the system env.
    +
    + EXAMPLES:
    +   sysenv
    +   sysenv USER
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/sysenv
    +
    + OPTIONS:
    + -h, --help                                                 this help
    + <env-name>                                                 env name
    +

    查看所有环境变量

    $ sysenv
    + KEY                      VALUE
    +----------------------------------------------------------------------------------------------------------------------------
    + PATH                     /Users/admin/.sdkman/candidates/visualvm/current/bin:/Users/admin/.sdkman/candidates/ja
    +                          va/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/
    +                          MacOS
    + SDKMAN_VERSION           5.7.3+337
    + JAVA_HOME                /Users/admin/.sdkman/candidates/java/current
    + JAVA_MAIN_CLASS_65244    demo.MathGame
    + TERM                     xterm-256color
    + LANG                     zh_CN.UTF-8
    + AUTOJUMP_SOURCED         1
    + COLORTERM                truecolor
    + LOGNAME                  admin
    + XPC_SERVICE_NAME         0
    + PWD                      /Users/admin/code/ali/arthas/demo
    + TERM_PROGRAM_VERSION     3.2.5
    + _                        /Users/admin/.sdkman/candidates/java/current/bin/java
    + SHELL                    /bin/bash
    + TERM_PROGRAM             iTerm.app
    + SDKMAN_PLATFORM          Darwin
    + USER                     admin
    + ITERM_PROFILE            Default
    + TMPDIR                   /var/folders/0r/k561bkk917gg972stqclbz9h0000gn/T/
    + XPC_FLAGS                0x0
    + TERM_SESSION_ID          w0t4p0:60BC264D-9649-42AC-A7E4-AF85B69F93F8
    + __CF_USER_TEXT_ENCODING  0x1F5:0x19:0x34
    + Apple_PubSub_Socket_Ren  /private/tmp/com.apple.launchd.DwmmjSQsll/Render
    + der
    + COLORFGBG                7;0
    + HOME                     /Users/admin
    + SHLVL                    1
    + AUTOJUMP_ERROR_PATH      /Users/admin/Library/autojump/errors.log
    +

    查看单个环境变量

    提示

    支持通过TAB键自动补全

    $ sysenv USER
    +USER=admin
    +
    + + + diff --git a/3.x/doc/sysprop.html b/3.x/doc/sysprop.html new file mode 100644 index 00000000000..ca13a95e421 --- /dev/null +++ b/3.x/doc/sysprop.html @@ -0,0 +1,136 @@ + + + + + + + + + sysprop | arthas + + + + +
    目录

    sysprop

    sysprop在线教程在新窗口打开

    提示

    查看当前 JVM 的系统属性(System Property)

    使用参考

     USAGE:
    +   sysprop [-h] [property-name] [property-value]
    +
    + SUMMARY:
    +   Display, and change all the system properties.
    +
    + EXAMPLES:
    + sysprop
    + sysprop file.encoding
    + sysprop production.mode true
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/sysprop
    +
    + OPTIONS:
    + -h, --help                                  this help
    + <property-name>                             property name
    + <property-value>                            property value
    +

    查看所有属性

    $ sysprop
    + KEY                                                  VALUE
    +-------------------------------------------------------------------------------------------------------------------------------------
    + java.runtime.name                                    Java(TM) SE Runtime Environment
    + sun.boot.library.path                                /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib
    + java.vm.version                                      25.51-b03
    + user.country.format                                  CN
    + gopherProxySet                                       false
    + java.vm.vendor                                       Oracle Corporation
    + java.vendor.url                                      http://java.oracle.com/
    + path.separator                                       :
    + java.vm.name                                         Java HotSpot(TM) 64-Bit Server VM
    + file.encoding.pkg                                    sun.io
    + user.country                                         US
    + sun.java.launcher                                    SUN_STANDARD
    + sun.os.patch.level                                   unknown
    + java.vm.specification.name                           Java Virtual Machine Specification
    + user.dir                                             /private/var/tmp
    + java.runtime.version                                 1.8.0_51-b16
    + java.awt.graphicsenv                                 sun.awt.CGraphicsEnvironment
    + java.endorsed.dirs                                   /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/endors
    +                                                      ed
    + os.arch                                              x86_64
    + java.io.tmpdir                                       /var/folders/2c/tbxwzs4s4sbcvh7frbcc7n000000gn/T/
    + line.separator
    +
    + java.vm.specification.vendor                         Oracle Corporation
    + os.name                                              Mac OS X
    + sun.jnu.encoding                                     UTF-8
    + java.library.path                                    /Users/wangtao/Library/Java/Extensions:/Library/Java/Extensions:/Network/Libra
    +                                                      ry/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
    + sun.nio.ch.bugLevel
    + java.specification.name                              Java Platform API Specification
    + java.class.version                                   52.0
    + sun.management.compiler                              HotSpot 64-Bit Tiered Compilers
    + os.version                                           10.12.6
    + user.home                                            /Users/wangtao
    + user.timezone                                        Asia/Shanghai
    + java.awt.printerjob                                  sun.lwawt.macosx.CPrinterJob
    + file.encoding                                        UTF-8
    + java.specification.version                           1.8
    + user.name                                            wangtao
    + java.class.path                                      .
    + java.vm.specification.version                        1.8
    + sun.arch.data.model                                  64
    + java.home                                            /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre
    + sun.java.command                                     Test
    + java.specification.vendor                            Oracle Corporation
    + user.language                                        en
    + awt.toolkit                                          sun.lwawt.macosx.LWCToolkit
    + java.vm.info                                         mixed mode
    + java.version                                         1.8.0_51
    + 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
    + sun.boot.class.path                                  /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/resour
    +                                                      ces.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/li
    +                                                      b/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/l
    +                                                      ib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/H
    +                                                      ome/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Content
    +                                                      s/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Conte
    +                                                      nts/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jd
    +                                                      k/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.
    +                                                      jdk/Contents/Home/jre/classes
    + java.vendor                                          Oracle Corporation
    + file.separator                                       /
    + java.vendor.url.bug                                  http://bugreport.sun.com/bugreport/
    + sun.cpu.endian                                       little
    + sun.io.unicode.encoding                              UnicodeBig
    + sun.cpu.isalist
    +

    查看单个属性

    提示

    支持通过TAB键自动补全

    $ sysprop java.version
    +java.version=1.8.0_51
    +

    修改单个属性

    $ sysprop user.country
    +user.country=US
    +$ sysprop user.country CN
    +Successfully changed the system property.
    +user.country=CN
    +
    + + + diff --git a/3.x/doc/tee.html b/3.x/doc/tee.html new file mode 100644 index 00000000000..86b6aa6000b --- /dev/null +++ b/3.x/doc/tee.html @@ -0,0 +1,58 @@ + + + + + + + + + tee | arthas + + + + +
    目录

    tee

    tee在线教程在新窗口打开

    提示

    类似传统的tee命令, 用于读取标准输入的数据,并将其内容输出成文件。

    tee 指令会从标准输入设备读取数据,将其内容输出到标准输出设备,同时保存成文件。

    使用参考

     USAGE:
    +   tee [-a] [-h] [file]
    +
    + SUMMARY:
    +   tee command for pipes.
    +
    + EXAMPLES:
    +  sysprop | tee /path/to/logfile | grep java
    +  sysprop | tee -a /path/to/logfile | grep java
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/tee
    +
    + OPTIONS:
    + -a, --append                              Append to file
    + -h, --help                                this help
    + <file>                                    File path
    +
    + + + diff --git a/3.x/doc/thread.html b/3.x/doc/thread.html new file mode 100644 index 00000000000..a1ff5c94e90 --- /dev/null +++ b/3.x/doc/thread.html @@ -0,0 +1,152 @@ + + + + + + + + + thread | arthas + + + + +
    目录

    thread

    thread在线教程在新窗口打开

    提示

    查看当前线程信息,查看线程的堆栈

    参数说明

    参数名称参数说明
    id线程 id
    [n:]指定最忙的前 N 个线程并打印堆栈
    [b]找出当前阻塞其他线程的线程
    [i <value>]指定 cpu 使用率统计的采样间隔,单位为毫秒,默认值为 200
    [--all]显示所有匹配的线程

    cpu 使用率是如何统计出来的?

    这里的 cpu 使用率与 linux 命令top -H -p <pid> 的线程%CPU类似,一段采样间隔时间内,当前 JVM 里各个线程的增量 cpu 时间与采样间隔时间的比例。

    工作原理说明:

    • 首先第一次采样,获取所有线程的 CPU 时间(调用的是java.lang.management.ThreadMXBean#getThreadCpuTime()sun.management.HotspotThreadMBean.getInternalThreadCpuTimes()接口)
    • 然后睡眠等待一个间隔时间(默认为 200ms,可以通过-i指定间隔时间)
    • 再次第二次采样,获取所有线程的 CPU 时间,对比两次采样数据,计算出每个线程的增量 CPU 时间
    • 线程 CPU 使用率 = 线程增量 CPU 时间 / 采样间隔时间 * 100%

    注意

    注意: 这个统计也会产生一定的开销(JDK 这个接口本身开销比较大),因此会看到 as 的线程占用一定的百分比,为了降低统计自身的开销带来的影响,可以把采样间隔拉长一些,比如 5000 毫秒。

    提示

    另外一种查看 Java 进程的线程 cpu 使用率方法:可以使用show-busy-java-threads在新窗口打开这个脚本。

    使用参考

    支持一键展示当前最忙的前 N 个线程并打印堆栈:

    $ thread -n 3
    +"C1 CompilerThread0" [Internal] cpuUsage=1.63% deltaTime=3ms time=1170ms
    +
    +
    +"arthas-command-execute" Id=23 cpuUsage=0.11% deltaTime=0ms time=401ms RUNNABLE
    +    at java.management@11.0.7/sun.management.ThreadImpl.dumpThreads0(Native Method)
    +    at java.management@11.0.7/sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:466)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads(ThreadCommand.java:199)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process(ThreadCommand.java:122)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:82)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:18)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:111)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:108)
    +    at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:385)
    +    at java.base@11.0.7/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    +    at java.base@11.0.7/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    +    at java.base@11.0.7/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    +    at java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    +    at java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    +    at java.base@11.0.7/java.lang.Thread.run(Thread.java:834)
    +
    +
    +"VM Periodic Task Thread" [Internal] cpuUsage=0.07% deltaTime=0ms time=584ms
    +
    • 没有线程 ID,包含[Internal]表示为 JVM 内部线程,参考dashboard命令的介绍。
    • cpuUsage为采样间隔时间内线程的 CPU 使用率,与dashboard命令的数据一致。
    • deltaTime为采样间隔时间内线程的增量 CPU 时间,小于 1ms 时被取整显示为 0ms。
    • time 线程运行总 CPU 时间。

    注意:线程栈为第二采样结束时获取,不能表明采样间隔时间内该线程都是在处理相同的任务。建议间隔时间不要太长,可能间隔时间越大越不准确。 可以根据具体情况尝试指定不同的间隔时间,观察输出结果。

    当没有参数时,显示第一页线程的信息

    默认按照 CPU 增量时间降序排列,只显示第一页数据。

    $ thread
    +Threads Total: 33, NEW: 0, RUNNABLE: 9, BLOCKED: 0, WAITING: 3, TIMED_WAITING: 4, TERMINATED: 0, Internal threads: 17
    +ID   NAME                           GROUP          PRIORITY  STATE     %CPU      DELTA_TIME TIME      INTERRUPT DAEMON
    +-1   C2 CompilerThread0             -              -1        -         5.06      0.010      0:0.973   false     true
    +-1   C1 CompilerThread0             -              -1        -         0.95      0.001      0:0.603   false     true
    +23   arthas-command-execute         system         5         RUNNABLE  0.17      0.000      0:0.226   false     true
    +-1   VM Periodic Task Thread        -              -1        -         0.05      0.000      0:0.094   false     true
    +-1   Sweeper thread                 -              -1        -         0.04      0.000      0:0.011   false     true
    +-1   G1 Young RemSet Sampling       -              -1        -         0.02      0.000      0:0.025   false     true
    +12   Attach Listener                system         9         RUNNABLE  0.0       0.000      0:0.022   false     true
    +11   Common-Cleaner                 InnocuousThrea 8         TIMED_WAI 0.0       0.000      0:0.000   false     true
    +3    Finalizer                      system         8         WAITING   0.0       0.000      0:0.000   false     true
    +2    Reference Handler              system         10        RUNNABLE  0.0       0.000      0:0.000   false     true
    +4    Signal Dispatcher              system         9         RUNNABLE  0.0       0.000      0:0.000   false     true
    +15   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.029   false     true
    +22   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.196   false     true
    +24   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.038   false     true
    +16   arthas-NettyWebsocketTtyBootst system         5         RUNNABLE  0.0       0.000      0:0.001   false     true
    +17   arthas-NettyWebsocketTtyBootst system         5         RUNNABLE  0.0       0.000      0:0.001   false     true
    +

    thread --all, 显示所有匹配的线程

    显示所有匹配线程信息,有时需要获取全部 JVM 的线程数据进行分析。

    thread id, 显示指定线程的运行堆栈

    $ thread 1
    +"main" Id=1 WAITING on java.util.concurrent.CountDownLatch$Sync@29fafb28
    +    at sun.misc.Unsafe.park(Native Method)
    +    -  waiting on java.util.concurrent.CountDownLatch$Sync@29fafb28
    +    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
    +    at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
    +

    thread -b, 找出当前阻塞其他线程的线程

    有时候我们发现应用卡住了, 通常是由于某个线程拿住了某个锁, 并且其他线程都在等待这把锁造成的。 为了排查这类问题, arthas 提供了thread -b, 一键找出那个罪魁祸首。

    $ thread -b
    +"http-bio-8080-exec-4" Id=27 TIMED_WAITING
    +    at java.lang.Thread.sleep(Native Method)
    +    at test.arthas.TestThreadBlocking.doGet(TestThreadBlocking.java:22)
    +    -  locked java.lang.Object@725be470 <---- but blocks 4 other threads!
    +    at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    +    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at test.filter.TestDurexFilter.doFilter(TestDurexFilter.java:46)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    +    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    +    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    +    at com.taobao.tomcat.valves.ContextLoadFilterValve$FilterChainAdapter.doFilter(ContextLoadFilterValve.java:191)
    +    at com.taobao.eagleeye.EagleEyeFilter.doFilter(EagleEyeFilter.java:81)
    +    at com.taobao.tomcat.valves.ContextLoadFilterValve.invoke(ContextLoadFilterValve.java:150)
    +    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    +    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    +    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    +    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:429)
    +    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)
    +    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    +    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
    +    -  locked org.apache.tomcat.util.net.SocketWrapper@7127ee12
    +    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    +    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    +    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    +    at java.lang.Thread.run(Thread.java:745)
    +
    +    Number of locked synchronizers = 1
    +    - java.util.concurrent.ThreadPoolExecutor$Worker@31a6493e
    +

    注意

    注意, 目前只支持找出 synchronized 关键字阻塞住的线程, 如果是java.util.concurrent.Lock, 目前还不支持。

    thread -i, 指定采样时间间隔

    • thread -i 1000 : 统计最近 1000ms 内的线程 CPU 时间。

    • thread -n 3 -i 1000 : 列出 1000ms 内最忙的 3 个线程栈

    $ thread -n 3 -i 1000
    +"as-command-execute-daemon" Id=4759 cpuUsage=23% RUNNABLE
    +    at sun.management.ThreadImpl.dumpThreads0(Native Method)
    +    at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:440)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads(ThreadCommand.java:133)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process(ThreadCommand.java:79)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:96)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:27)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:125)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:122)
    +    at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:332)
    +    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    +    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    +    at java.lang.Thread.run(Thread.java:756)
    +
    +    Number of locked synchronizers = 1
    +    - java.util.concurrent.ThreadPoolExecutor$Worker@546aeec1
    +...
    +

    thread --state ,查看指定状态的线程

    [arthas@28114]$ thread --state WAITING
    +Threads Total: 16, NEW: 0, RUNNABLE: 9, BLOCKED: 0, WAITING: 3, TIMED_WAITING: 4, TERMINATED: 0
    +ID   NAME                           GROUP           PRIORITY   STATE     %CPU      DELTA_TIME TIME      INTERRUPTE DAEMON
    +3    Finalizer                      system          8          WAITING   0.0       0.000      0:0.000   false      true
    +20   arthas-UserStat                system          9          WAITING   0.0       0.000      0:0.001   false      true
    +14   arthas-timer                   system          9          WAITING   0.0       0.000      0:0.000   false      true
    +
    + + + diff --git a/3.x/doc/trace.html b/3.x/doc/trace.html new file mode 100644 index 00000000000..db833e781c0 --- /dev/null +++ b/3.x/doc/trace.html @@ -0,0 +1,151 @@ + + + + + + + + + trace | arthas + + + + +
    目录

    trace

    trace在线教程在新窗口打开

    提示

    方法内部调用路径,并输出方法路径上的每个节点上耗时

    trace 命令能主动搜索 class-patternmethod-pattern 对应的方法调用路径,渲染和统计整个调用链路上的所有性能开销和追踪调用链路。

    参数说明

    参数名称参数说明
    class-pattern类名表达式匹配
    method-pattern方法名表达式匹配
    condition-express条件表达式
    [E]开启正则表达式匹配,默认为通配符匹配
    [n:]命令执行次数
    #cost方法执行耗时
    [m <arg>]指定 Class 最大匹配数量,默认值为 50。长格式为[maxMatch <arg>]

    这里重点要说明的是条件表达式条件表达式的构成主要由 ognl 表达式组成,所以你可以这样写"params[0]<0",只要是一个合法的 ognl 表达式,都能被正常支持。

    请参考表达式核心变量中关于该节点的描述。

    很多时候我们只想看到某个方法的 rt 大于某个时间之后的 trace 结果,现在 Arthas 可以按照方法执行的耗时来进行过滤了,例如trace *StringUtils isBlank '#cost>100'表示当执行时间超过 100ms 的时候,才会输出 trace 的结果。

    提示

    watch/stack/trace 这个三个命令都支持#cost

    注意事项

    • trace 能方便的帮助你定位和发现因 RT 高而导致的性能问题缺陷,但其每次只能跟踪一级方法的调用链路。

      参考:Trace 命令的实现原理在新窗口打开

    • 3.3.0 版本后,可以使用动态 Trace 功能,不断增加新的匹配类,参考下面的示例。

    • 目前不支持 trace java.lang.Thread getName,参考 issue: #1610在新窗口打开 ,考虑到不是非常必要场景,且修复有一定难度,因此当前暂不修复

    使用参考

    启动 Demo

    启动快速入门里的math-game

    trace 函数

    $ trace demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 28 ms.
    +`---ts=2019-12-04 00:45:08;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[0.617465ms] demo.MathGame:run()
    +        `---[0.078946ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +
    +`---ts=2019-12-04 00:45:09;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[1.276874ms] demo.MathGame:run()
    +        `---[0.03752ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +

    提示

    结果里的 #24,表示在 run 函数里,在源文件的第24行调用了primeFactors()函数。

    指定 Class 匹配的最大数量

    $ trace demo.MathGame run -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 412 ms, listenerId: 4
    +`---ts=2022-12-25 21:00:00;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    `---[0.762093ms] demo.MathGame:run()
    +        `---[30.21% 0.230241ms] demo.MathGame:primeFactors() #46 [throws Exception]
    +
    +`---ts=2022-12-25 21:00:10;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    `---[0.315298ms] demo.MathGame:run()
    +        `---[13.95% 0.043995ms] demo.MathGame:primeFactors() #46 [throws Exception]
    +

    trace 次数限制

    如果方法调用的次数很多,那么可以用-n参数指定捕捉结果的次数。比如下面的例子里,捕捉到一次调用就退出命令。

    $ trace demo.MathGame run -n 1
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 20 ms.
    +`---ts=2019-12-04 00:45:53;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[0.549379ms] demo.MathGame:run()
    +        +---[0.059839ms] demo.MathGame:primeFactors() #24
    +        `---[0.232887ms] demo.MathGame:print() #25
    +
    +Command execution times exceed limit: 1, so command will exit. You can set it with -n option.
    +

    包含 jdk 的函数

    • --skipJDKMethod <value> skip jdk method trace, default value true.

    默认情况下,trace 不会包含 jdk 里的函数调用,如果希望 trace jdk 里的函数,需要显式设置--skipJDKMethod false

    $ trace --skipJDKMethod false demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 60 ms.
    +`---ts=2019-12-04 00:44:41;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[1.357742ms] demo.MathGame:run()
    +        +---[0.028624ms] java.util.Random:nextInt() #23
    +        +---[0.045534ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +        +---[0.005372ms] java.lang.StringBuilder:<init>() #28
    +        +---[0.012257ms] java.lang.Integer:valueOf() #28
    +        +---[0.234537ms] java.lang.String:format() #28
    +        +---[min=0.004539ms,max=0.005778ms,total=0.010317ms,count=2] java.lang.StringBuilder:append() #28
    +        +---[0.013777ms] java.lang.Exception:getMessage() #28
    +        +---[0.004935ms] java.lang.StringBuilder:toString() #28
    +        `---[0.06941ms] java.io.PrintStream:println() #28
    +
    +`---ts=2019-12-04 00:44:42;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[3.030432ms] demo.MathGame:run()
    +        +---[0.010473ms] java.util.Random:nextInt() #23
    +        +---[0.023715ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +        +---[0.005198ms] java.lang.StringBuilder:<init>() #28
    +        +---[0.006405ms] java.lang.Integer:valueOf() #28
    +        +---[0.178583ms] java.lang.String:format() #28
    +        +---[min=0.011636ms,max=0.838077ms,total=0.849713ms,count=2] java.lang.StringBuilder:append() #28
    +        +---[0.008747ms] java.lang.Exception:getMessage() #28
    +        +---[0.019768ms] java.lang.StringBuilder:toString() #28
    +        `---[0.076457ms] java.io.PrintStream:println() #28
    +

    根据调用耗时过滤

    $ trace demo.MathGame run '#cost > 10'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 41 ms.
    +`---ts=2018-12-04 01:12:02;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[12.033735ms] demo.MathGame:run()
    +        +---[0.006783ms] java.util.Random:nextInt()
    +        +---[11.852594ms] demo.MathGame:primeFactors()
    +        `---[0.05447ms] demo.MathGame:print()
    +

    提示

    只会展示耗时大于 10ms 的调用路径,有助于在排查问题的时候,只关注异常情况

    • 是不是很眼熟,没错,在 JProfiler 等收费软件中你曾经见识类似的功能,这里你将可以通过命令就能打印出指定调用路径。 友情提醒下,trace 在执行的过程中本身是会有一定的性能开销,在统计的报告中并未像 JProfiler 一样预先减去其自身的统计开销。所以这统计出来有些许的不准,渲染路径上调用的类、方法越多,性能偏差越大。但还是能让你看清一些事情的。
    • [12.033735ms] 的含义,12.033735 的含义是:当前节点在当前步骤的耗时,单位为毫秒
    • [0,0,0ms,11]xxx:yyy() [throws Exception],对该方法中相同的方法调用进行了合并,0,0,0ms,11 表示方法调用耗时,min,max,total,countthrows Exception 表明该方法调用中存在异常返回
    • 这里存在一个统计不准确的问题,就是所有方法耗时加起来可能会小于该监测方法的总耗时,这个是由于 Arthas 本身的逻辑会有一定的耗时

    trace 多个类或者多个函数

    trace 命令只会 trace 匹配到的函数里的子调用,并不会向下 trace 多层。因为 trace 是代价比较贵的,多层 trace 可能会导致最终要 trace 的类和函数非常多。

    可以用正则表匹配路径上的多个类和函数,一定程度上达到多层 trace 的效果。

    trace -E com.test.ClassA|org.test.ClassB method1|method2|method3
    +

    排除掉指定的类

    使用 --exclude-class-pattern 参数可以排除掉指定的类,比如:

    trace javax.servlet.Filter * --exclude-class-pattern com.demo.TestFilter
    +

    动态 trace

    提示

    3.3.0 版本后支持。

    打开终端 1,trace 上面 demo 里的run函数,可以看到打印出 listenerId: 1

    [arthas@59161]$ trace demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 112 ms, listenerId: 1
    +`---ts=2020-07-09 16:48:11;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[1.389634ms] demo.MathGame:run()
    +        `---[0.123934ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +
    +`---ts=2020-07-09 16:48:12;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[3.716391ms] demo.MathGame:run()
    +        +---[3.182813ms] demo.MathGame:primeFactors() #24
    +        `---[0.167786ms] demo.MathGame:print() #25
    +

    现在想要深入子函数primeFactors,可以打开一个新终端 2,使用telnet localhost 3658连接上 arthas,再 trace primeFactors时,指定listenerId

    [arthas@59161]$ trace demo.MathGame primeFactors --listenerId 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 34 ms, listenerId: 1
    +

    这时终端 2 打印的结果,说明已经增强了一个函数:Affect(class count: 1 , method count: 1),但不再打印更多的结果。

    再查看终端 1,可以发现 trace 的结果增加了一层,打印了primeFactors函数里的内容:

    `---ts=2020-07-09 16:49:29;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[0.492551ms] demo.MathGame:run()
    +        `---[0.113929ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +            `---[0.061462ms] demo.MathGame:primeFactors()
    +                `---[0.001018ms] throw:java.lang.IllegalArgumentException() #46
    +
    +`---ts=2020-07-09 16:49:30;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[0.409446ms] demo.MathGame:run()
    +        +---[0.232606ms] demo.MathGame:primeFactors() #24
    +        |   `---[0.1294ms] demo.MathGame:primeFactors()
    +        `---[0.084025ms] demo.MathGame:print() #25
    +

    通过指定listenerId的方式动态 trace,可以不断深入。另外 watch/tt/monitor等命令也支持类似的功能。

    trace 结果时间不准确问题

    比如下面的结果里:0.705196 > (0.152743 + 0.145825)

    $ trace demo.MathGame run -n 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 66 ms, listenerId: 1
    +`---ts=2021-02-08 11:27:36;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@232204a1
    +    `---[0.705196ms] demo.MathGame:run()
    +        +---[0.152743ms] demo.MathGame:primeFactors() #24
    +        `---[0.145825ms] demo.MathGame:print() #25
    +

    那么其它的时间消耗在哪些地方?

    1. 没有被 trace 到的函数。比如java.* 下的函数调用默认会忽略掉。通过增加--skipJDKMethod false参数可以打印出来。

      $ trace demo.MathGame run --skipJDKMethod false
      +Press Q or Ctrl+C to abort.
      +Affect(class count: 1 , method count: 1) cost in 35 ms, listenerId: 2
      +`---ts=2021-02-08 11:27:48;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@232204a1
      +    `---[0.810591ms] demo.MathGame:run()
      +        +---[0.034568ms] java.util.Random:nextInt() #23
      +        +---[0.119367ms] demo.MathGame:primeFactors() #24 [throws Exception]
      +        +---[0.017407ms] java.lang.StringBuilder:<init>() #28
      +        +---[0.127922ms] java.lang.String:format() #57
      +        +---[min=0.01419ms,max=0.020221ms,total=0.034411ms,count=2] java.lang.StringBuilder:append() #57
      +        +---[0.021911ms] java.lang.Exception:getMessage() #57
      +        +---[0.015643ms] java.lang.StringBuilder:toString() #57
      +        `---[0.086622ms] java.io.PrintStream:println() #57
      +
    2. 非函数调用的指令消耗。比如 i++, getfield等指令。

    3. 在代码执行过程中,JVM 可能出现停顿,比如 GC,进入同步块等。

    使用 -v 参数打印更多信息

    提示

    watch/trace/monitor/stack/tt 命令都支持 -v 参数

    当命令执行之后,没有输出结果。有两种可能:

    1. 匹配到的函数没有被执行
    2. 条件表达式结果是 false

    但用户区分不出是哪种情况。

    使用 -v选项,则会打印Condition express的具体值和执行结果,方便确认。

    + + + diff --git a/3.x/doc/tt.html b/3.x/doc/tt.html new file mode 100644 index 00000000000..df1d695e81a --- /dev/null +++ b/3.x/doc/tt.html @@ -0,0 +1,133 @@ + + + + + + + + + tt | arthas + + + + +
    目录

    tt

    tt在线教程在新窗口打开

    提示

    方法执行数据的时空隧道,记录下指定方法每次调用的入参和返回信息,并能对这些不同的时间下调用进行观测

    watch 虽然很方便和灵活,但需要提前想清楚观察表达式的拼写,这对排查问题而言要求太高,因为很多时候我们并不清楚问题出自于何方,只能靠蛛丝马迹进行猜测。

    这个时候如果能记录下当时方法调用的所有入参和返回值、抛出的异常会对整个问题的思考与判断非常有帮助。

    于是乎,TimeTunnel 命令就诞生了。

    注意事项

    • tt 命令的实现是:把函数的入参/返回值等,保存到一个Map<Integer, TimeFragment>里,默认的大小是 100。
    • tt 相关功能在使用完之后,需要手动释放内存,否则长时间可能导致OOM。退出 arthas 不会自动清除 tt 的缓存 map。

    使用参考

    启动 Demo

    启动快速入门里的math-game

    记录调用

    对于一个最基本的使用来说,就是记录下当前方法的每次调用环境现场。

    $ tt -t demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 66 ms.
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +

    指定 Class 最大匹配数量

    $ tt -t -m 1 demo.MathGame primeFactors
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 130 ms, listenerId: 1.
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2022-12-25 19:41:45  2.629929  true    false    0x3bf400       MathGame                       primeFactors
    + 1001    2022-12-25 19:41:55  0.146161  false   true     0x3bf400       MathGame                       primeFactors
    +
    • 命令参数解析

      • -t

        tt 命令有很多个主参数,-t 就是其中之一。这个参数的表明希望记录下类 *Testprint 方法的每次执行情况。

      • -n 3

        当你执行一个调用量不高的方法时可能你还能有足够的时间用 CTRL+C 中断 tt 命令记录的过程,但如果遇到调用量非常大的方法,瞬间就能将你的 JVM 内存撑爆。

        此时你可以通过 -n 参数指定你需要记录的次数,当达到记录次数时 Arthas 会主动中断 tt 命令的记录过程,避免人工操作无法停止的情况。

      • -m 1

        通过 -m 参数指定 Class 匹配的最大数量,防止匹配到的 Class 数量太多导致 JVM 挂起,默认值是 50。

    • 表格字段说明

    表格字段字段解释
    INDEX时间片段记录编号,每一个编号代表着一次调用,后续 tt 还有很多命令都是基于此编号指定记录操作,非常重要。
    TIMESTAMP方法执行的本机时间,记录了这个时间片段所发生的本机时间
    COST(ms)方法执行的耗时
    IS-RET方法是否以正常返回的形式结束
    IS-EXP方法是否以抛异常的形式结束
    OBJECT执行对象的hashCode(),注意,曾经有人误认为是对象在 JVM 中的内存地址,但很遗憾他不是。但他能帮助你简单的标记当前执行方法的类实体
    CLASS执行的类名
    METHOD执行的方法名
    • 条件表达式

      不知道大家是否有在使用过程中遇到以下困惑

      • Arthas 似乎很难区分出重载的方法
      • 我只需要观察特定参数,但是 tt 却全部都给我记录了下来

      条件表达式也是用 OGNL 来编写,核心的判断对象依然是 Advice 对象。除了 tt 命令之外,watchtracestack 命令也都支持条件表达式。

    • 解决方法重载

      tt -t *Test print params.length==1

      通过制定参数个数的形式解决不同的方法签名,如果参数个数一样,你还可以这样写

      tt -t *Test print 'params[1] instanceof Integer'

    • 解决指定参数

      tt -t *Test print params[0].mobile=="13989838402"

    • 构成条件表达式的 Advice 对象

      前边看到了很多条件表达式中,都使用了 params[0],有关这个变量的介绍,请参考表达式核心变量

    检索调用记录

    当你用 tt 记录了一大片的时间片段之后,你希望能从中筛选出自己需要的时间片段,这个时候你就需要对现有记录进行检索。

    假设我们有这些记录

    $ tt -l
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +                              9
    + 1005    2018-12-04 11:15:43  0.4776    false   true     0x4b67cf4d     MathGame                       primeFactors
    +Affect(row-cnt:6) cost in 4 ms.
    +

    我需要筛选出 primeFactors 方法的调用信息

    $ tt -s 'method.name=="primeFactors"'
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +                              9
    + 1005    2018-12-04 11:15:43  0.4776    false   true     0x4b67cf4d     MathGame                       primeFactors
    +Affect(row-cnt:6) cost in 607 ms.
    +

    你需要一个 -s 参数。同样的,搜索表达式的核心对象依旧是 Advice 对象。

    查看调用信息

    对于具体一个时间片的信息而言,你可以通过 -i 参数后边跟着对应的 INDEX 编号查看到他的详细信息。

    $ tt -i 1003
    + INDEX            1003
    + GMT-CREATE       2018-12-04 11:15:41
    + COST(ms)         0.186073
    + OBJECT           0x4b67cf4d
    + CLASS            demo.MathGame
    + METHOD           primeFactors
    + IS-RETURN        false
    + IS-EXCEPTION     true
    + PARAMETERS[0]    @Integer[-564322413]
    + THROW-EXCEPTION  java.lang.IllegalArgumentException: number is: -564322413, need >= 2
    +                      at demo.MathGame.primeFactors(MathGame.java:46)
    +                      at demo.MathGame.run(MathGame.java:24)
    +                      at demo.MathGame.main(MathGame.java:16)
    +
    +Affect(row-cnt:1) cost in 11 ms.
    +

    重做一次调用

    当你稍稍做了一些调整之后,你可能需要前端系统重新触发一次你的调用,此时得求爷爷告奶奶的需要前端配合联调的同学再次发起一次调用。而有些场景下,这个调用不是这么好触发的。

    tt 命令由于保存了当时调用的所有现场信息,所以我们可以自己主动对一个 INDEX 编号的时间片自主发起一次调用,从而解放你的沟通成本。此时你需要 -p 参数。通过 --replay-times 指定 调用次数,通过 --replay-interval 指定多次调用间隔(单位 ms, 默认 1000ms)

    $ tt -i 1004 -p
    + RE-INDEX       1004
    + GMT-REPLAY     2018-12-04 11:26:00
    + OBJECT         0x4b67cf4d
    + CLASS          demo.MathGame
    + METHOD         primeFactors
    + PARAMETERS[0]  @Integer[946738738]
    + IS-RETURN      true
    + IS-EXCEPTION   false
    + COST(ms)         0.186073
    + RETURN-OBJ     @ArrayList[
    +                    @Integer[2],
    +                    @Integer[11],
    +                    @Integer[17],
    +                    @Integer[2531387],
    +                ]
    +Time fragment[1004] successfully replayed.
    +Affect(row-cnt:1) cost in 14 ms.
    +

    你会发现结果虽然一样,但调用的路径发生了变化,由原来的程序发起变成了 Arthas 自己的内部线程发起的调用了。

    观察表达式

    -w, --watch-express 观察时空隧道使用ognl 表达式

    [arthas@10718]$ tt -t demo.MathGame run -n 5
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1
    + INDEX      TIMESTAMP                   COST(ms)     IS-RET     IS-EXP      OBJECT              CLASS                                     METHOD
    +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    + 1000       2021-01-08 21:54:17         0.901091     true       false       0x7699a589          MathGame                                  run
    +[arthas@10718]$ tt -w 'target.illegalArgumentCount'  -x 1 -i 1000
    +@Integer[60]
    +Affect(row-cnt:1) cost in 7 ms.
    +
    • 获取类的静态字段、调用类的静态方法
    [arthas@10718]$ tt -t demo.MathGame run -n 5
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1
    + INDEX      TIMESTAMP                   COST(ms)     IS-RET     IS-EXP      OBJECT              CLASS                                     METHOD
    +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    + 1000       2021-01-08 21:54:17         0.901091     true       false       0x7699a589          MathGame                                  run
    +[arthas@10718]$ tt -w '@demo.MathGame@random.nextInt(100)'  -x 1 -i 1000
    +@Integer[46]
    +

    注意这里使用 com.taobao.arthas.core.advisor.Advice#getLoader加载,使用精确classloader ognl更好。

    高级用法 获取 spring context 调用 bean 方法在新窗口打开

    • 需要强调的点

      1. ThreadLocal 信息丢失

        很多框架偷偷的将一些环境变量信息塞到了发起调用线程的 ThreadLocal 中,由于调用线程发生了变化,这些 ThreadLocal 线程信息无法通过 Arthas 保存,所以这些信息将会丢失。

        一些常见的 CASE 比如:鹰眼的 TraceId 等。

      2. 引用的对象

        需要强调的是,tt 命令是将当前环境的对象引用保存起来,但仅仅也只能保存一个引用而已。如果方法内部对入参进行了变更,或者返回的对象经过了后续的处理,那么在 tt 查看的时候将无法看到当时最准确的值。这也是为什么 watch 命令存在的意义。

    通过索引删除指定的 tt 记录

    tt -d 1001
    +

    清除所有的 tt 记录

    tt --delete-all
    +
    + + + diff --git a/3.x/doc/tunnel.html b/3.x/doc/tunnel.html new file mode 100644 index 00000000000..9e4d6c9b2e6 --- /dev/null +++ b/3.x/doc/tunnel.html @@ -0,0 +1,87 @@ + + + + + + + + + Arthas Tunnel | arthas + + + + +
    目录

    Arthas Tunnel

    通过 Arthas Tunnel Server/Client 来远程管理/连接多个 Agent。

    比如,在流式计算里,Java 进程可以是在不同的机器启动的,想要使用 Arthas 去诊断会比较麻烦,因为用户通常没有机器的权限,即使登陆机器也分不清是哪个 Java 进程。

    在这种情况下,可以使用 Arthas Tunnel Server/Client。

    参考:

    下载部署 arthas tunnel server

    https://github.com/alibaba/arthas/releases在新窗口打开

    Arthas tunnel server 是一个 spring boot fat jar 应用,直接java -jar启动:

    java -jar  arthas-tunnel-server.jar
    +

    默认情况下,arthas tunnel server 的 web 端口是8080,arthas agent 连接的端口是7777

    启动之后,可以访问 http://127.0.0.1:8080/在新窗口打开 ,再通过agentId连接到已注册的 arthas agent 上。

    通过 Spring Boot 的 Endpoint,可以查看到具体的连接信息: http://127.0.0.1:8080/actuator/arthas在新窗口打开 ,登陆用户名是arthas,密码在 arthas tunnel server 的日志里可以找到,比如:

    32851 [main] INFO  o.s.b.a.s.s.UserDetailsServiceAutoConfiguration
    +
    +Using generated security password: f1dca050-3777-48f4-a577-6367e55a78a2
    +

    启动 arthas 时连接到 tunnel server

    在启动 arthas,可以传递--tunnel-server参数,比如:

    as3.sh --tunnel-server 'ws://127.0.0.1:7777/ws'
    +

    也可以使用下面的测试地址(不保证一直可用):

    as3.sh --tunnel-server 'ws://47.75.156.201:80/ws'
    +
    • 如果有特殊需求,可以通过--agent-id参数里指定 agentId。默认情况下,会生成随机 ID。

    attach 成功之后,会打印出 agentId,比如:

      ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
    +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
    +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
    +
    +
    +wiki      https://arthas.aliyun.com/3.x/doc
    +tutorials https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
    +version   3.1.2
    +pid       86183
    +time      2019-08-30 15:40:53
    +id        URJZ5L48RPBR2ALI5K4V
    +

    如果是启动时没有连接到 tunnel server,也可以在后续自动重连成功之后,通过 session 命令来获取 agentId:

    [arthas@86183]$ session
    + Name           Value
    +-----------------------------------------------------
    + JAVA_PID       86183
    + SESSION_ID     f7273eb5-e7b0-4a00-bc5b-3fe55d741882
    + AGENT_ID       URJZ5L48RPBR2ALI5K4V
    + TUNNEL_SERVER  ws://47.75.156.201:80/ws
    +

    以上面的为例,在浏览器里访问 http://47.75.156.201/arthas/?port=80在新窗口打开 ,输入 agentId,就可以连接到本机上的 arthas 了。

    最佳实践

    提示

    注意,agentId 要保持唯一,否则会在 tunnel server 上冲突,不能正常工作。

    如果 arthas agent 配置了 appName,则生成的 agentId 会带上appName的前缀。

    比如在加上启动参数:as3.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name demoapp ,则生成的 agentId 可能是demoapp_URJZ5L48RPBR2ALI5K4V

    Tunnel server 会以_做分隔符,提取出appName,方便按应用进行管理。

    提示

    另外,也可以在解压的 arthas 目录下的 arthas.properties,或者在 spring boot 应用的application.properties里配置appName

    Tunnel Server 的管理页面

    提示

    需要在 spring boot 的application.properties里配置 arthas.enable-detail-pages=true

    注意,开放管理页面有风险!管理页面没有安全拦截功能,务必自行增加安全措施。

    在本地启动 tunnel-server,然后使用as3.sh attach,并且指定应用名--app-name test

    $ as3.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name test
    +telnet connecting to arthas server... current timestamp is 1627539688
    +Trying 127.0.0.1...
    +Connected to 127.0.0.1.
    +Escape character is '^]'.
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
    +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
    +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
    +
    +
    +wiki       https://arthas.aliyun.com/3.x/doc
    +tutorials  https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
    +version    3.5.3
    +main_class demo.MathGame
    +pid        65825
    +time       2021-07-29 14:21:29
    +id         test_PE3LZO9NA9ENJYTPGL9L
    +

    然后访问 tunnel-server,可以看到所有连接的应用列表:

    http://localhost:8080/apps.html在新窗口打开

    再打开详情,则可以看到连接的所有 agent 列表:

    http://localhost:8080/agents.html?app=test在新窗口打开

    安全和权限管理

    提示

    强烈建议不要把 tunnel server 直接暴露到公网上。

    目前 tunnel server 没有专门的权限管理

    1. 用户需要自行开发,对 app name 鉴权。
    2. 如果开放管理页面,需要增加安全措施。

    集群方式管理

    如果希望部署多台 tunnel server,可以通过 nginx 做转发,redis 来保存 agent 信息。

    • nginx 需要配置 sticky session,保证用户 web socket 连接到同一个后端 tunnel server 上。简单的配置方式是用ip_hash

    Arthas tunnel server 的工作原理

    browser <-> arthas tunnel server <-> arthas tunnel client <-> arthas agent
    +

    tunnel-server/README.md在新窗口打开

    + + + diff --git a/3.x/doc/version.html b/3.x/doc/version.html new file mode 100644 index 00000000000..3c29a8dbd54 --- /dev/null +++ b/3.x/doc/version.html @@ -0,0 +1,43 @@ + + + + + + + + + version | arthas + + + + + + + + diff --git a/3.x/doc/vmoption.html b/3.x/doc/vmoption.html new file mode 100644 index 00000000000..481cab350d8 --- /dev/null +++ b/3.x/doc/vmoption.html @@ -0,0 +1,80 @@ + + + + + + + + + vmoption | arthas + + + + +
    目录

    vmoption

    vmoption在线教程在新窗口打开

    提示

    查看,更新 VM 诊断相关的参数

    使用参考

    查看所有的 option

    [arthas@56963]$ vmoption
    + KEY                    VALUE                   ORIGIN                 WRITEABLE
    +---------------------------------------------------------------------------------------------
    + HeapDumpBeforeFullGC   false                   DEFAULT                true
    + HeapDumpAfterFullGC    false                   DEFAULT                true
    + HeapDumpOnOutOfMemory  false                   DEFAULT                true
    + Error
    + HeapDumpPath                                   DEFAULT                true
    + CMSAbortablePrecleanW  100                     DEFAULT                true
    + aitMillis
    + CMSWaitDuration        2000                    DEFAULT                true
    + CMSTriggerInterval     -1                      DEFAULT                true
    + PrintGC                false                   DEFAULT                true
    + PrintGCDetails         true                    MANAGEMENT             true
    + PrintGCDateStamps      false                   DEFAULT                true
    + PrintGCTimeStamps      false                   DEFAULT                true
    + PrintGCID              false                   DEFAULT                true
    + PrintClassHistogramBe  false                   DEFAULT                true
    + foreFullGC
    + PrintClassHistogramAf  false                   DEFAULT                true
    + terFullGC
    + PrintClassHistogram    false                   DEFAULT                true
    + MinHeapFreeRatio       0                       DEFAULT                true
    + MaxHeapFreeRatio       100                     DEFAULT                true
    + PrintConcurrentLocks   false                   DEFAULT                true
    +

    查看指定的 option

    $ vmoption PrintGC
    + KEY                 VALUE                ORIGIN              WRITEABLE
    +---------------------------------------------------------------------------------
    + PrintGC             false                MANAGEMENT          true
    +

    更新指定的 option

    $ vmoption PrintGC true
    +Successfully updated the vm option.
    + NAME     BEFORE-VALUE  AFTER-VALUE
    +------------------------------------
    + PrintGC  false         true
    +
    $ vmoption PrintGCDetails true
    +Successfully updated the vm option.
    + NAME            BEFORE-VALUE  AFTER-VALUE
    +-------------------------------------------
    + PrintGCDetails  false         true
    +
    + + + diff --git a/3.x/doc/vmtool.html b/3.x/doc/vmtool.html new file mode 100644 index 00000000000..2a8986a4289 --- /dev/null +++ b/3.x/doc/vmtool.html @@ -0,0 +1,69 @@ + + + + + + + + + vmtool | arthas + + + + +
    目录

    vmtool

    提示

    @since 3.5.1

    vmtool在线教程在新窗口打开

    vmtool 利用JVMTI接口,实现查询内存对象,强制 GC 等功能。

    获取对象

    $ vmtool --action getInstances --className java.lang.String --limit 10
    +@String[][
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com.taobao.arthas.core.shell.session.Session],
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/],
    +    @String[java/util/concurrent/ConcurrentHashMap$ValueIterator],
    +    @String[java/util/concurrent/locks/LockSupport],
    +]
    +

    提示

    通过 --limit参数,可以限制返回值数量,避免获取超大数据时对 JVM 造成压力。默认值是 10。

    指定 classloader name

    vmtool --action getInstances --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader --className org.springframework.context.ApplicationContext
    +

    指定 classloader hash

    可以通过sc命令查找到加载 class 的 classloader。

    $ sc -d org.springframework.context.ApplicationContext
    + class-info        org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext
    + code-source       file:/private/tmp/demo-arthas-spring-boot.jar!/BOOT-INF/lib/spring-boot-1.5.13.RELEASE.jar!/
    + name              org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext
    +...
    + class-loader      +-org.springframework.boot.loader.LaunchedURLClassLoader@19469ea2
    +                     +-sun.misc.Launcher$AppClassLoader@75b84c92
    +                       +-sun.misc.Launcher$ExtClassLoader@4f023edb
    + classLoaderHash   19469ea2
    +

    然后用-c/--classloader 参数指定:

    vmtool --action getInstances -c 19469ea2 --className org.springframework.context.ApplicationContext
    +

    指定返回结果展开层数

    提示

    getInstances action 返回结果绑定到instances变量上,它是数组。

    通过 -x/--expand 参数可以指定结果的展开层次,默认值是 1。

    vmtool --action getInstances -c 19469ea2 --className org.springframework.context.ApplicationContext -x 2
    +

    执行表达式

    提示

    getInstances action 返回结果绑定到instances变量上,它是数组。可以通过--express参数执行指定的表达式。

    vmtool --action getInstances --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader --className org.springframework.context.ApplicationContext --express 'instances[0].getBeanDefinitionNames()'
    +

    强制 GC

    vmtool --action forceGc
    +
    • 可以结合 vmoption 命令动态打开PrintGC开关。

    interrupt 指定线程

    thread id 通过-t参数指定,可以使用 thread命令获取。

    vmtool --action interruptThread -t 1
    +
    + + + diff --git a/3.x/doc/watch.html b/3.x/doc/watch.html new file mode 100644 index 00000000000..b60ef0d9a7e --- /dev/null +++ b/3.x/doc/watch.html @@ -0,0 +1,228 @@ + + + + + + + + + watch | arthas + + + + +
    目录

    watch

    watch在线教程在新窗口打开

    提示

    函数执行数据观测

    让你能方便的观察到指定函数的调用情况。能观察到的范围为:返回值抛出异常入参,通过编写 OGNL 表达式进行对应变量的查看。

    参数说明

    watch 的参数比较多,主要是因为它能在 4 个不同的场景观察对象

    参数名称参数说明
    class-pattern类名表达式匹配
    method-pattern函数名表达式匹配
    express观察表达式,默认值:{params, target, returnObj}
    condition-express条件表达式
    [b]函数调用之前观察
    [e]函数异常之后观察
    [s]函数返回之后观察
    [f]函数结束之后(正常返回和异常返回)观察
    [E]开启正则表达式匹配,默认为通配符匹配
    [x:]指定输出结果的属性遍历深度,默认为 1,最大值是 4
    [m <arg>]指定 Class 最大匹配数量,默认值为 50。长格式为[maxMatch <arg>]

    这里重点要说明的是观察表达式,观察表达式的构成主要由 ognl 表达式组成,所以你可以这样写"{params,returnObj}",只要是一个合法的 ognl 表达式,都能被正常支持。

    观察的维度也比较多,主要体现在参数 advice 的数据结构上。Advice 参数最主要是封装了通知节点的所有信息。请参考表达式核心变量中关于该节点的描述。

    特别说明

    • watch 命令定义了 4 个观察事件点,即 -b 函数调用前,-e 函数异常后,-s 函数返回后,-f 函数结束后
    • 4 个观察事件点 -b-e-s 默认关闭,-f 默认打开,当指定观察点被打开后,在相应事件点会对观察表达式进行求值并输出
    • 这里要注意函数入参函数出参的区别,有可能在中间被修改导致前后不一致,除了 -b 事件点 params 代表函数入参外,其余事件都代表函数出参
    • 当使用 -b 时,由于观察事件点是在函数调用前,此时返回值或异常均不存在
    • 在 watch 命令的结果里,会打印出location信息。location有三种可能值:AtEnterAtExitAtExceptionExit。对应函数入口,函数正常 return,函数抛出异常。

    使用参考

    启动 Demo

    启动快速入门里的math-game

    观察函数调用返回时的参数、this 对象和返回值

    提示

    观察表达式,默认值是{params, target, returnObj}

    $ watch demo.MathGame primeFactors -x 2
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 32 ms, listenerId: 5
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2021-08-31 15:22:57; [cost=0.220625ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-179173],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@31cefde0],
    +        illegalArgumentCount=@Integer[44],
    +    ],
    +    null,
    +]
    +method=demo.MathGame.primeFactors location=AtExit
    +ts=2021-08-31 15:22:58; [cost=1.020982ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@31cefde0],
    +        illegalArgumentCount=@Integer[44],
    +    ],
    +    @ArrayList[
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[26947],
    +    ],
    +]
    +
    • 上面的结果里,说明函数被执行了两次,第一次结果是location=AtExceptionExit,说明函数抛出异常了,因此returnObj是 null
    • 在第二次结果里是location=AtExit,说明函数正常返回,因此可以看到returnObj结果是一个 ArrayList

    指定 Class 最大匹配数量

    $ watch demo.MathGame primeFactors -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 302 ms, listenerId: 3
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2022-12-25 19:58:41; [cost=0.222419ms] result=@ArrayList[
    +    @Object[][isEmpty=false;size=1],
    +    @MathGame[demo.MathGame@3bf400],
    +    null,
    +]
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2022-12-25 19:58:51; [cost=0.046928ms] result=@ArrayList[
    +    @Object[][isEmpty=false;size=1],
    +    @MathGame[demo.MathGame@3bf400],
    +    null,
    +]
    +

    观察函数调用入口的参数和返回值

    $ watch demo.MathGame primeFactors "{params,returnObj}" -x 2 -b
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 50 ms.
    +ts=2018-12-03 19:23:23; [cost=0.0353ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-1077465243],
    +    ],
    +    null,
    +]
    +
    • 对比前一个例子,返回值为空(事件点为函数执行前,因此获取不到返回值)

    同时观察函数调用前和函数返回后

    $ watch demo.MathGame primeFactors "{params,target,returnObj}" -x 2 -b -s -n 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 46 ms.
    +ts=2018-12-03 19:29:54; [cost=0.01696ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@522b408a],
    +        illegalArgumentCount=@Integer[13038],
    +    ],
    +    null,
    +]
    +ts=2018-12-03 19:29:54; [cost=4.277392ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@522b408a],
    +        illegalArgumentCount=@Integer[13038],
    +    ],
    +    @ArrayList[
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[5],
    +        @Integer[5],
    +        @Integer[73],
    +        @Integer[241],
    +        @Integer[439],
    +    ],
    +]
    +
    • 参数里-n 2,表示只执行两次

    • 这里输出结果中,第一次输出的是函数调用前的观察表达式的结果,第二次输出的是函数返回后的表达式的结果

    • 结果的输出顺序和事件发生的先后顺序一致,和命令中 -s -b 的顺序无关

    调整-x的值,观察具体的函数参数值

    $ watch demo.MathGame primeFactors "{params,target}" -x 3
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 58 ms.
    +ts=2018-12-03 19:34:19; [cost=0.587833ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[
    +            serialVersionUID=@Long[3905348978240129619],
    +            seed=@AtomicLong[3133719055989],
    +            multiplier=@Long[25214903917],
    +            addend=@Long[11],
    +            mask=@Long[281474976710655],
    +            DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +            BadBound=@String[bound must be positive],
    +            BadRange=@String[bound must be greater than origin],
    +            BadSize=@String[size must be non-negative],
    +            seedUniquifier=@AtomicLong[-3282039941672302964],
    +            nextNextGaussian=@Double[0.0],
    +            haveNextNextGaussian=@Boolean[false],
    +            serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +            unsafe=@Unsafe[sun.misc.Unsafe@2eaa1027],
    +            seedOffset=@Long[24],
    +        ],
    +        illegalArgumentCount=@Integer[13159],
    +    ],
    +]
    +
    • -x表示遍历深度,可以调整来打印具体的参数和结果内容,默认值是 1。
    • -x最大值是 4,防止展开结果占用太多内存。用户可以在ognl表达式里指定更具体的 field。

    条件表达式的例子

    $ watch demo.MathGame primeFactors "{params[0],target}" "params[0]<0"
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 68 ms.
    +ts=2018-12-03 19:36:04; [cost=0.530255ms] result=@ArrayList[
    +    @Integer[-18178089],
    +    @MathGame[demo.MathGame@41cf53f9],
    +]
    +
    • 只有满足条件的调用,才会有响应。

    观察异常信息的例子

    $ watch demo.MathGame primeFactors "{params[0],throwExp}" -e -x 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 62 ms.
    +ts=2018-12-03 19:38:00; [cost=1.414993ms] result=@ArrayList[
    +    @Integer[-1120397038],
    +    java.lang.IllegalArgumentException: number is: -1120397038, need >= 2
    +	at demo.MathGame.primeFactors(MathGame.java:46)
    +	at demo.MathGame.run(MathGame.java:24)
    +	at demo.MathGame.main(MathGame.java:16)
    +,
    +]
    +
    • -e表示抛出异常时才触发
    • express 中,表示异常信息的变量是throwExp

    按照耗时进行过滤

    $ watch demo.MathGame primeFactors '{params, returnObj}' '#cost>200' -x 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 66 ms.
    +ts=2018-12-03 19:40:28; [cost=2112.168897ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @ArrayList[
    +        @Integer[5],
    +        @Integer[428379493],
    +    ],
    +]
    +
    • #cost>200(单位是ms)表示只有当耗时大于 200ms 时才会输出,过滤掉执行时间小于 200ms 的调用

    观察当前对象中的属性

    如果想查看函数运行前后,当前对象中的属性,可以使用target关键字,代表当前对象

    $ watch demo.MathGame primeFactors 'target'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 52 ms.
    +ts=2018-12-03 19:41:52; [cost=0.477882ms] result=@MathGame[
    +    random=@Random[java.util.Random@522b408a],
    +    illegalArgumentCount=@Integer[13355],
    +]
    +

    然后使用target.field_name访问当前对象的某个属性

    $ watch demo.MathGame primeFactors 'target.illegalArgumentCount'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 67 ms.
    +ts=2018-12-03 20:04:34; [cost=131.303498ms] result=@Integer[8]
    +ts=2018-12-03 20:04:35; [cost=0.961441ms] result=@Integer[8]
    +

    获取类的静态字段、调用类的静态函数的例子

    watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -v -n 1 -x 2
    +[arthas@6527]$ watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -n 1 -x 2
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 5) cost in 34 ms, listenerId: 3
    +ts=2021-01-05 21:35:20; [cost=0.173966ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-138282],
    +    ],
    +    @Integer[89],
    +]
    +
    • 注意这里使用 Thread.currentThread().getContextClassLoader() 加载,使用精确classloader ognl更好。

    排除掉指定的类

    提示

    watch/trace/monitor/stack/tt 命令都支持 --exclude-class-pattern 参数

    使用 --exclude-class-pattern 参数可以排除掉指定的类,比如:

    watch javax.servlet.Filter * --exclude-class-pattern com.demo.TestFilter
    +

    不匹配子类

    默认情况下 watch/trace/monitor/stack/tt 命令都会匹配子类。如果想不匹配,可以通过全局参数关掉。

    options disable-sub-class true
    +

    使用 -v 参数打印更多信息

    提示

    watch/trace/monitor/stack/tt 命令都支持 -v 参数

    当命令执行之后,没有输出结果。有两种可能:

    1. 匹配到的函数没有被执行
    2. 条件表达式结果是 false

    但用户区分不出是哪种情况。

    使用 -v选项,则会打印Condition express的具体值和执行结果,方便确认。

    比如:

    $ watch -v -x 2 demo.MathGame print 'params' 'params[0] > 100000'
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 29 ms, listenerId: 11
    +Condition express: params[0] > 100000 , result: false
    +Condition express: params[0] > 100000 , result: false
    +Condition express: params[0] > 100000 , result: true
    +ts=2020-12-02 22:38:56; [cost=0.060843ms] result=@Object[][
    +    @Integer[200033],
    +    @ArrayList[
    +        @Integer[200033],
    +    ],
    +]
    +Condition express: params[0] > 100000 , result: true
    +ts=2020-12-02 22:38:57; [cost=0.052877ms] result=@Object[][
    +    @Integer[123047],
    +    @ArrayList[
    +        @Integer[29],
    +        @Integer[4243],
    +    ],
    +]
    +
    + + + diff --git a/3.x/doc/web-console.html b/3.x/doc/web-console.html new file mode 100644 index 00000000000..9c5f44721ec --- /dev/null +++ b/3.x/doc/web-console.html @@ -0,0 +1,41 @@ + + + + + + + + + Web Console | arthas + + + + +
    目录

    Web Console

    Web Console在线教程在新窗口打开

    通过浏览器连接 arthas

    Arthas 目前支持 Web Console,用户在 attach 成功之后,可以直接访问:http://127.0.0.1:8563/在新窗口打开

    可以填入 IP,远程连接其它机器上的 arthas。

    注意

    默认情况下,arthas 只 listen 127.0.0.1,所以如果想从远程连接,则可以使用 --target-ip参数指定 listen 的 IP,更多参考-h的帮助说明。 注意会有安全风险,考虑下面的 tunnel server 的方案。

    提示

    3.5.4 版本后,在 Web Console 可以鼠标右键复制粘贴。

    scrollback URL 参数

    提示

    3.5.5 版本后支持

    默认 Web Console 支持向上回滚的行数是 1000。可以在 URL 里用scrollback指定。比如

    http://127.0.0.1:8563/?scrollback=3000在新窗口打开

    使用 arthas tunnel server 连接远程 arthas

    参考:Arthas Tunnel

    + + + diff --git a/3.x/en-us/index.html b/3.x/en-us/index.html new file mode 100644 index 00000000000..49b88d83535 --- /dev/null +++ b/3.x/en-us/index.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/3.x/en/doc/advanced-use.html b/3.x/en/doc/advanced-use.html new file mode 100644 index 00000000000..3b0e94dece0 --- /dev/null +++ b/3.x/en/doc/advanced-use.html @@ -0,0 +1,70 @@ + + + + + + + + + Other features | arthas + + + + +
    Table of Contents

    Other features

    Arthas Async Jobs

    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.

    Log the output

    All execution records are fully saved in the log file for subsequent analysis.

    Docker

    Arthas configuration reference for using in Docker containers.

    Web Console

    Arthas supports living inside a browser. The communication between arthas and browser is via websocket.

    Arthas Tunnel

    Arthas Tunnel Server/Client enables remote management/connection to Java services across multiple servers.

    How to use ognl

    IDEA Plugin

    Build arthas commands more efficiently in the IntelliJ IDEA compiler.

    Arthas Properties

    Arthas supports configuration options reference.

    Start as a Java Agent

    Arthas Spring Boot Starter

    Starting with the application.

    HTTP API

    The Http API provides structured data and supports more complex interactive functions, making it easier to integrate Arthas into custom interfaces.

    Batch Processing

    It is convenient for running multiple commands in bulk with custom scripts. It can be used in conjunction with the --select parameter to specify the process name.

    as3.sh and arthas-boot3 tips

    • Select the process to be attached via the select option.

    Normally, as3.sh/arthas-boot3.jar needs to a pid, bacause the pid will change.

    For example, with math-game.jar already started, use the jps command to see.

    $ jps
    +58883 math-game.jar
    +58884 Jps
    +

    The select option allows you to specify a process name, which is very convenient.

    $ ./as3.sh --select math-game
    +Arthas script version: 3.3.6
    +[INFO] JAVA_HOME: /tmp/java/8.0.222-zulu
    +Arthas home: /Users/admin/.arthas/lib/3.3.6/arthas
    +Calculating attach execution time...
    +Attaching to 59161 using version /Users/admin/.arthas/lib/3.3.6/arthas...
    +
    +real	0m0.572s
    +user	0m0.281s
    +sys	0m0.039s
    +Attach success.
    +telnet connecting to arthas server... current timestamp is 1594280799
    +Trying 127.0.0.1...
    +Connected to localhost.
    +Escape character is '^]'.
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
    +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
    +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
    +
    +
    +wiki      https://arthas.aliyun.com/3.x/doc
    +tutorials https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
    +version   3.3.6
    +pid       58883
    +

    User data report

    After the 3.1.4 version, arthas support user data report.

    At startup, use the stat-url option, such as: ./as3.sh --stat-url 'http://192.168.10.11:8080/api/stat'

    There is a sample data report in the tunnel server that users can implement on their own.

    StatController.javaopen in new window

    + + + diff --git a/3.x/en/doc/advice-class.html b/3.x/en/doc/advice-class.html new file mode 100644 index 00000000000..e672e611c3c --- /dev/null +++ b/3.x/en/doc/advice-class.html @@ -0,0 +1,56 @@ + + + + + + + + + Fundamental Fields in Expressions | arthas + + + + +

    Fundamental Fields in Expressions

    There is a very fundamental class Advice for the expressions used in filtering, tracing or monitoring and other aspects in commands.

    public class Advice {
    +
    +    private final ClassLoader loader;
    +    private final Class<?> clazz;
    +    private final ArthasMethod method;
    +    private final Object target;
    +    private final Object[] params;
    +    private final Object returnObj;
    +    private final Throwable throwExp;
    +    private final boolean isBefore;
    +    private final boolean isThrow;
    +    private final boolean isReturn;
    +
    +    // getter/setter
    +}
    +

    Description for the variables in the class Advice:

    NameSpecification
    loaderthe class loader for the current called class
    clazzthe reference to the current called class
    methodthe reference to the current called method
    targetthe instance of the current called class
    paramsthe parameters for the current call, which is an array (when there's no parameter, it will be an empty array)
    returnObjthe return value from the current call - only available when the method call returns normally (isReturn==true), and null is for void return value
    throwExpthe exceptions thrown from the current call - only available when the method call throws exception (isThrow==true)
    isBeforeflag to indicate the method is about to execute. isBefore==true but isThrow==false and isReturn==false since it's no way to know how the method call will end
    isThrowflag to indicate the method call ends with exception thrown
    isReturnflag to indicate the method call ends normally without exception thrown

    All variables listed above can be used directly in the OGNL expressionopen in new window. The command will not execute and exit if there's illegal OGNL grammar or unexpected variable in the expression.

    + + + diff --git a/3.x/en/doc/agent.html b/3.x/en/doc/agent.html new file mode 100644 index 00000000000..ed14dbde7b6 --- /dev/null +++ b/3.x/en/doc/agent.html @@ -0,0 +1,42 @@ + + + + + + + + + Start as a Java Agent | arthas + + + + +

    Start as a Java Agent

    Usually Arthas dynamic attach the applications on the fly, but from version 3.2.0 onwards, Arthas supports starting directly as a java agent.

    For example, download the full arthas zip package, decompress it and start it by specifying arthas-agent.jar with the parameter -javaagent.

    java -javaagent:/tmp/test/arthas-agent.jar -jar math-game.jar
    +

    The default configuration is in the arthas.properties file in the decompression directory. Reference: Arthas Properties

    Reference: https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html

    + + + diff --git a/3.x/en/doc/arthas-properties.html b/3.x/en/doc/arthas-properties.html new file mode 100644 index 00000000000..0eea65c4f35 --- /dev/null +++ b/3.x/en/doc/arthas-properties.html @@ -0,0 +1,53 @@ + + + + + + + + + Arthas Properties | arthas + + + + +
    Table of Contents

    Arthas Properties

    The arthas.properties file is in the arthas directory.

    • If it is automatically downloaded arthas, the directory is under ~/.arthas/lib/3.x.x/arthas/
    • If it is a downloaded complete package, under the decompression directory of arthas

    Supported configuration items

    WARNING

    Note that the configuration must be camel case, which is different from the - style of spring boot. Only the spring boot application supports both camel case and - style configuration.

    #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
    +
    • If the configuration of arthas.telnetPort is -1, the telnet port will not be listened. arthas.httpPort is similar.
    • If you configure arthas.telnetPort to 0, then random listen telnet port, you can find the random port log in ~/logs/arthas/arthas.log. arthas.httpPort is similar.

    TIP

    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.

    disable specify commands

    TIP

    since 3.5.2

    Such as configuration:

    arthas.disabledCommands=stop,dump
    +

    It can also be configured on the command line: --disabled-commands stop,dump.

    TIP

    By default, arthas-spring-boot-starter will disable the stop command.

    Configured order

    The order of configuration is: command line parameters > System Env > System Properties > arthas.properties.

    such as:

    • ./as3.sh --telnet-port 9999 command line configuration will overwrite the default value arthas.telnetPort=3658 in arthas.properties.
    • If the application itself sets system properties arthas.telnetPort=8888, it will override the default value arthas.telnetPort=3658 in arthas.properties.

    If you want arthas.properties to have the highest order, you can configure arthas.config.overrideAll=true.

    + + + diff --git a/3.x/en/doc/async.html b/3.x/en/doc/async.html new file mode 100644 index 00000000000..151a95046d6 --- /dev/null +++ b/3.x/en/doc/async.html @@ -0,0 +1,54 @@ + + + + + + + + + Arthas Async Jobs | arthas + + + + +
    Table of Contents

    Arthas Async Jobs

    Async Jobs online tutorialopen in new window

    Asynchronous jobs in arthas. The idea is borrowed from linux jobsopen in new window.

    1. Use & to run the command in the background

    For example, execute the trace command in the background:

    trace Test t &
    +

    By doing this, the current command is put to the background to run, you can continue to execute other commands in the console.

    2. List background jobs

    If you want to list all background jobs, you can execute the jobs command and the results are as follows:

    $ jobs
    +[10]*
    +       Stopped           watch com.taobao.container.Test test "params[0].{? #this.name == null }" -x 2
    +       execution count : 19
    +       start time      : Fri Sep 22 09:59:55 CST 2017
    +       timeout date    : Sat Sep 23 09:59:55 CST 2017
    +       session         : 3648e874-5e69-473f-9eed-7f89660b079b (current)
    +

    You can see that there is currently a background job executing:

    • job id is 10, * indicates that this job is created by the current session.
    • status is Stopped
    • execution count is the number of executions, which have been executed 19 times since the start.
    • timeout date: timeout timestamp, when the time exceeds this timestamp, the job will be automatically timeout and exit.

    3. Suspend and cancel job

    When the job is executing in the foreground, for example, directly executing the command trace Test t, or executing the background job command trace Test t &, then putting the job back to the foreground via fg command, the console cannot continue to execute other command, but can receive and process the following keyboard events:

    • ‘ctrl + z’: Suspends the job, the job status will change to Stopped, and the job can be restarted by bg <job-id> or fg <job-id>
    • ‘ctrl + c’: Stops the job
    • ‘ctrl + d’: According to linux semantics this should lead to exit the terminal, right now Arthas has not implemented this yet, therefore simply ignore this keystroke.

    4. fg/bg, switch the job from the foreground to the background, and vise verse

    • When a job is executed in the background or in suspended status (use ctrl + z to suspend job), fg <job-id> can transfer the job to the foreground to continue to run.
    • When a job is in suspended status (use ctrl + z to suspend job), bg <job-id> can put the job to the background to continue to run.
    • A job created by other session can only be put to the foreground to run by using fg in the current session.

    5. Redirect the output

    The job output can be redirect to the specified file by > or >>, and can be used together with &. By doing this, you can achieve running commands asynchronously, for example:

    $ trace Test t >> test.out &
    +

    At this time, the trace command will be executed in the background, and the result will be output to the test.out file under the working directory 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 pwd command to view the working directory of the current application.

    $ cat test.out
    +

    If no redirect file is specified, the result will be output to the ~/logs/arthas-cache/ directory, for example:

    $ trace Test t >> &
    +job id : 2
    +cache location : /Users/admin/logs/arthas-cache/28198/2
    +

    At this time, the command will be executed asynchronously in the background, and the result will be asynchronously saved in the file (~/logs/arthas-cache/${PID}/${JobId});

    • 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 options command;
    • The result of this command will be output asynchronously to the file; at this time, regardless of whether save-result is true or not, the result will not be written asynchronously to ~/logs/arthas-cache/result.log.

    6. Stop job

    If you want to stop background job, just kill <job-id>.

    7. Others

    • Support up to 8 commands at the same time to redirect the output to the log files.
    • Do not open too many background jobs at the same time to avoid negative performance effect to the target JVM.
    • If you do not want to stop the Arthas service and continue to perform background tasks, you can exit the Arthas console by executing quit command (stop command will stop the Arthas service)
    + + + diff --git a/3.x/en/doc/auth.html b/3.x/en/doc/auth.html new file mode 100644 index 00000000000..34a02a57576 --- /dev/null +++ b/3.x/en/doc/auth.html @@ -0,0 +1,53 @@ + + + + + + + + + auth | arthas + + + + +
    Table of Contents

    auth

    TIP

    Authenticates the current session

    Configure username and password

    When attaching, you can specify a password on the command line. such as:

    java -jar arthas-boot3.jar --password ppp
    +
    • The user can be specified by the --username option, the default value is arthas.

    • You can also configure username/password in arthas.properties. The priority of the command line is higher than that of the configuration file.

    • If only username is configured and no password is configured, a random password will be generated and printed in ~/logs/arthas/arthas.log

      Using generated security password: 0vUBJpRIppkKuZ7dYzYqOKtranj4unGh
      +

    Local connection does not require authentication

    By default, there are configurations in the arthas.properties file:

    arthas.localConnectionNonAuth=true
    +

    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.

    Authenticate in the telnet console

    After connecting to arthas, directly executing the command will prompt for authentication:

    [arthas@37430]$ help
    +Error! command not permitted, try to use 'auth' command to authenticates.
    +

    Use the auth command to authenticate, and you can execute other commands after success.

    [arthas@37430]$ auth ppp
    +Authentication result: true
    +
    • The user can be specified by the --username option, the default value is arthas.

    Web console Authentication

    Open the browser, there will be a pop-up window prompting you to enter your username and password.

    After success, you can directly connect to the web console.

    HTTP API Authentication

    Arthas uses the HTTP standard Basic Authorization.

    For example, if the user name is: admin and the password is admin, the combination is a string: admin:admin, the base64 result is: YWRtaW46YWRtaW4=, then the HTTP request adds the Authorization header:

    curl 'http://localhost:8563/api' \
    +  -H 'Authorization: Basic YWRtaW46YWRtaW4=' \
    +  --data-raw '{"action":"exec","command":"version"}'
    +

    URL parameters

    It supports passing username and password in parameters. such as:

    curl 'http://localhost:8563/api?password=admin' \
    +  --data-raw '{"action":"exec","command":"version"}'
    +
    + + + diff --git a/3.x/en/doc/base64.html b/3.x/en/doc/base64.html new file mode 100644 index 00000000000..258de3dae3a --- /dev/null +++ b/3.x/en/doc/base64.html @@ -0,0 +1,51 @@ + + + + + + + + + base64 | arthas + + + + +
    Table of Contents

    base64

    TIP

    Encode and decode using Base64 representation.

    Encode to base64

    [arthas@70070]$ echo 'abc' > /tmp/test.txt
    +[arthas@70070]$ cat /tmp/test.txt
    +abc
    +
    +[arthas@70070]$ base64 /tmp/test.txt
    +YWJjCg==
    +

    Encode to base64 and save output to file

    $ base64 --input /tmp/test.txt --output /tmp/result.txt
    +

    Decode from base64

    $ base64 -d /tmp/result.txt
    +abc
    +

    Decode from base64 and save output to file

    $ base64 -d /tmp/result.txt --output /tmp/bbb.txt
    +
    + + + diff --git a/3.x/en/doc/batch-support.html b/3.x/en/doc/batch-support.html new file mode 100644 index 00000000000..43c463409a2 --- /dev/null +++ b/3.x/en/doc/batch-support.html @@ -0,0 +1,50 @@ + + + + + + + + + Batch Processing | arthas + + + + +
    Table of Contents

    Batch Processing

    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 “–select” parameter.

    Usage

    Step 1: Create the script

    Create a test.as script suffixed with as. Here as is suggested for the suffix of the filename, but in fact any suffix is acceptable.

    ➜  arthas git:(develop) cat /var/tmp/test.as
    +help
    +dashboard -n 1
    +session
    +thread
    +sc -d org.apache.commons.lang.StringUtils
    +

    Note:

    • Each command takes one line.
    • Batch mode execution times (via -n) must be explicitly specified for dashboard, otherwise batch script cannot terminate.
    • Commands such as watch/tt/trace/monitor/stack should include -n option to ensure the script can be able to quit.
    • Also consider to use async (for example: watch c.t.X test returnObj > &) to put commands run at background and get the output from the log file, see more from asynchronous job

    Step 2: Run the script

    Use -f 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:

    ./as3.sh -f /var/tmp/test.as 56328 > test.out
    +

    Use -c also can specify the commands, like this:

    ./as3.sh -c 'sysprop; thread' 56328 > test.out
    +

    Step 3: Check the output

    cat test.out
    +
    + + + diff --git a/3.x/en/doc/cat.html b/3.x/en/doc/cat.html new file mode 100644 index 00000000000..d5753339484 --- /dev/null +++ b/3.x/en/doc/cat.html @@ -0,0 +1,42 @@ + + + + + + + + + cat | arthas + + + + + + + + diff --git a/3.x/en/doc/classloader.html b/3.x/en/doc/classloader.html new file mode 100644 index 00000000000..c5e2526aeee --- /dev/null +++ b/3.x/en/doc/classloader.html @@ -0,0 +1,127 @@ + + + + + + + + + classloader | arthas + + + + +
    Table of Contents

    classloader

    classloader online tutorialopen in new window

    TIP

    View hierarchy, urls and classes-loading info for the class-loaders.

    classloader can search and print out the URLs for a specified resource from one particular classloader. It is quite handy when analyzing ResourceNotFoundException.

    Options

    NameSpecification
    [l]list all classloader instances
    [t]print classloader's hierarchy
    [a]list all the classes loaded by all the classloaders (use it with great caution since the output can be huge)
    [c:]print classloader's hashcode
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.
    [c: r:]using ClassLoader to search resource
    [c: load:]using ClassLoader to load class

    Usage

    View statistics categorized by class type

    $ classloader
    + name                                       numberOfInstances  loadedCountTotal
    + com.taobao.arthas.agent.ArthasClassloader  1                  2115
    + BootstrapClassLoader                       1                  1861
    + sun.reflect.DelegatingClassLoader          5                  5
    + sun.misc.Launcher$AppClassLoader           1                  4
    + sun.misc.Launcher$ExtClassLoader           1                  1
    +Affect(row-cnt:5) cost in 3 ms.
    +

    View statistics categorized by loaded classes number

    $ classloader -l
    + name                                                loadedCount  hash      parent
    + BootstrapClassLoader                                1861         null      null
    + com.taobao.arthas.agent.ArthasClassloader@68b31f0a  2115         68b31f0a  sun.misc.Launcher$ExtClassLoader@66350f69
    + sun.misc.Launcher$AppClassLoader@3d4eac69           4            3d4eac69  sun.misc.Launcher$ExtClassLoader@66350f69
    + sun.misc.Launcher$ExtClassLoader@66350f69           1            66350f69  null
    +Affect(row-cnt:4) cost in 2 ms.
    +

    View class-loaders hierarchy

    $ classloader -t
    ++-BootstrapClassLoader
    ++-sun.misc.Launcher$ExtClassLoader@66350f69
    +  +-com.taobao.arthas.agent.ArthasClassloader@68b31f0a
    +  +-sun.misc.Launcher$AppClassLoader@3d4eac69
    +Affect(row-cnt:4) cost in 3 ms.
    +

    Show the URLs of the URLClassLoader

    $ classloader -c 3d4eac69
    +file:/private/tmp/math-game.jar
    +file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
    +
    +Affect(row-cnt:9) cost in 3 ms.
    +

    Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader.

    For ClassLoader with only unique instance, it can be specified by class name, which is more convenient to use:

    $ classloader --classLoaderClass sun.misc.Launcher$AppClassLoader
    +file:/private/tmp/math-game.jar
    +file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar
    +
    +Affect(row-cnt:9) cost in 3 ms.
    +

    Use the classloader to load resource

    $ classloader -c 3d4eac69  -r META-INF/MANIFEST.MF
    + jar:file:/System/Library/Java/Extensions/MRJToolkit.jar!/META-INF/MANIFEST.MF
    + jar:file:/private/tmp/math-game.jar!/META-INF/MANIFEST.MF
    + jar:file:/Users/hengyunabc/.arthas/lib/3.0.5/arthas/arthas-agent.jar!/META-INF/MANIFEST.MF
    +

    Use the classloader to load .class resource

    $ classloader -c 1b6d3586 -r java/lang/String.class
    + jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/rt.jar!/java/lang/String.class
    +

    Use the classloader to load class

    $ classloader -c 3d4eac69 --load demo.MathGame
    +load class success.
    + class-info        demo.MathGame
    + code-source       /private/tmp/math-game.jar
    + name              demo.MathGame
    + isInterface       false
    + isAnnotation      false
    + isEnum            false
    + isAnonymousClass  false
    + isArray           false
    + isLocalClass      false
    + isMemberClass     false
    + isPrimitive       false
    + isSynthetic       false
    + simple-name       MathGame
    + modifier          public
    + annotation
    + interfaces
    + super-class       +-java.lang.Object
    + class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
    +                     +-sun.misc.Launcher$ExtClassLoader@66350f69
    + classLoaderHash   3d4eac69
    +

    Statistics ClassLoader actually used URLs and unused URLs

    WARNING

    Note that statistics are based on all classes currently loaded by the JVM. Does not mean that Unused URLs can be removed from the application. Because it may be necessary to load classes from Unused URLs in the future, or to load resources.

    $ 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
    +
    + + + diff --git a/3.x/en/doc/cls.html b/3.x/en/doc/cls.html new file mode 100644 index 00000000000..c14ac34007b --- /dev/null +++ b/3.x/en/doc/cls.html @@ -0,0 +1,41 @@ + + + + + + + + + cls | arthas + + + + + + + + diff --git a/3.x/en/doc/commands.html b/3.x/en/doc/commands.html new file mode 100644 index 00000000000..37d3d54a065 --- /dev/null +++ b/3.x/en/doc/commands.html @@ -0,0 +1,41 @@ + + + + + + + + + All Commands | arthas + + + + +
    Table of Contents

    All Commands

    • dashboard - dashboard for the system's real-time data
    • getstatic - examine class's static properties
    • heapdump - dump java heap in hprof binary format, like jmap
    • jvm - show JVM information
    • logger - print the logger information, update the logger level
    • mbean - show Mbean information
    • memory - show JVM memory information
    • ognl - execute ognl expression
    • perfcounter - show JVM Perf Counter information
    • sysenv — view system environment variables
    • sysprop - view/modify system properties
    • thread - show java thread information
    • vmoption - view/modify the vm diagnostic options.
    • vmtool - jvm tool, getInstances in jvm, forceGc
    • classloader - check the inheritance structure, urls, class loading info for the specified class; using classloader to get the url of the resource e.g. java/lang/String.class
    • dump - dump the loaded classes in byte code to the specified location
    • jad - decompile the specified loaded classes
    • mc - Memory compiler, compiles .java files into .class files in memory
    • redefine - load external *.class files and re-define it into JVM
    • retransform - load external *.class files and retransform it into JVM
    • sc - check the info for the classes loaded by JVM
    • sm - check methods info for the loaded classes

    WARNING

    Attention: commands here are taking advantage of byte-code-injection, which means we are injecting some aspectsopen in new window into the current classes for monitoring and statistics purpose. Therefore, when using it for online troubleshooting in your production environment, you'd better explicitly specify classes/methods/criteria, and remember to remove the injected code by stop or reset.

    • monitor - monitor method execution statistics
    • stack - display the stack trace for the specified class and method
    • trace - trace the execution time of specified method invocation
    • tt - time tunnel, record the arguments and returned value for the methods and replay
    • watch - display the input/output parameter, return object, and thrown exception of specified method invocation

    profiler/flame graph

    authentication

    • auth - authentication

    options

    • options - check/set Arthas global optionss

    pipe

    Arthas provides pipe to process the result returned from commands further, e.g. sm java.lang.String * | grep 'index'. Commands supported in pipe:

    • grep- filter the result with the given keyword
    • plaintext - remove the ANSI color
    • wc - count lines

    async jobs

    async can be handy when a problem is hardly to reproduce in the production environment, e.g. one watch condition may happen only once in one single day.

    • job control - use > to redirect result into the log file, use & to put the job to the background. Job keeps running even if the session is disconnected (the session lifecycle is 1 day by default)
    • jobs - list all jobs
    • kill - forcibly terminate the job
    • fg - bring the suspend job to the foreground
    • bg - put the job to run in the background

    Basic Arthas Commands

    • base64 - Encode and decode using Base64 representation.
    • cat - Concatenate and print files
    • cls - clear the screen
    • echo - write arguments to the standard output
    • grep - Pattern searcher
    • help - display Arthas help
    • history - view command history
    • keymap - keymap for Arthas keyboard shortcut
    • pwd - Return working directory name
    • quit/exit - exit the current Arthas session, without effecting other sessions
    • reset - reset all the enhanced classes. All enhanced classes will also be reset when Arthas server is closed by stop
    • session - display current session information
    • stop - terminate the Arthas server, all Arthas sessions will be destroyed
    • tee - Copies standard input to standard output, making a copy in zero or more files.
    • version - print the version for the Arthas attached to the current Java process
    + + + diff --git a/3.x/en/doc/contact-us.html b/3.x/en/doc/contact-us.html new file mode 100644 index 00000000000..2b30d497eae --- /dev/null +++ b/3.x/en/doc/contact-us.html @@ -0,0 +1,41 @@ + + + + + + + + + Contact Us | arthas + + + + +
    Table of Contents

    Contact Us

    Issues

    Questions about how to use Arthas and opinions can be directly raised in issues: https://github.com/alibaba/arthas/issuesopen in new window

    DingDing Group

    • Arthas open source discussion Group: 21965291 ,You can join by searching for group number。

    • Arthas open source discussion Group 2: 30707824 ,You can join by searching for group number。

    • Arthas open source discussion Group 3: 17605006847 , You can join by searching for group number。

    Instructions for Installing DingTalk

    DingTalk can be downloaded from: https://www.dingtalk.com/enopen in new window

    After installing you can search for group number and join it.

    QQ Group

    Arthas open source discussion QQ group:916328269

    Arthas open source discussion QQ group2:854625984

    Arthas open source discussion QQ group 3: 672077388

    + + + diff --git a/3.x/en/doc/dashboard.html b/3.x/en/doc/dashboard.html new file mode 100644 index 00000000000..550add24382 --- /dev/null +++ b/3.x/en/doc/dashboard.html @@ -0,0 +1,73 @@ + + + + + + + + + dashboard | arthas + + + + +
    Table of Contents

    dashboard

    dashboard online tutorialopen in new window

    TIP

    This is the real time statistics dashboard for the current system, press Ctrl+C to exit.

    When running in Apache Tomcat Alibaba edition, the dashboard will also present the real time statistics of the tomcat, including QPSopen in new window, RT, error counts, and thread pool, etc.

    Options

    NameSpecification
    [i:]The interval (in ms) between two executions, default is 5000 ms.
    [n:]The number of times this command will be executed.

    Usage

    $ 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
    +

    Notes on column headers

    • ID: JVM thread ID, pls. note this ID is different from the nativeID in jstack
    • NAME: thread name
    • GROUP: thread group name
    • PRIORITY: thread priority, ranged from 1 to 10. The greater number, the higher priority
    • STATE: thread state
    • 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%
    • DELTA_TIME: incremental CPU time of thread running after the last sampling in second format
    • TIME: total CPU time of the thread in minute:second format
    • INTERRUPTED: the thread interruption state
    • DAEMON: daemon thread or not

    JVM internal threads

    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).

    JVM activities can be observed through internal threads, such as GC, JIT compilation, etc., to perceive the overall status of JVM.

    • 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.
    • After executing commands such as trace/watch/tt/redefine, 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.

    JVM internal threads include the following:

    • JIT compilation thread: such as C1 CompilerThread0, C2 CompilerThread0
    • GC thread: such as GC Thread0, G1 Young RemSet Sampling
    • Other internal threads: such asVM Periodic Task Thread, VM Thread, Service Thread

    Screenshot

    + + + diff --git a/3.x/en/doc/docker.html b/3.x/en/doc/docker.html new file mode 100644 index 00000000000..ee99fed81ef --- /dev/null +++ b/3.x/en/doc/docker.html @@ -0,0 +1,90 @@ + + + + + + + + + Docker | arthas + + + + +
    Table of Contents

    Docker

    Use JDK in Docker

    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.

    Use public JDK image

    • https://hub.docker.com/_/openjdk/

    such as:

    FROM openjdk:8-jdk
    +

    or:

    FROM openjdk:8-jdk-alpine
    +

    Install via package management software

    such as:

    # Install OpenJDK-8
    +RUN apt-get update && \
    +    apt-get install -y openjdk-8-jdk && \
    +    apt-get install -y ant && \
    +    apt-get clean;
    +
    +# Fix certificate issues
    +RUN apt-get update && \
    +    apt-get install ca-certificates-java && \
    +    apt-get clean && \
    +    update-ca-certificates -f;
    +
    +# Setup JAVA_HOME - useful for docker commandline
    +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
    +RUN export JAVA_HOME
    +

    or:

    RUN yum install -y \
    +   java-1.8.0-openjdk \
    +   java-1.8.0-openjdk-devel
    +
    +ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk/
    +RUN export JAVA_HOME
    +

    Quick start with Docker

    1. Delete the existing math-game docker container (not necessary)

      $ docker stop math-game || true && docker rm math-game || true
      +
    2. Start math-game

      $ docker run --name math-game -it hengyunabc/arthas:latest /bin/sh -c "java -jar /opt/arthas/math-game.jar"
      +
    3. Start arthas-boot3 for diagnosis

      $ docker exec -it math-game /bin/sh -c "java -jar /opt/arthas/arthas-boot3.jar"
      +* [1]: 9 jar
      +
      +[INFO] arthas home: /opt/arthas
      +[INFO] Try to attach process 9
      +[INFO] Attach process 9 success.
      +[INFO] arthas-client connect 127.0.0.1 3658
      +,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
      +/  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
      +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
      +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
      +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
      +
      +
      +wiki: https://arthas.aliyun.com/3.x/doc
      +version: 3.0.5
      +pid: 9
      +time: 2018-12-18 11:30:36
      +

    Diagnose the Java process in Docker

    docker exec -it  ${containerId} /bin/bash -c "wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"
    +

    Diagnose the Java process in the container in k8s

    kubectl exec -it ${pod} --container ${containerId} -- /bin/bash -c "wget https://arthas.aliyun.com/arthas-boot3.jar && java -jar arthas-boot3.jar"
    +

    Install Arthas into the base Docker image

    It's easy to install Arthas into your Docker image.

    FROM openjdk:8-jdk-alpine
    +
    +# copy arthas
    +COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas
    +

    If you want to specify a version, you can view all the tags:

    https://hub.docker.com/r/hengyunabc/arthas/tagsopen in new window

    + + + diff --git a/3.x/en/doc/download.html b/3.x/en/doc/download.html new file mode 100644 index 00000000000..ea3258f33bd --- /dev/null +++ b/3.x/en/doc/download.html @@ -0,0 +1,45 @@ + + + + + + + + + Download | arthas + + + + +
    Table of Contents

    Download

    Download full package

    Download from Github Releases

    https://github.com/alibaba/arthas/releasesopen in new window

    Use as3.sh

    Download and unzip, find as3.sh in the directory. Start it in bash:

    ./as3.sh
    +

    Print usage:

    ./as3.sh -h
    +

    Use arthas-boot3.jar

    Download and unzip, find arthas-boot3.jar in the directory. Start with java command:

    java -jar arthas-boot3.jar
    +

    Print usage:

    java -jar arthas-boot3.jar -h
    +
    + + + diff --git a/3.x/en/doc/dump.html b/3.x/en/doc/dump.html new file mode 100644 index 00000000000..f51b6d8f994 --- /dev/null +++ b/3.x/en/doc/dump.html @@ -0,0 +1,60 @@ + + + + + + + + + dump | arthas + + + + +
    Table of Contents

    dump

    dump online tutorialopen in new window

    TIP

    Dump the bytecode for the particular classes to the specified directory.

    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 jad.

    Options

    NameSpecification
    class-patternclass name pattern
    [c:]hashcode of the class loader that loaded the target class
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.
    [d:]set the destination directory for class files
    [E]turn on regex match, the default behavior is wild card match

    Usage

    $ dump java.lang.String
    + HASHCODE  CLASSLOADER  LOCATION
    + null                   /Users/admin/logs/arthas/classdump/java/lang/String.class
    +Affect(row-cnt:1) cost in 119 ms.
    +
    $ dump demo.*
    + HASHCODE  CLASSLOADER                                    LOCATION
    + 3d4eac69  +-sun.misc.Launcher$AppClassLoader@3d4eac69    /Users/admin/logs/arthas/classdump/sun.misc.Launcher$AppClassLoader-3d4eac69/demo/MathGame.class
    +             +-sun.misc.Launcher$ExtClassLoader@66350f69
    +Affect(row-cnt:1) cost in 39 ms.
    +
    $ dump -d /tmp/output java.lang.String
    + HASHCODE  CLASSLOADER  LOCATION
    + null                   /tmp/output/java/lang/String.class
    +Affect(row-cnt:1) cost in 138 ms.
    +
    • Specify classLoader

    Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader.

    if you use-c, you have to manually type hashcode by -c <hashcode>.

    $ dump -c 3d4eac69 demo.*
    +

    For classloader with only one instance, it can be specified by --classLoaderClass using class name, which is more convenient to use.

    $ dump --classLoaderClass sun.misc.Launcher$AppClassLoader demo.*
    + HASHCODE  CLASSLOADER                                    LOCATION
    + 3d4eac69  +-sun.misc.Launcher$AppClassLoader@3d4eac69    /Users/admin/logs/arthas/classdump/sun.misc.Launcher$AppClassLoader-3d4eac69/demo/MathGame.class
    +             +-sun.misc.Launcher$ExtClassLoader@66350f69
    +Affect(row-cnt:1) cost in 39 ms.
    +
    • 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.

    The value of --classloaderclass 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, -c <hashcode> is dynamic.

    + + + diff --git a/3.x/en/doc/echo.html b/3.x/en/doc/echo.html new file mode 100644 index 00000000000..30569cb541c --- /dev/null +++ b/3.x/en/doc/echo.html @@ -0,0 +1,42 @@ + + + + + + + + + echo | arthas + + + + + + + + diff --git a/3.x/en/doc/faq.html b/3.x/en/doc/faq.html new file mode 100644 index 00000000000..8b7634f3d90 --- /dev/null +++ b/3.x/en/doc/faq.html @@ -0,0 +1,47 @@ + + + + + + + + + FAQ | arthas + + + + +
    Table of Contents

    FAQ

    TIP

    For questions that are not in this list, please search in issues. https://github.com/alibaba/arthas/issuesopen in new window

    Where is the log file?

    Log file path: ~/logs/arthas/arthas.log

    How much impact does Arthas attach have on the performance of the original process?

    https://github.com/alibaba/arthas/issues/44open in new window

    target process not responding or HotSpot VM not loaded

    com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded

    1. 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.
    2. Try to use jstack -l $pid. 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 jmap heapdump to analyze.
    3. Try to attach math-game in quick-start.
    4. For more information: https://github.com/alibaba/arthas/issues/347open in new window

    Can commands such as trace/watch enhance the classes in jdk?

    By default, classes beginning with java. or the classes loaded by the Bootstrap ClassLoader are filtered out, but they can be turned on:

    options unsafe true
    +

    See more at options

    TIP

    To support the jars appended by java.lang.instrument.Instrumentation#appendToBootstrapClassLoaderSearch need to enable unsafe.

    How to view the result in json format

    options json-format true
    +

    See more at options

    Can arthas trace native methods

    No.

    Can arthas view the value of a variable in memory?

    1. You can use vmtool command.
    2. You can use some tricks to intercept the object with the tt command, or fetch it from a static method.

    How to filter method with the same name?

    You can used all variables in fundamental fields in expressions for the condition express to filter method with the same name, you can use the number of parameters params.length ==1,parameter type params[0] instanceof java.lang.Integer,return value type returnObj instanceof java.util.List and so on in one or more combinations as condition express.

    You can use -v to view the condition express result https://github.com/alibaba/arthas/issues/1348open in new window

    example math-game

    watch demo.MathGame primeFactors '{params,returnObj,throwExp}' 'params.length >0 && returnObj instanceof java.util.List' -v
    +

    How to watch or trace constructor?

    watch demo.MathGame <init> '{params,returnObj,throwExp}' -v
    +

    How to watch or trace inner classes?

    In the JVM specification the name of inner classes is OuterClass$InnerClass.

    watch OuterClass$InnerClass
    +

    Enter Unicode characters

    Convert Unicode characters to \u representation:

    ognl '@java.lang.System@out.println("Hello \u4e2d\u6587")'
    +

    java.lang.ClassFormatError: null, skywalking arthas compatible use

    When error log appear java.lang.ClassFormatError: null, it is usually modified by other bytecode tools that are not compatible with arthas modified bytecode.

    For example: use skywalking V8.1.0 below cannot trace, watch classes enhanced by skywalking agentopen in new window, V8.1.0 or above is compatible, refer to skywalking configuration for more details. skywalking compatible with other javaagent bytecode processingopen in new window.

    class redefinition failed: attempted to change the schema (add/remove fields)

    Reference: https://github.com/alibaba/arthas/issues/2165open in new window

    Can I use arthas offline?

    Yes. Just download the full size package and unzip it, refer to: Download.

    Attach the process with pid 1 in docker/k8s failed

    Reference: https://github.com/alibaba/arthas/issues/362#issuecomment-448185416open in new window

    Why is the new version of Arthas downloaded, but the old version is connected?

    For example, the started version of as3.sh/arthas-boot3.jar is 3.5., but after connecting, the printed arthas version is 3.4..

    It may be that the target process has been diagnosed with the old version of arthas before. You can execute stop to stop the old version of arthas, and then reuse the new version to attach.

    + + + diff --git a/3.x/en/doc/getstatic.html b/3.x/en/doc/getstatic.html new file mode 100644 index 00000000000..cd2f139c06a --- /dev/null +++ b/3.x/en/doc/getstatic.html @@ -0,0 +1,74 @@ + + + + + + + + + getstatic | arthas + + + + +
    Table of Contents

    getstatic

    getstatic online tutorialopen in new window

    Usage

    • It is recommended to use the [OGNL] (ognl.md) command, which will be more flexible.

    Check the static fields of classes conveniently, the usage is getstatic class_name field_name.

    $ getstatic demo.MathGame random
    +field: random
    +@Random[
    +    serialVersionUID=@Long[3905348978240129619],
    +    seed=@AtomicLong[120955813885284],
    +    multiplier=@Long[25214903917],
    +    addend=@Long[11],
    +    mask=@Long[281474976710655],
    +    DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +    BadBound=@String[bound must be positive],
    +    BadRange=@String[bound must be greater than origin],
    +    BadSize=@String[size must be non-negative],
    +    seedUniquifier=@AtomicLong[-3282039941672302964],
    +    nextNextGaussian=@Double[0.0],
    +    haveNextNextGaussian=@Boolean[false],
    +    serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +    unsafe=@Unsafe[sun.misc.Unsafe@2eaa1027],
    +    seedOffset=@Long[24],
    +]
    +
    • Specify classLoader

    Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader using sc -d <ClassName>.

    if you use-c, you have to manually type hashcode by -c <hashcode>.

    $ getstatic -c 3d4eac69 demo.MathGame random
    +

    For classloader with only one instance, it can be specified by --classLoaderClass using class name, which is more convenient to use.

    getstatic --classLoaderClass demo.MathGame random

    • 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.

    The value of --classloaderclass 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, -c <hashcode> is dynamic.

    Tip: if the static field is a complex class, you can even use OGNLopen in new window to traverse, filter and access the inner properties of this class.

    E.g. suppose n is a Map and its key is a Enum, then you can achieve this if you want to pick the key with a specific Enum value:

    $ 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],
    +]
    +
    + + + diff --git a/3.x/en/doc/grep.html b/3.x/en/doc/grep.html new file mode 100644 index 00000000000..c11bffa65f8 --- /dev/null +++ b/3.x/en/doc/grep.html @@ -0,0 +1,70 @@ + + + + + + + + + grep | arthas + + + + +
    Table of Contents

    grep

    grep online tutorialopen in new window

    TIP

    Similar to the traditional grep command.

    Usage

     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
    +
    + + + diff --git a/3.x/en/doc/groovy.html b/3.x/en/doc/groovy.html new file mode 100644 index 00000000000..d20c69dc67f --- /dev/null +++ b/3.x/en/doc/groovy.html @@ -0,0 +1,164 @@ + + + + + + + + + groovy | arthas + + + + +
    Table of Contents

    groovy

    TIP

    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.

    Limitations

    1. Prohibit from alternating the original logic. Like watch command, The major purpose of scripting is monitoring and observing.
    2. Only allow to monitor at the stages of before/success/exception/finish on one method.

    Parameters

    ParameterExplanation
    class-patternclass name pattern
    method-patternmethod name pattern
    script-filepaththe absolute path of the groovy script
    [S]match all sub classes
    [E]enable regex match, the default is wildcard match

    Note: the third parameter script-filepath must be the absolute path of the groovy script, for example /tmp/test.groovy. It is not recommended to use relative path, e.g. ./test.groovy.

    Explanation on the important callbacks

    /**
    + * Listeners for script to enhance the class
    + */
    +interface ScriptListener {
    +
    +    /**
    +     * When the script is created
    +     *
    +     * @param output Output
    +     */
    +    void create(Output output);
    +
    +    /**
    +     * When the script is destroyed
    +     *
    +     * @param output Output
    +     */
    +    void destroy(Output output);
    +
    +    /**
    +     * Before the method executes
    +     *
    +     * @param output Output
    +     * @param advice Advice
    +     */
    +    void before(Output output, Advice advice);
    +
    +    /**
    +     * After the method returns
    +     *
    +     * @param output Output
    +     * @param advice Advice
    +     */
    +    void afterReturning(Output output, Advice advice);
    +
    +    /**
    +     * After the method throws exceptions
    +     *
    +     * @param output Output
    +     * @param advice Advice
    +     */
    +    void afterThrowing(Output output, Advice advice);
    +
    +}
    +

    Advice parameter

    Advice contains all information necessary for notification. Refer to expression core parameters for more details.

    Output parameter

    There are three methods in Output, used for outputting the corresponding text.

    /**
    + * Output
    + */
    +interface Output {
    +
    +    /**
    +     * Output text without line break
    +     *
    +     * @param string Text to output
    +     * @return this
    +     */
    +    Output print(String string);
    +
    +    /**
    +     * Output text with line break
    +     *
    +     * @param string Text to output
    +     * @return this
    +     */
    +    Output println(String string);
    +
    +    /**
    +     * Finish outputting from the script
    +     *
    +     * @return this
    +     */
    +    Output finish();
    +
    +}
    +

    A groovy sample script to output logs

    import com.taobao.arthas.core.command.ScriptSupportCommand
    +import com.taobao.arthas.core.util.Advice
    +
    +import static java.lang.String.format
    +
    +/**
    + * Output method logs
    + */
    +public class Logger implements ScriptSupportCommand.ScriptListener {
    +
    +    @Override
    +    void create(ScriptSupportCommand.Output output) {
    +        output.println("script create.");
    +    }
    +
    +    @Override
    +    void destroy(ScriptSupportCommand.Output output) {
    +        output.println("script destroy.");
    +    }
    +
    +    @Override
    +    void before(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("before:class=%s;method=%s;paramslen=%d;%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName(),
    +                advice.getParams().length, advice.getParams()))
    +    }
    +
    +    @Override
    +    void afterReturning(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("returning:class=%s;method=%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName()))
    +    }
    +
    +    @Override
    +    void afterThrowing(ScriptSupportCommand.Output output, Advice advice) {
    +        output.println(format("throwing:class=%s;method=%s;",
    +                advice.getClazz().getSimpleName(),
    +                advice.getMethod().getName()))
    +    }
    +}
    +

    Run the script like this:

    $ 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;
    +
    + + + diff --git a/3.x/en/doc/heapdump.html b/3.x/en/doc/heapdump.html new file mode 100644 index 00000000000..74286400fb0 --- /dev/null +++ b/3.x/en/doc/heapdump.html @@ -0,0 +1,50 @@ + + + + + + + + + heapdump | arthas + + + + +
    Table of Contents

    heapdump

    heapdump online tutorialopen in new window

    TIP

    dump java heap in hprof binary format, like jmap.

    Usage

    Dump to file

    [arthas@58205]$ heapdump arthas-output/dump.hprof
    +Dumping heap to arthas-output/dump.hprof ...
    +Heap dump file created
    +

    TIP

    The generated file is located in the arthas-output directory and can be downloaded through the browser at http://localhost:8563/arthas-output/

    Dump only live objects

    [arthas@58205]$ heapdump --live /tmp/dump.hprof
    +Dumping heap to /tmp/dump.hprof ...
    +Heap dump file created
    +

    Dump to tmp file

    [arthas@58205]$ heapdump
    +Dumping heap to /var/folders/my/wy7c9w9j5732xbkcyt1mb4g40000gp/T/heapdump2019-09-03-16-385121018449645518991.hprof...
    +Heap dump file created
    +
    + + + diff --git a/3.x/en/doc/help.html b/3.x/en/doc/help.html new file mode 100644 index 00000000000..384fba1a70c --- /dev/null +++ b/3.x/en/doc/help.html @@ -0,0 +1,106 @@ + + + + + + + + + help | arthas + + + + +
    Table of Contents

    help

    show help message, the command can show all the commands that current Arthas server supports,or you can use the command to show the detail usage of another command.

    TIP

    [help command] equals [command -help],both is to show the detail usage of one command.

    Options

    NameSpecification
    show all the commands that current Arthas server supports
    [name:]show the detail usage of one command

    Usage

    $ help
    + NAME         DESCRIPTION
    + help         Display Arthas Help
    + auth         Authenticates the current session
    + keymap       Display all the available keymap for the specified connection.
    + sc           Search all the classes loaded by JVM
    + sm           Search the method of classes loaded by JVM
    + classloader  Show classloader info
    + jad          Decompile class
    + getstatic    Show the static field of a class
    + monitor      Monitor method execution statistics, e.g. total/success/failure count, average rt, fail rate, etc.
    + stack        Display the stack trace for the specified class and method
    + thread       Display thread info, thread stack
    + trace        Trace the execution time of specified method invocation.
    + watch        Display the input/output parameter, return object, and thrown exception of specified method invocation
    + tt           Time Tunnel
    + jvm          Display the target JVM information
    + perfcounter  Display the perf counter information.
    + ognl         Execute ognl expression.
    + mc           Memory compiler, compiles java files into bytecode and class files in memory.
    + redefine     Redefine classes. @see Instrumentation#redefineClasses(ClassDefinition...)
    + retransform  Retransform classes. @see Instrumentation#retransformClasses(Class...)
    + dashboard    Overview of target jvm's thread, memory, gc, vm, tomcat info.
    + dump         Dump class byte array from JVM
    + heapdump     Heap dump
    + options      View and change various Arthas options
    + cls          Clear the screen
    + reset        Reset all the enhanced classes
    + version      Display Arthas version
    + session      Display current session information
    + sysprop      Display, and change the system properties.
    + sysenv       Display the system env.
    + vmoption     Display, and update the vm diagnostic options.
    + logger       Print logger info, and update the logger level
    + history      Display command history
    + cat          Concatenate and print files
    + base64       Encode and decode using Base64 representation
    + echo         write arguments to the standard output
    + pwd          Return working directory name
    + mbean        Display the mbean information
    + grep         grep command for pipes.
    + tee          tee command for pipes.
    + profiler     Async Profiler. https://github.com/jvm-profiling-tools/async-profiler
    + stop         Stop/Shutdown Arthas server and exit the console.
    +
    +
    +
     $ help dashboard
    +  USAGE:
    +   dashboard [-h] [-i <value>] [-n <value>]
    +
    + SUMMARY:
    +   Overview of target jvm's thread, memory, gc, vm, tomcat info.
    +
    + EXAMPLES:
    +   dashboard
    +   dashboard -n 10
    +   dashboard -i 2000
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/dashboard
    +
    + OPTIONS:
    + -h, --help                              this help
    + -i, --interval <value>                  The interval (in ms) between two executions, default is 5000 ms.
    + -n, --number-of-execution <value>       The number of times this command will be executed.
    +
    + + + diff --git a/3.x/en/doc/history.html b/3.x/en/doc/history.html new file mode 100644 index 00000000000..d9c31e1e059 --- /dev/null +++ b/3.x/en/doc/history.html @@ -0,0 +1,50 @@ + + + + + + + + + history | arthas + + + + +
    Table of Contents

    history

    view command history.

    TIP

    history of commands will persisted in a file named history, so the history command can show all the history commands of current Arthas server ,but not only history in current session.

    Options

    NameSpecification
    [c:]clear all the history commands
    [n:]view the nearest 5 commands

    Usage

    #view the nearest 3 commands
    +$ history 3
    +  269  thread
    +  270  cls
    +  271  history 3
    +
     #clear all the history commands
    + $ history -c
    + $ history 3
    +  1  history 3
    +
    + + + diff --git a/3.x/en/doc/http-api.html b/3.x/en/doc/http-api.html new file mode 100644 index 00000000000..b37e8063cbf --- /dev/null +++ b/3.x/en/doc/http-api.html @@ -0,0 +1,384 @@ + + + + + + + + + Http API | arthas + + + + +
    Table of Contents

    Http API

    Http API online tutorialopen in new window

    Overview

    Http API provides a RESTful-like interactive interface, and both requests and responses data in JSON format. Compared with Telnet/WebConsole's output unstructured text data, Http API can provide structured data and support more complex interactive functions, such as a series of diagnostic operations in specific application scenarios.

    Access address

    The Http API address is: http://ip:port/api, the request parameters must be submitted using POST. Such as POST http://127.0.0.1:8563/api.

    Note: The telnet port 3658 has compatibility issues with the Chrome browser. It is recommended to use the http port 8563 to access the http api.

    Request data format

    {
    +  "action": "exec",
    +  "requestId": "req112",
    +  "sessionId": "94766d3c-8b39-42d3-8596-98aee3ccbefb",
    +  "consumerId": "955dbd1325334a84972b0f3ac19de4f7_2",
    +  "command": "version",
    +  "execTimeout": "10000"
    +}
    +

    Request data format description:

    • action : The requested action/behavior, please refer to "Request Actions" for optional values.
    • requestId : Optional request ID, generated by the client.
    • sessionId : Arthas session ID, one-time command does not need to set the session ID.
    • consumerId : Arthas consumer ID, used for multi-person sharing sessions.
    • command : Arthas command line
    • execTimeout : Timeout for executing commands (ms), default value is 30000.

    Note: Different actions use different parameters. Set the parameters according to the specific action.

    Request Actions

    Currently supported request actions are as follows:

    • exec : The command is executed synchronously, and the command results is returned after the command execution end or interrupted.
    • async_exec : The command is executed asynchronously, and the scheduling result of the command is returned immediately. The command execution result is obtained through pull_results action.
    • interrupt_job : To interrupt the foreground command of the session, similar to the function of Telnet Ctrl + c.
    • pull_results : Get the result of the command executed asynchronously, and execute it repeatedly in http long-polling mode.
    • init_session : Create new session.
    • join_session : Join the session, used to support multiple people sharing the same Arthas session.
    • close_session : Close the session.

    Response status

    The state attribute in the response indicates the request processing state, and its value is as follows:

    • SCHEDULED: When the command is executed asynchronously, it means that the job has been created, and may not be executed yet or is being executed;
    • SUCCEEDED: The request is processed successfully (completed status);
    • FAILED: Request processing failed (completed status), usually accompanied by a message explaining the reason;
    • REFUSED: The request is rejected (completed status), usually accompanied by a message explaining the reason;

    One-time command

    Similar to executing batch commands, the one-time commands are executed synchronously. No need to create a session, no need to set the sessionId option.

    {
    +  "action": "exec",
    +  "command": "<Arthas command line>"
    +}
    +

    For example, get the Arthas version number:

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"exec",
    +  "command":"version"
    +}
    +'
    +

    The response is as follows:

    {
    +  "state": "SUCCEEDED",
    +  "sessionId": "ee3bc004-4586-43de-bac0-b69d6db7a869",
    +  "body": {
    +    "results": [
    +      {
    +        "type": "version",
    +        "version": "3.3.7",
    +        "jobId": 5
    +      },
    +      {
    +        "jobId": 5,
    +        "statusCode": 0,
    +        "type": "status"
    +      }
    +    ],
    +    "timeExpired": false,
    +    "command": "version",
    +    "jobStatus": "TERMINATED",
    +    "jobId": 5
    +  }
    +}
    +

    Response data format description:

    • state: Request processing status, refer to the description of "Response Status".
    • sessionId : Arthas session ID, one-time command to automatically create and destroy temporary sessions.
    • body.jobId: The job ID of the command, all output results of the same job are the same jobId.
    • body.jobStatus: The job status of the command.
    • body.timeExpired: Whether the job execution timed out.
    • body/results: Command execution results.

    Command result format description

    [
    +  {
    +    "type": "version",
    +    "version": "3.3.7",
    +    "jobId": 5
    +  },
    +  {
    +    "jobId": 5,
    +    "statusCode": 0,
    +    "type": "status"
    +  }
    +]
    +
    • type : The command result type, except for the special ones such as status, the others remain the same as the Arthas command name. Please refer to the section "Special command results".
    • jobId : The job ID of the command.
    • Other fields are the data of each different command.

    Note: You can also use a one-time command to execute continuous output commands such as watch/trace, but you can't interrupt the command execution, and there may be hang up for a long time. Please refer to the example in the "Make watch command output a map object" section.

    Please try to deal with it in the following way:

    • Set a reasonable execTimeout to forcibly interrupt the command execution after the timeout period is reached to avoid a long hang.
    • Use the -n parameter to specify a smaller number of executions.
    • Ensure the methods of the command matched can be successfully hit and the condition-express is written correctly. If the watch/trace does not hit, even if -n 1 is specified, it will hang and wait until the execution timeout.

    Session interaction

    Users create and manage Arthas sessions, which are suitable for complex interactive processes. The access process is as follows:

    • Create a session
    • Join the session (optional)
    • Pull command results
    • Execute a series of commands
    • Interrupt command execution
    • Close the session

    Create session

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"init_session"
    +}
    +'
    +

    Response result:

    {
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId": "5ae4e5fbab8b4e529ac404f260d4e2d1_1",
    +  "state": "SUCCEEDED"
    +}
    +

    The new session ID is: b09f1353-202c-407b-af24-701b744f971e, and consumer ID is: 5ae4e5fbab8b4e529ac404f260d4e2d1_1.

    Join session

    Specify the session ID to join, and the server will assign a new consumer ID. Multiple consumers can receive the same command results of target session. This interface is used to support multiple people sharing the same session or refreshing the page to retrieve the session history.

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"join_session",
    +  "sessionId" : "b09f1353-202c-407b-af24-701b744f971e"
    +}
    +'
    +

    Response result:

    {
    +  "consumerId": "8f7f6ad7bc2d4cb5aa57a530927a95cc_2",
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "state": "SUCCEEDED"
    +}
    +

    The new consumer ID is 8f7f6ad7bc2d4cb5aa57a530927a95cc_2 .

    Pull command results

    The action of pulling the command result message is pull_results. Please use the Http long-polling method to periodically pull the result messages. The consumer's timeout period is 5 minutes. After the timeout, you need to call join_session to allocate a new consumer.

    Each consumer is allocated a cache queue separately, and the pull order does not affect the content received by the consumer.

    The request parameters require session ID and consumer ID:

    curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"pull_results",
    +  "sessionId" : "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId" : "8f7f6ad7bc2d4cb5aa57a530927a95cc_2"
    +}
    +'
    +

    Use Bash scripts to regularly pull results messages:

    while true; do curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"pull_results",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +  "consumerId" : "8ecb9cb7c7804d5d92e258b23d5245cc_1"
    +}
    +' | json_pp; sleep 2; done
    +

    Note: The json_pp tool formats the output content as pretty json.

    The response content is as follows:

    {
    +  "body": {
    +    "results": [
    +      {
    +        "inputStatus": "DISABLED",
    +        "jobId": 0,
    +        "type": "input_status"
    +      },
    +      {
    +        "type": "message",
    +        "jobId": 0,
    +        "message": "Welcome to arthas!"
    +      },
    +      {
    +        "tutorials": "https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html",
    +        "time": "2020-08-06 15:56:43",
    +        "type": "welcome",
    +        "jobId": 0,
    +        "pid": "7909",
    +        "wiki": "https://arthas.aliyun.com/3.x/doc",
    +        "version": "3.3.7"
    +      },
    +      {
    +        "inputStatus": "ALLOW_INPUT",
    +        "type": "input_status",
    +        "jobId": 0
    +      }
    +    ]
    +  },
    +  "sessionId": "b09f1353-202c-407b-af24-701b744f971e",
    +  "consumerId": "8f7f6ad7bc2d4cb5aa57a530927a95cc_2",
    +  "state": "SUCCEEDED"
    +}
    +

    Execute commands asynchronously

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"async_exec",
    +  "command":"watch demo.MathGame primeFactors \"{params, returnObj, throwExp}\" ",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +

    Response of async_exec:

    {
    +  "sessionId": "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +  "state": "SCHEDULED",
    +  "body": {
    +    "jobStatus": "READY",
    +    "jobId": 3,
    +    "command": "watch demo.MathGame primeFactors \"{params, returnObj, throwExp}\" "
    +  }
    +}
    +
    • state : The status of SCHEDULED means that the command has been parsed and generated the job, but the execution has not started.
    • body.jobId : The job id of command execution, filter the command results output in pull_results according to this job ID.
    • body.jobStatus : The job status READY means that execution has not started.

    The shell output of the script that continuously pulls the result message:

    {
    +   "body" : {
    +      "results" : [
    +         {
    +            "type" : "command",
    +            "jobId" : 3,
    +            "state" : "SCHEDULED",
    +            "command" : "watch demo.MathGame primeFactors \"{params, returnObj, throwExp}\" "
    +         },
    +         {
    +            "inputStatus" : "ALLOW_INTERRUPT",
    +            "jobId" : 0,
    +            "type" : "input_status"
    +         },
    +         {
    +            "success" : true,
    +            "jobId" : 3,
    +            "effect" : {
    +               "listenerId" : 3,
    +               "cost" : 24,
    +               "classCount" : 1,
    +               "methodCount" : 1
    +            },
    +            "type" : "enhancer"
    +         },
    +         {
    +            "sizeLimit" : 10485760,
    +            "expand" : 1,
    +            "jobId" : 3,
    +            "type" : "watch",
    +            "cost" : 0.071499,
    +            "ts" : 1596703453237,
    +            "value" : [
    +               [
    +                  -170365
    +               ],
    +               null,
    +               {
    +                  "stackTrace" : [
    +                     {
    +                        "className" : "demo.MathGame",
    +                        "classLoaderName" : "app",
    +                        "methodName" : "primeFactors",
    +                        "nativeMethod" : false,
    +                        "lineNumber" : 46,
    +                        "fileName" : "MathGame.java"
    +                     },
    +                     ...
    +                  ],
    +                  "localizedMessage" : "number is: -170365, need >= 2",
    +                  "@type" : "java.lang.IllegalArgumentException",
    +                  "message" : "number is: -170365, need >= 2"
    +               }
    +            ]
    +         },
    +         {
    +            "type" : "watch",
    +            "cost" : 0.033375,
    +            "jobId" : 3,
    +            "ts" : 1596703454241,
    +            "value" : [
    +               [
    +                  1
    +               ],
    +               [
    +                  2,
    +                  2,
    +                  2,
    +                  2,
    +                  13,
    +                  491
    +               ],
    +               null
    +            ],
    +            "sizeLimit" : 10485760,
    +            "expand" : 1
    +         }
    +      ]
    +   },
    +   "consumerId" : "8ecb9cb7c7804d5d92e258b23d5245cc_1",
    +   "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a",
    +   "state" : "SUCCEEDED"
    +}
    +

    The value of the watch command result is the value of watch-experss, and the above command is {params, returnObj, throwExp}, so the value of the watch result is an array of length 3, and each element corresponds to the expression in the corresponding order.

    Please refer to the section "Make watch command output a map object".

    Interrupt command execution

    Interrupt the running foreground job of the session:

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"interrupt_job",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +
    {
    +  "state": "SUCCEEDED",
    +  "body": {
    +    "jobStatus": "TERMINATED",
    +    "jobId": 3
    +  }
    +}
    +

    Close session

    Specify the session ID to close the session.

    curl -Ss -XPOST http://localhost:8563/api -d '''
    +{
    +  "action":"close_session",
    +  "sessionId" : "2b085b5d-883b-4914-ab35-b2c5c1d5aa2a"
    +}
    +'''
    +
    {
    +  "state": "SUCCEEDED"
    +}
    +

    Authentication

    Web UI

    A Web UI based on Http API, visit url : http://127.0.0.1:8563/uiopen in new window .

    Completed functions:

    • Create a session
    • Copy and open the url to join the session, share the session with multiple people
    • Continuously pull session command result messages
    • Refresh the web page or join the session to pull command messages history
    • Control input or interrupt command status

    Pending function:

    • Improve the readability of command result messages
    • Support automatic completion of input commands and command templates
    • Provide command help
    • Support personal profile settings

    Special command results

    status

    {
    +  "jobId": 5,
    +  "statusCode": 0,
    +  "type": "status"
    +}
    +

    type is status to indicate the command execution status:

    After each command is executed, there is a unique status result. If the statusCode is 0, it means the execution is successful, and the statusCode is a non-zero value that means the execution failed, similar to the process exit code.

    When the command execution fails, an error message is generally provided, such as:

    {
    +  "jobId": 3,
    +  "message": "The argument 'class-pattern' is required",
    +  "statusCode": -10,
    +  "type": "status"
    +}
    +

    input_status

    {
    +  "inputStatus": "ALLOW_INPUT",
    +  "type": "input_status",
    +  "jobId": 0
    +}
    +

    type is input_status to indicate input status:

    It is used to control user input during UI interaction, and a change message will be sent before and after each command is executed.

    Possible values ​​of inputStatus:

    • ALLOW_INPUT : Allow users to enter commands, which means that the session has no foreground command being executed and can accept new command.
    • ALLOW_INTERRUPT : Allow the user to interrupt the command execution, indicating that a command is currently being executed, and the user can send interrupt_job to interrupt the execution.
    • DISABLED : In the disabled state, commands cannot be entered or interrupted.

    command

    {
    +  "type": "command",
    +  "jobId": 3,
    +  "state": "SCHEDULED",
    +  "command": "watch demo.MathGame primeFactors \"{params, returnObj, throwExp}\" "
    +}
    +

    type is command to indicate the input command data:

    It is used for the interactive UI to echo the commands entered by the user. The pulled session command message history will contain messages of type command, which can be processed in order.

    enhancer

    {
    +  "success": true,
    +  "jobId": 3,
    +  "effect": {
    +    "listenerId": 3,
    +    "cost": 24,
    +    "classCount": 1,
    +    "methodCount": 1
    +  },
    +  "type": "enhancer"
    +}
    +

    type is enhancer to indicate the result of class enhancement:

    Commands such as trace/watch/jad/tt need to enhance the class and will receive this enhancer result. It may happen that the result of enhancer is successful, but there is no hit method. The client can prompt the user according to the result of enhancer.

    Cases

    Get classpath of Java application

    Get system properties of the Java application through Http api and extract the value of java.class.path.

    json_data=$(curl -Ss -XPOST http://localhost:8563/api -d '
    +{
    +  "action":"exec",
    +  "command":"sysprop"
    +}')
    +
    • Extract value with sed:
    class_path=$(echo $json_data | tr -d '\n' | sed 's/.*"java.class.path":"\([^"]*\).*/\1/')
    +echo "classpath: $class_path"
    +
    • Extract value with json_pp/awk:
    class_path=$(echo $json_data | tr -d '\n' | json_pp | grep java.class.path | awk -F'"' '{ print $4 }')
    +echo "classpath: $class_path"
    +

    Output:

    classpath: demo-arthas-spring-boot.jar
    +

    NOTE:

    • echo $json_data | tr -d '\n' : Delete line breaks (the value of line.separator) to avoid affecting the processing of sed/json_pp commands.
    • awk -F'"' '{ print $4 }' : Use double quote as delimiter

    Make watch command output a map object

    The result value of watch is generated by calculating the watch-express ognl expression. You can change the ognl expression to generate the desired value, please refer to OGNL documentopen in new window.

    TIP

    Maps can also be created using a special syntax.

    #{ "foo" : "foo value", "bar" : "bar value" }

    This creates a Map initialized with mappings for "foo" and "bar".

    The following command generates values ​​in map format:

    watch *MathGame prime* '#{ "params" : params, "returnObj" : returnObj, "throwExp": throwExp}' -x 2 -n 5
    +

    Execute the above command in Telnet shell/WebConsole, the output result:

    ts=2020-08-06 16:57:20; [cost=0.241735ms] result=@LinkedHashMap[
    +    @String[params]:@Object[][
    +        @Integer[1],
    +    ],
    +    @String[returnObj]:@ArrayList[
    +        @Integer[2],
    +        @Integer[241],
    +        @Integer[379],
    +    ],
    +    @String[throwExp]:null,
    +]
    +

    Execute the above command with Http api, pay attention to escaping the JSON double quotes:

    curl -Ss -XPOST http://localhost:8563/api -d @- << EOF
    +{
    +  "action":"exec",
    +  "execTimeout": 30000,
    +  "command":"watch *MathGame prime* '#{ \"params\" : params, \"returnObj\" : returnObj, \"throwExp\": throwExp}' -n 3 "
    +}
    +EOF
    +

    Http api execution result:

    {
    +    "body": {
    +         ...
    +        "results": [
    +            ...
    +            {
    +                ...
    +                "type": "watch",
    +                "value": {
    +                    "params": [
    +                        1
    +                    ],
    +                    "returnObj": [
    +                        2,
    +                        5,
    +                        17,
    +                        23,
    +                        23
    +                    ]
    +                }
    +            },
    +            {
    +                ...
    +                "type": "watch",
    +                "value": {
    +                    "params": [
    +                        -98278
    +                    ],
    +                    "throwExp": {
    +                        "@type": "java.lang.IllegalArgumentException",
    +                        "localizedMessage": "number is: -98278, need >= 2",
    +                        "message": "number is: -98278, need >= 2",
    +                        "stackTrace": [
    +                            ...
    +                        ]
    +                    }
    +                }
    +            },
    +            ...
    +}
    +

    You can see that the value of the watch result becomes a map object, and the program can read value through a key .

    + + + diff --git a/3.x/en/doc/idea-plugin.html b/3.x/en/doc/idea-plugin.html new file mode 100644 index 00000000000..dfa8d04420f --- /dev/null +++ b/3.x/en/doc/idea-plugin.html @@ -0,0 +1,41 @@ + + + + + + + + + IDEA Plugin | arthas + + + + + + + + diff --git a/3.x/en/doc/index.html b/3.x/en/doc/index.html new file mode 100644 index 00000000000..b9535d45b0f --- /dev/null +++ b/3.x/en/doc/index.html @@ -0,0 +1,41 @@ + + + + + + + + + Introduction | arthas + + + + +
    Table of Contents

    Introduction

    Arthas is a Java diagnostic tool open-sourced by Alibaba middleware team. It is widely adopted and popular among the developers inside Alibaba. Arthas helps developers in trouble-shooting issues in production environment for Java based applications without modifying code or restarting servers.

    Background

    Oftentimes the production system network is inaccessible from local development environment. If issues are encountered in production systems, it is impossible to use IDE to debug the application remotely. What's even worse, debugging in production environment is unacceptable, as it will suspend all the threads, leading to services downtime.

    Developers could always try to reproduce the same issue on the test/staging environment. However, this is tricky as some issues cannot be reproduced easily in a different environment, or even disappear once restarted.

    And if you're thinking of adding some logs to your code to help trouble-shoot the issue, you will have to go through the following lifecycle: test, staging, and then to production. Time is money! This approach is inefficient! Worse still, the issue may not be fixed since it might be irreproducible once the JVM is restarted, as described above.

    Arthas is built to solve these issues. A developer can troubleshoot production issues on the fly. No JVM restart, no additional code changes. Arthas works as an observer, that is, it will never suspend your running threads.

    Key features

    • Check whether a class is loaded? Or where the class is loaded from? (Useful for trouble-shooting jar file conflicts)
    • Decompile a class to ensure the code is running as expected.
    • Check classloader statistics, e.g. the number of classloaders, the number of classes loaded per classloader, the classloader hierarchy, possible classloader leaks, etc.
    • Check the method invocation details, e.g. method parameter, returned values, exceptions and etc.
    • Check the stack trace of specified method invocation. This is useful when a developer wants to know the caller of the method.
    • Trace the method invocation to find slow sub-invocations.
    • Monitor method invocation statistics, e.g. QPS (Query Per Second), RT (Return Time), success rate and etc.
    • Monitor system metrics, thread states and CPU usage, GC statistics and etc.
    • Supports command line interactive mode, with auto-complete feature enabled.
    • Supports telnet and WebSocket, which enables both local and remote diagnostics with command line and browsers.
    • Supports profiler/Flame Graph
    • Support get objects in the heap that are instances of the specified class.
    • Supports JDK 6+
    • Supports Linux/Mac/Windows

    If you are using Arthas, please let us know. Your feedback is very important to us: Viewopen in new window

    Contributors

    open in new window

    + + + diff --git a/3.x/en/doc/install-detail.html b/3.x/en/doc/install-detail.html new file mode 100644 index 00000000000..ab60c7fa7ff --- /dev/null +++ b/3.x/en/doc/install-detail.html @@ -0,0 +1,52 @@ + + + + + + + + + Install Arthas | arthas + + + + +
    Table of Contents

    Install Arthas

    Quick installation

    Downloadarthas-boot3.jar,Start with java command:

    curl -O https://arthas.aliyun.com/arthas-boot3.jar
    +java -jar arthas-boot3.jar
    +

    Print usage:

    java -jar arthas-boot3.jar -h
    +

    Use as3.sh

    You can install Arthas with one single line command on Linux, Unix, and Mac. Pls. copy the following command and paste it into the command line, then press Enter to run:

    curl -L https://arthas.aliyun.com/install3.sh | sh
    +

    The command above will download the bootstrap script as3.sh to the current directory. You can move it to any other place you want, or put its location in $PATH.

    You can enter its interactive interface by executing as3.sh, or execute as3.sh -h for more help information.

    Full installation

    Download from Github Releases

    https://github.com/alibaba/arthas/releasesopen in new window

    Download and unzip, find arthas-boot3.jar in the directory. Start with java command:

    java -jar arthas-boot3.jar
    +

    Print usage:

    java -jar arthas-boot3.jar -h
    +

    Manual Installation

    Manual Installation

    Installation via Packages

    Arthas has packages for Debian and Fedora based systems. you can get them from the github releases page https://github.com/alibaba/arthas/releases.

    Instruction for Debian based systems

    sudo dpkg -i arthas*.deb
    +

    Instruction for Fedora based systems

    sudo rpm -i arthas*.rpm
    +

    Usage

    After the installation of packages, execute

    as3.sh
    +

    Offline Help Documentation

    Latest Version Documentation, Click To Download:open in new window

    Uninstall

    • On Linux/Unix/Mac, delete the files with the following command:

      rm -rf ~/.arthas/
      +rm -rf ~/logs/arthas/
      +
    • On Windows, delete .arthas and logs/arthas directory under user home.

    + + + diff --git a/3.x/en/doc/jad.html b/3.x/en/doc/jad.html new file mode 100644 index 00000000000..754f685be85 --- /dev/null +++ b/3.x/en/doc/jad.html @@ -0,0 +1,159 @@ + + + + + + + + + jad | arthas + + + + +
    Table of Contents

    jad

    jad online tutorialopen in new window

    TIP

    Decompile the specified classes.

    jad helps to decompile the byte code running in JVM to the source code to assist you to understand the logic behind better. If you need to download the bytecode of classes in a specific package directory in bulk, you can refer to the dump tool for assistance.

    • The decompiled code is syntax highlighted for better readability in Arthas console.
    • It is possible that there's grammar error in the decompiled code, but it should not affect your interpretation.

    Options

    NameSpecification
    class-patternpattern for the class name
    [c:]hashcode of the class loader that loads the class
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.
    [E]turn on regex match while the default is wildcard match

    Usage

    Decompile java.lang.String

    $ jad java.lang.String
    +
    +ClassLoader:
    +
    +Location:
    +
    +
    +        /*
    +         * Decompiled with CFR.
    +         */
    +        package java.lang;
    +
    +        import java.io.ObjectStreamField;
    +        import java.io.Serializable;
    +...
    +        public final class String
    +        implements Serializable,
    +        Comparable<String>,
    +        CharSequence {
    +            private final char[] value;
    +            private int hash;
    +            private static final long serialVersionUID = -6849794470754667710L;
    +            private static final ObjectStreamField[] serialPersistentFields = new ObjectStreamField[0];
    +            public static final Comparator<String> CASE_INSENSITIVE_ORDER = new CaseInsensitiveComparator();
    +...
    +            public String(byte[] byArray, int n, int n2, Charset charset) {
    +/*460*/         if (charset == null) {
    +                    throw new NullPointerException("charset");
    +                }
    +/*462*/         String.checkBounds(byArray, n, n2);
    +/*463*/         this.value = StringCoding.decode(charset, byArray, n, n2);
    +            }
    +...
    +

    By default, the decompile result will have the ClassLoader information. With the --source-only option, you can print only the source code. Conveniently used with the mc/retransform commands.

    $ jad --source-only demo.MathGame
    +/*
    + * Decompiled with CFR 0_132.
    + */
    +package demo;
    +
    +import java.io.PrintStream;
    +import java.util.ArrayList;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.Random;
    +import java.util.concurrent.TimeUnit;
    +
    +public class MathGame {
    +    private static Random random = new Random();
    +    public int illegalArgumentCount = 0;
    +...
    +

    Decompile the specified method

    $ jad demo.MathGame main
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@232204a1
    +  +-sun.misc.Launcher$ExtClassLoader@7f31245a
    +
    +Location:
    +/private/tmp/math-game.jar
    +
    +       public static void main(String[] args) throws InterruptedException {
    +           MathGame game = new MathGame();
    +           while (true) {
    +/*16*/         game.run();
    +/*17*/         TimeUnit.SECONDS.sleep(1L);
    +           }
    +       }
    +

    Do not print line numbers

    • --lineNumber: Output source code contins line numbers, default value true
    $ jad demo.MathGame main --lineNumber false
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@232204a1
    +  +-sun.misc.Launcher$ExtClassLoader@7f31245a
    +
    +Location:
    +/private/tmp/math-game.jar
    +
    +public static void main(String[] args) throws InterruptedException {
    +    MathGame game = new MathGame();
    +    while (true) {
    +        game.run();
    +        TimeUnit.SECONDS.sleep(1L);
    +    }
    +}
    +

    Decompile with specified classLoader

    TIP

    If the target class is loaded by multiple classloaders, jad outputs the hashcode of the corresponding classloaders, then you can re-run jad and specify -c <hashcode> to decompile the target class from the specified classloader.

    $ jad org.apache.log4j.Logger
    +
    +Found more than one class for: org.apache.log4j.Logger, Please use jad -c hashcode org.apache.log4j.Logger
    +HASHCODE  CLASSLOADER
    +69dcaba4  +-monitor's ModuleClassLoader
    +6e51ad67  +-java.net.URLClassLoader@6e51ad67
    +            +-sun.misc.Launcher$AppClassLoader@6951a712
    +            +-sun.misc.Launcher$ExtClassLoader@6fafc4c2
    +2bdd9114  +-pandora-qos-service's ModuleClassLoader
    +4c0df5f8  +-pandora-framework's ModuleClassLoader
    +
    +Affect(row-cnt:0) cost in 38 ms.
    +$ jad org.apache.log4j.Logger -c 69dcaba4
    +
    +ClassLoader:
    ++-monitor's ModuleClassLoader
    +
    +Location:
    +/Users/admin/app/log4j-1.2.14.jar
    +
    +package org.apache.log4j;
    +
    +import org.apache.log4j.spi.*;
    +
    +public class Logger extends Category
    +{
    +    private static final String FQCN;
    +
    +    protected Logger(String name)
    +    {
    +        super(name);
    +    }
    +
    +...
    +
    +Affect(row-cnt:1) cost in 190 ms.
    +

    For classloader with only one instance, it can be specified by --classLoaderClass using class name, which is more convenient to use.

    The value of --classloaderclass 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, -c <hashcode> is dynamic.

    + + + diff --git a/3.x/en/doc/jfr.html b/3.x/en/doc/jfr.html new file mode 100644 index 00000000000..0e5e4b29a91 --- /dev/null +++ b/3.x/en/doc/jfr.html @@ -0,0 +1,62 @@ + + + + + + + + + jfr | arthas + + + + +
    Table of Contents

    jfr

    jfr online tutorialopen in new window

    TIP

    Java Flight Recorder (JFR) is a tool for collecting diagnostic and profiling data about a running Java application. It is integrated into the Java Virtual Machine (JVM) and causes almost no performance overhead, so it can be used even in heavily loaded production environments.

    The jfr command supports starting and stopping JFR recordings during dynamic program running. Recording collects data about events. Events occur in the JVM or the Java application at a specific point in time. Each event has a name, a time stamp, and an optional payload. The payload is the data associated with an event, for example, the CPU usage, the Java heap size before and after the event, the thread ID of the lock holder, and so on.

    The basic usage of the jfr command isjfr cmd [actionArg]

    Note: jfr is supported only after the 8u262 version of jdk8

    Supported Options

    NameSpecification
    cmdCommand to execute, support【start,status,dump,stop】
    actionArgAttribute name pattern
    [n:]Name of recording
    [r:]Recording id
    [dumponexit:]When the program exits, whether to dump the .jfr file. (boolean false)
    [d:]Duration of recording, i.e. 60s, 2m, 5h, 3d. default no delay
    [duration:]Duration of recording, default forever.
    [s:]Server-side template, The default is default.jfc located at $JAVA_HOME/lib/jfr/default.jfc
    [f:]Resulting recording filename
    [maxage:]Maximum age of buffer data
    [maxsize:]Maximum size of buffers in bytes
    [state:]Recording state

    Start jfr recording

    $ jfr start
    +Started recording 1. No limit specified, using maxsize=250MB as default.
    +

    TIP

    The default JFR record is started.

    Start the JFR recording, specify the recording name, duration, file saving path.

    $ jfr start -n myRecording --duration 60s -f /tmp/myRecording.jfr
    +Started recording 2. The result will be written to:
    +/tmp/myRecording.jfr
    +

    ##View jfr recordings status

    The default is to view all JFR recordings.

    $ jfr status
    +Recording: recording=1 name=Recording-1 (running)
    +Recording: recording=2 name=myRecording duration=PT1M (closed)
    +

    View the records of the specified recording ID.

    $ jfr status -r 1
    +Recording: recording=1 name=Recording-1 (running)
    +

    View recordings in a specified state.

    $ jfr status --state closed
    +Recording: recording=2 name=myRecording duration=PT1M (closed)
    +

    dump jfr recording

    The jfr dump command will output the recordings from the start until the execution of the command to a JFR file, without stopping the recording.
    Specifies the record output path.

    $ jfr dump -r 1 -f /tmp/myRecording1.jfr
    +Dump recording 1, The result will be written to:
    +/tmp/myRecording1.jfr
    +

    The file output path is not specified. By default, it is saved to the arthas-output directory

    $ jfr dump -r 1
    +Dump recording 1, The result will be written to:
    +/tmp/test/arthas-output/20220819-200915.jfr
    +

    Stop jfr recording

    No recording output path is specified, default is saved to arthas-output directory.

    $ jfr stop -r 1
    +Stop recording 1, The result will be written to:
    +/tmp/test/arthas-output/20220819-202049.jfr
    +

    notice: A recording can only be stopped once.

    You can also specify the record output path.

    View JFR recording results under arthas-output via browser

    By default, arthas uses http port 8563 , which can be opened:http://localhost:8563/arthas-output/open in new window View the arthas-output directory below JFR recording results:

    The resulting results can be viewed with tools that support the JFR format. Such as:

    • JDK Mission Control : https://github.com/openjdk/jmc
    + + + diff --git a/3.x/en/doc/jvm.html b/3.x/en/doc/jvm.html new file mode 100644 index 00000000000..64a8a58a61c --- /dev/null +++ b/3.x/en/doc/jvm.html @@ -0,0 +1,140 @@ + + + + + + + + + jvm | arthas + + + + +
    Table of Contents

    jvm

    jvm online tutorialopen in new window

    TIP

    Check the current JVM's info

    Usage

    $ jvm
    +RUNTIME
    +--------------------------------------------------------------------------------------------------------------
    + MACHINE-NAME                   37@ff267334bb65
    + JVM-START-TIME                 2020-07-23 07:50:36
    + MANAGEMENT-SPEC-VERSION        1.2
    + SPEC-NAME                      Java Virtual Machine Specification
    + SPEC-VENDOR                    Oracle Corporation
    + SPEC-VERSION                   1.8
    + VM-NAME                        Java HotSpot(TM) 64-Bit Server VM
    + VM-VENDOR                      Oracle Corporation
    + VM-VERSION                     25.201-b09
    + INPUT-ARGUMENTS                []
    + CLASS-PATH                     demo-arthas-spring-boot.jar
    + BOOT-CLASS-PATH                /usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/j
    +                                re/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/
    +                                java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/us
    +                                r/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/l
    +                                ib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes
    + LIBRARY-PATH                   /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
    +
    +--------------------------------------------------------------------------------------------------------------
    + CLASS-LOADING
    +--------------------------------------------------------------------------------------------------------------
    + LOADED-CLASS-COUNT             7529
    + TOTAL-LOADED-CLASS-COUNT       7529
    + UNLOADED-CLASS-COUNT           0
    + IS-VERBOSE                     false
    +
    +--------------------------------------------------------------------------------------------------------------
    + COMPILATION
    +--------------------------------------------------------------------------------------------------------------
    + NAME                           HotSpot 64-Bit Tiered Compilers
    + TOTAL-COMPILE-TIME             14921(ms)
    +
    +--------------------------------------------------------------------------------------------------------------
    + GARBAGE-COLLECTORS
    +--------------------------------------------------------------------------------------------------------------
    + PS Scavenge                            name : PS Scavenge
    + [count/time (ms)]                      collectionCount : 7
    +                                        collectionTime : 68
    +
    + PS MarkSweep                           name : PS MarkSweep
    + [count/time (ms)]                      collectionCount : 1
    +                                        collectionTime : 47
    +
    +--------------------------------------------------------------------------------------------------------------
    + MEMORY-MANAGERS
    +--------------------------------------------------------------------------------------------------------------
    + CodeCacheManager               Code Cache
    +
    + Metaspace Manager              Metaspace
    +                                Compressed Class Space
    +
    + Copy                           Eden Space
    +                                Survivor Space
    +
    + MarkSweepCompact               Eden Space
    +                                Survivor Space
    +                                Tenured Gen
    +
    +
    +--------------------------------------------------------------------------------------------------------------
    + MEMORY
    +--------------------------------------------------------------------------------------------------------------
    + HEAP-MEMORY-USAGE                      init : 268435456(256.0 MiB)
    + [memory in bytes]                      used : 18039504(17.2 MiB)
    +                                        committed : 181403648(173.0 MiB)
    +                                        max : 3817865216(3.6 GiB)
    +
    + NO-HEAP-MEMORY-USAGE                   init : 2555904(2.4 MiB)
    + [memory in bytes]                      used : 33926216(32.4 MiB)
    +                                        committed : 35176448(33.5 MiB)
    +                                        max : -1(-1 B)
    +
    +--------------------------------------------------------------------------------------------------------------
    + OPERATING-SYSTEM
    +--------------------------------------------------------------------------------------------------------------
    + OS                             Linux
    + ARCH                           amd64
    + PROCESSORS-COUNT               3
    + LOAD-AVERAGE                   29.53
    + VERSION                        4.15.0-52-generic
    +
    +--------------------------------------------------------------------------------------------------------------
    + THREAD
    +--------------------------------------------------------------------------------------------------------------
    + COUNT                          30
    + DAEMON-COUNT                   24
    + PEAK-COUNT                     31
    + STARTED-COUNT                  36
    + DEADLOCK-COUNT                 0
    +
    +--------------------------------------------------------------------------------------------------------------
    + FILE-DESCRIPTOR
    +--------------------------------------------------------------------------------------------------------------
    + MAX-FILE-DESCRIPTOR-COUNT      1048576
    + OPEN-FILE-DESCRIPTOR-COUNT     100
    +Affect(row-cnt:0) cost in 88 ms.
    +
    • COUNT: the count of active threads
    • DAEMON-COUNT: the count of active daemon threads
    • PEAK-COUNT: the maximum count of the live threads since JVM starts
    • STARTED-COUNT: the total count of the created threads since JVM starts
    • DEADLOCK-COUNT: the count of deadlocked threads
    • MAX-FILE-DESCRIPTOR-COUNT:the count of max file descriptor JVM process can open
    • OPEN-FILE-DESCRIPTOR-COUNT:the current count of file descriptor JVM process open
    + + + diff --git a/3.x/en/doc/keymap.html b/3.x/en/doc/keymap.html new file mode 100644 index 00000000000..dc61ef6de68 --- /dev/null +++ b/3.x/en/doc/keymap.html @@ -0,0 +1,60 @@ + + + + + + + + + keymap | arthas + + + + +
    Table of Contents

    keymap

    keymap online tutorialopen in new window

    Use keymap command to print the current keymap:

    The default keymap is:

    ShortcutShortcut DescriptionCommand NameCommand Description
    "\C-a"ctrl + abeginning-of-linego to the beginning of the line
    "\C-e"ctrl + eend-of-linego to the end of the line
    "\C-f"ctrl + fforward-wordforward a word
    "\C-b"ctrl + bbackward-wordbackward a word
    "\e[D"left arrowbackward-charbackward a character
    "\e[C"right arrowforward-charforward a character
    "\e[B"down arrownext-historyshow next history command
    "\e[A"up arrowprevious-historyshow previous history command
    "\C-h"ctrl + hbackward-delete-charbackward delete a character
    "\C-?"ctrl + shift + /backward-delete-charbackward delete a character
    "\C-u"ctrl + uundoclear current line
    "\C-d"ctrl + ddelete-chardelete the character of the current cursor
    "\C-k"ctrl + kkill-linedelete all characters from the current cursor to the end of the line
    "\C-i"ctrl + icompleteAuto completion, equivalent to TAB
    "\C-j"ctrl + jaccept-lineend the current line, equivalent to enter
    "\C-m"ctrl + maccept-lineend the current line, equivalent to enter
    "\C-w"backward-delete-word
    "\C-x\e[3~"backward-kill-line
    "\e\C-?"backward-kill-word
    • Press tab to enable auto-completion prompt at any time.
    • Enter command and - or --, then press tab to display the concrete options for the current command.

    Custom shortcuts

    Specify customization in $USER_HOME/.arthas/conf/inputrc file in the current user home directory.

    Vim user may want to map ctrl+h to moving the cursor forward one character. To achieve this, copy the default configuration first,

    "\C-a": beginning-of-line
    +"\C-e": end-of-line
    +"\C-f": forward-word
    +"\C-b": backward-word
    +"\e[D": backward-char
    +"\e[C": forward-char
    +"\e[B": next-history
    +"\e[A": previous-history
    +"\C-h": backward-delete-char
    +"\C-?": backward-delete-char
    +"\C-u": undo
    +"\C-d": delete-char
    +"\C-k": kill-line
    +"\C-i": complete
    +"\C-j": accept-line
    +"\C-m": accept-line
    +"\C-w": backward-delete-word
    +"\C-x\e[3~": backward-kill-line
    +"\e\C-?": backward-kill-word
    +

    then replace "\C-h": backward-delete-char with "\C-h": backward-char, then reconnect to Arthas console to take effect.

    Shortcuts for jobs

    • ctrl + c: Terminates current command
    • ctrl + z: Suspends the current command, you can restore this command with bg/fg, or kill it.
    • ctrl + a: Go to the beginning the line
    • ctrl + e: Go to the end of the line
    + + + diff --git a/3.x/en/doc/logger.html b/3.x/en/doc/logger.html new file mode 100644 index 00000000000..fc2779e3040 --- /dev/null +++ b/3.x/en/doc/logger.html @@ -0,0 +1,176 @@ + + + + + + + + + logger | arthas + + + + +
    Table of Contents

    logger

    logger online tutorialopen in new window

    TIP

    Print the logger information, update the logger level

    Usage

    Take the following logback.xml as an example:

    <?xml version="1.0" encoding="UTF-8"?>
    +<configuration>
    +    <appender name="APPLICATION" class="ch.qos.logback.core.rolling.RollingFileAppender">
    +        <file>app.log</file>
    +        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
    +            <fileNamePattern>mylog-%d{yyyy-MM-dd}.%i.txt</fileNamePattern>
    +            <maxFileSize>100MB</maxFileSize>
    +            <maxHistory>60</maxHistory>
    +            <totalSizeCap>2GB</totalSizeCap>
    +        </rollingPolicy>
    +        <encoder>
    +            <pattern>%logger{35} - %msg%n</pattern>
    +        </encoder>
    +    </appender>
    +
    +    <appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
    +        <appender-ref ref="APPLICATION" />
    +    </appender>
    +
    +    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
    +        <encoder>
    +            <pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n
    +            </pattern>
    +            <charset>utf8</charset>
    +        </encoder>
    +    </appender>
    +
    +    <root level="INFO">
    +        <appender-ref ref="CONSOLE" />
    +        <appender-ref ref="ASYNC" />
    +    </root>
    +</configuration>
    +

    The result of the logger command:

    [arthas@2062]$ logger
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  INFO
    + effectiveLevel                         INFO
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +

    In the appenders section:

    • The target of CONSOLE logger is System.out
    • APPLICATION logger is RollingFileAppender, the file is app.log
    • ASYNC its appenderRef is APPLICATION, which means asynchronous output to the file

    View logger information for the special name

    [arthas@2062]$ logger -n org.springframework.web
    + name                                   org.springframework.web
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         INFO
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +

    View logger information for the special classloader

    Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader.

    if you use-c, you have to manually type hashcode by -c <hashcode>.

    [arthas@2062]$ logger -c 2a139a55
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  DEBUG
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +

    For classloader with only one instance, it can be specified by --classLoaderClass using class name, which is more convenient to use.

    logger --classLoaderClass sun.misc.Launcher$AppClassLoader

    • PS: Here the classLoaderClass in java 8 is sun.misc.Launcher$AppClassLoader, while in java 11 it's jdk.internal.loader.ClassLoaders$AppClassLoader.

    The value of --classloaderclass 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, -c <hashcode> is dynamic.

    Update logger level

    [arthas@2062]$ logger --name ROOT --level debug
    +update logger level success.
    +

    Speecify classloader to update logger level

    By default,logger command will be executed under SystemClassloader, if the application is a traditional war, or using spring boot fat jar, then it needs to specify classloader。

    You can first use sc -d yourClassName to check specified classloader hashcode,then specify classloader when updating logger level:

    [arthas@2062]$ logger -c 2a139a55 --name ROOT --level debug
    +

    View the logger information without appenders

    By default, the logger command only prints information about the logger with appenders. If you want to see information about loggers without appender, you can use the parameter --include-no-appender.

    Note that the output will usually be very long.

    [arthas@2062]$ logger --include-no-appender
    + name                                   ROOT
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  DEBUG
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    + appenders                              name            CONSOLE
    +                                        class           ch.qos.logback.core.ConsoleAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        target          System.out
    +                                        name            APPLICATION
    +                                        class           ch.qos.logback.core.rolling.RollingFileAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        file            app.log
    +                                        name            ASYNC
    +                                        class           ch.qos.logback.classic.AsyncAppender
    +                                        classLoader     sun.misc.Launcher$AppClassLoader@2a139a55
    +                                        classLoaderHash 2a139a55
    +                                        appenderRef     [APPLICATION]
    +
    + name                                   com
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +
    + name                                   com.alibaba
    + class                                  ch.qos.logback.classic.Logger
    + classLoader                            sun.misc.Launcher$AppClassLoader@2a139a55
    + classLoaderHash                        2a139a55
    + level                                  null
    + effectiveLevel                         DEBUG
    + additivity                             true
    + codeSource                             file:/Users/hengyunabc/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
    +...
    +
    + + + diff --git a/3.x/en/doc/manual-install.html b/3.x/en/doc/manual-install.html new file mode 100644 index 00000000000..de9ee401d35 --- /dev/null +++ b/3.x/en/doc/manual-install.html @@ -0,0 +1,60 @@ + + + + + + + + + Manually Install Arthas | arthas + + + + +
    Table of Contents

    Manually Install Arthas

    1. Download the latest version

    Download from Github Releases

    https://github.com/alibaba/arthas/releasesopen in new window

    1. Unzip zip file

      unzip arthas-packaging-bin.zip
      +
    2. Install Arthas

      It is recommended to completely remove all old versions of Arthas before installation.

      sudo su admin
      +rm -rf /home/admin/.arthas/lib/* # remove all the leftover of the old outdated Arthas
      +cd arthas
      +./install-local3.sh # switch the user based on the owner of the target Java process.
      +
    3. Start Arthas

      Make sure stop the old Arthas server before start.

      ./as3.sh
      +

    Startup with as3.sh/as.bat

    Linux/Unix/Mac

    You can install Arthas with one single line command on Linux, Unix, and Mac. Pls. copy the following command and paste it into the command line, then press Enter to run:

    curl -L https://arthas.aliyun.com/install3.sh | sh
    +

    The command above will download the bootstrap script as3.sh to the current directory. You can move it the any other place you want, or put its location in $PATH.

    You can enter its interactive interface by executing as3.sh, or execute as3.sh -h for more help information.

    Windows

    Latest Version, Click To Download: open in new window

    Download and unzip, then find as.bat from 'bin' directory. For now this script will only take one argument pid, which means you can only diagnose the local Java process. (Welcome any bat script expert to make it better ❤️)

    as.bat <pid>
    +

    If you want to diagnose Java process run as windows service, try these commands:

    as-service.bat -port <port>
    +as-service.bat -pid <pid>
    +as-service.bat -pid <pid> --interact
    +

    Use this command to remove arthas service:

    as-service.bat -remove
    +

    Manual command line startup

    If you fail to boot Arthas with the provided batch file, you could try to assemble the bootstrap command in the following way.

    1. Locate java in the target JVM:

      • Linux/Unix/Mac: ps aux | grep java
      • Windows: open the Process Monitor to search java
    2. Assemble bootstrap command:

      Let's suppose we are using /opt/jdk1.8/bin/java, then the command should be:

      /opt/jdk1.8/bin/java -Xbootclasspath/a:/opt/jdk1.8/lib/tools.jar \
      +    -jar /tmp/arthas-packaging/arthas-core.jar \
      +    -pid 15146 \
      +    -target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 \
      +    -core /tmp/arthas-packaging/arthas-core.jar \
      +    -agent /tmp/arthas-packaging/arthas/arthas-agent.jar
      +

      Note:

      • -Xbootclasspath adds tools.jar
      • -jar /tmp/arthas-packaging/arthas-core.jar specifies main entry
      • -pid 15146 specifies the target java process PID
      • -target-ip 127.0.0.1 specifies the IP
      • -telnet-port 3658 -http-port 8563 specifies telnet and HTTP ports for remote access
      • -core /tmp/arthas-packaging/arthas-core.jar -agent /tmp/arthas-packaging/arthas/arthas-agent.jar specifies core/agent jar package

      If you are running on JDK 1.9 or above,then it's unnecessary to add tools.jar in option -Xbootclasspath.

      You can find the logs from ~/logs/arthas/arthas.log.

    3. Use telnet to connect once attaching to the target JVM (in step 2) succeeds

      telnet 127.0.0.1 3658
      +
    + + + diff --git a/3.x/en/doc/mbean.html b/3.x/en/doc/mbean.html new file mode 100644 index 00000000000..6107f4a4c2a --- /dev/null +++ b/3.x/en/doc/mbean.html @@ -0,0 +1,49 @@ + + + + + + + + + mbean | arthas + + + + +
    Table of Contents

    mbean

    mbean online tutorialopen in new window

    TIP

    show Mbean information

    This command can show or monitor Mbean attribute information.

    Parameters

    NameSpecification
    name-patternpattern for the Mbean name
    attribute-patternpattern for the attribute name
    [m]show meta information
    [i:]specify the interval to refresh attribute value (ms)
    [n:]execution times
    [E]turn on regex matching while the default mode is wildcard matching. Only effect on the attribute name

    Usage

    show all Mbean names:

    mbean
    +

    show meta data of Mbean:

    mbean -m java.lang:type=Threading
    +

    show attributes of Mbean:

    mbean java.lang:type=Threading
    +

    Mbean name support wildcard matcher:

    mbean java.lang:type=Th*
    +

    WARNING

    Notes:ObjectName matching rules differ from normal wildcards, Reference resources:javax.management.ObjectNameopen in new window

    Wildcards match specific attributes:

    mbean java.lang:type=Threading *Count
    +

    Switch to regular matching using the -E command:

    mbean -E java.lang:type=Threading PeakThreadCount|ThreadCount|DaemonThreadCount
    +

    Real-time monitoring using -i command:

    mbean -i 1000 java.lang:type=Threading *Count
    +

    Real-time monitoring using -i with number of times the command will be executed using -n command (100 times by default):

    mbean -i 1000 -n 50 java.lang:type=Threading *Count
    +
    + + + diff --git a/3.x/en/doc/mc.html b/3.x/en/doc/mc.html new file mode 100644 index 00000000000..6cacba527c7 --- /dev/null +++ b/3.x/en/doc/mc.html @@ -0,0 +1,48 @@ + + + + + + + + + mc | arthas + + + + +
    Table of Contents

    mc

    mc-retransform online tutorialopen in new window

    Usage

    TIP

    Memory compiler, compiles .java files into .class files in memory.

    mc /tmp/Test.java
    +

    The classloader can be specified with the -c option:

    mc -c 327a647b /tmp/Test.java
    +

    You can also specify the ClassLoader with the --classLoaderClass option:

    $ mc --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader /tmp/UserController.java -d /tmp
    +Memory compiler output:
    +/tmp/com/example/demo/arthas/user/UserController.class
    +Affect(row-cnt:1) cost in 346 ms
    +

    The output directory can be specified with the -d option:

    mc -d /tmp/output /tmp/ClassA.java /tmp/ClassB.java
    +

    After compiling the .class file, you can use the retransform command to re-define the loaded classes in JVM.

    WARNING

    Note that the mc command may fail. If the compilation fails, the .class file can be compiled locally and uploaded to the server. Refer to the retransform command description for details.

    + + + diff --git a/3.x/en/doc/memory.html b/3.x/en/doc/memory.html new file mode 100644 index 00000000000..772b0d3c5a9 --- /dev/null +++ b/3.x/en/doc/memory.html @@ -0,0 +1,55 @@ + + + + + + + + + memory | arthas + + + + +
    Table of Contents

    memory

    View the JVM memory information.

    Usage

    $ memory
    +Memory                           used      total      max        usage
    +heap                             32M       256M       4096M      0.79%
    +g1_eden_space                    11M       68M        -1         16.18%
    +g1_old_gen                       17M       184M       4096M      0.43%
    +g1_survivor_space                4M        4M         -1         100.00%
    +nonheap                          35M       39M        -1         89.55%
    +codeheap_'non-nmethods'          1M        2M         5M         20.53%
    +metaspace                        26M       27M        -1         96.88%
    +codeheap_'profiled_nmethods'     4M        4M         117M       3.57%
    +compressed_class_space           2M        3M         1024M      0.29%
    +codeheap_'non-profiled_nmethods' 685K      2496K      120032K    0.57%
    +mapped                           0K        0K         -          0.00%
    +direct                           48M       48M        -          100.00%
    +
    + + + diff --git a/3.x/en/doc/monitor.html b/3.x/en/doc/monitor.html new file mode 100644 index 00000000000..5cf240b78d2 --- /dev/null +++ b/3.x/en/doc/monitor.html @@ -0,0 +1,121 @@ + + + + + + + + + monitor | arthas + + + + +
    Table of Contents

    monitor

    monitor online tutorialopen in new window

    TIP

    Monitor method invocation.

    Monitor invocation for the method matched with class-pattern and method-pattern and filter by condition-expression.

    monitor is not a command returning immediately.

    A command returning immediately is a command immediately returns with the result after the command is input, while a non-immediate returning command will keep outputting the information from the target JVM process until user presses Ctrl+C.

    On Arthas's server side, the command is running as a background job, but the weaved code will not take further effect once the job is terminated, therefore, it will not impact the performance after the job quits. Furthermore, Arthas is designed to have no side effect to the business logic.

    Items to monitor

    ItemSpecification
    timestamptimestamp
    classJava class
    methodmethod (constructor and regular methods)
    totalcalling times
    successsuccess count
    failfailure count
    rtaverage RT
    fail-ratefailure ratio

    Parameters

    Parameter [c:] stands for cycles of statistics. Its value is an integer value in seconds.

    NameSpecification
    class-patternpattern for the class name
    method-patternpattern for the method name
    condition-expressioncondition expression for filtering method calls
    [E]turn on regex matching while the default is wildcard matching
    [c:]cycle of statistics, the default value: 120s
    [b]evaluate the condition-expression before method invoke
    [m <arg>]Specify the max number of matched Classes, the default value is 50. Long format is [maxMatch <arg>].

    Usage

    $ monitor -c 5 demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 94 ms.
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:38  demo.MathGame  primeFactors  5      1        4     1.15        80.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:43  demo.MathGame  primeFactors  5      3        2     42.29       40.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:48  demo.MathGame  primeFactors  5      3        2     67.92       40.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:53  demo.MathGame  primeFactors  5      2        3     0.25        60.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:06:58  demo.MathGame  primeFactors  1      1        0     0.45        0.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2018-12-03 19:07:03  demo.MathGame  primeFactors  2      2        0     3182.72     0.00%
    +

    Specify the max number of matched Classes

    $ monitor -c 1 -m 1 demo.MathGame primeFactors
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 384 ms, listenerId: 6.
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2022-12-25 21:12:58  demo.MathGame  primeFactors  1      1        0     0.18        0.00%
    +
    + timestamp            class          method        total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2022-12-25 21:12:59  demo.MathGame  primeFactors  0      0        0     0.00       0.00%
    +

    Evaluate condition-express to filter method (after method call)

    monitor -c 5 demo.MathGame primeFactors "params[0] <= 2"
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 19 ms, listenerId: 5
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +-----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:36  demo.MathGame  primeFactors    5       3       2      0.09       40.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:41  demo.MathGame  primeFactors    5       2       3      0.11       60.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:46  demo.MathGame  primeFactors    5       1       4      0.06       80.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:51  demo.MathGame  primeFactors    5       1       4      0.12       80.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:56  demo.MathGame  primeFactors    5       3       2      0.15       40.00%
    +

    Evaluate condition-express to filter method (before method call)

    monitor -b -c 5 com.test.testes.MathGame primeFactors "params[0] <= 2"
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 21 ms, listenerId: 4
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:41:57  demo.MathGame  primeFactors    1       0        1      0.10      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:02  demo.MathGame  primeFactors    3       0        3      0.06      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:07  demo.MathGame  primeFactors    2       0        2      0.06      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:12  demo.MathGame  primeFactors    1       0        1      0.05      100.00%
    +
    + timestamp            class          method         total  success  fail  avg-rt(ms)  fail-rate
    +----------------------------------------------------------------------------------------------
    + 2020-09-02 09:42:17  demo.MathGame  primeFactors    2       0        2      0.10      100.00%
    +
    + + + diff --git a/3.x/en/doc/ognl.html b/3.x/en/doc/ognl.html new file mode 100644 index 00000000000..b92986dd469 --- /dev/null +++ b/3.x/en/doc/ognl.html @@ -0,0 +1,86 @@ + + + + + + + + + ognl | arthas + + + + +
    Table of Contents

    ognl

    ognl online tutorialopen in new window

    TIP

    Execute ognl expression.

    Since 3.0.5.

    Parameters

    NameSpecification
    expressexpression to be executed
    [c:]The hashcode of the ClassLoader that executes the expression, default ClassLoader is SystemClassLoader.
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.
    [x]Expand level of object (1 by default).

    Usage

    Call static method:

    $ ognl '@java.lang.System@out.println("hello")'
    +null
    +

    Get static field:

    $ ognl '@demo.MathGame@random'
    +@Random[
    +    serialVersionUID=@Long[3905348978240129619],
    +    seed=@AtomicLong[125451474443703],
    +    multiplier=@Long[25214903917],
    +    addend=@Long[11],
    +    mask=@Long[281474976710655],
    +    DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +    BadBound=@String[bound must be positive],
    +    BadRange=@String[bound must be greater than origin],
    +    BadSize=@String[size must be non-negative],
    +    seedUniquifier=@AtomicLong[-3282039941672302964],
    +    nextNextGaussian=@Double[0.0],
    +    haveNextNextGaussian=@Boolean[false],
    +    serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +    unsafe=@Unsafe[sun.misc.Unsafe@28ea5898],
    +    seedOffset=@Long[24],
    +]
    +

    Specify ClassLoader by hashcode:

    $ classloader -t
    ++-BootstrapClassLoader
    ++-jdk.internal.loader.ClassLoaders$PlatformClassLoader@301ec38b
    +  +-com.taobao.arthas.agent.ArthasClassloader@472067c7
    +  +-jdk.internal.loader.ClassLoaders$AppClassLoader@4b85612c
    +    +-org.springframework.boot.loader.LaunchedURLClassLoader@7f9a81e8
    +
    +$ ognl -c 7f9a81e8 @org.springframework.boot.SpringApplication@logger
    +@Slf4jLocationAwareLog[
    +    FQCN=@String[org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog],
    +    name=@String[org.springframework.boot.SpringApplication],
    +    logger=@Logger[Logger[org.springframework.boot.SpringApplication]],
    +]
    +$
    +

    Note that the hashcode changes, you need to check the current ClassLoader information first, and extract the hashcode corresponding to the ClassLoader.

    For ClassLoader with only unique instance, it can be specified by class name, which is more convenient to use:

    $ ognl --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader  @org.springframework.boot.SpringApplication@logger
    +@Slf4jLocationAwareLog[
    +    FQCN=@String[org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog],
    +    name=@String[org.springframework.boot.SpringApplication],
    +    logger=@Logger[Logger[org.springframework.boot.SpringApplication]],
    +]
    +

    Execute a multi-line expression, and return a list:

    $ ognl '#value1=@System@getProperty("java.home"), #value2=@System@getProperty("java.runtime.name"), {#value1, #value2}'
    +@ArrayList[
    +    @String[/opt/java/8.0.181-zulu/jre],
    +    @String[OpenJDK Runtime Environment],
    +]
    +
    + + + diff --git a/3.x/en/doc/options.html b/3.x/en/doc/options.html new file mode 100644 index 00000000000..5fbab596fcd --- /dev/null +++ b/3.x/en/doc/options.html @@ -0,0 +1,101 @@ + + + + + + + + + options | arthas + + + + +
    Table of Contents

    options

    options online tutorialopen in new window

    TIP

    Global options

    NameDefault ValueDescription
    unsafefalsewhether to enhance to system-level class. Use it with caution since JVM may hang
    dumpfalsewhether to dump enhanced class to the external files. If it's on, enhanced class will be dumped into /${application dir}/arthas-class-dump/, the specific output path will be output in the console
    batch-re-transformtruewhether to re-transform matched classes in batch
    json-formatfalsewhether to output in JSON format
    disable-sub-classfalsewhether to enable matching child classes. The default value is true. If exact match is desire, turn off this flag
    support-default-methodtruewhether to enable matching default method in interface. The default value is true. Refer to #1105open in new window
    save-resultfalsewhether to save execution result. All execution results will be saved to ~/logs/arthas-cache/result.log when it's turned on
    job-timeout1ddefault timeout for background jobs. Background job will be terminated once it's timed out (i.e. 1d, 2h, 3m, 25s)
    print-parent-fieldstrueThis option enables print files in parent class, default value true.
    verbosefalseThis option enables print verbose information
    stricttruewhether to enable strict mode

    View all options

    $ options
    + LEVEL  TYPE    NAME          VALUE   SUMMARY               DESCRIPTION
    +-------------------------------------------------------------------------------------------------------
    + 0      boolea  unsafe        false   Option to support sy  This option enables to proxy functionality
    +        n                             stem-level class       of JVM classes. Due to serious security r
    +                                                            isk a JVM crash is possibly be introduced.
    +                                                             Do not activate it unless you are able to
    +                                                             manage.
    + 1      boolea  dump          false   Option to dump the e  This option enables the enhanced classes t
    +        n                             nhanced classes       o be dumped to external file for further d
    +                                                            e-compilation and analysis.
    + 1      boolea  batch-re-tra  true    Option to support ba  This options enables to reTransform classe
    +        n       nsform                tch reTransform Clas  s with batch mode.
    +                                      s
    + 2      boolea  json-format   false   Option to support JS  This option enables to format object outpu
    +        n                             ON format of object   t with JSON when -x option selected.
    +                                      output
    + 1      boolea  disable-sub-  false   Option to control in  This option disable to include sub class w
    +        n       class                 clude sub class when  hen matching class.
    +                                       class matching
    + 1      boolea  support-defa  true    Option to control in  This option disable to include default met
    +        n       ult-method            clude default method  hod in interface when matching class.
    +                                       in interface when c
    +                                      lass matching
    + 1      boolea  save-result   false   Option to print comm  This option enables to save each command's
    +        n                             and's result to log    result to log file, which path is ${user.
    +                                      file                  home}/logs/arthas-cache/result.log.
    + 2      String  job-timeout   1d      Option to job timeou  This option setting job timeout,The unit c
    +                                      t                     an be d, h, m, s for day, hour, minute, se
    +                                                            cond. 1d is one day in default
    + 1      boolea  print-parent  true    Option to print all   This option enables print files in parent
    +        n       -fields               fileds in parent cla  class, default value true.
    +                                      ss
    + 1      boolea  verbose       false   Option to print verb  This option enables print verbose informat
    +        n                             ose information       ion, default value false.
    + 1      boolea  strict        true    Option to strict mod  By default, strict mode is true, not allow
    +        n                             e                     ed to set object properties. Want to set o
    +                                                            bject properties, execute `options strict
    +                                                            false`
    +

    Get special option value

    $ options json-format
    + LEVEL  TYPE  NAME         VALUE  SUMMARY             DESCRIPTION
    +--------------------------------------------------------------------------------------------
    + 2      bool  json-format  false  Option to support   This option enables to format object
    +        ean                       JSON format of obj  output with JSON when -x option selec
    +                                  ect output          ted.
    +

    TIP

    By default, json-format is false. When set json-format to true, commands like wathc/tt will print result with json format.

    Set special option value

    For example, to enable saving command execution result, input the command below:

    $ options save-result true
    + NAME         BEFORE-VALUE  AFTER-VALUE
    +----------------------------------------
    + save-result  false         true
    +

    Set unsafe to true to enhance the classes under the java.* package

    By default, watch/trace/tt/trace/monitor command do not support classes under java.* package. You can set unsafe to true to enhance the classes under the java.* package.

    $ options unsafe true
    + NAME    BEFORE-VALUE  AFTER-VALUE
    +-----------------------------------
    + unsafe  false         true
    +
    $ watch java.lang.invoke.Invokers callSiteForm
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 61 ms, listenerId: 1
    +

    Turn off strict mode, allow setting object properties in ognl expressions

    TIP

    since 3.6.0

    For new users, there may be misuses when writing ognl expressions.

    For example, for Student, when judging the age is equal to 18, the conditional expression may be mistakenly written as target.age=18, which actually sets the age of the current object to 18. The correct spelling is target.age==18.

    In order to prevent misuse like the above, Arthas enables strict mode by default, in ognl expressions, it is forbidden to update the property of the object or call the setter method.

    Take MathGame as an example, the following error message will appear.

    $ watch demo.MathGame primeFactors 'target' 'target.illegalArgumentCount=1'
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 206 ms, listenerId: 1
    +watch failed, condition is: target.illegalArgumentCount=1, express is: target, By default, strict mode is true, not allowed to set object properties. Want to set object properties, execute `options strict false`, visit /Users/admin/logs/arthas/arthas.log for more details.
    +

    If the user want to change the object properties in the ognl expression, you can execute options strict false to turn off the strict mode.

    • For more information, please refer to: https://github.com/alibaba/arthas/issues/2128
    + + + diff --git a/3.x/en/doc/perfcounter.html b/3.x/en/doc/perfcounter.html new file mode 100644 index 00000000000..8d761f354e2 --- /dev/null +++ b/3.x/en/doc/perfcounter.html @@ -0,0 +1,60 @@ + + + + + + + + + perfcounter | arthas + + + + +
    Table of Contents

    perfcounter

    perfcounter online tutorialopen in new window

    TIP

    Check the current JVM Perf Counter information.

    Usage

    $ perfcounter
    + java.ci.totalTime                            2325637411
    + java.cls.loadedClasses                       3403
    + java.cls.sharedLoadedClasses                 0
    + java.cls.sharedUnloadedClasses               0
    + java.cls.unloadedClasses                     0
    + java.property.java.version                   11.0.4
    + java.property.java.vm.info                   mixed mode
    + java.property.java.vm.name                   OpenJDK 64-Bit Server VM
    +...
    +

    Print more information with the -d option:

    $ perfcounter -d
    + Name                                   Variability   Units        Value
    +---------------------------------------------------------------------------------
    + java.ci.totalTime                      Monotonic     Ticks        3242526906
    + java.cls.loadedClasses                 Monotonic     Events       3404
    + java.cls.sharedLoadedClasses           Monotonic     Events       0
    + java.cls.sharedUnloadedClasses         Monotonic     Events       0
    + java.cls.unloadedClasses               Monotonic     Events       0
    +

    JVM above JDK9

    If the information is not printed, when the application starts, add the following parameters:

    --add-opens java.base/jdk.internal.perf=ALL-UNNAMED --add-exports java.base/jdk.internal.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter.perf=ALL-UNNAMED --add-opens java.management/sun.management.counter=ALL-UNNAMED
    +
    + + + diff --git a/3.x/en/doc/profiler.html b/3.x/en/doc/profiler.html new file mode 100644 index 00000000000..2b76c05749e --- /dev/null +++ b/3.x/en/doc/profiler.html @@ -0,0 +1,93 @@ + + + + + + + + + profiler | arthas + + + + +
    Table of Contents

    profiler

    profiler online tutorialopen in new window

    TIP

    Generate a flame graph using async-profileropen in new window

    The profiler command supports generate flame graph for application hotspots.

    The basic usage of the profiler command is profiler action [actionArg]

    Supported Options

    NameSpecification
    actionAction to execute
    actionArgAttribute name pattern
    [i:]sampling interval in ns (default: 10'000'000, i.e. 10 ms)
    [f:]dump output to specified directory
    [d:]run profiling for specified seconds
    [e:]which event to trace (cpu, alloc, lock, cache-misses etc.), default value is cpu

    Start profiler

    $ profiler start
    +Started [cpu] profiling
    +

    TIP

    By default, the sample event is cpu. Can be specified with the --event parameter.

    Get the number of samples collected

    $ profiler getSamples
    +23
    +

    View profiler status

    $ profiler status
    +[cpu] profiling is running for 4 seconds
    +

    Can view which event and sampling time.

    Stop profiler

    Generating html format results

    By default, the result file is html format. You can also specify it with the --format parameter:

    $ profiler stop --format html
    +profiler output file: /tmp/test/arthas-output/20211207-111550.html
    +OK
    +

    Or use the file name name format in the --file parameter. For example, --file /tmp/result.html.

    View profiler results under arthas-output via browser

    By default, arthas uses port 3658, which can be opened: http://localhost:3658/arthas-output/open in new window View the arthas-output directory below Profiler results:

    Click to view specific results:

    TIP

    If using the chrome browser, may need to be refreshed multiple times.

    Profiler supported events

    Under different platforms and different OSs, the supported events are different. For example, under macos:

    $ profiler list
    +Basic events:
    +  cpu
    +  alloc
    +  lock
    +  wall
    +  itimer
    +

    Under linux

    $ profiler list
    +Basic events:
    +  cpu
    +  alloc
    +  lock
    +  wall
    +  itimer
    +Perf events:
    +  page-faults
    +  context-switches
    +  cycles
    +  instructions
    +  cache-references
    +  cache-misses
    +  branches
    +  branch-misses
    +  bus-cycles
    +  L1-dcache-load-misses
    +  LLC-load-misses
    +  dTLB-load-misses
    +  mem:breakpoint
    +  trace:tracepoint
    +

    If you encounter the permissions/configuration issues of the OS itself and then missing some events, you can refer to the async-profileropen in new window documentation.

    You can use the --event parameter to specify the event to sample, such as sampling the alloc event:

    $ profiler start --event alloc
    +

    Resume sampling

    $ profiler resume
    +Started [cpu] profiling
    +

    The difference between start and resume is: start is the new start sampling, resume will retain the data of the last stop.

    You can verify the number of samples by executing profiler getSamples.

    Use execute action to execute complex commands

    For example, start sampling:

    profiler execute 'start,framebuf=5000000'
    +

    Stop sampling and save to the specified file:

    profiler execute 'stop,file=/tmp/result.html'
    +

    Specific format reference: arguments.cppopen in new window

    View all supported actions

    $ profiler actions
    +Supported Actions: [resume, dumpCollapsed, getSamples, start, list, execute, version, stop, load, dumpFlat, actions, dumpTraces, status]
    +

    View version

    $ profiler version
    +Async-profiler 1.6 built on Sep  9 2019
    +Copyright 2019 Andrei Pangin
    +

    Configure framebuf option

    TIP

    you encounter [frame_buffer_overflow] in the generated result, you need to increase the framebuf (the default value is 1'000'000), which can be configured explicitly, such as:

    profiler start --framebuf 5000000
    +

    Configure include/exclude to filter data

    If the application is complex and generates a lot of content, and you want to focus on only part of the data, you can filter by include/exclude. such as

    profiler start --include'java/*' --include'demo/*' --exclude'*Unsafe.park*'
    +

    Both include/exclude support setting multiple values, but need to be configured at the end of the command line.

    Specify execution time

    For example, if you want the profiler to automatically end after 300 seconds, you can specify it with the -d/--duration parameter:

    profiler start --duration 300
    +

    Generate jfr format result

    Note that jfr only supports configuration at start. If it is specified at stop, it will not take effect.

    profiler start --file /tmp/test.jfr
    +

    The file parameter supports some variables:

    • Timestamp: --file /tmp/test-%t.jfr
    • Process ID: --file /tmp/test-%p.jfr

    The generated results can be viewed with tools that support the jfr format. such as:

    • JDK Mission Control: https://github.com/openjdk/jmc
    • JProfiler: https://github.com/alibaba/arthas/issues/1416

    The 'unknown' in profiler result

    • https://github.com/jvm-profiling-tools/async-profiler/discussions/409
    + + + diff --git a/3.x/en/doc/pwd.html b/3.x/en/doc/pwd.html new file mode 100644 index 00000000000..43fc376279b --- /dev/null +++ b/3.x/en/doc/pwd.html @@ -0,0 +1,42 @@ + + + + + + + + + pwd | arthas + + + + + + + + diff --git a/3.x/en/doc/quick-start.html b/3.x/en/doc/quick-start.html new file mode 100644 index 00000000000..5c4390ce5fe --- /dev/null +++ b/3.x/en/doc/quick-start.html @@ -0,0 +1,205 @@ + + + + + + + + + Quick Start | arthas + + + + +
    Table of Contents

    Quick Start

    You can practice it yourself by following the instructions below, or you can use our online tutorialsopen in new window to get started quickly.

    1. Start math-game

    curl -O https://arthas.aliyun.com/math-game.jar
    +java -jar math-game.jar
    +

    math-game is a simple program that generates a random number every second, then it finds all prime factors of that number.

    The source code of math-game: Viewopen in new window

    2. Start Arthas

    Linux/Unix/Mac

    Execute the following command in the command line:

    curl -O https://arthas.aliyun.com/arthas-boot3.jar
    +java -jar arthas-boot3.jar
    +
    • The user to run this command MUST have the same privilege as the owner of the target process, as a simple example you can try the following command if the target process is managed by user admin: sudo su admin && java -jar arthas-boot3.jar or sudo -u admin -EH java -jar arthas-boot3.jar
    • If you cannot be able to attach to the target process, please check the logs under ~/logs/arthas for troubleshooting.
    • java -jar arthas-boot3.jar -h print usage.

    Select the target Java process to attach:

    $ $ java -jar arthas-boot3.jar
    +* [1]: 35542
    +  [2]: 71560 math-game.jar
    +

    The math-game process is the second as shown above, press '2' then 'Enter'. Arthas will attach to the target process, and start to output:

    [INFO] Try to attach process 71560
    +[INFO] Attach process 71560 success.
    +[INFO] arthas-client connect 127.0.0.1 3658
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
    +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
    +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
    +
    +
    +wiki: https://arthas.aliyun.com/3.x/doc
    +version: 3.0.5.20181127201536
    +pid: 71560
    +time: 2018-11-28 19:16:24
    +
    +$
    +

    3. Check the Dashboard

    Type 'dashboard' and hit 'ENTER', a brief report on the current process will be shown as below, pls. Ctrl+C to stop:

    $ dashboard
    +ID     NAME                   GROUP          PRIORI STATE  %CPU    TIME   INTERRU DAEMON
    +17     pool-2-thread-1        system         5      WAITIN 67      0:0    false   false
    +27     Timer-for-arthas-dashb system         10     RUNNAB 32      0:0    false   true
    +11     AsyncAppender-Worker-a system         9      WAITIN 0       0:0    false   true
    +9      Attach Listener        system         9      RUNNAB 0       0:0    false   true
    +3      Finalizer              system         8      WAITIN 0       0:0    false   true
    +2      Reference Handler      system         10     WAITIN 0       0:0    false   true
    +4      Signal Dispatcher      system         9      RUNNAB 0       0:0    false   true
    +26     as-command-execute-dae system         10     TIMED_ 0       0:0    false   true
    +13     job-timeout            system         9      TIMED_ 0       0:0    false   true
    +1      main                   main           5      TIMED_ 0       0:0    false   false
    +14     nioEventLoopGroup-2-1  system         10     RUNNAB 0       0:0    false   false
    +18     nioEventLoopGroup-2-2  system         10     RUNNAB 0       0:0    false   false
    +23     nioEventLoopGroup-2-3  system         10     RUNNAB 0       0:0    false   false
    +15     nioEventLoopGroup-3-1  system         10     RUNNAB 0       0:0    false   false
    +Memory             used   total max    usage GC
    +heap               32M    155M  1820M  1.77% gc.ps_scavenge.count  4
    +ps_eden_space      14M    65M   672M   2.21% gc.ps_scavenge.time(m 166
    +ps_survivor_space  4M     5M    5M           s)
    +ps_old_gen         12M    85M   1365M  0.91% gc.ps_marksweep.count 0
    +nonheap            20M    23M   -1           gc.ps_marksweep.time( 0
    +code_cache         3M     5M    240M   1.32% ms )
    +Runtime
    +os.name                Mac OS X
    +os.version             10.13.4
    +java.version           1.8.0_162
    +java.home              /Library/Java/JavaVir
    +                       tualMachines/jdk1.8.0
    +                       _162.jdk/Contents/Hom
    +                       e/jre
    +

    4. Get the Main Class of the math-game process with the thread command

    thread 1 will print the stack of the thread with ID 1, which usually the main function thread.

    $ thread 1 | grep 'main('
    +    at demo.MathGame.main(MathGame.java:17)
    +

    5. Decompile Main Class with jad command

    $ jad demo.MathGame
    +
    +ClassLoader:
    ++-sun.misc.Launcher$AppClassLoader@3d4eac69
    +  +-sun.misc.Launcher$ExtClassLoader@66350f69
    +
    +Location:
    +/tmp/math-game.jar
    +
    +/*
    + * Decompiled with CFR 0_132.
    + */
    +package demo;
    +
    +import java.io.PrintStream;
    +import java.util.ArrayList;
    +import java.util.Iterator;
    +import java.util.List;
    +import java.util.Random;
    +import java.util.concurrent.TimeUnit;
    +
    +public class MathGame {
    +    private static Random random = new Random();
    +    private int illegalArgumentCount = 0;
    +
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        do {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1L);
    +        } while (true);
    +    }
    +
    +    public void run() throws InterruptedException {
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = this.primeFactors(number);
    +            MathGame.print(number, primeFactors);
    +        }
    +        catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", this.illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +
    +    public static void print(int number, List<Integer> primeFactors) {
    +        StringBuffer sb = new StringBuffer("" + number + "=");
    +        Iterator<Integer> iterator = primeFactors.iterator();
    +        while (iterator.hasNext()) {
    +            int factor = iterator.next();
    +            sb.append(factor).append('*');
    +        }
    +        if (sb.charAt(sb.length() - 1) == '*') {
    +            sb.deleteCharAt(sb.length() - 1);
    +        }
    +        System.out.println(sb);
    +    }
    +
    +    public List<Integer> primeFactors(int number) {
    +        if (number < 2) {
    +            ++this.illegalArgumentCount;
    +            throw new IllegalArgumentException("number is: " + number + ", need >= 2");
    +        }
    +        ArrayList<Integer> result = new ArrayList<Integer>();
    +        int i = 2;
    +        while (i <= number) {
    +            if (number % i == 0) {
    +                result.add(i);
    +                number /= i;
    +                i = 2;
    +                continue;
    +            }
    +            ++i;
    +        }
    +        return result;
    +    }
    +}
    +
    +Affect(row-cnt:1) cost in 970 ms.
    +

    6. watch

    Use 'watch' to view the return object of demo.MathGame#primeFactors:

    $ watch demo.MathGame primeFactors returnObj
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 107 ms.
    +ts=2018-11-28 19:22:30; [cost=1.715367ms] result=null
    +ts=2018-11-28 19:22:31; [cost=0.185203ms] result=null
    +ts=2018-11-28 19:22:32; [cost=19.012416ms] result=@ArrayList[
    +    @Integer[5],
    +    @Integer[47],
    +    @Integer[2675531],
    +]
    +ts=2018-11-28 19:22:33; [cost=0.311395ms] result=@ArrayList[
    +    @Integer[2],
    +    @Integer[5],
    +    @Integer[317],
    +    @Integer[503],
    +    @Integer[887],
    +]
    +ts=2018-11-28 19:22:34; [cost=10.136007ms] result=@ArrayList[
    +    @Integer[2],
    +    @Integer[2],
    +    @Integer[3],
    +    @Integer[3],
    +    @Integer[31],
    +    @Integer[717593],
    +]
    +ts=2018-11-28 19:22:35; [cost=29.969732ms] result=@ArrayList[
    +    @Integer[5],
    +    @Integer[29],
    +    @Integer[7651739],
    +]
    +

    Pls. refer to Arthas advancedopen in new window for more information.

    7. Exit Arthas

    Use quit or exit to disconnect from the current process. The Arthas instance attached to the target process continues to live inside the process, and its port is standby for further connection.

    Use stop command to have Arthas completely quit from the target process.

    + + + diff --git a/3.x/en/doc/quit.html b/3.x/en/doc/quit.html new file mode 100644 index 00000000000..7d2211c08a5 --- /dev/null +++ b/3.x/en/doc/quit.html @@ -0,0 +1,41 @@ + + + + + + + + + quit | arthas + + + + + + + + diff --git a/3.x/en/doc/redefine.html b/3.x/en/doc/redefine.html new file mode 100644 index 00000000000..daad9938047 --- /dev/null +++ b/3.x/en/doc/redefine.html @@ -0,0 +1,75 @@ + + + + + + + + + redefine | arthas + + + + +
    Table of Contents

    redefine

    TIP

    Recommend to use the retransform command.

    mc-redefine online tutorialopen in new window

    TIP

    Load the external *.class files to re-define the loaded classes in JVM.

    Reference: Instrumentation#redefineClassesopen in new window

    Frequently asked questions

    TIP

    Recommend to use the retransform command.

    • The class of redefine cannot modify, add or delete the field and method of the class, including method parameters, method names and return values.

    • If mc fails, you can compile the class file in the local development environment, upload it to the target system, and use redefine to hot load the class.

    • At present, redefine conflicts with watch / trace / jad / tt commands. Reimplementing redefine function in the future will solve this problem.

    WARNING

    Notes: Re-defined classes cannot be restored. There are chances that redefining may fail due to some reasons, for example: there's new field introduced in the new version of the class, pls. refer to JDK's documentation for the limitations.

    TIP

    The reset command is not valid for classes that have been processed by redefine. If you want to reset, you need redefine the original bytecode.

    TIP

    The redefine command will conflict with the jad/watch/trace/monitor/tt commands. After executing redefine, if you execute the above mentioned command, the bytecode of the class will be reset. The reason is that in the JDK redefine and retransform are different mechanisms. When two mechanisms are both used to update the bytecode, only the last modified will take effect.

    Options

    NameSpecification
    [c:]hashcode of the class loader
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.

    Usage

    redefine /tmp/Test.class
    +redefine -c 327a647b /tmp/Test.class /tmp/Test\$Inner.class
    +redefine --classLoaderClass sun.misc.Launcher$AppClassLoader /tmp/Test.class /tmp/Test\$Inner.class
    +

    Use with the jad/mc command

    jad --source-only com.example.demo.arthas.user.UserController > /tmp/UserController.java
    +
    +mc /tmp/UserController.java -d /tmp
    +
    +redefine /tmp/com/example/demo/arthas/user/UserController.class
    +
    • Use jad command to decompile bytecode, and then you can use other editors, such as vim to modify the source code.
    • mc command to compile the modified code
    • Load new bytecode with redefine command

    Tips for uploading .class files to the server

    The mc command may fail. You can modify the code locally, compile it, and upload it to the server. Some servers do not allow direct uploading files, you can use the base64 command to bypass.

    1. Convert the .class file to base64 first, then save it as result.txt

      Base64 < Test.class > result.txt
      +
    2. Login the server, create and edit result.txt, copy the local content, paste and save

    3. Restore result.txt on the server to .class

      Base64 -d < result.txt > Test.class
      +
    4. Use the md5 command to verify that the .class files are consistent.

    Restrictions of the redefine command

    • New field/method is not allowed
    • The function that is running, no exit can not take effect, such as the new System.out.println added below, only the run() function will take effect.
    public class MathGame {
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        while (true) {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1);
    +            // This doesn't work because the code keeps running in while
    +            System.out.println("in loop");
    +        }
    +    }
    +
    +    public void run() throws InterruptedException {
    +        // This works because the run() function ends completely every time
    +        System.out.println("call run()");
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = primeFactors(number);
    +            print(number, primeFactors);
    +
    +        } catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +}
    +
    + + + diff --git a/3.x/en/doc/release-notes.html b/3.x/en/doc/release-notes.html new file mode 100644 index 00000000000..2ffe867faad --- /dev/null +++ b/3.x/en/doc/release-notes.html @@ -0,0 +1,41 @@ + + + + + + + + + Release Notes | arthas + + + + +
    Table of Contents

    Release Notes

    v3.1.1

    v3.1.0

    v3.0.5

    v3.0.4

    v2017-11-03

    • [improvement] add getstatic
    • [bug] fix Arthas class loader logs loading issues
    • [improvement] introduce OGNLopen in new window to customize classloader to invoke static methods
    • [improvement] optimise termd uppercase output performance
    • [improvement] classloader compile in class loader category by default
    • [bug] fix wc counting issue
    • [improvement] disable certain JDK classes e.g. Classloader, Method, Integer and the lik
    • [improvement] quit directly when encountering incorrect OGNLopen in new window expression
    • [bug] fix pipe issues
    • [improvement] optimize command re-direct features using asynchronous log
    • [improvement] trace can filter JDK method calls

    v2017-09-22

    • [improvement] improve the error message when starting agent and server fails
    • [bug] fix some asynchronous issues

    v2017-09-11

    • [improvement] async supported
    • [improvement] optimize jad support JDK 8 and inner class
    • [bug] fix Chinese encoding issues

    v2017-05-11

    • [improvement] tt investigating/recording level one to avoid too much performance overhead
    • [bug] fix Chinese characters can not be presented issue

    v2017-05-12

    • Arthas 3.0 release 🎊

    v2016-12-09

    • [feature] as.shopen in new window support -h to print help info
    • [bug] [#121] fix leftover temp files causing Arthas cannot start issue
    • [bug] [#123] fix attach/shutdown repeatedly causing Arthas classloader leakage issue
    • [improvement] make the help info more readable
    • [bug] [#126] fix the documents links issues
    • [bug] [#122] fix the classloader filtering out sun.reflect.DelegatingClassLoader issue
    • [bug] [#129] fix classloader presenting structure issues
    • [improvement] [#125] make the Arthas log output more readable
    • [improvement] [#96] sc and more commands are supporting format as com/taobao/xxx/TestClass
    • [bug] [#124] fix the negative values of trace
    • [improvement] [#128] the output of tt will auto-expand now
    • [bug] [#130] providing more meaningful error messages when port conflicts
    • [bug] [#98] fix Arthas starting issue: when updating/downloading failed, Arthas will fail to start
    • [bug] [#139] fix agent attaching fails under some scenarios issues
    • [improvement] [#156] delay jd-core-java initialization to avoid Arthas starting failure
    • [bug] avoid thread names duplicate issue
    • [improvement] [#150] filtering by total time cost in trace
    • [bug] fix sc NPE issue when searching SystemClassloader
    • [bug] [#180] fix attach fails issues: attaching succeed at the first time, delete the Arthas installer, re-compile and package => attaching fails

    v2016-06-07

    • [bug] fix NPE when loading spy as resource
    • [improvement] locating the blocking thread
    • [improvement] print out thread in name order
    • [improvement] specify the refreshing interval when checking topN busiest threads

    v2016-04-08

    • [feature] specify refreshing interval and execution times in dashboard
    • [feature] log the command execution result
    • [feature] speed up the booting and attaching while the first attaching is even quicker by 100% than before
    • [feature] batch supported; script supported
    • [feature] interactive mode used in Arthas
    • [feature] inheritance relation included in class searching; global option disable-sub-class can be used to turn it off
    • [feature] colorful and plain text modes both supported
    • [improvement] merge exit and quit commands
    • [improvement] help info enclosed with wiki links
    • [improvement] optimize watch using flow for better UX
    • [improvement] add examples to thread
    • [improvement] auto-completion ignores character case
    • [improvement] make the UI more beautiful/friendly
    • [bug] fix trace printing too much encountering loop issues
    • [bug] fix trace node twisting issues when method throwing exceptions
    • [bug] fix injected/enhanced BootstrapClassLoader cannot locate spy issues

    v2016-03-07

    • [feature] checking the topN thread and related stack traces
    • [bug] fix Arthas starting failure in OpenJdk issues (requiring to reinstall as.shopen in new window)
    • [improvement] optimize UX

    v2016-01-18

    • [improvement] optimise jad; dump memory byte array in real time; using jd-core-java to decompile; line number presented;
    • [bug] fix checking/re-producing issues when tt is watching thread-context related methods invoking

    v2016-01-08

    • [bug] jad NPE
    • [bug] watch/monitor NPE
    • [bug] wrong escaping issues
    • [bug] wrong statistics
    • [bug] sc checking internal structure issues

    v2015-12-29

    • Arthas 2.0 Beta 💥!
    + + + diff --git a/3.x/en/doc/reset.html b/3.x/en/doc/reset.html new file mode 100644 index 00000000000..11e356aafab --- /dev/null +++ b/3.x/en/doc/reset.html @@ -0,0 +1,76 @@ + + + + + + + + + reset | arthas + + + + +
    Table of Contents

    reset

    reset online tutorialopen in new window

    TIP

    Reset all classes that have been enhanced by Arthas. These enhanced classes will also be reset when Arthas server is stop.

    Usage

    $ reset -h
    + USAGE:
    +   reset [-h] [-E] [class-pattern]
    +
    + SUMMARY:
    +   Reset all the enhanced classes
    +
    + EXAMPLES:
    +   reset
    +   reset *List
    +   reset -E .*List
    +
    + OPTIONS:
    + -h, --help                                                         this help
    + -E, --regex                                                        Enable regular expression to match (wildcard matching by default)
    + <class-pattern>                                                    Path and classname of Pattern Matching
    +

    Reset specified class

    $ trace Test test
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 57 ms.
    +`---ts=2017-10-26 17:10:33;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    `---[0.590102ms] Test:test()
    +
    +`---ts=2017-10-26 17:10:34;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    `---[0.068692ms] Test:test()
    +
    +$ reset Test
    +Affect(class-cnt:1 , method-cnt:0) cost in 11 ms.
    +

    Reset all classes

    $ trace Test test
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 15 ms.
    +`---ts=2017-10-26 17:12:06;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    +    `---[0.128518ms] Test:test()
    +
    +$ reset
    +Affect(class-cnt:1 , method-cnt:0) cost in 9 ms.
    +
    + + + diff --git a/3.x/en/doc/retransform.html b/3.x/en/doc/retransform.html new file mode 100644 index 00000000000..b201c28e200 --- /dev/null +++ b/3.x/en/doc/retransform.html @@ -0,0 +1,90 @@ + + + + + + + + + retransform | arthas + + + + +
    Table of Contents

    retransform

    mc-retransform online tutorialopen in new window

    TIP

    Load the external *.class files to retransform the loaded classes in JVM.

    Reference: Instrumentation#retransformClassesopen in new window

    Usage

       retransform /tmp/Test.class
    +   retransform -l
    +   retransform -d 1                    # delete retransform entry
    +   retransform --deleteAll             # delete all retransform entries
    +   retransform --classPattern demo.*   # triger retransform classes
    +   retransform -c 327a647b /tmp/Test.class /tmp/Test\$Inner.class
    +   retransform --classLoaderClass 'sun.misc.Launcher$AppClassLoader' /tmp/Test.class
    +

    retransform the specified .class file

    $ retransform /tmp/MathGame.class
    +retransform success, size: 1, classes:
    +demo.MathGame
    +

    Load the specified .class file, then parse out the class name, and then retransform the corresponding class loaded in the jvm. Every time a .class file is loaded, a retransform entry is recorded.

    TIP

    If retransform is executed multiple times to load the same class file, there will be multiple retransform entries.

    View retransform entry

    $ retransform -l
    +Id              ClassName       TransformCount  LoaderHash      LoaderClassName
    +1               demo.MathGame   1               null            null
    +
    • TransformCount counts the times of attempts to return the .class file corresponding to the entry in the ClassFileTransformer#transform method, but it does not mean that the transform must be successful.

    Delete the specified retransform entry

    Need to specify id:

    retransform -d 1
    +

    Delete all retransform entries

    retransform --deleteAll
    +

    Explicitly trigger retransform

    $ retransform --classPattern demo.MathGame
    +retransform success, size: 1, classes:
    +demo.MathGame
    +

    WARNING

    Note: For the same class, when there are multiple retransform entries, if retransform is explicitly triggered, the entry added last will take effect (the one with the largest id).

    Eliminate the influence of retransform

    If you want to eliminate the impact after performing retransform on a class, you need to:

    • Delete the retransform entry corresponding to this class
    • Re-trigger retransform

    TIP

    If you do not clear all retransform entries and trigger retransform again, the retransformed classes will still take effect when arthas stop.

    Use with the jad/mc command

    jad --source-only com.example.demo.arthas.user.UserController > /tmp/UserController.java
    +
    +mc /tmp/UserController.java -d /tmp
    +
    +retransform /tmp/com/example/demo/arthas/user/UserController.class
    +
    • Use jad command to decompile bytecode, and then you can use other editors, such as vim to modify the source code.
    • mc command to compile the modified code
    • Load new bytecode with retransform command

    Tips for uploading .class files to the server

    The mc command may fail. You can modify the code locally, compile it, and upload it to the server. Some servers do not allow direct uploading files, you can use the base64 command to bypass.

    1. Convert the .class file to base64 first, then save it as result.txt

      Base64 < Test.class > result.txt
      +
    2. Login the server, create and edit result.txt, copy the local content, paste and save

    3. Restore result.txt on the server to .class

      Base64 -d < result.txt > Test.class
      +
    4. Use the md5 command to verify that the .class files are consistent.

    Restrictions of the retransform command

    • New field/method is not allowed
    • The function that is running, no exit can not take effect, such as the new System.out.println added below, only the run() function will take effect.
    public class MathGame {
    +    public static void main(String[] args) throws InterruptedException {
    +        MathGame game = new MathGame();
    +        while (true) {
    +            game.run();
    +            TimeUnit.SECONDS.sleep(1);
    +            // This doesn't work because the code keeps running in while
    +            System.out.println("in loop");
    +        }
    +    }
    +
    +    public void run() throws InterruptedException {
    +        // This works because the run() function ends completely every time
    +        System.out.println("call run()");
    +        try {
    +            int number = random.nextInt();
    +            List<Integer> primeFactors = primeFactors(number);
    +            print(number, primeFactors);
    +
    +        } catch (Exception e) {
    +            System.out.println(String.format("illegalArgumentCount:%3d, ", illegalArgumentCount) + e.getMessage());
    +        }
    +    }
    +}
    +
    + + + diff --git a/3.x/en/doc/save-log.html b/3.x/en/doc/save-log.html new file mode 100644 index 00000000000..04ffccea256 --- /dev/null +++ b/3.x/en/doc/save-log.html @@ -0,0 +1,46 @@ + + + + + + + + + Log command outputs | arthas + + + + +
    Table of Contents

    Log command outputs

    Log command outputs online tutorialopen in new window

    TIP

    Log command outputs for later analysis

    • By default, this behavior is turned off. To enable it, execute the command below:

      $ options save-result true
      + NAME         BEFORE-VALUE  AFTER-VALUE
      +----------------------------------------
      +save-result  false         true
      +Affect(row-cnt:1) cost in 3 ms.
      +

      If the message above is output on the console, then this behavior is enabled successfully.

    • Log file path

      The command execution result will be save in {user.home}/logs/arthas-cache/result.log. Pls. clean it up regularly to save disk space.

    Use asynchronous job to log

    Reference: async

    + + + diff --git a/3.x/en/doc/sc.html b/3.x/en/doc/sc.html new file mode 100644 index 00000000000..3ab4d114957 --- /dev/null +++ b/3.x/en/doc/sc.html @@ -0,0 +1,105 @@ + + + + + + + + + sc | arthas + + + + +
    Table of Contents

    sc

    sc online tutorialopen in new window

    TIP

    Search classes loaded by JVM.

    sc stands for search class. This command can search all possible classes loaded by JVM and show their information. The supported options are: [d][E][f] and [x:].

    Supported Options

    NameSpecification
    class-patternpattern for the class name
    method-patternpattern for the method name
    [d]print the details of the current class, including its code source, class specification, its class loader and so on.
    If a class is loaded by more than one class loader, then the class details will be printed several times
    [E]turn on regex match, the default behavior is wildcards match
    [f]print the fields info of the current class, MUST be used with -d together
    [x:]specify the depth of recursive traverse the static fields, the default value is '0' - equivalent to use toString to output
    [c:]The hash code of the special class's classLoader
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.
    [n:]Maximum number of matching classes with details (100 by default)
    [cs <arg>]Specify the return value of class's ClassLoader#toString(). Long format is[classLoaderStr <arg>]

    TIP

    class-patten supports full qualified class name, e.g. com.taobao.test.AAA and com/taobao/test/AAA. It also supports the format of 'com/taobao/test/AAA', so that it is convenient to directly copy class name from the exception stack trace without replacing '/' to '.'.

    TIP

    sc turns on matching sub-class match by default, that is, sc will also search the sub classes of the target class too. If exact-match is desired, pls. use options disable-sub-class true.

    Usage

    • Wildcards match search

      $ sc demo.*
      +demo.MathGame
      +Affect(row-cnt:1) cost in 55 ms.
      +
    • View class details

      $ sc -d demo.MathGame
      +class-info        demo.MathGame
      +code-source       /private/tmp/math-game.jar
      +name              demo.MathGame
      +isInterface       false
      +isAnnotation      false
      +isEnum            false
      +isAnonymousClass  false
      +isArray           false
      +isLocalClass      false
      +isMemberClass     false
      +isPrimitive       false
      +isSynthetic       false
      +simple-name       MathGame
      +modifier          public
      +annotation
      +interfaces
      +super-class       +-java.lang.Object
      +class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
      +                    +-sun.misc.Launcher$ExtClassLoader@66350f69
      +classLoaderHash   3d4eac69
      +
      +Affect(row-cnt:1) cost in 875 ms.
      +
    • View class fields

      $ sc -d -f demo.MathGame
      +class-info        demo.MathGame
      +code-source       /private/tmp/math-game.jar
      +name              demo.MathGame
      +isInterface       false
      +isAnnotation      false
      +isEnum            false
      +isAnonymousClass  false
      +isArray           false
      +isLocalClass      false
      +isMemberClass     false
      +isPrimitive       false
      +isSynthetic       false
      +simple-name       MathGame
      +modifier          public
      +annotation
      +interfaces
      +super-class       +-java.lang.Object
      +class-loader      +-sun.misc.Launcher$AppClassLoader@3d4eac69
      +                    +-sun.misc.Launcher$ExtClassLoader@66350f69
      +classLoaderHash   3d4eac69
      +fields            modifierprivate,static
      +                  type    java.util.Random
      +                  name    random
      +                  value   java.util.Random@522b4
      +                          08a
      +
      +                  modifierprivate
      +                  type    int
      +                  name    illegalArgumentCount
      +
      +
      +Affect(row-cnt:1) cost in 19 ms.
      +
    • Search class by ClassLoader#toString (on the premise that a ClassLoader instance whose toString() returns apo has loaded some classes including demo.MathGame, demo.MyBar, demo.MyFoo)

      $ sc -cs apo *demo*
      +demo.MathGame
      +demo.MyBar
      +demo.MyFoo
      +Affect(row-cnt:3) cost in 56 ms.
      +
    + + + diff --git a/3.x/en/doc/session.html b/3.x/en/doc/session.html new file mode 100644 index 00000000000..f5155f38efc --- /dev/null +++ b/3.x/en/doc/session.html @@ -0,0 +1,46 @@ + + + + + + + + + session | arthas + + + + +
    Table of Contents

    session

    examines the current session,show the current binded processId and the sessionId.

    TIP

    if exits tunnel server,it will also show agentId、tunnelServerUrl、connected status.

    if exits statUrl,it will also show statUrl.

    Usage

    $ session
    +  Name        Value
    +--------------------------------------------------
    + JAVA_PID    14584
    + SESSION_ID  c2073d3b-443a-4a9b-9249-0c5d24a5756c
    +
    + + + diff --git a/3.x/en/doc/sm.html b/3.x/en/doc/sm.html new file mode 100644 index 00000000000..c838d7a8f58 --- /dev/null +++ b/3.x/en/doc/sm.html @@ -0,0 +1,97 @@ + + + + + + + + + sm | arthas + + + + +
    Table of Contents

    sm

    sm online tutorialopen in new window

    TIP

    Search method from the loaded classes.

    sm stands for search method. This command can search and show method information from all loaded classes. sm can only view the methods declared on the target class, that is, methods from its parent classes are invisible.

    Options

    NameSpecification
    class-patternpattern for class name
    method-patternpattern for method name
    [d]print the details of the method
    [E]turn on regex matching while the default mode is wildcard matching
    [c:]The hash code of the special class's classLoader
    [classLoaderClass:]The class name of the ClassLoader that executes the expression.
    [n:]Maximum number of matching classes with details (100 by default)

    Usage

    View methods of java.lang.String:

    $ sm java.lang.String
    +java.lang.String-><init>
    +java.lang.String->equals
    +java.lang.String->toString
    +java.lang.String->hashCode
    +java.lang.String->compareTo
    +java.lang.String->indexOf
    +java.lang.String->valueOf
    +java.lang.String->checkBounds
    +java.lang.String->length
    +java.lang.String->isEmpty
    +java.lang.String->charAt
    +java.lang.String->codePointAt
    +java.lang.String->codePointBefore
    +java.lang.String->codePointCount
    +java.lang.String->offsetByCodePoints
    +java.lang.String->getChars
    +java.lang.String->getBytes
    +java.lang.String->contentEquals
    +java.lang.String->nonSyncContentEquals
    +java.lang.String->equalsIgnoreCase
    +java.lang.String->compareToIgnoreCase
    +java.lang.String->regionMatches
    +java.lang.String->startsWith
    +java.lang.String->endsWith
    +java.lang.String->indexOfSupplementary
    +java.lang.String->lastIndexOf
    +java.lang.String->lastIndexOfSupplementary
    +java.lang.String->substring
    +java.lang.String->subSequence
    +java.lang.String->concat
    +java.lang.String->replace
    +java.lang.String->matches
    +java.lang.String->contains
    +java.lang.String->replaceFirst
    +java.lang.String->replaceAll
    +java.lang.String->split
    +java.lang.String->join
    +java.lang.String->toLowerCase
    +java.lang.String->toUpperCase
    +java.lang.String->trim
    +java.lang.String->toCharArray
    +java.lang.String->format
    +java.lang.String->copyValueOf
    +java.lang.String->intern
    +Affect(row-cnt:44) cost in 1342 ms.
    +

    View method java.lang.String#toString details:

    $ sm -d java.lang.String toString
    + declaring-class  java.lang.String
    + method-name      toString
    + modifier         public
    + annotation
    + parameters
    + return           java.lang.String
    + exceptions
    +
    +Affect(row-cnt:1) cost in 3 ms.
    +
    + + + diff --git a/3.x/en/doc/spring-boot-starter.html b/3.x/en/doc/spring-boot-starter.html new file mode 100644 index 00000000000..f81c592f46b --- /dev/null +++ b/3.x/en/doc/spring-boot-starter.html @@ -0,0 +1,77 @@ + + + + + + + + + Arthas Spring Boot Starter | arthas + + + + +
    Table of Contents

    Arthas Spring Boot Starter

    TIP

    Support spring boot 2

    Latest Version: Viewopen in new window

    Add maven dependency:

            <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-spring-boot-starter</artifactId>
    +            <version>${arthas.version}</version>
    +        </dependency>
    +

    When the application is started, spring will start arthas and attach its own process.

    Configuration properties

    For example, by configuring the tunnel server for remote management.

    arthas.agent-id=hsehdfsfghhwertyfad
    +arthas.tunnel-server=ws://47.75.156.201:7777/ws
    +

    All supported configuration: Referenceopen in new window

    TIP

    By default, arthas-spring-boot-starter will disable the stop command.

    Reference: Arthas Properties

    View Endpoint Information

    TIP

    Need to configure spring boot to expose endpoint: Referenceopen in new window.

    Assuming the endpoint port is 8080, it can be viewed via the following url.

    http://localhost:8080/actuator/arthas

    {
    +    "arthasConfigMap": {
    +        "agent-id": "hsehdfsfghhwertyfad",
    +        "tunnel-server": "ws://47.75.156.201:7777/ws",
    +    }
    +}
    +

    Non-spring boot application usage

    Non-Spring Boot applications can be used in the following ways.

            <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-agent-attach</artifactId>
    +            <version>${arthas.version}</version>
    +        </dependency>
    +        <dependency>
    +            <groupId>com.taobao.arthas</groupId>
    +            <artifactId>arthas-packaging</artifactId>
    +            <version>${arthas.version}</version>
    +        </dependency>
    +
    import com.taobao.arthas.agent.attach.ArthasAgent;
    +
    +public class ArthasAttachExample {
    +
    +	public static void main(String[] args) {
    +		ArthasAgent.attach();
    +	}
    +
    +}
    +

    You can also configure properties:

            HashMap<String, String> configMap = new HashMap<String, String>();
    +        configMap.put("arthas.appName", "demo");
    +        configMap.put("arthas.tunnelServer", "ws://127.0.0.1:7777/ws");
    +        ArthasAgent.attach(configMap);
    +

    WARNING

    Note that the configuration must be camel case, which is different from the - style of spring boot. Only the spring boot application supports both camel case and - style configuration.

    + + + diff --git a/3.x/en/doc/stack.html b/3.x/en/doc/stack.html new file mode 100644 index 00000000000..da9ce70329c --- /dev/null +++ b/3.x/en/doc/stack.html @@ -0,0 +1,72 @@ + + + + + + + + + stack | arthas + + + + +
    Table of Contents

    stack

    stack online tutorialopen in new window

    TIP

    Print out the full call stack of the current method.

    Most often we know one method gets called, but we have no idea on which code path gets executed or when the method gets called since there are so many code paths to the target method. The command stack comes to rescue in this difficult situation.

    Parameters

    NameSpecification
    class-patternpattern for the class name
    method-patternpattern for the method name
    condition-expressioncondition expression
    [E]turn on regex match, the default behavior is wildcard match
    [n:]execution times
    [m <arg>]Specify the max number of matched Classes, the default value is 50. Long format is [maxMatch <arg>].

    There's one thing worthy noting here is observation expression. The observation expression supports OGNL grammar, for example, you can come up a expression like this "{params,returnObj}". All OGNL expressions are supported as long as they are legal to the grammar.

    Thanks for advice's data structure, it is possible to observe from varieties of different angles. Inside advice parameter, all necessary information for notification can be found.

    Pls. refer to core parameters in expression for more details.

    Usage

    Start Demo

    Start math-game in Quick Start.

    stack

    $ stack demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 36 ms.
    +ts=2018-12-04 01:32:19;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +

    Specify the max number of matched Classes

    $ stack demo.MathGame primeFactors -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 561 ms, listenerId: 5.
    +ts=2022-12-25 21:07:07;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    @demo.MathGame.primeFactors()
    +        at demo.MathGame.run(MathGame.java:46)
    +        at demo.MathGame.main(MathGame.java:38)
    +

    Filtering by condition expression

    $ stack demo.MathGame primeFactors 'params[0]<0' -n 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 30 ms.
    +ts=2018-12-04 01:34:27;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    +ts=2018-12-04 01:34:30;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    +Command execution times exceed limit: 2, so command will exit. You can set it with -n option.
    +

    Filtering by cost

    $ stack demo.MathGame primeFactors '#cost>5'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 35 ms.
    +ts=2018-12-04 01:35:58;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    @demo.MathGame.run()
    +        at demo.MathGame.main(MathGame.java:16)
    +
    + + + diff --git a/3.x/en/doc/start-arthas.html b/3.x/en/doc/start-arthas.html new file mode 100644 index 00000000000..71ebd8075f2 --- /dev/null +++ b/3.x/en/doc/start-arthas.html @@ -0,0 +1,58 @@ + + + + + + + + + Start Arthas | arthas + + + + +
    Table of Contents

    Start Arthas

    Interactive Mode

    ./as3.sh
    +
    ➜  bin git:(develop) ✗ ./as3.sh
    +Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
    +  [1]: 3088 org.jetbrains.idea.maven.server.RemoteMavenServer
    +* [2]: 12872 org.apache.catalina.startup.Bootstrap
    +  [3]: 2455
    +Attaching to 12872...
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
    +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
    +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
    +$
    +

    Non-Interactive Mode

    Startup script is as follows:

    ./as3.sh <PID>[@IP:PORT]
    +

    Parameter Description

    • PID: Target Java process ID (Make sure that the user executing the command has sufficient permissions to operate the target Java process.)
    • IP: The address that Arthas Server listens on, the default value is 127.0.0.1. Arthas allows multiple users to access simultaneously without interfering with each other.
    • PORT: Arthas Server port,the default value is 3658

    Sample

    • If IP and PORT are not specified, then the default values are 127.0.0.1 and 3658

      ./as3.sh 12345

      Equivalent to:

      ./as3.sh 12356@127.0.0.1:3658

    Remote Diagnosis

    After starting Arthas Server on the target Java process, users can use telnet connect to the remote Arthas Server, for example:

    telnet 192.168.1.119 3658
    +

    sudo Support

    Usually online environment will only grant users privilege as low as possible, instead, all advanced operations are through sudo-list. Since as3.sh script takes into account the current effective user, it is possible to run the script in the other rule, by specifying -H option like this:

    sudo -u admin -H ./as3.sh 12345
    +

    Windows Support

    Right now as.bat script supports one parameter only, which is: pid

    as.bat <pid>
    +
    + + + diff --git a/3.x/en/doc/stop.html b/3.x/en/doc/stop.html new file mode 100644 index 00000000000..3f86d8ce21d --- /dev/null +++ b/3.x/en/doc/stop.html @@ -0,0 +1,41 @@ + + + + + + + + + stop | arthas + + + + + + + + diff --git a/3.x/en/doc/sysenv.html b/3.x/en/doc/sysenv.html new file mode 100644 index 00000000000..8e75da9904c --- /dev/null +++ b/3.x/en/doc/sysenv.html @@ -0,0 +1,92 @@ + + + + + + + + + sysenv | arthas + + + + +
    Table of Contents

    sysenv

    sysenv online tutorialopen in new window

    TIP

    View the current JVM environment variables.

    Usage

     USAGE:
    +   sysenv [-h] [env-name]
    +
    + SUMMARY:
    +   Display the system env.
    +
    + EXAMPLES:
    +   sysenv
    +   sysenv USER
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/sysenv
    +
    + OPTIONS:
    + -h, --help                                                 this help
    + <env-name>                                                 env name
    +

    View all environment variables

    $ sysenv
    + KEY                      VALUE
    +----------------------------------------------------------------------------------------------------------------------------
    + PATH                     /Users/admin/.sdkman/candidates/visualvm/current/bin:/Users/admin/.sdkman/candidates/ja
    +                          va/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/
    +                          MacOS
    + SDKMAN_VERSION           5.7.3+337
    + JAVA_HOME                /Users/admin/.sdkman/candidates/java/current
    + JAVA_MAIN_CLASS_65244    demo.MathGame
    + TERM                     xterm-256color
    + LANG                     zh_CN.UTF-8
    + AUTOJUMP_SOURCED         1
    + COLORTERM                truecolor
    + LOGNAME                  admin
    + XPC_SERVICE_NAME         0
    + PWD                      /Users/admin/code/ali/arthas/demo
    + TERM_PROGRAM_VERSION     3.2.5
    + _                        /Users/admin/.sdkman/candidates/java/current/bin/java
    + SHELL                    /bin/bash
    + TERM_PROGRAM             iTerm.app
    + SDKMAN_PLATFORM          Darwin
    + USER                     admin
    + ITERM_PROFILE            Default
    + TMPDIR                   /var/folders/0r/k561bkk917gg972stqclbz9h0000gn/T/
    + XPC_FLAGS                0x0
    + TERM_SESSION_ID          w0t4p0:60BC264D-9649-42AC-A7E4-AF85B69F93F8
    + __CF_USER_TEXT_ENCODING  0x1F5:0x19:0x34
    + Apple_PubSub_Socket_Ren  /private/tmp/com.apple.launchd.DwmmjSQsll/Render
    + der
    + COLORFGBG                7;0
    + HOME                     /Users/admin
    + SHLVL                    1
    + AUTOJUMP_ERROR_PATH      /Users/admin/Library/autojump/errors.log
    +

    View individual environment variables

    TIP

    Use tab for auto-completion

    $ sysenv USER
    +USER=admin
    +
    + + + diff --git a/3.x/en/doc/sysprop.html b/3.x/en/doc/sysprop.html new file mode 100644 index 00000000000..a304c6f2efd --- /dev/null +++ b/3.x/en/doc/sysprop.html @@ -0,0 +1,136 @@ + + + + + + + + + sysprop | arthas + + + + +
    Table of Contents

    sysprop

    sysprop online tutorialopen in new window

    TIP

    Examine the system properties from the target JVM

    Usage

     USAGE:
    +   sysprop [-h] [property-name] [property-value]
    +
    + SUMMARY:
    +   Display, and change all the system properties.
    +
    + EXAMPLES:
    + sysprop
    + sysprop file.encoding
    + sysprop production.mode true
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/sysprop
    +
    + OPTIONS:
    + -h, --help                                  this help
    + <property-name>                             property name
    + <property-value>                            property value
    +

    Check all properties

    $ sysprop
    + KEY                                                  VALUE
    +-------------------------------------------------------------------------------------------------------------------------------------
    + java.runtime.name                                    Java(TM) SE Runtime Environment
    + sun.boot.library.path                                /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib
    + java.vm.version                                      25.51-b03
    + user.country.format                                  CN
    + gopherProxySet                                       false
    + java.vm.vendor                                       Oracle Corporation
    + java.vendor.url                                      http://java.oracle.com/
    + path.separator                                       :
    + java.vm.name                                         Java HotSpot(TM) 64-Bit Server VM
    + file.encoding.pkg                                    sun.io
    + user.country                                         US
    + sun.java.launcher                                    SUN_STANDARD
    + sun.os.patch.level                                   unknown
    + java.vm.specification.name                           Java Virtual Machine Specification
    + user.dir                                             /private/var/tmp
    + java.runtime.version                                 1.8.0_51-b16
    + java.awt.graphicsenv                                 sun.awt.CGraphicsEnvironment
    + java.endorsed.dirs                                   /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/endors
    +                                                      ed
    + os.arch                                              x86_64
    + java.io.tmpdir                                       /var/folders/2c/tbxwzs4s4sbcvh7frbcc7n000000gn/T/
    + line.separator
    +
    + java.vm.specification.vendor                         Oracle Corporation
    + os.name                                              Mac OS X
    + sun.jnu.encoding                                     UTF-8
    + java.library.path                                    /Users/wangtao/Library/Java/Extensions:/Library/Java/Extensions:/Network/Libra
    +                                                      ry/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
    + sun.nio.ch.bugLevel
    + java.specification.name                              Java Platform API Specification
    + java.class.version                                   52.0
    + sun.management.compiler                              HotSpot 64-Bit Tiered Compilers
    + os.version                                           10.12.6
    + user.home                                            /Users/wangtao
    + user.timezone                                        Asia/Shanghai
    + java.awt.printerjob                                  sun.lwawt.macosx.CPrinterJob
    + file.encoding                                        UTF-8
    + java.specification.version                           1.8
    + user.name                                            wangtao
    + java.class.path                                      .
    + java.vm.specification.version                        1.8
    + sun.arch.data.model                                  64
    + java.home                                            /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre
    + sun.java.command                                     Test
    + java.specification.vendor                            Oracle Corporation
    + user.language                                        en
    + awt.toolkit                                          sun.lwawt.macosx.LWCToolkit
    + java.vm.info                                         mixed mode
    + java.version                                         1.8.0_51
    + 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
    + sun.boot.class.path                                  /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/lib/resour
    +                                                      ces.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/li
    +                                                      b/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/l
    +                                                      ib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/H
    +                                                      ome/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Content
    +                                                      s/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Conte
    +                                                      nts/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jd
    +                                                      k/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.
    +                                                      jdk/Contents/Home/jre/classes
    + java.vendor                                          Oracle Corporation
    + file.separator                                       /
    + java.vendor.url.bug                                  http://bugreport.sun.com/bugreport/
    + sun.cpu.endian                                       little
    + sun.io.unicode.encoding                              UnicodeBig
    + sun.cpu.isalist
    +

    Check One Single Property

    TIP

    Use tab for auto-completion

    $ sysprop java.version
    +java.version=1.8.0_51
    +

    Modify Single Property

    $ sysprop user.country
    +user.country=US
    +$ sysprop user.country CN
    +Successfully changed the system property.
    +user.country=CN
    +
    + + + diff --git a/3.x/en/doc/tee.html b/3.x/en/doc/tee.html new file mode 100644 index 00000000000..0c6e2746f2e --- /dev/null +++ b/3.x/en/doc/tee.html @@ -0,0 +1,58 @@ + + + + + + + + + tee | arthas + + + + +
    Table of Contents

    tee

    tee online tutorialopen in new window

    TIP

    Similar to the traditional tee command, it is used to read standard input data and output its contents into a file.

    tee will read data from standard input device, output its content to standard output device, and save it as a file.

    Usage

     USAGE:
    +   tee [-a] [-h] [file]
    +
    + SUMMARY:
    +   tee command for pipes.
    +
    + EXAMPLES:
    +  sysprop | tee /path/to/logfile | grep java
    +  sysprop | tee -a /path/to/logfile | grep java
    +
    + WIKI:
    +   https://arthas.aliyun.com/3.x/doc/tee
    +
    + OPTIONS:
    + -a, --append                              Append to file
    + -h, --help                                this help
    + <file>                                    File path
    +
    + + + diff --git a/3.x/en/doc/thread.html b/3.x/en/doc/thread.html new file mode 100644 index 00000000000..271d4bb9704 --- /dev/null +++ b/3.x/en/doc/thread.html @@ -0,0 +1,152 @@ + + + + + + + + + thread | arthas + + + + +
    Table of Contents

    thread

    thread online tutorialopen in new window

    TIP

    Check the basic info and stack trace of the target thread.

    Parameters

    NameSpecification
    idthread id in JVM
    [n:]the top n busiest threads with stack traces printed
    [b]locate the thread blocking the others
    [i <value>]specify the interval to collect data to compute CPU ratios (ms)
    [--all]Show all matching threads

    How the CPU ratios are calculated?

    The cpu ratios here is similar to the thread %CPU of the linux command top -H -p <pid>. During a sampling interval, the ratio of the incremental cpu time of each thread in the current JVM to the sampling interval time.

    Working principle description:

    • Do the first sampling, get the CPU time of all threads ( by calling java.lang.management.ThreadMXBean#getThreadCpuTime() and sun.management.HotspotThreadMBean.getInternalThreadCpuTimes() )
    • Sleep and wait for an interval (the default is 200ms, the interval can be specified by -i)
    • Do the second sampling, get the CPU time of all threads, compare the two sampling data, and calculate the incremental CPU time of each thread
    • Thread CPU usage ratio = Thread increment CPU time / Sampling interval time * 100%

    Note: this operation consumes CPU time too (getThreadCpuTime is time-consuming), therefore it is possible to observe Arthas's thread appears in the list. To avoid this, try to increase sample interval, for example: 5000 ms.

    Another way to view the thread cpu usage of the Java process, show-busy-java-threadsopen in new window can come to help.

    Usage

    List the top n busiest threads with detailed stack trace

    $ thread -n 3
    +"C1 CompilerThread0" [Internal] cpuUsage=1.63% deltaTime=3ms time=1170ms
    +
    +
    +"arthas-command-execute" Id=23 cpuUsage=0.11% deltaTime=0ms time=401ms RUNNABLE
    +    at java.management@11.0.7/sun.management.ThreadImpl.dumpThreads0(Native Method)
    +    at java.management@11.0.7/sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:466)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads(ThreadCommand.java:199)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process(ThreadCommand.java:122)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:82)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:18)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:111)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:108)
    +    at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:385)
    +    at java.base@11.0.7/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    +    at java.base@11.0.7/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    +    at java.base@11.0.7/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    +    at java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    +    at java.base@11.0.7/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    +    at java.base@11.0.7/java.lang.Thread.run(Thread.java:834)
    +
    +
    +"VM Periodic Task Thread" [Internal] cpuUsage=0.07% deltaTime=0ms time=584ms
    +
    • Without thread ID, including [Internal] means JVM internal thread, refer to the introduction of dashboard command.
    • cpuUsage is the CPU usage of the thread during the sampling interval, consistent with the data of the dashboard command.
    • deltaTime is the incremental CPU time of the thread during the sampling interval. If it is less than 1ms, it will be rounded and displayed as 0ms.
    • time The total CPU time of thread.

    Note: The thread stack is acquired at the end of the second sampling, which does not indicate that the thread is processing the same task during the sampling interval. It is recommended that the interval time should not be too long. The larger the interval time, the more inaccurate.

    You can try to specify different intervals according to the specific situation and observe the output results.

    List first page threads' info when no options provided

    By default, they are arranged in descending order of CPU increment time, and only the first page of data is displayed.

    $ thread
    +Threads Total: 33, NEW: 0, RUNNABLE: 9, BLOCKED: 0, WAITING: 3, TIMED_WAITING: 4, TERMINATED: 0, Internal threads: 17
    +ID   NAME                           GROUP          PRIORITY  STATE     %CPU      DELTA_TIME TIME      INTERRUPT DAEMON
    +-1   C2 CompilerThread0             -              -1        -         5.06      0.010      0:0.973   false     true
    +-1   C1 CompilerThread0             -              -1        -         0.95      0.001      0:0.603   false     true
    +23   arthas-command-execute         system         5         RUNNABLE  0.17      0.000      0:0.226   false     true
    +-1   VM Periodic Task Thread        -              -1        -         0.05      0.000      0:0.094   false     true
    +-1   Sweeper thread                 -              -1        -         0.04      0.000      0:0.011   false     true
    +-1   G1 Young RemSet Sampling       -              -1        -         0.02      0.000      0:0.025   false     true
    +12   Attach Listener                system         9         RUNNABLE  0.0       0.000      0:0.022   false     true
    +11   Common-Cleaner                 InnocuousThrea 8         TIMED_WAI 0.0       0.000      0:0.000   false     true
    +3    Finalizer                      system         8         WAITING   0.0       0.000      0:0.000   false     true
    +2    Reference Handler              system         10        RUNNABLE  0.0       0.000      0:0.000   false     true
    +4    Signal Dispatcher              system         9         RUNNABLE  0.0       0.000      0:0.000   false     true
    +15   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.029   false     true
    +22   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.196   false     true
    +24   arthas-NettyHttpTelnetBootstra system         5         RUNNABLE  0.0       0.000      0:0.038   false     true
    +16   arthas-NettyWebsocketTtyBootst system         5         RUNNABLE  0.0       0.000      0:0.001   false     true
    +17   arthas-NettyWebsocketTtyBootst system         5         RUNNABLE  0.0       0.000      0:0.001   false     true
    +

    thread --all, show all matching threads

    Display all matching threads. Sometimes it is necessary to obtain all the thread data of the JVM for analysis.

    thread id, show the running stack for the target thread

    $ thread 1
    +"main" Id=1 WAITING on java.util.concurrent.CountDownLatch$Sync@29fafb28
    +    at sun.misc.Unsafe.park(Native Method)
    +    -  waiting on java.util.concurrent.CountDownLatch$Sync@29fafb28
    +    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
    +    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
    +    at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
    +

    thread -b, locate the thread bocking the others

    In some occasions, we experience the whole application is stuck because there's one particular thread hold one lock that other threads are relying on. To diagnose such an issue, Arthas provides thread -b to find the problematic thread in one single command.

    $ thread -b
    +"http-bio-8080-exec-4" Id=27 TIMED_WAITING
    +    at java.lang.Thread.sleep(Native Method)
    +    at test.arthas.TestThreadBlocking.doGet(TestThreadBlocking.java:22)
    +    -  locked java.lang.Object@725be470 <---- but blocks 4 other threads!
    +    at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    +    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at test.filter.TestDurexFilter.doFilter(TestDurexFilter.java:46)
    +    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    +    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    +    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    +    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    +    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    +    at com.taobao.tomcat.valves.ContextLoadFilterValve$FilterChainAdapter.doFilter(ContextLoadFilterValve.java:191)
    +    at com.taobao.eagleeye.EagleEyeFilter.doFilter(EagleEyeFilter.java:81)
    +    at com.taobao.tomcat.valves.ContextLoadFilterValve.invoke(ContextLoadFilterValve.java:150)
    +    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    +    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    +    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    +    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:429)
    +    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)
    +    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    +    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
    +    -  locked org.apache.tomcat.util.net.SocketWrapper@7127ee12
    +    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    +    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    +    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    +    at java.lang.Thread.run(Thread.java:745)
    +
    +    Number of locked synchronizers = 1
    +    - java.util.concurrent.ThreadPoolExecutor$Worker@31a6493e
    +

    Note: By now Arthas only supports to locate the thread blocked by synchronzied, while java.util.concurrent.Lock is not supported yet.

    thread -i, specify the sampling interval

    • thread -i 1000: Count the thread cpu time of the last 1000ms.

    • thread -n 3 -i 1000: List the 3 busiest thread stacks in 1000ms

    $ thread -n 3 -i 1000
    +"as-command-execute-daemon" Id=4759 cpuUsage=23% RUNNABLE
    +    at sun.management.ThreadImpl.dumpThreads0(Native Method)
    +    at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:440)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.processTopBusyThreads(ThreadCommand.java:133)
    +    at com.taobao.arthas.core.command.monitor200.ThreadCommand.process(ThreadCommand.java:79)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:96)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:27)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:125)
    +    at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:122)
    +    at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:332)
    +    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    +    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    +    at java.lang.Thread.run(Thread.java:756)
    +
    +    Number of locked synchronizers = 1
    +    - java.util.concurrent.ThreadPoolExecutor$Worker@546aeec1
    +...
    +

    thread --state , view the special state theads

    [arthas@28114]$ thread --state WAITING
    +Threads Total: 16, NEW: 0, RUNNABLE: 9, BLOCKED: 0, WAITING: 3, TIMED_WAITING: 4, TERMINATED: 0
    +ID   NAME                           GROUP           PRIORITY   STATE     %CPU      DELTA_TIME TIME      INTERRUPTE DAEMON
    +3    Finalizer                      system          8          WAITING   0.0       0.000      0:0.000   false      true
    +20   arthas-UserStat                system          9          WAITING   0.0       0.000      0:0.001   false      true
    +14   arthas-timer                   system          9          WAITING   0.0       0.000      0:0.000   false      true
    +
    + + + diff --git a/3.x/en/doc/trace.html b/3.x/en/doc/trace.html new file mode 100644 index 00000000000..c982ae2a6d5 --- /dev/null +++ b/3.x/en/doc/trace.html @@ -0,0 +1,151 @@ + + + + + + + + + trace | arthas + + + + +
    Table of Contents

    trace

    trace online tutorialopen in new window

    TIP

    Trace method calling path, and output the time cost for each node in the path.

    trace can track the calling path specified by class-pattern / method-pattern, and calculate the time cost on the whole path.

    Parameters

    NameSpecification
    class-patternpattern for the class name
    method-patternpattern for the method name
    condition-expresscondition expression
    [E]enable regex match, the default behavior is wildcards match
    [n:]execution times
    #costtime cost
    [m <arg>]Specify the max number of matched Classes, the default value is 50. Long format is [maxMatch <arg>].

    There's one thing worthy noting here is condition expression. The condition expression supports OGNL grammar, for example, you can come up a expression like this "params[0]<0". All OGNL expressions are supported as long as they are legal to the grammar.

    Pls. refer to core parameters in expression for more details.

    Many times what we are interested is the exact trace result when the method call takes time over one particular period. It is possible to achieve this in Arthas, for example: trace *StringUtils isBlank '#cost>100' means trace result will only be output when the executing time exceeds 100ms.

    TIP

    watch/stack/trace, these three commands all support #cost.

    Notice

    • trace is handy to help discovering and locating the performance flaws in your system, but pls. note Arthas can only trace the first level method call each time.

    • After version 3.3.0, you can use the Dynamic Trace feature to add new matching classes/methods, see the following example.

    • Currently trace java.lang.Thread getName is not supported, please refer to issue: #1610open in new window, considering that it is not very necessary and it is difficult to repair , So it won’t be fixed for now

    Usage

    Start Demo

    Start math-game in Quick Start.

    Trace method

    $ trace demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 28 ms.
    +`---ts=2019-12-04 00:45:08;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[0.617465ms] demo.MathGame:run()
    +        `---[0.078946ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +
    +`---ts=2019-12-04 00:45:09;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[1.276874ms] demo.MathGame:run()
    +        `---[0.03752ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +

    TIP

    The #24 in the result indicates that in the run function, the primeFactors() function was called on line 24 of the source file.

    Specify the max number of matched Classes

    $ trace demo.MathGame run -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 412 ms, listenerId: 4
    +`---ts=2022-12-25 21:00:00;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    `---[0.762093ms] demo.MathGame:run()
    +        `---[30.21% 0.230241ms] demo.MathGame:primeFactors() #46 [throws Exception]
    +
    +`---ts=2022-12-25 21:00:10;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@b4aac2
    +    `---[0.315298ms] demo.MathGame:run()
    +        `---[13.95% 0.043995ms] demo.MathGame:primeFactors() #46 [throws Exception]
    +

    Trace times limit

    If the method invoked many times, use -n options to specify trace times. For example, the command will exit when received a trace result.

    $ trace demo.MathGame run -n 1
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 20 ms.
    +`---ts=2019-12-04 00:45:53;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[0.549379ms] demo.MathGame:run()
    +        +---[0.059839ms] demo.MathGame:primeFactors() #24
    +        `---[0.232887ms] demo.MathGame:print() #25
    +
    +Command execution times exceed limit: 1, so command will exit. You can set it with -n option.
    +

    Include jdk method

    • --skipJDKMethod <value> skip jdk method trace, default value true.
    $ trace --skipJDKMethod false demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 60 ms.
    +`---ts=2019-12-04 00:44:41;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[1.357742ms] demo.MathGame:run()
    +        +---[0.028624ms] java.util.Random:nextInt() #23
    +        +---[0.045534ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +        +---[0.005372ms] java.lang.StringBuilder:<init>() #28
    +        +---[0.012257ms] java.lang.Integer:valueOf() #28
    +        +---[0.234537ms] java.lang.String:format() #28
    +        +---[min=0.004539ms,max=0.005778ms,total=0.010317ms,count=2] java.lang.StringBuilder:append() #28
    +        +---[0.013777ms] java.lang.Exception:getMessage() #28
    +        +---[0.004935ms] java.lang.StringBuilder:toString() #28
    +        `---[0.06941ms] java.io.PrintStream:println() #28
    +
    +`---ts=2019-12-04 00:44:42;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[3.030432ms] demo.MathGame:run()
    +        +---[0.010473ms] java.util.Random:nextInt() #23
    +        +---[0.023715ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +        +---[0.005198ms] java.lang.StringBuilder:<init>() #28
    +        +---[0.006405ms] java.lang.Integer:valueOf() #28
    +        +---[0.178583ms] java.lang.String:format() #28
    +        +---[min=0.011636ms,max=0.838077ms,total=0.849713ms,count=2] java.lang.StringBuilder:append() #28
    +        +---[0.008747ms] java.lang.Exception:getMessage() #28
    +        +---[0.019768ms] java.lang.StringBuilder:toString() #28
    +        `---[0.076457ms] java.io.PrintStream:println() #28
    +

    Filtering by cost

    $ trace demo.MathGame run '#cost > 10'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 41 ms.
    +`---ts=2018-12-04 01:12:02;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[12.033735ms] demo.MathGame:run()
    +        +---[0.006783ms] java.util.Random:nextInt()
    +        +---[11.852594ms] demo.MathGame:primeFactors()
    +        `---[0.05447ms] demo.MathGame:print()
    +

    TIP

    Only the call path which's time cost is higher than 10ms will be shown. This feature is handy to focus on what's needed to focus when troubleshoot.

    • Here Arthas provides the similar functionality JProfile and other commercial software provide. Compared to these professional softwares, Arthas doesn't deduce the time cost trace itself takes, therefore it is not as accurate as these softwares offer. More classes and methods on the calling path, more inaccurate trace output is, but it is still helpful for diagnostics where the bottleneck is.
    • "[12.033735ms]" means the method on the node takes 12.033735 ms.
    • "[min=0.005428ms,max=0.094064ms,total=0.105228ms,count=3] demo:call()" means aggregating all same method calls into one single line. The minimum time cost is 0.005428 ms, the maximum time cost is 0.094064 ms, and the total time cost for all method calls (3 times in total) to "demo:call()" is 0.105228ms. If "throws Exception" appears in this line, it means some exceptions have been thrown from this method calls.
    • The total time cost may not equal to the sum of the time costs each sub method call takes, this is because Arthas instrumented code takes time too.

    Trace multiple classes or multiple methods

    The trace command will only trace the subcalls in the method to the trace, and will not trace down multiple layers. Because traces are expensive, multi-layer traces can lead to a lot of classes and methods that ultimately have to be traced.

    You can use the regular expression to match multiple classes and methods on the path to achieve a multi-layer trace effect to some extent.

    Trace -E com.test.ClassA|org.test.ClassB method1|method2|method3
    +

    Exclude the specified class

    TIP

    The watch/trace/monitor/stack/tt commands all support the --exclude-class-pattern parameter

    Use the --exclude-class-pattern parameter to exclude the specified class, for example:

    watch javax.servlet.Filter * --exclude-class-pattern com.demo.TestFilter
    +

    Dynamic trace

    TIP

    Supported since version 3.3.0.

    Open terminal 1, trace the run method in the above demo, and you can see the printout listenerId: 1 .

    [arthas@59161]$ trace demo.MathGame run
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 112 ms, listenerId: 1
    +`---ts=2020-07-09 16:48:11;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[1.389634ms] demo.MathGame:run()
    +        `---[0.123934ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +
    +`---ts=2020-07-09 16:48:12;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[3.716391ms] demo.MathGame:run()
    +        +---[3.182813ms] demo.MathGame:primeFactors() #24
    +        `---[0.167786ms] demo.MathGame:print() #25
    +

    Now to drill down into the sub method primeFactors, you can open a new terminal 2 and use the telnet localhost 3658 connects to the arthas, then trace primeFactors with the specify listenerId.

    [arthas@59161]$ trace demo.MathGame primeFactors --listenerId 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 34 ms, listenerId: 1
    +

    At Terminal 2 prints the results, indicating that a method has been enhanced: Affect(class count: 1 , method count: 1), but no more results are printed.

    At terminal 1, you can see that the trace result has increased by one layer:

    `---ts=2020-07-09 16:49:29;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[0.492551ms] demo.MathGame:run()
    +        `---[0.113929ms] demo.MathGame:primeFactors() #24 [throws Exception]
    +            `---[0.061462ms] demo.MathGame:primeFactors()
    +                `---[0.001018ms] throw:java.lang.IllegalArgumentException() #46
    +
    +`---ts=2020-07-09 16:49:30;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@3d4eac69
    +    `---[0.409446ms] demo.MathGame:run()
    +        +---[0.232606ms] demo.MathGame:primeFactors() #24
    +        |   `---[0.1294ms] demo.MathGame:primeFactors()
    +        `---[0.084025ms] demo.MathGame:print() #25
    +

    Dynamic trace by specifying listenerId, you can go deeper and deeper. In addition, commands such as watch/tt/monitor also support similar functionality.

    Trace result time inaccuracy problem

    For example, in the following result: 0.705196 > (0.152743 + 0.145825)

    $ trace demo.MathGame run -n 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 66 ms, listenerId: 1
    +`---ts=2021-02-08 11:27:36;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@232204a1
    +    `--[0.705196ms] demo.MathGame:run()
    +        +---[0.152743ms] demo.MathGame:primeFactors() #24
    +        `--[0.145825ms] demo.MathGame:print() #25
    +

    So where is the rest of the time consumed?

    1. Methods that are not traced to. For example, methods under java.* are ignored by default. This can be printed out by adding the -skipJDKMethod false parameter.

      $ trace demo.MathGame run --skipJDKMethod false
      +Press Q or Ctrl+C to abort.
      +Affect(class count: 1 , method count: 1) cost in 35 ms, listenerId: 2
      +`---ts=2021-02-08 11:27:48;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@232204a1
      +    `--[0.810591ms] demo.MathGame:run()
      +        +--[0.034568ms] java.util.Random:nextInt() #23
      +        +---[0.119367ms] demo.MathGame:timeFactors() #24 [throws Exception]
      +        +---[0.017407ms] java.lang.StringBuilder:<init>() #28
      +        +--[0.127922ms] java.lang.String:format() #57
      +        +---[min=0.01419ms,max=0.020221ms,total=0.034411ms,count=2] java.lang.StringBuilder:append() #57
      +        +--[0.021911ms] java.lang.Exception:getMessage() #57
      +        +---[0.015643ms] java.lang.StringBuilder:toString() #57
      +        `--[0.086622ms] java.io.PrintStream:println() #57
      +
    2. Instruction consumption. For example, instructions such as i++, getfield, etc.

    3. Possible JVM pause during code execution, such as GC, entering synchronization blocks, etc.

    Use the -v parameter to print more information

    TIP

    The watch/trace/monitor/stack/tt commands all support the -v parameter.

    When the command is executed, there is no output result. There are two possibilities:

    1. The matched function is not executed
    2. The result of the conditional expression is false

    But the user cannot tell which situation is.

    Using the -v option, the specific value and execution result of Condition express will be printed for easy confirmation.

    + + + diff --git a/3.x/en/doc/tt.html b/3.x/en/doc/tt.html new file mode 100644 index 00000000000..81a78358f5e --- /dev/null +++ b/3.x/en/doc/tt.html @@ -0,0 +1,132 @@ + + + + + + + + + tt | arthas + + + + +
    Table of Contents

    tt

    tt online tutorialopen in new window

    Check the parameters, return values and exceptions of the methods at different times.

    watch is a powerful command but due to its feasibility and complexity, it's quite hard to locate the issue effectively.

    In such difficulties, tt comes into play.

    With the help of tt (TimeTunnel), you can check the contexts of the methods at different times in execution history.

    Precautions

    • The implementation of the tt command is to save the input parameters/return values of the function into a Map<Integer, TimeFragment>. The default size is 100.
    • After using tt related functions, you need to manually release the memory, otherwise OOM may occur for a long time. Exiting arthas will not automatically clear tt's cache map.

    Usage

    Start Demo

    Start math-game in Quick Start.

    Record method calls

    $ tt -t demo.MathGame primeFactors
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 66 ms.
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +

    Specify the max number of matched Classes

    $ tt -t -m 1 demo.MathGame primeFactors
    +Press Q or Ctrl+C to abort.
    +Affect(class count:1 , method count:1) cost in 130 ms, listenerId: 1.
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2022-12-25 19:41:45  2.629929  true    false    0x3bf400       MathGame                       primeFactors
    + 1001    2022-12-25 19:41:55  0.146161  false   true     0x3bf400       MathGame                       primeFactors
    +
    • -t

      record the calling context of the method demo.MathGame primeFactors

    • -n 3

      limit the number of the records (avoid overflow for too many records; with -n option, Arthas can automatically stop recording once the records reach the specified limit)

    • -m 1

      limit the number of matched Classes to avoid JVM suspending when too many matched Classes. The default value is 50.

    • Property

    NameSpecification
    INDEXthe index for each call based on time
    TIMESTAMPtime to invoke the method
    COST(ms)time cost of the method call
    IS-RETwhether method exits with normal return
    IS-EXPwhether method failed with exceptions
    OBJECThashCode() of the object invoking the method
    CLASSclass name of the object invoking the method
    METHODmethod being invoked
    • Condition expression

    Tips:

    1. tt -t *Test print params.length==1 with different amounts of parameters;
    2. tt -t *Test print 'params[1] instanceof Integer' with different types of parameters;
    3. tt -t *Test print params[0].mobile=="13989838402" with specified parameter.

    Advanced:

    List all records

    $ tt -l
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +                              9
    + 1005    2018-12-04 11:15:43  0.4776    false   true     0x4b67cf4d     MathGame                       primeFactors
    +Affect(row-cnt:6) cost in 4 ms.
    +

    Searching for records

    $ tt -s 'method.name=="primeFactors"'
    + INDEX   TIMESTAMP            COST(ms)  IS-RET  IS-EXP   OBJECT         CLASS                          METHOD
    +-------------------------------------------------------------------------------------------------------------------------------------
    + 1000    2018-12-04 11:15:38  1.096236  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1001    2018-12-04 11:15:39  0.191848  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1002    2018-12-04 11:15:40  0.069523  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1003    2018-12-04 11:15:41  0.186073  false   true     0x4b67cf4d     MathGame                       primeFactors
    + 1004    2018-12-04 11:15:42  17.76437  true    false    0x4b67cf4d     MathGame                       primeFactors
    +                              9
    + 1005    2018-12-04 11:15:43  0.4776    false   true     0x4b67cf4d     MathGame                       primeFactors
    +Affect(row-cnt:6) cost in 607 ms.
    +

    Advanced:

    Check context of the call

    Using tt -i <index> to check a specific calling details.

    $ tt -i 1003
    + INDEX            1003
    + GMT-CREATE       2018-12-04 11:15:41
    + COST(ms)         0.186073
    + OBJECT           0x4b67cf4d
    + CLASS            demo.MathGame
    + METHOD           primeFactors
    + IS-RETURN        false
    + IS-EXCEPTION     true
    + PARAMETERS[0]    @Integer[-564322413]
    + THROW-EXCEPTION  java.lang.IllegalArgumentException: number is: -564322413, need >= 2
    +                    at demo.MathGame.primeFactors(MathGame.java:46)
    +                    at demo.MathGame.run(MathGame.java:24)
    +                    at demo.MathGame.main(MathGame.java:16)
    +
    +Affect(row-cnt:1) cost in 11 ms.
    +

    Replay record

    Since Arthas stores the context of the call, you can even replay the method calling afterwards with extra option -p to replay the issue for advanced troubleshooting, option --replay-times define the replay execution times, option --replay-interval define the interval(unit in ms,with default value 1000) of replays

    $ tt -i 1004 -p
    + RE-INDEX       1004
    + GMT-REPLAY     2018-12-04 11:26:00
    + OBJECT         0x4b67cf4d
    + CLASS          demo.MathGame
    + METHOD         primeFactors
    + PARAMETERS[0]  @Integer[946738738]
    + IS-RETURN      true
    + IS-EXCEPTION   false
    + RETURN-OBJ     @ArrayList[
    +                    @Integer[2],
    +                    @Integer[11],
    +                    @Integer[17],
    +                    @Integer[2531387],
    +                ]
    +Time fragment[1004] successfully replayed.
    +Affect(row-cnt:1) cost in 14 ms.
    +

    Watch express

    -w, --watch-express watch the time fragment by ognl express.

    [arthas@10718]$ tt -t demo.MathGame run -n 5
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1
    + INDEX      TIMESTAMP                   COST(ms)     IS-RET     IS-EXP      OBJECT              CLASS                                     METHOD
    +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    + 1000       2021-01-08 21:54:17         0.901091     true       false       0x7699a589          MathGame                                  run
    +[arthas@10718]$ tt -w 'target.illegalArgumentCount'  -x 1 -i 1000
    +@Integer[60]
    +Affect(row-cnt:1) cost in 7 ms.
    +
    • Get a static field and calling a static method
    [arthas@10718]$ tt -t demo.MathGame run -n 5
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1
    + INDEX      TIMESTAMP                   COST(ms)     IS-RET     IS-EXP      OBJECT              CLASS                                     METHOD
    +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    + 1000       2021-01-08 21:54:17         0.901091     true       false       0x7699a589          MathGame                                  run
    +[arthas@10718]$ tt -w '@demo.MathGame@random.nextInt(100)'  -x 1 -i 1000
    +@Integer[46]
    +

    Note that com.taobao.arthas.core.advisor.Advice#getLoader is used here, and that it is better to use the exact classloader ognl.

    Advanced usage get spring context to call the bean methodopen in new window

    F.Y.I

    1. Loss of the ThreadLocal

      Arthas save params into an array, then invoke the method with the params again. The method execute in another thread, so the ThreadLocal lost.

    2. params may be modified

      Arthas save params into an array, they are object references. The Objects may be modified by other code.

    Delete the specified tt record by index

    tt -d 1001
    +

    Clear all tt records

    tt --delete-all
    +
    + + + diff --git a/3.x/en/doc/tunnel.html b/3.x/en/doc/tunnel.html new file mode 100644 index 00000000000..6aac8c01c6e --- /dev/null +++ b/3.x/en/doc/tunnel.html @@ -0,0 +1,87 @@ + + + + + + + + + Arthas Tunnel | arthas + + + + +
    Table of Contents

    Arthas Tunnel

    Manage/connect multiple Agents remotely via Arthas Tunnel Server/Client.

    For example, in streaming computing, Java processes can be started on different machines, and it can be difficult to use Arthas to diagnose them, because the user usually does not have access to the machine.

    In this case, Arthas Tunnel Server/Client can be used.

    Reference:

    Download and deploy arthas tunnel server

    https://github.com/alibaba/arthas/releasesopen in new window

    Arthas tunnel server is a spring boot fat jar application, start with the java -jar command:

    java -jar  arthas-tunnel-server.jar
    +

    By default, the web port of the arthas tunnel server is 8080, and the port connected by the arthas agent is 7777.

    Once started, you can go to http://127.0.0.1:8080/open in new window and connect to the registered arthas agent via agentId.

    Through Spring Boot's Endpoint, you can view the specific connection information: http://127.0.0.1:8080/actuator/arthasopen in new window, the login user name is arthas, and the password can be found in the log of arthas tunnel server, for example:

    32851 [main] INFO o.s.b.a.s.s.UserDetailsServiceAutoConfiguration
    +
    +Using generated security password: f1dca050-3777-48f4-a577-6367e55a78a2
    +

    Connecting to the tunnel server when starting arthas

    When starting arthas, you can use the --tunnel-server parameter, for example:

    as3.sh --tunnel-server 'ws://127.0.0.1:7777/ws'
    +

    You can also use the following test address (not guaranteed to be available all the time):

    as3.sh --tunnel-server 'ws://47.75.156.201:80/ws'
    +
    • You can specify the agentId by the --agent-id parameter. By default, a random ID is generated.

    After Arthas attach succeeds, the agentId will be printed, such as:

      ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
    +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
    +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
    +
    +
    +wiki      https://arthas.aliyun.com/3.x/doc
    +tutorials https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
    +version   3.1.2
    +pid       86183
    +time      2019-08-30 15:40:53
    +id        URJZ5L48RPBR2ALI5K4V
    +

    If the connection is not connected to the tunnel server at startup, you can also obtain the agentId through the session command after reconnection succeeds:

    [arthas@86183]$ session
    + Name           Value
    +-----------------------------------------------------
    + JAVA_PID       86183
    + SESSION_ID     f7273eb5-e7b0-4a00-bc5b-3fe55d741882
    + AGENT_ID       URJZ5L48RPBR2ALI5K4V
    + TUNNEL_SERVER  ws://47.75.156.201:80/ws
    +

    For the above example, go to http://47.75.156.201/arthas/?port=80open in new window in the browser and input the agentId to connect to arthas on remote machine.

    Best practices

    WARNING

    Note that the agentId must be unique, otherwise it will conflict on the tunnel server and not work properly.

    If the arthas agent is configured with appName, the generated agentId will be prefixed with appName.

    For example, if you add the startup parameter as3.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name demoapp, the generated agentId might be demoapp_URJZ5L48RPBR2ALI5K4V.

    Tunnel server will use _ as a delimiter to extract appName, which is convenient to manage by application.

    TIP

    Alternatively, you can configure appName in arthas.properties in the unzipped arthas directory, or in application.properties of the spring boot application.

    Tunnel Server Management Page

    TIP

    Need to configure arthas.enable-detail-pages=true in application.properties of spring boot

    Attention, opening admin pages is risky! There is no security blocking function on the management page, you must add security measures by yourself.

    Start the tunnel-server locally, then use as3.sh attach, and specify the application name --app-name test:

    $ as3.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name test
    +telnet connecting to arthas server... current timestamp is 1627539688
    +Trying 127.0.0.1...
    +Connected to 127.0.0.1.
    +Escape character is '^]'.
    +  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
    + /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
    +|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
    +|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
    +`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'
    +
    +
    +wiki       https://arthas.aliyun.com/3.x/doc
    +tutorials  https://arthas.aliyun.com/3.x/doc/arthas-tutorials.html
    +version    3.5.3
    +main_class demo.MathGame
    +pid        65825
    +time       2021-07-29 14:21:29
    +id         test_PE3LZO9NA9ENJYTPGL9L
    +

    Then visit tunnel-server, you can see a list of all connected applications:

    http://localhost:8080/apps.htmlopen in new window

    Then open the details, you can see a list of all connected agents:

    http://localhost:8080/agents.html?app=testopen in new window

    Security and Privilege Management

    TIP

    It is strongly recommended not to expose the tunnel server directly to the public network.

    Currently tunnel server does not have special permission management

    1. Users need to develop by themselves and authenticate the app name.
    2. If the management page is opened, security measures need to be added.

    Cluster Management

    If you want to deploy multiple tunnel servers, you can use nginx for forwarding and redis to store agent information.

    Nginx needs to configure sticky session to ensure that the user's web socket is connected to the same back-end tunnel server. The simple configuration method is to use ip_hash.

    How arthas tunnel server works

    browser <-> arthas tunnel server <-> arthas tunnel client <-> arthas agent
    +

    tunnel-server/README.mdopen in new window

    + + + diff --git a/3.x/en/doc/version.html b/3.x/en/doc/version.html new file mode 100644 index 00000000000..a21fb2d78c5 --- /dev/null +++ b/3.x/en/doc/version.html @@ -0,0 +1,43 @@ + + + + + + + + + version | arthas + + + + + + + + diff --git a/3.x/en/doc/vmoption.html b/3.x/en/doc/vmoption.html new file mode 100644 index 00000000000..cfe83bfee9b --- /dev/null +++ b/3.x/en/doc/vmoption.html @@ -0,0 +1,80 @@ + + + + + + + + + vmoption | arthas + + + + +
    Table of Contents

    vmoption

    vmoption online tutorialopen in new window

    TIP

    Display, and update the vm diagnostic options.

    Usage

    View all options

    [arthas@56963]$ vmoption
    + KEY                    VALUE                   ORIGIN                 WRITEABLE
    +---------------------------------------------------------------------------------------------
    + HeapDumpBeforeFullGC   false                   DEFAULT                true
    + HeapDumpAfterFullGC    false                   DEFAULT                true
    + HeapDumpOnOutOfMemory  false                   DEFAULT                true
    + Error
    + HeapDumpPath                                   DEFAULT                true
    + CMSAbortablePrecleanW  100                     DEFAULT                true
    + aitMillis
    + CMSWaitDuration        2000                    DEFAULT                true
    + CMSTriggerInterval     -1                      DEFAULT                true
    + PrintGC                false                   DEFAULT                true
    + PrintGCDetails         true                    MANAGEMENT             true
    + PrintGCDateStamps      false                   DEFAULT                true
    + PrintGCTimeStamps      false                   DEFAULT                true
    + PrintGCID              false                   DEFAULT                true
    + PrintClassHistogramBe  false                   DEFAULT                true
    + foreFullGC
    + PrintClassHistogramAf  false                   DEFAULT                true
    + terFullGC
    + PrintClassHistogram    false                   DEFAULT                true
    + MinHeapFreeRatio       0                       DEFAULT                true
    + MaxHeapFreeRatio       100                     DEFAULT                true
    + PrintConcurrentLocks   false                   DEFAULT                true
    +

    View individual option

    $ vmoption PrintGC
    + KEY                 VALUE                ORIGIN              WRITEABLE
    +---------------------------------------------------------------------------------
    + PrintGC             false                MANAGEMENT          true
    +

    Update individual option

    $ vmoption PrintGC true
    +Successfully updated the vm option.
    + NAME     BEFORE-VALUE  AFTER-VALUE
    +------------------------------------
    + PrintGC  false         true
    +
    $ vmoption PrintGCDetails true
    +Successfully updated the vm option.
    + NAME            BEFORE-VALUE  AFTER-VALUE
    +-------------------------------------------
    + PrintGCDetails  false         true
    +
    + + + diff --git a/3.x/en/doc/vmtool.html b/3.x/en/doc/vmtool.html new file mode 100644 index 00000000000..f28f9ce4e11 --- /dev/null +++ b/3.x/en/doc/vmtool.html @@ -0,0 +1,69 @@ + + + + + + + + + vmtool | arthas + + + + +
    Table of Contents

    vmtool

    TIP

    @since 3.5.1

    vmtool online tutorialopen in new window

    vmtool uses the JVMTI to support getInstances in jvm and forceGc.

    getInstances

    $ vmtool --action getInstances --className java.lang.String --limit 10
    +@String[][
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com.taobao.arthas.core.shell.session.Session],
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com/taobao/arthas/core/shell/session/Session],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/taobao/arthas/core/shell/session/Session.class],
    +    @String[com/],
    +    @String[java/util/concurrent/ConcurrentHashMap$ValueIterator],
    +    @String[java/util/concurrent/locks/LockSupport],
    +]
    +

    TIP

    Through the --limit parameter, you can limit the number of return values to avoid pressure on the JVM when obtaining large data. The default value of limit is 10.

    Specify classloader name

    vmtool --action getInstances --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader --className org.springframework.context.ApplicationContext
    +

    Specify classloader hash

    The classloader that loads the class can be found through the sc command.

    $ sc -d org.springframework.context.ApplicationContext
    + class-info org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext
    + code-source file:/private/tmp/demo-arthas-spring-boot.jar!/BOOT-INF/lib/spring-boot-1.5.13.RELEASE.jar!/
    + name org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext
    +...
    + class-loader +-org.springframework.boot.loader.LaunchedURLClassLoader@19469ea2
    +                     +-sun.misc.Launcher$AppClassLoader@75b84c92
    +                       +-sun.misc.Launcher$ExtClassLoader@4f023edb
    + classLoaderHash 19469ea2
    +

    Then use the -c/--classloader parameter to specify:

    vmtool --action getInstances -c 19469ea2 --className org.springframework.context.ApplicationContext
    +

    Specify the number of expanded layers of returned results

    TIP

    The return result of the getInstances action is bound to the instances variable, which is an array.

    The expansion level of the result can be specified by the -x/--expand parameter, the default value is 1.

    vmtool --action getInstances -c 19469ea2 --className org.springframework.context.ApplicationContext -x 2
    +

    Execute expression

    TIP

    The return result of the getInstances action is bound to the instances variable, which is an array. The specified expression can be executed through the --express parameter.

    vmtool --action getInstances --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader --className org.springframework.context.ApplicationContext --express'instances[0].getBeanDefinitionNames()'
    +

    Force GC

    vmtool --action forceGc
    +
    • Use the vmoption command to dynamically turn on the PrintGC option.

    interrupt 指定线程

    The thread id is specified by the -t parameter. It can be obtained using the thread command.

    vmtool --action interruptThread -t 1
    +
    + + + diff --git a/3.x/en/doc/watch.html b/3.x/en/doc/watch.html new file mode 100644 index 00000000000..b4808de7a77 --- /dev/null +++ b/3.x/en/doc/watch.html @@ -0,0 +1,228 @@ + + + + + + + + + watch | arthas + + + + +
    Table of Contents

    watch

    watch online tutorialopen in new window

    Monitor methods in data aspect including return values, exceptions and parameters.

    With the help of OGNLopen in new window, you can easily check the details of variables when methods being invoked.

    Parameters & Options

    There are four different scenarios for watch command, which makes it rather complicated.

    NameSpecification
    class-patternpattern for the class name
    method-patternpattern for the method name
    expressionexpression to watch, default value {params, target, returnObj}
    condition-expressioncondition expression to filter
    [b]before method being invoked
    [e]when method encountering exceptions
    [s]when method exits normally
    [f]when method exits (either succeed or fail with exceptions)
    [E]turn on regex matching while the default is wildcard matching
    [x:]the depth to print the specified property with default value: 1, the max value is 4
    [m <arg>]Specify the max number of matched Classes, the default value is 50. Long format is [maxMatch <arg>].

    F.Y.I

    1. any valid OGNL expression as "{params,returnObj}" supported
    2. there are four watching points: -b, -e, -s and -f (the first three are off in default while -f on);
    3. at the watching point, Arthas will use the expression to evaluate the variables and print them out;
    4. in parameters and out parameters are different since they can be modified within the invoked methods; params stands for in parameters in -bwhile out parameters in other watching points;
    5. there are no return values and exceptions when using -b.
    6. In the result of the watch command, the location information will be printed. There are three possible values for location: AtEnter, AtExit, and AtExceptionExit. Corresponding to the method entry, the method returns normally, and the method throws an exception.

    Advanced:

    Usage

    Start Demo

    Start math-game in Quick Start.

    Check the out parameters, this and return value

    TIP

    The expression to watch, default value {params, target, returnObj}

    $ watch demo.MathGame primeFactors -x 2
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 32 ms, listenerId: 5
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2021-08-31 15:22:57; [cost=0.220625ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-179173],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@31cefde0],
    +        illegalArgumentCount=@Integer[44],
    +    ],
    +    null,
    +]
    +method=demo.MathGame.primeFactors location=AtExit
    +ts=2021-08-31 15:22:58; [cost=1.020982ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@31cefde0],
    +        illegalArgumentCount=@Integer[44],
    +    ],
    +    @ArrayList[
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[26947],
    +    ],
    +]
    +
    • In the above result, the method is executed twice, the first result is location=AtExceptionExit, indicating that the method throws an exception, so returnObj is null
    • In the second result is location=AtExit, indicating that the method returns normally, so you can see that the result of returnObj is an ArrayList

    Specify the max number of matched Classes

    $ watch demo.MathGame primeFactors -m 1
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 302 ms, listenerId: 3
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2022-12-25 19:58:41; [cost=0.222419ms] result=@ArrayList[
    +    @Object[][isEmpty=false;size=1],
    +    @MathGame[demo.MathGame@3bf400],
    +    null,
    +]
    +method=demo.MathGame.primeFactors location=AtExceptionExit
    +ts=2022-12-25 19:58:51; [cost=0.046928ms] result=@ArrayList[
    +    @Object[][isEmpty=false;size=1],
    +    @MathGame[demo.MathGame@3bf400],
    +    null,
    +]
    +

    Check in parameters

    $ watch demo.MathGame primeFactors "{params,returnObj}" -x 2 -b
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 50 ms.
    +ts=2018-12-03 19:23:23; [cost=0.0353ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-1077465243],
    +    ],
    +    null,
    +]
    +

    Compared to the previous check:

    • return value is null since it's -b.

    Check before and after at the same time

    $ watch demo.MathGame primeFactors "{params,target,returnObj}" -x 2 -b -s -n 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 46 ms.
    +ts=2018-12-03 19:29:54; [cost=0.01696ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@522b408a],
    +        illegalArgumentCount=@Integer[13038],
    +    ],
    +    null,
    +]
    +ts=2018-12-03 19:29:54; [cost=4.277392ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[java.util.Random@522b408a],
    +        illegalArgumentCount=@Integer[13038],
    +    ],
    +    @ArrayList[
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[2],
    +        @Integer[5],
    +        @Integer[5],
    +        @Integer[73],
    +        @Integer[241],
    +        @Integer[439],
    +    ],
    +]
    +

    F.Y.I

    • -n 2: threshold of execution times is 2.
    • the first block of output is the before watching point;
    • *the order of the output determined by the *watching* order itself (nothing to do with the order of the options -b -s).

    Use -x to check more details

    $ watch demo.MathGame primeFactors "{params,target}" -x 3
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 58 ms.
    +ts=2018-12-03 19:34:19; [cost=0.587833ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @MathGame[
    +        random=@Random[
    +            serialVersionUID=@Long[3905348978240129619],
    +            seed=@AtomicLong[3133719055989],
    +            multiplier=@Long[25214903917],
    +            addend=@Long[11],
    +            mask=@Long[281474976710655],
    +            DOUBLE_UNIT=@Double[1.1102230246251565E-16],
    +            BadBound=@String[bound must be positive],
    +            BadRange=@String[bound must be greater than origin],
    +            BadSize=@String[size must be non-negative],
    +            seedUniquifier=@AtomicLong[-3282039941672302964],
    +            nextNextGaussian=@Double[0.0],
    +            haveNextNextGaussian=@Boolean[false],
    +            serialPersistentFields=@ObjectStreamField[][isEmpty=false;size=3],
    +            unsafe=@Unsafe[sun.misc.Unsafe@2eaa1027],
    +            seedOffset=@Long[24],
    +        ],
    +        illegalArgumentCount=@Integer[13159],
    +    ],
    +]
    +
    • -x: Expand level of object (1 by default)
    • The max value of -x is 4, to prevent the expansion result taking up too much memory. Users can specify the field in the ognl expression.

    Use condition expressions to locate specific call

    $ watch demo.MathGame primeFactors "{params[0],target}" "params[0]<0"
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 68 ms.
    +ts=2018-12-03 19:36:04; [cost=0.530255ms] result=@ArrayList[
    +    @Integer[-18178089],
    +    @MathGame[demo.MathGame@41cf53f9],
    +]
    +

    Check exceptions

    $ watch demo.MathGame primeFactors "{params[0],throwExp}" -e -x 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 62 ms.
    +ts=2018-12-03 19:38:00; [cost=1.414993ms] result=@ArrayList[
    +    @Integer[-1120397038],
    +    java.lang.IllegalArgumentException: number is: -1120397038, need >= 2
    +	at demo.MathGame.primeFactors(MathGame.java:46)
    +	at demo.MathGame.run(MathGame.java:24)
    +	at demo.MathGame.main(MathGame.java:16)
    +,
    +]
    +
    • -e: Trigger when an exception is thrown
    • throwExp: the exception object

    Filter by time cost

    $ watch demo.MathGame primeFactors '{params, returnObj}' '#cost>200' -x 2
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 66 ms.
    +ts=2018-12-03 19:40:28; [cost=2112.168897ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[1],
    +    ],
    +    @ArrayList[
    +        @Integer[5],
    +        @Integer[428379493],
    +    ],
    +]
    +
    • #cost>200 (ms) filter out all invokings that take less than 200ms.

    Check the field of the target object

    • target is the this object in java.
    $ watch demo.MathGame primeFactors 'target'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 52 ms.
    +ts=2018-12-03 19:41:52; [cost=0.477882ms] result=@MathGame[
    +    random=@Random[java.util.Random@522b408a],
    +    illegalArgumentCount=@Integer[13355],
    +]
    +
    • target.field_name: the field of the current object.
    $ watch demo.MathGame primeFactors 'target.illegalArgumentCount'
    +Press Ctrl+C to abort.
    +Affect(class-cnt:1 , method-cnt:1) cost in 67 ms.
    +ts=2018-12-03 20:04:34; [cost=131.303498ms] result=@Integer[8]
    +ts=2018-12-03 20:04:35; [cost=0.961441ms] result=@Integer[8]
    +

    Get a static field and calling a static method

    watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -v -n 1 -x 2
    +[arthas@6527]$ watch demo.MathGame * '{params,@demo.MathGame@random.nextInt(100)}' -n 1 -x 2
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 5) cost in 34 ms, listenerId: 3
    +ts=2021-01-05 21:35:20; [cost=0.173966ms] result=@ArrayList[
    +    @Object[][
    +        @Integer[-138282],
    +    ],
    +    @Integer[89],
    +]
    +
    • Note that here you use Thread.currentThread().getContextClassLoader() to load, and it is better to use the exact classloader ognl.

    Exclude the specified class

    TIP

    The watch/trace/monitor/stack/tt commands all support the --exclude-class-pattern parameter

    Use the --exclude-class-pattern parameter to exclude the specified class, for example:

    watch javax.servlet.Filter * --exclude-class-pattern com.demo.TestFilter
    +

    Does not match subclass

    By default, the watch/trace/monitor/stack/tt commands will match subclass. If you don't want to match, you can turn it off.

    options disable-sub-class true
    +

    Use the -v parameter to print more information

    The watch/trace/monitor/stack/tt commands all support the -v parameter.

    When the command is executed, there is no output result. There are two possibilities:

    1. The matched function is not executed
    2. The result of the conditional expression is false

    But the user cannot tell which situation is.

    Using the -v option, the specific value and execution result of Condition express will be printed for easy confirmation.

    such as:

    $ watch -v -x 2 demo.MathGame print 'params' 'params[0] > 100000'
    +Press Q or Ctrl+C to abort.
    +Affect(class count: 1 , method count: 1) cost in 29 ms, listenerId: 11
    +Condition express: params[0] > 100000 , result: false
    +Condition express: params[0] > 100000 , result: false
    +Condition express: params[0] > 100000 , result: true
    +ts=2020-12-02 22:38:56; [cost=0.060843ms] result=@Object[][
    +    @Integer[1],
    +    @ArrayList[
    +        @Integer[200033],
    +    ],
    +]
    +Condition express: params[0] > 100000 , result: true
    +ts=2020-12-02 22:38:57; [cost=0.052877ms] result=@Object[][
    +    @Integer[1],
    +    @ArrayList[
    +        @Integer[29],
    +        @Integer[4243],
    +    ],
    +]
    +
    + + + diff --git a/3.x/en/doc/web-console.html b/3.x/en/doc/web-console.html new file mode 100644 index 00000000000..c9a5061251f --- /dev/null +++ b/3.x/en/doc/web-console.html @@ -0,0 +1,41 @@ + + + + + + + + + Web Console | arthas + + + + +
    Table of Contents

    Web Console

    Web Console online tutorialopen in new window

    Connect arthas through the browser

    Arthas supports the Web Console. After attach success, the user can access: http://127.0.0.1:8563/open in new window.

    The user can fill in the IP and connect the remote arthas on other machines.

    WARNING

    By default, arthas only listens to 127.0.0.1, so if you want to connect from a remote, you can use the --target-ip parameter to specify the IP. See the help description for -h for more information.

    If you have suggestions for the Web Console, please leave a message here: https://github.com/alibaba/arthas/issues/15open in new window

    TIP

    Since 3.5.4, you can right-click to copy and paste in the Web Console.

    scrollback URL parameters

    TIP

    Since 3.5.5

    By default, the number of rows that the Web Console supports to roll back upwards is 1000. It can be specified with scrollback in the URL. for example

    http://127.0.0.1:8563/?scrollback=3000open in new window

    Connect remote arthas through arthas tunnel server

    Reference: Arthas Tunnel

    + + + diff --git a/3.x/en/index.html b/3.x/en/index.html new file mode 100644 index 00000000000..128c1600441 --- /dev/null +++ b/3.x/en/index.html @@ -0,0 +1,56 @@ + + + + + + + + + Home | arthas + + + + +
    🖥

    Dashboard

    View the operating status of the system in real time

    🔬

    Parameters/Return values/Exceptions

    View method parameters, return values and exceptions

    🔩

    Online hotswap

    jad/sc/redefine online hotswap

    🩺

    Class conflict

    Resolve the class conflict problem in seconds, locate the class loading path

    ⚡️

    Flame Graph

    Quickly locate application hotspots and generate flame graphs

    📡

    WebConsole

    Online diagnosis

    Users

    Providing your info on Wanted: who's using arthas to help improving arthas better

    + + + diff --git a/3.x/images/alibabacloud_hotreload.png b/3.x/images/alibabacloud_hotreload.png new file mode 100644 index 00000000000..4fd8630a61c Binary files /dev/null and b/3.x/images/alibabacloud_hotreload.png differ diff --git a/3.x/images/arthas-output-recording.png b/3.x/images/arthas-output-recording.png new file mode 100644 index 00000000000..9482abce530 Binary files /dev/null and b/3.x/images/arthas-output-recording.png differ diff --git a/3.x/images/arthas-output-svg.jpg b/3.x/images/arthas-output-svg.jpg new file mode 100644 index 00000000000..9afbd1654ff Binary files /dev/null and b/3.x/images/arthas-output-svg.jpg differ diff --git a/3.x/images/arthas-output.jpg b/3.x/images/arthas-output.jpg new file mode 100644 index 00000000000..fbb87a066a5 Binary files /dev/null and b/3.x/images/arthas-output.jpg differ diff --git a/3.x/images/arthas-tunnel-server.png b/3.x/images/arthas-tunnel-server.png new file mode 100644 index 00000000000..86ff84e8acd Binary files /dev/null and b/3.x/images/arthas-tunnel-server.png differ diff --git a/3.x/images/arthas-web-ui.png b/3.x/images/arthas-web-ui.png new file mode 100644 index 00000000000..f5fb25c35d4 Binary files /dev/null and b/3.x/images/arthas-web-ui.png differ diff --git a/3.x/images/arthas.png b/3.x/images/arthas.png new file mode 100644 index 00000000000..73317782da7 Binary files /dev/null and b/3.x/images/arthas.png differ diff --git a/3.x/images/arthas_dark.png b/3.x/images/arthas_dark.png new file mode 100644 index 00000000000..236613852dc Binary files /dev/null and b/3.x/images/arthas_dark.png differ diff --git a/3.x/images/arthas_light.png b/3.x/images/arthas_light.png new file mode 100644 index 00000000000..ff4190d7b8d Binary files /dev/null and b/3.x/images/arthas_light.png differ diff --git a/3.x/images/arthas_mate_image.png b/3.x/images/arthas_mate_image.png new file mode 100644 index 00000000000..9376a90339f Binary files /dev/null and b/3.x/images/arthas_mate_image.png differ diff --git a/3.x/images/dashboard.png b/3.x/images/dashboard.png new file mode 100644 index 00000000000..7eddc17d61c Binary files /dev/null and b/3.x/images/dashboard.png differ diff --git a/3.x/images/dingding2_qr.jpg b/3.x/images/dingding2_qr.jpg new file mode 100644 index 00000000000..9f52cc3abd5 Binary files /dev/null and b/3.x/images/dingding2_qr.jpg differ diff --git a/3.x/images/dingding3_qr.jpg b/3.x/images/dingding3_qr.jpg new file mode 100644 index 00000000000..d0cba3e9b9b Binary files /dev/null and b/3.x/images/dingding3_qr.jpg differ diff --git a/3.x/images/dingding_group_search.png b/3.x/images/dingding_group_search.png new file mode 100644 index 00000000000..c1b8281e942 Binary files /dev/null and b/3.x/images/dingding_group_search.png differ diff --git a/3.x/images/dingding_qr.jpg b/3.x/images/dingding_qr.jpg new file mode 100644 index 00000000000..933dad3b65a Binary files /dev/null and b/3.x/images/dingding_qr.jpg differ diff --git a/3.x/images/favicon.ico b/3.x/images/favicon.ico new file mode 100644 index 00000000000..df9b02e1eb1 Binary files /dev/null and b/3.x/images/favicon.ico differ diff --git a/3.x/images/logo.png b/3.x/images/logo.png new file mode 100644 index 00000000000..a58394ee02e Binary files /dev/null and b/3.x/images/logo.png differ diff --git a/3.x/images/qqgroup2_qr.jpg b/3.x/images/qqgroup2_qr.jpg new file mode 100644 index 00000000000..b4d7fd8c9b8 Binary files /dev/null and b/3.x/images/qqgroup2_qr.jpg differ diff --git a/3.x/images/qqgroup3_qr.jpg b/3.x/images/qqgroup3_qr.jpg new file mode 100644 index 00000000000..7717a758c16 Binary files /dev/null and b/3.x/images/qqgroup3_qr.jpg differ diff --git a/3.x/images/qqgroup_qr.jpg b/3.x/images/qqgroup_qr.jpg new file mode 100644 index 00000000000..f94beae41fd Binary files /dev/null and b/3.x/images/qqgroup_qr.jpg differ diff --git a/3.x/images/qr-jd-2019.png b/3.x/images/qr-jd-2019.png new file mode 100644 index 00000000000..5837e1fe912 Binary files /dev/null and b/3.x/images/qr-jd-2019.png differ diff --git a/3.x/images/qrcode_gongzhonghao.jpg b/3.x/images/qrcode_gongzhonghao.jpg new file mode 100644 index 00000000000..9d0e54ab866 Binary files /dev/null and b/3.x/images/qrcode_gongzhonghao.jpg differ diff --git a/3.x/images/trace.png b/3.x/images/trace.png new file mode 100644 index 00000000000..d7fa4692d4c Binary files /dev/null and b/3.x/images/trace.png differ diff --git a/3.x/images/tunnel-server-agents.png b/3.x/images/tunnel-server-agents.png new file mode 100644 index 00000000000..c786e2a52a0 Binary files /dev/null and b/3.x/images/tunnel-server-agents.png differ diff --git a/3.x/images/tunnel-server-apps.png b/3.x/images/tunnel-server-apps.png new file mode 100644 index 00000000000..67c116d6f11 Binary files /dev/null and b/3.x/images/tunnel-server-apps.png differ diff --git a/3.x/images/users/users_alibaba.png b/3.x/images/users/users_alibaba.png new file mode 100644 index 00000000000..a6e4ecdeee0 Binary files /dev/null and b/3.x/images/users/users_alibaba.png differ diff --git a/3.x/images/users/users_didi.png b/3.x/images/users/users_didi.png new file mode 100644 index 00000000000..df1ec282d1d Binary files /dev/null and b/3.x/images/users/users_didi.png differ diff --git a/3.x/images/users/users_icbc.png b/3.x/images/users/users_icbc.png new file mode 100644 index 00000000000..aca25a4c597 Binary files /dev/null and b/3.x/images/users/users_icbc.png differ diff --git a/3.x/images/users/users_kaola.png b/3.x/images/users/users_kaola.png new file mode 100644 index 00000000000..be7dac8cd5e Binary files /dev/null and b/3.x/images/users/users_kaola.png differ diff --git a/3.x/images/users/users_qunar.png b/3.x/images/users/users_qunar.png new file mode 100644 index 00000000000..658287308e2 Binary files /dev/null and b/3.x/images/users/users_qunar.png differ diff --git a/3.x/images/users/users_telecom.png b/3.x/images/users/users_telecom.png new file mode 100644 index 00000000000..7406587b22c Binary files /dev/null and b/3.x/images/users/users_telecom.png differ diff --git a/3.x/images/users/users_weidian.png b/3.x/images/users/users_weidian.png new file mode 100644 index 00000000000..a166da39b7d Binary files /dev/null and b/3.x/images/users/users_weidian.png differ diff --git a/3.x/images/users/users_yinlian.png b/3.x/images/users/users_yinlian.png new file mode 100644 index 00000000000..d13e93416e7 Binary files /dev/null and b/3.x/images/users/users_yinlian.png differ diff --git a/3.x/images/web-console-local.png b/3.x/images/web-console-local.png new file mode 100644 index 00000000000..56f44e4f2d6 Binary files /dev/null and b/3.x/images/web-console-local.png differ diff --git a/3.x/index.html b/3.x/index.html new file mode 100644 index 00000000000..f8fa0ca9a7f --- /dev/null +++ b/3.x/index.html @@ -0,0 +1,56 @@ + + + + + + + + + arthas + + + + +
    🖥

    Dashboard

    实时查看系统的运行状况。

    🔬

    查看入参/返回值/异常

    查看函数调用的参数,返回值和异常。

    🔩

    在线热更新

    jad/sc/redefine 一条龙热更新代码。

    🩺

    类冲突

    秒解类冲突问题,定位类加载路径。

    ⚡️

    性能热点

    快速定位应用的热点,生成火焰图。

    📡

    WebConsole

    在线诊断,点开网页诊断线上应用。

    用户

    请在 Wanted: who's using arthas 上提供信息来帮助Arthas做的更好。

    + + + diff --git a/3.x/zh-cn/index.html b/3.x/zh-cn/index.html new file mode 100644 index 00000000000..ffdcd7453bf --- /dev/null +++ b/3.x/zh-cn/index.html @@ -0,0 +1,17 @@ + + + + + + + + Redirecting... + + + +

    Redirecting...

    + + \ No newline at end of file diff --git a/arthas-boot3.jar b/arthas-boot3.jar new file mode 100644 index 00000000000..cdf0791800e Binary files /dev/null and b/arthas-boot3.jar differ diff --git a/as3.sh b/as3.sh new file mode 100755 index 00000000000..1933c2696d1 --- /dev/null +++ b/as3.sh @@ -0,0 +1,1109 @@ +#!/usr/bin/env bash + +# WIKI: https://arthas.aliyun.com/3.x/doc +# This script only supports bash, do not support posix sh. +# If you have the problem like Syntax error: "(" unexpected (expecting "fi"), +# Try to run "bash -version" to check the version. +# Try to visit WIKI to find a solution. + +# program : Arthas +# author : Core Engine @ Taobao.com +# date : 2024-09-14 + +# current arthas script version +ARTHAS_SCRIPT_VERSION=3.7.3 + +# SYNOPSIS +# rreadlink +# DESCRIPTION +# Resolves to its ultimate target, if it is a symlink, and +# prints its canonical path. If it is not a symlink, its own canonical path +# is printed. +# A broken symlink causes an error that reports the non-existent target. +# LIMITATIONS +# - Won't work with filenames with embedded newlines or filenames containing +# the string ' -> '. +# COMPATIBILITY +# This is a fully POSIX-compliant implementation of what GNU readlink's +# -e option does. +# EXAMPLE +# In a shell script, use the following to get that script's true directory of origin: +# trueScriptDir=$(dirname -- "$(rreadlink "$0")") +rreadlink() ( # Execute the function in a *subshell* to localize variables and the effect of `cd`. + + target=$1 fname= targetDir= CDPATH= + + # Try to make the execution environment as predictable as possible: + # All commands below are invoked via `command`, so we must make sure that + # `command` itself is not redefined as an alias or shell function. + # (Note that command is too inconsistent across shells, so we don't use it.) + # `command` is a *builtin* in bash, dash, ksh, zsh, and some platforms do not + # even have an external utility version of it (e.g, Ubuntu). + # `command` bypasses aliases and shell functions and also finds builtins + # in bash, dash, and ksh. In zsh, option POSIX_BUILTINS must be turned on for + # that to happen. + { \unalias command; \unset -f command; } >/dev/null 2>&1 + [ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on # make zsh find *builtins* with `command` too. + + while :; do # Resolve potential symlinks until the ultimate target is found. + [ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; } + command cd "$(command dirname -- "$target")" # Change to target dir; necessary for correct resolution of target path. + fname=$(command basename -- "$target") # Extract filename. + [ "$fname" = '/' ] && fname='' # !! curiously, `basename /` returns '/' + if [ -L "$fname" ]; then + # Extract [next] target path, which may be defined + # *relative* to the symlink's own directory. + # Note: We parse `ls -l` output to find the symlink target + # which is the only POSIX-compliant, albeit somewhat fragile, way. + target=$(command ls -l "$fname") + target=${target#* -> } + continue # Resolve [next] symlink target. + fi + break # Ultimate target reached. + done + targetDir=$(command pwd -P) # Get canonical dir. path + # Output the ultimate target's canonical path. + # Note that we manually resolve paths ending in /. and /.. to make sure we have a normalized path. + if [ "$fname" = '.' ]; then + command printf '%s\n' "${targetDir%/}" + elif [ "$fname" = '..' ]; then + # Caveat: something like /var/.. will resolve to /private (assuming /var@ -> /private/var), i.e. the '..' is applied + # AFTER canonicalization. + command printf '%s\n' "$(command dirname -- "${targetDir}")" + else + command printf '%s\n' "${targetDir%/}/$fname" + fi +) + +DIR=$(dirname -- "$(rreadlink "${BASH_SOURCE[0]}")") + +############ Command Arguments ############ + +# define arthas's home +ARTHAS_HOME= + +# define arthas's lib +if [ -z "${ARTHAS_LIB_DIR}" ]; then + ARTHAS_LIB_DIR=${HOME}/.arthas/lib +else + echo "[INFO] ARTHAS_LIB_DIR: ${ARTHAS_LIB_DIR}" +fi + +# target process id to attach +TARGET_PID= + +# target process id to attach, default 127.0.0.1 +TARGET_IP= +DEFAULT_TARGET_IP="127.0.0.1" + +# telnet port, default 3658 +TELNET_PORT= +DEFAULT_TELNET_PORT="3658" + +# http port, default 8563 +HTTP_PORT= +DEFAULT_HTTP_PORT="8563" + +# telnet session timeout seconds, default 1800 +SESSION_TIMEOUT= + +# use specify version +USE_VERSION= + +# remote repo to download arthas +REPO_MIRROR= + +# use http to download arthas +USE_HTTP=false + +# attach only, do not telnet connect +ATTACH_ONLY=false + +# pass debug arguments to the attach java process +DEBUG_ATTACH=false + +# arthas-client terminal height +HEIGHT= +# arthas-client terminal width +WIDTH= + +# select target process by classname or JARfilename +SELECT= + +# Verbose, print debug info. +VERBOSE=false + +# command to execute +COMMAND= +# batch file to execute +BATCH_FILE= + +# tunnel server url +TUNNEL_SERVER= +# agent id +AGENT_ID= + +# stat report url +STAT_URL= + +# app name +APP_NAME= + +# username +USERNAME= + +# password +PASSWORD= + +# disabledCommands +DISABLED_COMMANDS= + +############ Command Arguments ############ + +# if arguments contains -c/--command or -f/--batch-file, BATCH_MODE will be true +BATCH_MODE=false + +# define arthas's temp dir +TMP_DIR=/tmp + +# arthas remote url +# https://arthas.aliyun.com/download/3.1.7?mirror=aliyun +REMOTE_DOWNLOAD_URL="https://arthas.aliyun.com/download/PLACEHOLDER_VERSION?mirror=PLACEHOLDER_REPO" +# update timeout(sec) +SO_TIMEOUT=5 + +# define JVM's OPS +JVM_OPTS="" + +ARTHAS_OPTS="-Djava.awt.headless=true" + +OS_TYPE= +case "$(uname -s)" in + Linux*) OS_TYPE=Linux;; + Darwin*) OS_TYPE=Mac;; + CYGWIN*) OS_TYPE=Cygwin;; + MINGW*) OS_TYPE=MinGw;; + *) OS_TYPE="UNKNOWN" +esac + +# check curl/grep/awk/telnet/unzip command +if ! [ -x "$(command -v curl)" ]; then + echo 'Error: curl is not installed. Try to use java -jar arthas-boot3.jar' >&2 + exit 1 +fi +if ! [ -x "$(command -v grep)" ]; then + echo 'Error: grep is not installed. Try to use java -jar arthas-boot3.jar' >&2 + exit 1 +fi +if ! [ -x "$(command -v awk)" ]; then + echo 'Error: awk is not installed. Try to use java -jar arthas-boot3.jar' >&2 + exit 1 +fi +if ! [ -x "$(command -v telnet)" ]; then + echo 'Error: telnet is not installed. Try to use java -jar arthas-boot3.jar' >&2 + exit 1 +fi +if ! [ -x "$(command -v unzip)" ]; then + echo 'Error: unzip is not installed. Try to use java -jar arthas-boot3.jar' >&2 + exit 1 +fi + +# exit shell with err_code +# $1 : err_code +# $2 : err_msg +exit_on_err() +{ + [[ ! -z "${2}" ]] && echo "${2}" 1>&2 + exit ${1} +} + + +# get with default value +# $1 : target value +# $2 : default value +default() +{ + [[ ! -z "${1}" ]] && echo "${1}" || echo "${2}" +} + + +# check arthas permission +check_permission() +{ + [ ! -w "${HOME}" ] \ + && exit_on_err 1 "permission denied, ${HOME} is not writable." +} + + +# reset arthas work environment +# reset some options for env +reset_for_env() +{ + unset JAVA_TOOL_OPTIONS + + # init ARTHAS' lib + mkdir -p "${ARTHAS_LIB_DIR}" \ + || exit_on_err 1 "create ${ARTHAS_LIB_DIR} fail." + + # if env define the JAVA_HOME, use it first + # if is alibaba opts, use alibaba ops's default JAVA_HOME + [ -z "${JAVA_HOME}" ] && [ -d /opt/taobao/java ] && JAVA_HOME=/opt/taobao/java + + if [[ (-z "${JAVA_HOME}") && ( -e "/usr/libexec/java_home") ]]; then + # for mac + JAVA_HOME=`/usr/libexec/java_home` + fi + + if [ -z "${JAVA_HOME}" ]; then + # try to find JAVA_HOME from java command + local JAVA_COMMAND_PATH=$( rreadlink $(type -p java) ) + JAVA_HOME=$(echo "$JAVA_COMMAND_PATH" | sed -n 's/\/bin\/java$//p') + fi + + # iterater throught candidates to find a proper JAVA_HOME at least contains tools.jar which is required by arthas. + if [ ! -d "${JAVA_HOME}" ]; then + JAVA_HOME_CANDIDATES=($(ps aux | grep java | grep -v 'grep java' | awk '{print $11}' | sed -n 's/\/bin\/java$//p')) + for JAVA_HOME_TEMP in ${JAVA_HOME_CANDIDATES[@]}; do + if [ -f "${JAVA_HOME_TEMP}/lib/tools.jar" ]; then + JAVA_HOME=`rreadlink "${JAVA_HOME_TEMP}"` + break + fi + done + fi + + if [ -z "${JAVA_HOME}" ]; then + exit_on_err 1 "Can not find JAVA_HOME, please set \$JAVA_HOME bash env first." + fi + + # maybe 1.8.0_162 , 11-ea + local JAVA_VERSION + + local IFS=$'\n' + # remove \r for Cygwin + local lines=$("${JAVA_HOME}"/bin/java -version 2>&1 | tr '\r' '\n') + for line in $lines; do + if [[ (-z $JAVA_VERSION) && ($line = *"version \""*) ]] + then + local ver=$(echo $line | sed -e 's/.*version "\(.*\)"\(.*\)/\1/; 1q') + # on macOS, sed doesn't support '?' + if [[ $ver = "1."* ]] + then + JAVA_VERSION=$(echo $ver | sed -e 's/1\.\([0-9]*\)\(.*\)/\1/; 1q') + else + JAVA_VERSION=$(echo $ver | sed -e 's/\([0-9]*\)\(.*\)/\1/; 1q') + fi + fi + done + + # when java version less than 9, we can use tools.jar to confirm java home. + # when java version greater than 9, there is no tools.jar. + if [[ "$JAVA_VERSION" -lt 9 ]];then + # possible java homes + javaHomes=("${JAVA_HOME%%/}" "${JAVA_HOME%%/}/.." "${JAVA_HOME%%/}/../..") + for javaHome in ${javaHomes[@]} + do + toolsJar="$javaHome/lib/tools.jar" + if [ -f $toolsJar ]; then + JAVA_HOME=$( rreadlink $javaHome ) + BOOT_CLASSPATH=-Xbootclasspath/a:$( rreadlink $toolsJar ) + break + fi + done + [ -z "${BOOT_CLASSPATH}" ] && exit_on_err 1 "tools.jar was not found, so arthas could not be launched!" + fi + + echo "[INFO] JAVA_HOME: ${JAVA_HOME}" + + # reset CHARSET for alibaba opts, we use GBK + [[ -x /opt/taobao/java ]] && JVM_OPTS="-Dinput.encoding=GBK ${JVM_OPTS} " + +} + +# get latest 3.x version from local +get_local_3x_version() +{ + ls "${ARTHAS_LIB_DIR}" | grep -oE '3\.[0-9]+\.[0-9]+.*' | sort -V | tail -1 | tr -d '\r\n' +} + +get_repo_url() +{ + local repoUrl="${REPO_MIRROR}" + if [ "$USE_HTTP" = true ] ; then + repoUrl=${repoUrl/https/http} + fi + echo "${repoUrl}" +} + +# get latest 3.x version from remote +get_remote_3x_version() +{ + curl -sLk "https://arthas.aliyun.com/api/versions" | grep -oE '3\.[0-9]+\.[0-9]+.*' | sort -V | tail -1 | tr -d '\r\n' +} + +# check version greater +version_gt() +{ + local remote_version=$1 + local arthas_local_version=$2 + [[ "$remote_version" > "$arthas_local_version" ]] && return 0 || return 1 +} + +# update arthas if necessary +update_if_necessary() +{ + local update_version=$1 + + if [ ! -d "${ARTHAS_LIB_DIR}/${update_version}" ]; then + echo "updating version ${update_version} ..." + + local temp_target_lib_dir="$TMP_DIR/temp_${update_version}_$$" + local temp_target_lib_zip="${temp_target_lib_dir}/arthas-${update_version}-bin.zip" + local target_lib_dir="${ARTHAS_LIB_DIR}/${update_version}/arthas" + + # clean + rm -rf "${temp_target_lib_dir}" + rm -rf "${target_lib_dir}" + + mkdir -p "${temp_target_lib_dir}" \ + || exit_on_err 1 "create ${temp_target_lib_dir} fail." + + # download current arthas version + local downloadUrl="${REMOTE_DOWNLOAD_URL//PLACEHOLDER_REPO/$(get_repo_url)}" + downloadUrl="${downloadUrl//PLACEHOLDER_VERSION/${update_version}}" + echo "Download arthas from: ${downloadUrl}" + curl \ + -#Lk \ + --connect-timeout ${SO_TIMEOUT} \ + -o "${temp_target_lib_zip}" \ + "${downloadUrl}" \ + || return 1 + + # unzip arthas lib + if ! (unzip "${temp_target_lib_zip}" -d "${temp_target_lib_dir}") ; then + rm -rf "${temp_target_lib_dir}" "${ARTHAS_LIB_DIR}/${update_version}" + return 1 + fi + + mkdir -p "${ARTHAS_LIB_DIR}/${update_version}" + # rename + mv "${temp_target_lib_dir}" "${target_lib_dir}" || return 1 + + # print success + echo "update completed." + fi +} + +# jps command may crash, so need to check it +check_jps() { + "${JAVA_HOME}/bin/jps" > /dev/null 2>&1 + local exit_code=$? + if [ $exit_code -ne 0 ]; then + echo "jps command failed with exit code ${exit_code}" >&2 + fi + return $exit_code +} + +call_jps() +{ + check_jps + local exit_code=$? + if [[ "$exit_code" -eq 0 ]]; then + # jps command is ok + local jps_command=("${JAVA_HOME}/bin/jps" "-l") + if [ "${VERBOSE}" = true ] ; then + jps_command=("${JAVA_HOME}/bin/jps" "-l" "-v") + fi + local jps_output=$("${jps_command[@]}") + echo "$jps_output" + else + # jps command failed, use ps and grep + ps_output=$(ps aux | grep java | grep -v grep | awk '{print $2" "$11}') + echo "$ps_output" + fi +} + +# the usage +usage() +{ + echo " +Usage: + $0 [-h] [--target-ip ] [--telnet-port ] + [--http-port ] [--session-timeout ] [--arthas-home ] + [--tunnel-server ] [--agent-id ] [--stat-url ] + [--app-name ] + [--username ] [--password ] + [--disabled-commands ] + [--use-version ] [--repo-mirror ] [--versions] [--use-http] + [--attach-only] [-c ] [-f ] [-v] [pid] + +Options and Arguments: + -h,--help Print usage + --target-ip The target jvm listen ip, default 127.0.0.1 + --telnet-port The target jvm listen telnet port, default 3658 + --http-port The target jvm listen http port, default 8563 + --session-timeout The session timeout seconds, default 1800 (30min) + --arthas-home The arthas home + --use-version Use special version arthas + --repo-mirror Use special remote repository mirror, value is + center/aliyun or http repo url. + --versions List local and remote arthas versions + --use-http Enforce use http to download, default use https + --attach-only Attach target process only, do not connect + --debug-attach Debug attach agent + --tunnel-server Remote tunnel server url + --agent-id Special agent id + --app-name Special app name + --username Special username + --password Special password + --disabled-commands Disable special commands + --select select target process by classname or JARfilename + -c,--command Command to execute, multiple commands separated + by ; + -f,--batch-file The batch file to execute + --height arthas-client terminal height + --width arthas-client terminal width + -v,--verbose Verbose, print debug info. + Target pid + +EXAMPLES: + ./as3.sh + ./as3.sh --telnet-port 9999 --http-port -1 + ./as3.sh --username admin --password + ./as3.sh --tunnel-server 'ws://192.168.10.11:7777/ws' --app-name demoapp + ./as3.sh --tunnel-server 'ws://192.168.10.11:7777/ws' --agent-id bvDOe8XbTM2pQWjF4cfw + ./as3.sh --stat-url 'http://192.168.10.11:8080/api/stat' + ./as3.sh -c 'sysprop; thread' + ./as3.sh -f batch.as + ./as3.sh --use-version 3.7.3 + ./as3.sh --session-timeout 3600 + ./as3.sh --attach-only + ./as3.sh --disabled-commands stop,dump + ./as3.sh --select math-game + ./as3.sh --repo-mirror aliyun --use-http +WIKI: + https://arthas.aliyun.com/3.x/doc + +Here is the list of possible java process(es) to attatch: +" + +call_jps | grep -v sun.tools.jps.Jps + +} + +# list arthas versions +list_versions() +{ + echo "Arthas versions under ${ARTHAS_LIB_DIR}:" + ls -1 "${ARTHAS_LIB_DIR}" +} + +# find the process tcp listen at the port +# $1 : port number +find_listen_port_process() +{ + if [ -x "$(command -v lsof)" ]; then + echo $(lsof -t -s TCP:LISTEN -i TCP:$1) + fi +} + +getTargetIPOrDefault() +{ + local targetIP=${DEFAULT_TARGET_IP} + if [ "${TARGET_IP}" ]; then + targetIP=${TARGET_IP} + fi + echo $targetIP +} + +getTelnetPortOrDefault() +{ + local telnetPort=${DEFAULT_TELNET_PORT} + if [ "${TELNET_PORT}" ]; then + telnetPort=${TELNET_PORT} + fi + echo $telnetPort +} + +getHttpPortOrDefault() +{ + local httpPort=${DEFAULT_HTTP_PORT} + if [ "${HTTP_PORT}" ]; then + httpPort=${HTTP_PORT} + fi + echo $httpPort +} + +# Status from com.taobao.arthas.client.TelnetConsole +# Execute commands timeout +STATUS_EXEC_TIMEOUT=100 +# Execute commands error +STATUS_EXEC_ERROR=101 + +# find the process pid of target telnet port +# maybe another user start an arthas server at the same port, but invisible for current user +find_listen_port_process_by_client() +{ + local arthas_lib_dir="${ARTHAS_HOME}" + # http://www.inonit.com/cygwin/faq/ + if [ "${OS_TYPE}" = "Cygwin" ]; then + arthas_lib_dir=`cygpath -wp "$arthas_lib_dir"` + fi + + "${JAVA_HOME}/bin/java" ${ARTHAS_OPTS} ${JVM_OPTS} \ + -jar "${arthas_lib_dir}/arthas-client.jar" \ + $(getTargetIPOrDefault) \ + $(getTelnetPortOrDefault) \ + -c "session" \ + --execution-timeout 2000 \ + 2>&1 + + # return java process exit status code ! + return $? +} + +parse_arguments() +{ + POSITIONAL=() + while [[ $# -gt 0 ]] + do + key="$1" + + case $key in + -h|--help) + usage + exit 0 + ;; + --versions) + list_versions + exit 0 + ;; + --target-ip) + TARGET_IP="$2" + shift # past argument + shift # past value + ;; + --telnet-port) + TELNET_PORT="$2" + shift # past argument + shift # past value + ;; + --http-port) + HTTP_PORT="$2" + shift # past argument + shift # past value + ;; + --session-timeout) + SESSION_TIMEOUT="$2" + shift # past argument + shift # past value + ;; + --arthas-home) + ARTHAS_HOME="$2" + shift # past argument + shift # past value + ;; + --use-version) + USE_VERSION="$2" + shift # past argument + shift # past value + ;; + --repo-mirror) + REPO_MIRROR="$2" + shift # past argument + shift # past value + ;; + -c|--command) + COMMAND="$2" + BATCH_MODE=true + shift # past argument + shift # past value + ;; + -f|--batch-file) + BATCH_FILE="$2" + BATCH_MODE=true + shift # past argument + shift # past value + ;; + --tunnel-server) + TUNNEL_SERVER="$2" + shift # past argument + shift # past value + ;; + --agent-id) + AGENT_ID="$2" + shift # past argument + shift # past value + ;; + --stat-url) + STAT_URL="$2" + shift # past argument + shift # past value + ;; + --app-name) + APP_NAME="$2" + shift # past argument + shift # past value + ;; + --username) + USERNAME="$2" + shift # past argument + shift # past value + ;; + --password) + PASSWORD="$2" + shift # past argument + shift # past value + ;; + --disabled-commands) + DISABLED_COMMANDS="$2" + shift # past argument + shift # past value + ;; + --use-http) + USE_HTTP=true + shift # past argument + ;; + --attach-only) + ATTACH_ONLY=true + shift # past argument + ;; + --debug-attach) + DEBUG_ATTACH=true + if [ -z "$JPDA_TRANSPORT" ]; then + JPDA_TRANSPORT="dt_socket" + fi + if [ -z "$JPDA_ADDRESS" ]; then + JPDA_ADDRESS="8888" + fi + if [ -z "$JPDA_SUSPEND" ]; then + JPDA_SUSPEND="y" + fi + if [ -z "$JPDA_OPTS" ]; then + JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND" + fi + ARTHAS_OPTS="$JPDA_OPTS $ARTHAS_OPTS" + shift # past argument + ;; + --height) + HEIGHT="$2" + shift # past argument + shift # past value + ;; + --width) + WIDTH="$2" + shift # past argument + shift # past value + ;; + --select) + SELECT="$2" + shift # past argument + shift # past value + ;; + -v|--verbose) + VERBOSE=true + shift # past argument + ;; + --default) + DEFAULT=YES + shift # past argument + ;; + *) # unknown option + POSITIONAL+=("$1") # save it in an array for later + shift # past argument + ;; + esac + done + set -- "${POSITIONAL[@]}" # restore positional parameters + + if [[ -n $1 ]]; then + # parse pid + TARGET_PID=$(echo ${1}|awk -F "@" '{print $1}'); + local targetIp=$(echo ${1}|awk -F "@|:" '{print $2}'); + [[ "$targetIp" ]] && TARGET_IP=$targetIp + local telnetPort=$(echo ${1}|awk -F ":" '{print $2}'); + [[ "$telnetPort" ]] && TELNET_PORT=$telnetPort + local httpPort=$(echo ${1}|awk -F ":" '{print $3}'); + [[ "$httpPort" ]] && HTTP_PORT=$httpPort + fi + + # check telnet port/http port + local telnetPortPid + local httpPortPid + local telnetPortOrDefault=$(getTelnetPortOrDefault) + local httpPortOrDefault=$(getHttpPortOrDefault) + if [[ $telnetPortOrDefault > 0 ]]; then + telnetPortPid=$(find_listen_port_process $telnetPortOrDefault) + if [ $telnetPortPid ]; then + echo "[INFO] Process $telnetPortPid already using port $telnetPortOrDefault" + fi + fi + if [[ $httpPortOrDefault > 0 ]]; then + httpPortPid=$(find_listen_port_process $httpPortOrDefault) + if [ $telnetPortPid ]; then + echo "[INFO] Process $httpPortPid already using port $httpPortOrDefault" + fi + fi + + if [ -z ${REPO_MIRROR} ]; then + REPO_MIRROR="center" + # if timezone is +0800, set REPO_MIRROR to aliyun + if [[ -x "$(command -v date)" ]] && [[ $(date +%z) == "+0800" ]]; then + REPO_MIRROR="aliyun" + fi + fi + + # try to find target pid by --select option + if [ -z ${TARGET_PID} ] && [ ${SELECT} ]; then + local IFS=$'\n' + CANDIDATES=($(call_jps | grep -v sun.tools.jps.Jps | grep "${SELECT}" | awk '{print $0}')) + if [ ${#CANDIDATES[@]} -eq 1 ]; then + TARGET_PID=`echo ${CANDIDATES[0]} | cut -d ' ' -f 1` + fi + fi + + # check pid + if [ -z ${TARGET_PID} ]; then + # interactive mode + local IFS=$'\n' + CANDIDATES=($(call_jps | grep -v sun.tools.jps.Jps | awk '{print $0}')) + + if [ ${#CANDIDATES[@]} -eq 0 ]; then + echo "Error: no available java process to attach." + return 1 + fi + + echo "Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER." + + index=0 + suggest=1 + # auto select tomcat/pandora-boot process + for process in "${CANDIDATES[@]}"; do + index=$(($index+1)) + if [ $(echo ${process} | grep -c org.apache.catalina.startup.Bootstrap) -eq 1 ] \ + || [ $(echo ${process} | grep -c com.taobao.pandora.boot.loader.SarLauncher) -eq 1 ] + then + suggest=${index} + break + fi + done + + index=0 + for process in "${CANDIDATES[@]}"; do + index=$(($index+1)) + if [ ${index} -eq ${suggest} ]; then + echo "* [$index]: ${process}" + else + echo " [$index]: ${process}" + fi + done + + read choice + + if [ -z ${choice} ]; then + choice=${suggest} + fi + + TARGET_PID=`echo ${CANDIDATES[$(($choice-1))]} | cut -d ' ' -f 1` + + # check the process already using telnet port if equals to target pid + if [[ ($telnetPortPid) && ($TARGET_PID != $telnetPortPid) ]]; then + print_telnet_port_pid_error + exit 1 + fi + if [[ ($httpPortPid) && ($TARGET_PID != $httpPortPid) ]]; then + echo "Target process $TARGET_PID is not the process using port $(getHttpPortOrDefault), you will connect to an unexpected process." + echo "1. Try to restart as3.sh, select process $httpPortPid, shutdown it first with running the 'stop' command." + echo "2. Try to use different http port, for example: as3.sh --telnet-port 9998 --http-port 9999" + exit 1 + fi + elif [ -z ${TARGET_PID} ]; then + # batch mode is enabled, no interactive process selection. + echo "Illegal arguments, the is required." 1>&2 + return 1 + fi +} + +# attach arthas to target jvm +attach_jvm() +{ + local arthas_lib_dir=$1 + # http://www.inonit.com/cygwin/faq/ + if [ "${OS_TYPE}" = "Cygwin" ]; then + arthas_lib_dir=`cygpath -wp "$arthas_lib_dir"` + fi + + echo "Attaching to ${TARGET_PID} using version ${1}..." + + local java_command=("${JAVA_HOME}"/bin/java) + if [ "${BOOT_CLASSPATH}" ]; then + java_command+=("${BOOT_CLASSPATH}") + fi + + local tempArgs=() + if [ "${TUNNEL_SERVER}" ]; then + tempArgs+=("-tunnel-server") + tempArgs+=("${TUNNEL_SERVER}") + fi + if [ "${AGENT_ID}" ]; then + tempArgs+=("-agent-id") + tempArgs+=("${AGENT_ID}") + fi + if [ "${STAT_URL}" ]; then + tempArgs+=("-stat-url") + tempArgs+=("${STAT_URL}") + fi + + if [ "${APP_NAME}" ]; then + tempArgs+=("-app-name") + tempArgs+=("${APP_NAME}") + fi + + if [ "${USERNAME}" ]; then + tempArgs+=("-username") + tempArgs+=("${USERNAME}") + fi + + if [ "${PASSWORD}" ]; then + tempArgs+=("-password") + tempArgs+=("${PASSWORD}") + fi + + if [ "${DISABLED_COMMANDS}" ]; then + tempArgs+=("-disabled-commands") + tempArgs+=("${DISABLED_COMMANDS}") + fi + + if [ "${TARGET_IP}" ]; then + tempArgs+=("-target-ip") + tempArgs+=("${TARGET_IP}") + fi + if [ "${TELNET_PORT}" ]; then + tempArgs+=("-telnet-port") + tempArgs+=("${TELNET_PORT}") + fi + if [ "${HTTP_PORT}" ]; then + tempArgs+=("-http-port") + tempArgs+=("${HTTP_PORT}") + fi + if [ "${SESSION_TIMEOUT}" ]; then + tempArgs+=("-session-timeout") + tempArgs+=("${SESSION_TIMEOUT}") + fi + + "${java_command[@]}" \ + ${ARTHAS_OPTS} ${JVM_OPTS} \ + -jar "${arthas_lib_dir}/arthas-core.jar" \ + -pid ${TARGET_PID} \ + "${tempArgs[@]}" \ + -core "${arthas_lib_dir}/arthas-core.jar" \ + -agent "${arthas_lib_dir}/arthas-agent.jar" + +} + +sanity_check() { + # only Linux/Mac support ps to find process, Cygwin/MinGw may fail. + if ([ "${OS_TYPE}" != "Linux" ] && [ "${OS_TYPE}" != "Mac" ]); then + return + fi + + # 0 check whether the pid exist + local pid=$(ps -p ${TARGET_PID} -o pid= 2>&1 ) + + # get ps command exit code + local exitCode="$(ps -p ${TARGET_PID} -o pid= > /dev/null 2>&1; echo $?)" + + # If ps exist code not 0, the TARGET_PID process maybe not exist or ps do not support -p options. + if [ "${exitCode}" != "0" ]; then + # if ps do not support -p or -o , ${pid} will be error message, just return + if [ -n "${pid}" ]; then + return + fi + fi + + if [ -z ${pid} ]; then + exit_on_err 1 "The target pid (${TARGET_PID}) does not exist!" + fi + + # 1 check the current user matches the process owner + local current_user=$(id -u -n) + # the last '=' after 'user' eliminates the column header + local target_user=$(ps -p "${TARGET_PID}" -o user=) + if [ "$current_user" != "$target_user" ]; then + echo "The current user ($current_user) does not match with the owner of process ${TARGET_PID} ($target_user)." + echo "To solve this, choose one of the following command:" + echo " 1) sudo su $target_user && ./as3.sh" + echo " 2) sudo -u $target_user -EH ./as3.sh" + exit_on_err 1 + fi +} + +port_pid_check() { + if [[ $(getTelnetPortOrDefault) > 0 ]]; then + local telnet_output + local find_process_status + # declare local var before var=$() + telnet_output=$(find_listen_port_process_by_client) + find_process_status=$? + #echo "find_process_status: $find_process_status" + #echo "telnet_output: $telnet_output" + + #check return code + if [[ $find_process_status -eq $STATUS_EXEC_TIMEOUT ]]; then + print_telnet_port_used_error "detection timeout" + exit 1 + elif [[ $find_process_status -eq $STATUS_EXEC_ERROR ]]; then + print_telnet_port_used_error "detection error" + exit 1 + fi + + if [[ -n $telnet_output ]]; then + # check JAVA_PID + telnetPortPid=$(echo "$telnet_output" | grep JAVA_PID | awk '{ print $2 }') + #echo "telnetPortPid: $telnetPortPid" + # check the process already using telnet port if equals to target pid + if [[ -n $telnetPortPid && ($TARGET_PID != $telnetPortPid) ]]; then + print_telnet_port_pid_error + exit 1 + fi + fi + + fi +} + +print_telnet_port_pid_error() { + echo "[ERROR] The telnet port $(getTelnetPortOrDefault) is used by process $telnetPortPid instead of target process $TARGET_PID, you will connect to an unexpected process." + echo "[ERROR] 1. Try to restart as3.sh, select process $telnetPortPid, shutdown it first with running the 'stop' command." + echo "[ERROR] 2. Try to stop the existing arthas instance: java -jar arthas-client.jar 127.0.0.1 $(getTelnetPortOrDefault) -c \"stop\"" + echo "[ERROR] 3. Try to use different telnet port, for example: as3.sh --telnet-port 9998 --http-port -1" +} + +print_telnet_port_used_error() { + local error_msg=$1 + echo "[ERROR] The telnet port $(getTelnetPortOrDefault) is used, but process $error_msg, you will connect to an unexpected process." + echo "[ERROR] Try to use different telnet port, for example: as3.sh --telnet-port 9998 --http-port -1" +} + +# active console +# $1 : arthas_lib_dir +active_console() +{ + local arthas_lib_dir=$1 + + # http://www.inonit.com/cygwin/faq/ + if [ "${OS_TYPE}" = "Cygwin" ]; then + arthas_lib_dir=`cygpath -wp $arthas_lib_dir` + fi + + if [ "${BATCH_MODE}" = "true" ]; then + local tempArgs=() + if [ "${HEIGHT}" ]; then + tempArgs+=("--height") + tempArgs+=("${HEIGHT}") + fi + if [ "${WIDTH}" ]; then + tempArgs+=("--width") + tempArgs+=("${WIDTH}") + fi + + if [ "${COMMAND}" ] ; then + "${JAVA_HOME}/bin/java" ${ARTHAS_OPTS} ${JVM_OPTS} \ + -jar "${arthas_lib_dir}/arthas-client.jar" \ + $(getTargetIPOrDefault) \ + $(getTelnetPortOrDefault) \ + "${tempArgs[@]}" \ + -c "${COMMAND}" + fi + if [ "${BATCH_FILE}" ] ; then + "${JAVA_HOME}/bin/java" ${ARTHAS_OPTS} ${JVM_OPTS} \ + -jar "${arthas_lib_dir}/arthas-client.jar" \ + $(getTargetIPOrDefault) \ + $(getTelnetPortOrDefault) \ + "${tempArgs[@]}" \ + -f ${BATCH_FILE} + fi + elif type telnet 2>&1 >> /dev/null; then + # use telnet + if [[ $(command -v telnet) == *"system32"* ]] ; then + # Windows/system32/telnet.exe can not run in Cygwin/MinGw + echo "It seems that current bash is under Windows. $(command -v telnet) can not run under bash." + echo "Please start cmd.exe from Windows start menu, and then run telnet $(getTargetIPOrDefault) $(getTelnetPortOrDefault) to connect to target process." + echo "Or visit http://127.0.0.1:$(getHttpPortOrDefault) to connect to target process." + return 1 + fi + echo "telnet connecting to arthas server... current timestamp is `date +%s`" + telnet $(getTargetIPOrDefault) $(getTelnetPortOrDefault) + else + echo "'telnet' is required." 1>&2 + return 1 + fi +} + +# the main +main() +{ + echo "Arthas script version: $ARTHAS_SCRIPT_VERSION" + + check_permission + reset_for_env + + parse_arguments "${@}" \ + || exit_on_err 1 "$(usage)" + + # try to find arthas home from --use-version + if [[ (-z "${ARTHAS_HOME}") && (! -z "${USE_VERSION}") ]]; then + if [[ "${USE_VERSION:0:1}" != "3" ]] ; then + echo "Arthas version ${USE_VERSION} is not supported; only version 3.x is supported." 1>&2 + exit 1 + fi + if [[ ! -d "${ARTHAS_LIB_DIR}/${USE_VERSION}/arthas" ]] ; then + update_if_necessary "${USE_VERSION}" || echo "update fail, ignore this update." 1>&2 + fi + ARTHAS_HOME="${ARTHAS_LIB_DIR}/${USE_VERSION}/arthas" + fi + + # try to set arthas home from as3.sh directory + if [ -z "${ARTHAS_HOME}" ] ; then + [[ -a "${DIR}/arthas-core.jar" ]] \ + && [[ -a "${DIR}/arthas-agent.jar" ]] \ + && [[ -a "${DIR}/arthas-spy.jar" ]] \ + && ARTHAS_HOME="${DIR}" + fi + + # try to find arthas under ~/.arthas/lib + if [ -z "${ARTHAS_HOME}" ] ; then + local remote_3x_version=$(get_remote_3x_version) + local arthas_local_3x_version=$(get_local_3x_version) + if $(version_gt $remote_3x_version $arthas_local_3x_version) ; then + update_if_necessary "${remote_3x_version}" || echo "update fail, ignore this update." 1>&2 + fi + local arthas_local_3x_version=$(get_local_3x_version) + ARTHAS_HOME="${ARTHAS_LIB_DIR}/${arthas_local_3x_version}/arthas" + fi + + echo "Arthas home: ${ARTHAS_HOME}" + + if [ ! -d "${ARTHAS_HOME}" ] ; then + exit_on_err 1 "Arthas home is not a directory, please delete it and retry." + fi + + sanity_check + + port_pid_check + + echo "Calculating attach execution time..." + time (attach_jvm "${ARTHAS_HOME}" || exit 1) + + if [ $? -ne 0 ]; then + exit_on_err 1 "attach to target jvm (${TARGET_PID}) failed, check ${HOME}/logs/arthas/arthas.log or stderr of target jvm for any exceptions." + fi + + echo "Attach success." + + if [ ${ATTACH_ONLY} = false ]; then + active_console "${ARTHAS_HOME}" + fi +} + + + +main "${@}" \ No newline at end of file diff --git a/install3.sh b/install3.sh new file mode 100644 index 00000000000..d9ce21df2e4 --- /dev/null +++ b/install3.sh @@ -0,0 +1,48 @@ +#! /bin/bash + +# temp file of as3.sh +TEMP_ARTHAS_FILE="./as3.sh.$$" + +# target file of as3.sh +TARGET_ARTHAS_FILE="./as3.sh" + +# update timeout(sec) +SO_TIMEOUT=60 + +# default downloading url +ARTHAS_FILE_URL="https://arthas.aliyun.com/as3.sh" + +# exit shell with err_code +# $1 : err_code +# $2 : err_msg +exit_on_err() +{ + [[ ! -z "${2}" ]] && echo "${2}" 1>&2 + exit ${1} +} + +# check permission to download && install +[[ ! -w ./ ]] && exit_on_err 1 "permission denied, target directory ./ was not writable." + +if [[ $# -gt 1 ]] && [[ $1 = "--url" ]]; then + shift + ARTHAS_FILE_URL=$1 + shift +fi + +# download from aliyunos +echo "downloading... ${TEMP_ARTHAS_FILE}" +curl \ + -sLk \ + --connect-timeout ${SO_TIMEOUT} \ + ${ARTHAS_FILE_URL} \ + -o ${TEMP_ARTHAS_FILE} \ +|| exit_on_err 1 "download failed!" + +# write or overwrite local file +rm -rf as3.sh +mv ${TEMP_ARTHAS_FILE} ${TARGET_ARTHAS_FILE} +chmod +x ${TARGET_ARTHAS_FILE} + +# done +echo "Arthas install succeeded."