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.
5 lines
7.8 KiB
JavaScript
5 lines
7.8 KiB
JavaScript
import{_ as i,o as c,c as l,b as s,w as t,a as o,d as h,e,r as n}from"./app.5024572d.js";const _={},u=h(`<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>java \u5982\u4F55\u7528arthas \u67E5\u770B \u5185\u5B58 \u60C5\u51B5\uFF1F</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>\u8981\u4F7F\u7528Arthas\u67E5\u770BJava\u5E94\u7528\u7684\u5185\u5B58\u60C5\u51B5\uFF0C\u53EF\u4EE5\u9075\u5FAA\u4EE5\u4E0B\u6B65\u9AA4\uFF1A</p><ol><li><p><strong>\u8FDE\u63A5\u76EE\u6807Java\u8FDB\u7A0B</strong><br> \u9996\u5148\uFF0C\u786E\u4FDDArthas\u5DE5\u5177\u5DF2\u7ECF\u5728\u4F60\u7684\u7CFB\u7EDF\u4E2D\u5B89\u88C5\u5E76\u53EF\u7528\u3002\u63A5\u7740\uFF0C\u901A\u8FC7\u547D\u4EE4\u884C\u8FDE\u63A5\u5230\u4F60\u60F3\u8981\u76D1\u63A7\u7684Java\u8FDB\u7A0B\u3002\u6BD4\u5982\uFF0C\u5982\u679C\u4F60\u7684\u76EE\u6807\u8FDB\u7A0BID\u662F12345\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>arthas.sh attach <span class="token number">12345</span>
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div></li><li><p><strong>\u68C0\u67E5JVM\u5185\u5B58\u6982\u89C8</strong><br> \u8FD0\u884C<code>memory</code>\u547D\u4EE4\u4EE5\u83B7\u53D6\u5F53\u524DJVM\u7684\u5185\u5B58\u72B6\u6001\u6982\u89C8\u3002\u8FD9\u4F1A\u663E\u793A\u5305\u62EC\u5806\u5185\u5B58\u3001\u975E\u5806\u5185\u5B58\u3001\u5404\u79CD\u4EE3\u7684\u7A7A\u95F4\u4F7F\u7528\u60C5\u51B5\u7B49\u5173\u952E\u4FE1\u606F\u3002\u4F8B\u5982\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>memory
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u89C2\u5BDF\u8FD4\u56DE\u7684\u7ED3\u679C\u4E2D\u5404\u533A\u57DF\u7684<code>used</code>\u548C<code>usage</code>\u5217\uFF0C\u4EE5\u5224\u65AD\u662F\u5426\u6709\u5F02\u5E38\u589E\u957F\u7684\u533A\u57DF\uFF0C\u8FD9\u53EF\u80FD\u662F\u5185\u5B58\u6CC4\u6F0F\u7684\u8FF9\u8C61\u3002</p></li><li><p><strong>\u5206\u6790\u5185\u5B58\u6CC4\u6F0F</strong><br> \u5982\u679C\u6000\u7591\u5B58\u5728\u5185\u5B58\u6CC4\u6F0F\uFF0C\u53EF\u4EE5\u591A\u6B21\u6267\u884C<code>memory</code>\u547D\u4EE4\u5E76\u89C2\u5BDF\u7279\u5B9A\u533A\u57DF\u7684\u5185\u5B58\u4F7F\u7528\u53D8\u5316\u3002\u5982\u679C\u53D1\u73B0\u67D0\u4E9B\u533A\u57DF\u7684\u5185\u5B58\u6301\u7EED\u589E\u957F\uFF0C\u8FD9\u4E9B\u533A\u57DF\u5F88\u53EF\u80FD\u662F\u5185\u5B58\u6CC4\u6F0F\u53D1\u751F\u7684\u6E90\u5934\u3002</p></li><li><p><strong>\u751F\u6210\u5806\u8F6C\u50A8\u6587\u4EF6</strong><br> \u4F7F\u7528<code>heapdump</code>\u547D\u4EE4\u751F\u6210\u5806\u7684\u5168\u91CF\u5185\u5B58\u4FE1\u606F\u6587\u4EF6\uFF0C\u4EE5\u4FBF\u8FDB\u884C\u66F4\u6DF1\u5165\u7684\u5206\u6790\u3002\u4F8B\u5982\uFF0C\u5C06\u5806\u8F6C\u50A8\u4FDD\u5B58\u5230\u6307\u5B9A\u8DEF\u5F84\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>heapdump /path/to/your/dump.hprof
|
|
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u7136\u540E\uFF0C\u53EF\u4EE5\u4F7F\u7528\u50CFEclipse Memory Analyzer (MAT)\u8FD9\u6837\u7684\u5DE5\u5177\u6253\u5F00<code>.hprof</code>\u6587\u4EF6\uFF0C\u5206\u6790\u54EA\u4E9B\u5BF9\u8C61\u5360\u636E\u4E86\u5927\u91CF\u5185\u5B58\uFF0C\u4EE5\u53CA\u5B83\u4EEC\u662F\u5982\u4F55\u88AB\u5F15\u7528\u7684\uFF0C\u4ECE\u800C\u5B9A\u4F4D\u5185\u5B58\u6CC4\u6F0F\u7684\u5177\u4F53\u539F\u56E0\u3002</p></li><li><p><strong>\u8C03\u6574\u4E0E\u4F18\u5316</strong><br> \u6839\u636E\u5206\u6790\u7ED3\u679C\uFF0C\u5BF9\u4EE3\u7801\u6216\u914D\u7F6E\u8FDB\u884C\u76F8\u5E94\u7684\u8C03\u6574\u4EE5\u89E3\u51B3\u5185\u5B58\u6CC4\u6F0F\u95EE\u9898\u3002\u5982\u679C\u5728\u542F\u52A8Arthas\u65F6\u9047\u5230\u5185\u5B58\u6EA2\u51FA\u9519\u8BEF\uFF0C\u9700\u8981\u8C03\u6574Arthas\u81EA\u8EAB\u7684\u5185\u5B58\u914D\u7F6E\uFF0C\u6BD4\u5982\u589E\u52A0\u542F\u52A8\u53C2\u6570<code>-Xms</code>\u548C<code>-Xmx</code>\u7684\u503C\u3002</p></li></ol><p><strong>\u89E3\u91CA</strong>\uFF1A</p><ul><li>\u4E0A\u8FF0\u6B65\u9AA4\u9996\u5148\u901A\u8FC7\u8FDE\u63A5\u76EE\u6807\u8FDB\u7A0B\u548C\u68C0\u67E5\u5185\u5B58\u6982\u89C8\u5FEB\u901F\u8BC6\u522B\u6F5C\u5728\u95EE\u9898\u3002</li><li>\u901A\u8FC7\u8FDE\u7EED\u76D1\u6D4B\u5185\u5B58\u4F7F\u7528\u60C5\u51B5\uFF0C\u80FD\u591F\u66F4\u51C6\u786E\u5730\u5B9A\u4F4D\u5185\u5B58\u6CC4\u6F0F\u7684\u4F4D\u7F6E\u3002</li><li>\u751F\u6210\u5806\u8F6C\u50A8\u6587\u4EF6\u5E76\u5229\u7528\u4E13\u4E1A\u5DE5\u5177\u5206\u6790\uFF0C\u662F\u6DF1\u5165\u7406\u89E3\u5185\u5B58\u4F7F\u7528\u7EC6\u8282\u548C\u5B9A\u4F4D\u5177\u4F53\u6CC4\u9732\u5BF9\u8C61\u7684\u5173\u952E\u6B65\u9AA4\u3002</li><li>\u6700\u540E\uFF0C\u6839\u636E\u5206\u6790\u7ED3\u679C\u91C7\u53D6\u63AA\u65BD\u89E3\u51B3\u95EE\u9898\uFF0C\u5E76\u6CE8\u610FArthas\u81EA\u8EAB\u8FD0\u884C\u65F6\u7684\u5185\u5B58\u9700\u6C42\uFF0C\u907F\u514D\u5176\u6210\u4E3A\u8BCA\u65AD\u8FC7\u7A0B\u4E2D\u7684\u969C\u788D\u3002</li></ul><p>\u4EE5\u4E0A\u6B65\u9AA4\u4F9D\u6258\u4E8E\u63D0\u4F9B\u7684\u77E5\u8BC6\u5185\u5BB9\uFF0C\u65E8\u5728\u5E2E\u52A9\u4F60\u6709\u6548\u5730\u4F7F\u7528Arthas\u6392\u67E5Java\u5E94\u7528\u7684\u5185\u5B58\u95EE\u9898\u3002</p>`,9),p=e("---------------"),m=o("h2",{id:"\u53C2\u8003\u94FE\u63A5",tabindex:"-1"},[o("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 \u6392\u67E5\u5185\u5B58\u6CC4\u9732\u7684\u65B9\u6CD5"),f=e("profiler"),g=e("\u4E13\u5BB6\u7ECF\u9A8C\uFF1Aarthas\u542F\u52A8\u65F6\u5185\u5B58\u6EA2\u51FA"),v=e("---------------"),x={id:"\u7B54\u7591\u670D\u52A1\u8BF4\u660E",tabindex:"-1"},y=o("a",{class:"header-anchor",href:"#\u7B54\u7591\u670D\u52A1\u8BF4\u660E","aria-hidden":"true"},"#",-1),k=e(),A=e("\u7B54\u7591\u670D\u52A1\u8BF4\u660E\uFF1A"),J=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"),F=e("\u4E13\u5BB6\u667A\u80FD\u7B54\u7591\u670D\u52A1"),V=e("\uFF0C\u5728"),E=e("\u9875\u9762\u7684\u53F3\u4E0B\u7684\u6D6E\u7A97\u201D\u4E13\u5BB6\u7B54\u7591\u201C"),I=e("\u3002\u60A8\u4E5F\u53EF\u4EE5\u8BBF\u95EE : "),B={href:"https://answer.opensource.alibaba.com/docs/intro",target:"_blank",rel:"noopener noreferrer"},L=e("\u5168\u5C40\u4E13\u5BB6\u7B54\u7591"),M=e(" \u3002 \u54A8\u8BE2\u5176\u4ED6\u4EA7\u54C1\u7684\u7684\u95EE\u9898"),N=o("h3",{id:"\u53CD\u9988",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u53CD\u9988","aria-hidden":"true"},"#"),e(" \u53CD\u9988")],-1),O=e("\u5982\u95EE\u7B54\u6709\u9519\u6F0F\uFF0C\u6B22\u8FCE\u70B9\uFF1A"),q={href:"https://ai.nacos.io/user/feedbackByEnhancerGradePOJOID?enhancerGradePOJOId=16063",target:"_blank",rel:"noopener noreferrer"},w=e("\u5DEE\u8BC4"),C=e("\u7ED9\u6211\u4EEC\u53CD\u9988\u3002");function D(G,P){const a=n("font"),r=n("RouterLink"),d=n("ExternalLinkIcon");return c(),l("div",null,[u,s(a,{color:"#949494"},{default:t(()=>[p]),_:1}),m,o("p",null,[s(r,{to:"/doc/expert/user-question-history12455.html"},{default:t(()=>[b]),_:1})]),o("p",null,[s(r,{to:"/doc/profiler.html"},{default:t(()=>[f]),_:1})]),o("p",null,[s(r,{to:"/doc/expert/user-question-history14832.html"},{default:t(()=>[g]),_:1})]),s(a,{color:"#949494"},{default:t(()=>[v]),_:1}),o("h2",x,[y,k,s(a,{color:"#FF0000"},{default:t(()=>[A]),_:1})]),o("p",null,[J,s(a,{color:"#FF0000"},{default:t(()=>[F]),_:1}),V,s(a,{color:"#FF0000"},{default:t(()=>[E]),_:1}),I,o("a",B,[L,s(d)]),M]),N,o("p",null,[O,o("a",q,[w,s(d)]),C])])}const T=i(_,[["render",D],["__file","user-question-history12715.html.vue"]]);export{T as default};
|