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.
arthas/assets/user-question-history13510....

3 lines
7.6 KiB
JavaScript

import{_ as d,o as i,c,b as t,w as r,a as o,d as h,e,r as n}from"./app.977e81c1.js";const l={},_=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>\u67E5\u770B\u5B9E\u65F6jvm\u5185\u5B58\u5927\u5C0F</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\u770B\u5B9E\u65F6JVM\u5185\u5B58\u5927\u5C0F\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\u8FDB\u5165Arthas\u542F\u52A8\u754C\u9762\uFF0C\u4F7F\u7528<code>attach</code>\u547D\u4EE4\u8FDE\u63A5\u5230\u4F60\u60F3\u8981\u76D1\u63A7\u7684Java\u8FDB\u7A0B\u3002\u4F8B\u5982\uFF0C\u5982\u679C\u76EE\u6807\u8FDB\u7A0B\u7684ID\u4E3A12345\uFF0C\u547D\u4EE4\u5C06\u4F1A\u662F\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>arthas 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>\u67E5\u8BE2JVM\u5185\u5B58\u72B6\u6001</strong><br> \u8FDB\u5165Arthas\u4EA4\u4E92\u754C\u9762\u540E\uFF0C\u8F93\u5165<code>memory</code>\u547D\u4EE4\u6765\u67E5\u770B\u5F53\u524DJVM\u7684\u5185\u5B58\u4F7F\u7528\u60C5\u51B5\u3002\u8FD9\u5C06\u63D0\u4F9B\u5173\u4E8E\u5806\u5185\u5B58\u3001\u975E\u5806\u5185\u5B58\u4EE5\u53CA\u5404\u4E2A\u7279\u5B9A\u533A\u57DF\uFF08\u5982Eden\u533A\u3001Old\u533A\u3001Survivor\u533A\u7B49\uFF09\u7684\u8BE6\u7EC6\u4F7F\u7528\u7EDF\u8BA1\u4FE1\u606F\u3002\u793A\u4F8B\u8F93\u51FA\u5982\u77E5\u8BC6\u4E2D\u6240\u793A\uFF0C\u5305\u542B\u4E86\u5404\u5185\u5B58\u533A\u57DF\u7684\u4F7F\u7528\u91CF\u3001\u603B\u91CF\u3001\u6700\u5927\u503C\u4EE5\u53CA\u4F7F\u7528\u7387\u3002</p></li><li><p><strong>\u5206\u6790\u5185\u5B58\u6CC4\u6F0F\u8FF9\u8C61</strong><br> \u89C2\u5BDF<code>memory</code>\u547D\u4EE4\u7684\u8F93\u51FA\u7ED3\u679C\uFF0C\u6CE8\u610F\u662F\u5426\u6709\u67D0\u4E2A\u6216\u67D0\u4E9B\u5185\u5B58\u533A\u57DF\u7684\u4F7F\u7528\u91CF\u6301\u7EED\u589E\u957F\u800C\u6CA1\u6709\u51CF\u5C11\uFF0C\u8FD9\u53EF\u80FD\u662F\u5185\u5B58\u6CC4\u6F0F\u7684\u8FF9\u8C61\u3002\u7279\u522B\u662F\u5806\u5185\u5B58\u4E2D\u7684\u8001\u5E74\u4EE3(g1_old_gen)\u82E5\u4E0D\u65AD\u589E\u957F\uFF0C\u5E94\u5F15\u8D77\u7279\u522B\u5173\u6CE8\u3002</p></li><li><p><strong>\u5B9A\u671F\u68C0\u67E5\u5185\u5B58\u53D8\u5316</strong><br> \u4E3A\u4E86\u786E\u5B9A\u662F\u5426\u786E\u5B9E\u5B58\u5728\u5185\u5B58\u6CC4\u6F0F\uFF0C\u9700\u8981\u5B9A\u671F\u91CD\u590D\u6267\u884C<code>memory</code>\u547D\u4EE4\uFF0C\u6BD4\u5982\u6BCF\u9694\u4E00\u6BB5\u65F6\u95F4\u6216\u8005\u5728\u5E94\u7528\u6267\u884C\u5173\u952E\u64CD\u4F5C\u524D\u540E\u6267\u884C\uFF0C\u8BB0\u5F55\u4E0B\u5404\u5185\u5B58\u533A\u57DF\u7684\u4F7F\u7528\u60C5\u51B5\u3002\u901A\u8FC7\u5BF9\u6BD4\u8FD9\u4E9B\u6570\u636E\uFF0C\u53EF\u4EE5\u66F4\u6E05\u6670\u5730\u8BC6\u522B\u5185\u5B58\u6CC4\u6F0F\u7684\u8D8B\u52BF\u3002</p></li><li><p><strong>\u6DF1\u5165\u5206\u6790</strong><br> \u5982\u679C\u6000\u7591\u5B58\u5728\u5185\u5B58\u6CC4\u6F0F\uFF0C\u53EF\u4EE5\u8FDB\u4E00\u6B65\u4F7F\u7528<code>heapdump</code>\u547D\u4EE4\u751F\u6210\u5806\u5185\u5B58\u5FEB\u7167\uFF0C\u7136\u540E\u5229\u7528\u8BF8\u5982Eclipse Memory Analyzer (MAT)\u7B49\u5DE5\u5177\u8FDB\u884C\u79BB\u7EBF\u5206\u6790\uFF0C\u4EE5\u5B9A\u4F4D\u5177\u4F53\u6CC4\u6F0F\u7684\u5BF9\u8C61\u53CA\u5176\u5F15\u7528\u94FE\u8DEF\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><strong>\u7B2C\u4E00\u6B65</strong>\u662F\u4E3A\u4E86\u5EFA\u7ACB\u4E0E\u76EE\u6807Java\u8FDB\u7A0B\u7684\u8FDE\u63A5\uFF0C\u4EE5\u4FBF\u4E8E\u76D1\u63A7\u5176\u8FD0\u884C\u65F6\u72B6\u6001\u3002</li><li><strong>\u7B2C\u4E8C\u6B65</strong>\u76F4\u63A5\u5C55\u793A\u4E86JVM\u7684\u5185\u5B58\u5206\u914D\u548C\u4F7F\u7528\u60C5\u51B5\uFF0C\u5E2E\u52A9\u5FEB\u901F\u8BC6\u522B\u5185\u5B58\u4F7F\u7528\u6982\u51B5\u3002</li><li><strong>\u7B2C\u4E09\u6B65</strong>\u548C<strong>\u7B2C\u56DB\u6B65</strong>\u662F\u57FA\u4E8E\u52A8\u6001\u76D1\u6D4B\u7684\u7406\u5FF5\uFF0C\u901A\u8FC7\u5BF9\u6BD4\u4E0D\u540C\u65F6\u95F4\u70B9\u7684\u5185\u5B58\u72B6\u6001\uFF0C\u6709\u6548\u8BC6\u522B\u5185\u5B58\u6CC4\u6F0F\u7684\u6A21\u5F0F\u3002</li><li><strong>\u7B2C\u4E94\u6B65</strong>\u662F\u6DF1\u5EA6\u8BCA\u65AD\u6B65\u9AA4\uFF0C\u5F53\u521D\u6B65\u5206\u6790\u53D1\u73B0\u5185\u5B58\u6CC4\u6F0F\u5ACC\u7591\u65F6\uFF0C\u91C7\u7528\u5806\u5185\u5B58\u5FEB\u7167\u5E76\u501F\u52A9\u4E13\u4E1A\u5DE5\u5177\u8FDB\u884C\u7EC6\u81F4\u5206\u6790\uFF0C\u662F\u5B9A\u4F4D\u95EE\u9898\u6839\u6E90\u7684\u5173\u952E\u624B\u6BB5\u3002</li></ul><p>\u4EE5\u4E0A\u6B65\u9AA4\u7ED3\u5408\u4E86Arthas\u7684\u5F3A\u5927\u529F\u80FD\uFF0C\u80FD\u591F\u6709\u6548\u5730\u5E2E\u52A9\u6392\u67E5\u548C\u89E3\u51B3JVM\u5185\u5B58\u76F8\u5173\u95EE\u9898\uFF0C\u5305\u62EC\u4F46\u4E0D\u9650\u4E8E\u5185\u5B58\u6CC4\u6F0F\u3002</p>`,9),p=e("---------------"),u=o("h2",