mirror of https://github.com/alibaba/arthas.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7 lines
8.2 KiB
JavaScript
7 lines
8.2 KiB
JavaScript
import{_ as c,o as i,c as h,b as o,w as s,a,d as l,e,r}from"./app.5024572d.js";const p={},u=l(`<h2 id="\u7528\u6237\u95EE\u9898" tabindex="-1"><a class="header-anchor" href="#\u7528\u6237\u95EE\u9898" aria-hidden="true">#</a> \u7528\u6237\u95EE\u9898 \uFF1A</h2><p>arthas \u600E\u4E48\u67E5\u770B\u53D8\u91CF\u5185\u5BB9</p><hr><h2 id="\u4E13\u5BB6\u5B98\u65B9\u89E3\u7B54" tabindex="-1"><a class="header-anchor" href="#\u4E13\u5BB6\u5B98\u65B9\u89E3\u7B54" aria-hidden="true">#</a> \u4E13\u5BB6\u5B98\u65B9\u89E3\u7B54 \uFF1A</h2><p>\u5728Arthas\u4E2D\u67E5\u770B\u53D8\u91CF\u5185\u5BB9\uFF0C\u53EF\u4EE5\u4F7F\u7528<code>watch</code>\u6216\u8005<code>heapdump</code>\u7B49\u547D\u4EE4\u6765\u5B9E\u73B0\u3002\u4E0B\u9762\u6211\u4F1A\u6839\u636E\u8FD9\u4E9B\u547D\u4EE4\u63D0\u4F9B\u5177\u4F53\u7684\u6B65\u9AA4\u548C\u89E3\u91CA\u3002</p><h3 id="\u4F7F\u7528watch\u547D\u4EE4" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528watch\u547D\u4EE4" aria-hidden="true">#</a> \u4F7F\u7528<code>watch</code>\u547D\u4EE4</h3><p><strong>\u6B65\u9AA4:</strong></p><ol><li><p><strong>\u542F\u52A8Arthas\u5E76\u8FDE\u63A5\u5230\u76EE\u6807Java\u8FDB\u7A0B</strong>\uFF1A \u9996\u5148\u786E\u4FDD\u4F60\u5DF2\u7ECF\u6309\u7167Arthas\u7684\u5FEB\u901F\u542F\u52A8\u6307\u5357\u6210\u529F\u5B89\u88C5\u5E76\u8FDE\u63A5\u5230\u4E86\u76EE\u6807Java\u5E94\u7528\u3002\u5373\u6267\u884C\u4E86\u7C7B\u4F3C\u5982\u4E0B\u7684\u547D\u4EE4\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">curl</span> <span class="token parameter variable">-O</span> https://arthas.aliyun.com/arthas-boot.jar
|
|
<span class="token function">java</span> <span class="token parameter variable">-jar</span> arthas-boot.jar
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div></li><li><p><strong>\u6267\u884C<code>watch</code>\u547D\u4EE4</strong>\uFF1A \u5047\u8BBE\u4F60\u8981\u89C2\u5BDF\u7684\u7C7B\u540D\u4E3A<code>com.example.YourClass</code>\uFF0C\u65B9\u6CD5\u540D\u4E3A<code>yourMethod</code>\uFF0C\u5E76\u4E14\u60F3\u67E5\u770B\u8BE5\u65B9\u6CD5\u4E2D\u53D8\u91CF<code>yourVariable</code>\u7684\u5185\u5BB9\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">watch</span> com.example.YourClass yourMethod <span class="token string">"{params,returnObj,throwExp}"</span>
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u5982\u679C\u4F60\u60F3\u66F4\u8BE6\u7EC6\u5730\u89C2\u5BDF\u67D0\u4E2A\u7279\u5B9A\u5C40\u90E8\u53D8\u91CF\uFF0C\u53EF\u4EE5\u6307\u5B9A\u53D8\u91CF\u540D\uFF0C\u4F8B\u5982\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">watch</span> com.example.YourClass yourMethod <span class="token string">"yourVariable"</span>
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li><li><p><strong>\u89E3\u8BFB\u8F93\u51FA</strong>\uFF1A <code>watch</code>\u547D\u4EE4\u4F1A\u5728\u6BCF\u6B21\u6307\u5B9A\u7684\u65B9\u6CD5\u88AB\u8C03\u7528\u65F6\u6253\u5370\u51FA\u4F60\u5173\u6CE8\u7684\u53C2\u6570\u3001\u8FD4\u56DE\u5BF9\u8C61\u6216\u629B\u51FA\u7684\u5F02\u5E38\u4FE1\u606F\uFF0C\u5305\u62EC\u4F60\u6307\u5B9A\u7684\u53D8\u91CF\u5185\u5BB9\u3002</p></li></ol><h3 id="\u4F7F\u7528heapdump\u547D\u4EE4" tabindex="-1"><a class="header-anchor" href="#\u4F7F\u7528heapdump\u547D\u4EE4" aria-hidden="true">#</a> \u4F7F\u7528<code>heapdump</code>\u547D\u4EE4</h3><p>\u5982\u679C\u4F60\u9700\u8981\u67E5\u770B\u5806\u5185\u5B58\u4E2D\u7684\u53D8\u91CF\u72B6\u6001\uFF0C\u53EF\u4EE5\u4F7F\u7528<code>heapdump</code>\u751F\u6210\u5806\u8F6C\u50A8\u6587\u4EF6\uFF0C\u7136\u540E\u4F7F\u7528\u5DE5\u5177\uFF08\u5982VisualVM\u3001Eclipse Memory Analyzer\uFF09\u5206\u6790\u3002</p><p><strong>\u6B65\u9AA4:</strong></p><ol><li><p><strong>\u751F\u6210\u5806\u8F6C\u50A8\u6587\u4EF6</strong>\uFF1A \u6267\u884C\u547D\u4EE4\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>heapdump /path/to/dump.hprof
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u8FD9\u5C06\u4F1A\u5728\u6307\u5B9A\u8DEF\u5F84\u4E0B\u751F\u6210\u4E00\u4E2A<code>.hprof</code>\u6587\u4EF6\u3002</p></li><li><p><strong>\u5206\u6790\u5806\u8F6C\u50A8\u6587\u4EF6</strong>\uFF1A \u4F7F\u7528\u5185\u5B58\u5206\u6790\u5DE5\u5177\u6253\u5F00\u8FD9\u4E2A\u6587\u4EF6\uFF0C\u641C\u7D22\u4F60\u9700\u8981\u67E5\u770B\u7684\u53D8\u91CF\u6216\u5BF9\u8C61\uFF0C\u5206\u6790\u5176\u5185\u5BB9\u548C\u5F15\u7528\u94FE\u3002</p></li></ol><h3 id="\u89E3\u91CA" tabindex="-1"><a class="header-anchor" href="#\u89E3\u91CA" aria-hidden="true">#</a> \u89E3\u91CA</h3><ul><li><code>watch</code>\u547D\u4EE4\u5141\u8BB8\u4F60\u5728\u4E0D\u4FEE\u6539\u4EE3\u7801\u7684\u60C5\u51B5\u4E0B\uFF0C\u52A8\u6001\u5730\u89C2\u5BDF\u5230\u7A0B\u5E8F\u8FD0\u884C\u65F6\u7684\u53D8\u91CF\u72B6\u6001\uFF0C\u975E\u5E38\u9002\u5408\u8C03\u8BD5\u548C\u8BCA\u65AD\u95EE\u9898\u3002</li><li><code>heapdump</code>\u5219\u7528\u4E8E\u83B7\u53D6\u6574\u4E2AJava\u5E94\u7528\u7684\u5185\u5B58\u5FEB\u7167\uFF0C\u9002\u5408\u5206\u6790\u5185\u5B58\u6CC4\u6F0F\u6216\u67E5\u627E\u5927\u5BF9\u8C61\u7B49\u95EE\u9898\uFF0C\u4F46\u4F7F\u7528\u8D77\u6765\u76F8\u5BF9\u590D\u6742\uFF0C\u9700\u8981\u540E\u7EED\u7684\u5206\u6790\u5DE5\u5177\u652F\u6301\u3002</li></ul><p>\u8BF7\u6839\u636E\u4F60\u7684\u5177\u4F53\u9700\u6C42\u9009\u62E9\u5408\u9002\u7684\u65B9\u6CD5\u6765\u67E5\u770B\u53D8\u91CF\u5185\u5BB9\u3002\u5982\u679C\u6709\u5176\u4ED6\u7279\u5B9A\u573A\u666F\u6216\u9700\u6C42\uFF0C\u8BF7\u8FDB\u4E00\u6B65\u8BF4\u660E\u3002</p>`,15),_=e("---------------"),m=a("h2",{id:"\u53C2\u8003\u94FE\u63A5",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u53C2\u8003\u94FE\u63A5","aria-hidden":"true"},"#"),e(" \u53C2\u8003\u94FE\u63A5 \uFF1A")],-1),b=e("\u4E13\u5BB6\u7ECF\u9A8C\uFF1AArthas \u5FEB\u901F\u542F\u52A8"),f=e("\u4E13\u5BB6\u7ECF\u9A8C\uFF1Aarthas\u542F\u52A8\u65F6\u5185\u5B58\u6EA2\u51FA"),v=e("profiler"),g=e("---------------"),x={id:"\u7B54\u7591\u670D\u52A1\u8BF4\u660E",tabindex:"-1"},k=a("a",{class:"header-anchor",href:"#\u7B54\u7591\u670D\u52A1\u8BF4\u660E","aria-hidden":"true"},"#",-1),w=e(),y=e("\u7B54\u7591\u670D\u52A1\u8BF4\u660E\uFF1A"),V=e("\u672C\u5185\u5BB9\u7ECF\u7531\u6280\u672F\u4E13\u5BB6\u5BA1\u9605\u7684\u7528\u6237\u95EE\u7B54\u7684\u955C\u50CF\u751F\u6210\uFF0C\u6211\u4EEC\u63D0\u4F9B\u4E86"),q=e("\u4E13\u5BB6\u667A\u80FD\u7B54\u7591\u670D\u52A1"),E=e("\uFF0C\u5728"),F=e("\u9875\u9762\u7684\u53F3\u4E0B\u7684\u6D6E\u7A97\u201D\u4E13\u5BB6\u7B54\u7591\u201C"),O=e("\u3002\u60A8\u4E5F\u53EF\u4EE5\u8BBF\u95EE : "),j={href:"https://answer.opensource.alibaba.com/docs/intro",target:"_blank",rel:"noopener noreferrer"},A=e("\u5168\u5C40\u4E13\u5BB6\u7B54\u7591"),C=e(" \u3002 \u54A8\u8BE2\u5176\u4ED6\u4EA7\u54C1\u7684\u7684\u95EE\u9898"),J=a("h3",{id:"\u53CD\u9988",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u53CD\u9988","aria-hidden":"true"},"#"),e(" \u53CD\u9988")],-1),M=e("\u5982\u95EE\u7B54\u6709\u9519\u6F0F\uFF0C\u6B22\u8FCE\u70B9\uFF1A"),B={href:"https://ai.nacos.io/user/feedbackByEnhancerGradePOJOID?enhancerGradePOJOId=16089",target:"_blank",rel:"noopener noreferrer"},I=e("\u5DEE\u8BC4"),L=e("\u7ED9\u6211\u4EEC\u53CD\u9988\u3002");function N(Y,G){const t=r("font"),n=r("RouterLink"),d=r("ExternalLinkIcon");return i(),h("div",null,[u,o(t,{color:"#949494"},{default:s(()=>[_]),_:1}),m,a("p",null,[o(n,{to:"/doc/expert/user-question-history11440.html"},{default:s(()=>[b]),_:1})]),a("p",null,[o(n,{to:"/doc/expert/user-question-history14832.html"},{default:s(()=>[f]),_:1})]),a("p",null,[o(n,{to:"/doc/profiler.html"},{default:s(()=>[v]),_:1})]),o(t,{color:"#949494"},{default:s(()=>[g]),_:1}),a("h2",x,[k,w,o(t,{color:"#FF0000"},{default:s(()=>[y]),_:1})]),a("p",null,[V,o(t,{color:"#FF0000"},{default:s(()=>[q]),_:1}),E,o(t,{color:"#FF0000"},{default:s(()=>[F]),_:1}),O,a("a",j,[A,o(d)]),C]),J,a("p",null,[M,a("a",B,[I,o(d)]),L])])}const R=c(p,[["render",N],["__file","user-question-history15729.html.vue"]]);export{R as default};
|