<!DOCTYPE html>
< html lang = "zh-CN" >
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width,initial-scale=1" >
< meta name = "generator" content = "VuePress 2.0.0-beta.51" >
< style >
:root {
--c-bg: #fff;
}
html.dark {
--c-bg: #22272e;
}
html, body {
background-color: var(--c-bg);
}
< / style >
< script >
const userMode = localStorage.getItem('vuepress-color-scheme');
const systemDarkMode = window.matchMedia & & window.matchMedia('(prefers-color-scheme: dark)').matches;
if (userMode === 'dark' || (userMode !== 'light' & & systemDarkMode)) {
document.documentElement.classList.toggle('dark', true);
}
< / script >
< 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诊断利器Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas" > < meta property = "og:image" content = "/images/arthas_mate_image.png" > < meta property = "og:description" content = "Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas" > < 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诊断利器Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas" > < 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诊断利器Arthas - alibaba/arthas: Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas" > < script >
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?d5c5e25b100f0eb51a4c35c8a86ea9b4";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
< / script > < 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 > < 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" > < / script > < title > heapdump | arthas< / title > < meta name = "description" content = "arthas 使用文档" >
< link rel = "modulepreload" href = "/assets/app.5e87b7e3.js" > < link rel = "modulepreload" href = "/assets/heapdump.html.c668b0c7.js" > < link rel = "modulepreload" href = "/assets/heapdump.html.2ddea4ab.js" > < link rel = "prefetch" href = "/assets/index.html.960bfdd3.js" > < link rel = "prefetch" href = "/assets/index.html.00e16dda.js" > < link rel = "prefetch" href = "/assets/index.html.5723c979.js" > < link rel = "prefetch" href = "/assets/advanced-use.html.e91c4971.js" > < link rel = "prefetch" href = "/assets/advice-class.html.2029f175.js" > < link rel = "prefetch" href = "/assets/agent.html.fa285ea6.js" > < link rel = "prefetch" href = "/assets/arthas-properties.html.16fa7682.js" > < link rel = "prefetch" href = "/assets/arthas3.html.1201931c.js" > < link rel = "prefetch" href = "/assets/async.html.c6fad914.js" > < link rel = "prefetch" href = "/assets/auth.html.c10c9f5e.js" > < link rel = "prefetch" href = "/assets/base64.html.a6a4a2ad.js" > < link rel = "prefetch" href = "/assets/batch-support.html.f57652c7.js" > < link rel = "prefetch" href = "/assets/cat.html.b3497770.js" > < link rel = "prefetch" href = "/assets/classloader.html.e98e7470.js" > < link rel = "prefetch" href = "/assets/cls.html.d76c79c3.js" > < link rel = "prefetch" href = "/assets/commands.html.27eec831.js" > < link rel = "prefetch" href = "/assets/contact-us.html.63bd2c0b.js" > < link rel = "prefetch" href = "/assets/dashboard.html.16d45267.js" > < link rel = "prefetch" href = "/assets/docker.html.720ade72.js" > < link rel = "prefetch" href = "/assets/download.html.789000ae.js" > < link rel = "prefetch" href = "/assets/dump.html.3699c6ed.js" > < link rel = "prefetch" href = "/assets/echo.html.4924a036.js" > < link rel = "prefetch" href = "/assets/faq.html.86a513d4.js" > < link rel = "prefetch" href = "/assets/getstatic.html.5fa1ed7e.js" > < link rel = "prefetch" href = "/assets/grep.html.c520ae3b.js" > < link rel = "prefetch" href = "/assets/groovy.html.8f04aa08.js" > < link rel = "prefetch" href = "/assets/help.html.34c42702.js" > < link rel = "prefetch" href = "/assets/history.html.f851697e.js" > < link rel = "prefetch" href = "/assets/http-api.html.1302a07d.js" > < link rel = "prefetch" href = "/assets/idea-plugin.html.6cbc05e6.js" > < link rel = "prefetch" href = "/assets/install-detail.html.845b09dc.js" > < link rel = "prefetch" href = "/assets/jad.html.f42b73a8.js" > < link rel = "prefetch" href = "/assets/jfr.html.050ed896.js" > < link rel = "prefetch" href = "/assets/jvm.html.8f4f1b8d.js" > < link rel = "prefetch" href = "/assets/keymap.html.3ca88526.js" > < link rel = "prefetch" href = "/assets/logger.html.c26ab313.js" > < link rel = "prefetch" href = "/assets/manual-install.html.768b3c2d.js" > < link rel = "prefetch" href = "/assets/mbean.html.196c866d.js" > < link rel = "prefetch" href = "/assets/mc.html.61492e8e.js" > < link rel = "prefetch" href = "/assets/memory.html.e334106f.js" > < link rel = "prefetch" href = "/assets/monitor.html.d612684e.js" > < link rel = "prefetch" href = "/assets/ognl.html.8f9c2331.js" > < link rel = "prefetch" href = "/assets/options.html.dfbba303.js" > < link rel = "prefetch" href = "/assets/perfcounter.html.cbbc3ab7.js" > < link rel = "prefetch" href = "/assets/profiler.html.9d3961e6.js" > < link rel = "prefetch" href = "/assets/pwd.html.5140d483.js" > < link rel = "prefetch" href = "/assets/quick-start.html.6ffb6846.js" > < link rel = "prefetch" href = "/assets/quit.html.707ec74c.js" > < link rel = "prefetch" href = "/assets/redefine.html.aa3d574d.js" > < link rel = "prefetch" href = "/assets/release-notes.html.b07de003.js" > < link rel = "prefetch" href = "/assets/reset.html.758b8323.js" > < link rel = "prefetch" href = "/assets/retransform.html.a7c1ed5f.js" > < link rel = "prefetch" href = "/assets/save-log.html.326b8ae5.js" > < link rel = "prefetch" href = "/assets/sc.html.488c7d5c.js" > < link rel = "prefetch" href = "/assets/session.html.80199657.js" > < link rel = "prefetch" href = "/assets/sm.html.b85e4b76.js" > < link rel = "prefetch" href = "/assets/spring-boot-starter.html.55dee76b.js" > < link rel = "prefetch" href = "/assets/stack.html.72e5fa11.js" > < link rel = "prefetch" href = "/assets/start-arthas.html.acb60428.js" > < link rel = "prefetch" href = "/assets/stop.html.82d50e6c.js" > < link rel = "prefetch" href = "/assets/sysenv.html.fb99f9f4.js" > < link rel = "prefetch" href = "/assets/sysprop.html.603daacf.js" > < link rel = "prefetch" href = "/assets/tee.html.30146805.js" > < link rel = "prefetch" href = "/assets/thread.html.3beec45a
< link rel = "stylesheet" href = "/assets/style.cf0d4c26.css" >
< / head >
< body >
< div id = "app" > <!-- [ --> < div class = "theme-container" > <!-- [ --> < header class = "navbar" > < div class = "toggle-sidebar-button" title = "切换侧边栏" aria-expanded = "false" role = "button" tabindex = "0" > < div class = "icon" aria-hidden = "true" > < span > < / span > < span > < / span > < span > < / span > < / div > < / div > < span > < a href = "/" class = "" data-v-a8869d06 > <!-- --> < span class = "site-name can-hide" data-v-a8869d06 > arthas< / span > < span class = "navbar-version" data-v-a8869d06 > v4.0.1< / span > < / a > < / span > < div class = "navbar-items-wrapper" style = "" > <!-- [ --> <!-- ] --> < nav class = "navbar-items can-hide" > <!-- [ --> < div class = "navbar-item" > < a href = "/" class = "" aria-label = "首页" > <!-- [ --> <!-- ] --> 首页 <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < a class = "external-link" href = "/doc/arthas-tutorials.html?language=cn&id=arthas-basics" rel = "noopener noreferrer" target = "_blank" aria-label = "在线教程" > <!-- [ --> <!-- ] --> < span > 在线教程< / span > < span > < 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" > < 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" > < / path > < 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" > < / polygon > < / svg > < span class = "external-link-icon-sr-only" > 在新窗口打开< / span > < / span > <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < a href = "/doc/" class = "router-link-active" aria-label = "文档" > <!-- [ --> <!-- ] --> 文档 <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < a href = "/doc/commands.md" class = "" aria-label = "命令列表" > <!-- [ --> <!-- ] --> 命令列表 <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < a href = "/doc/download.md" class = "" aria-label = "下载" > <!-- [ --> <!-- ] --> 下载 <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < a href = "/doc/expert/intro.md" class = "" aria-label = "专家答疑" > <!-- [ --> <!-- ] --> 专家答疑 <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < div class = "navbar-dropdown-wrapper" > < button class = "navbar-dropdown-title" type = "button" aria-label = "版本" > < span class = "title" > 版本< / span > < span class = "arrow down" > < / span > < / button > < button class = "navbar-dropdown-title-mobile" type = "button" aria-label = "版本" > < span class = "title" > 版本< / span > < span class = "right arrow" > < / span > < / button > < ul style = "display:none;" class = "navbar-dropdown" > <!-- [ --> < li class = "navbar-dropdown-item" > < a class = "external-link" href = "https://arthas.aliyun.com/3.x/" rel = "noopener noreferrer" target = "_blank" aria-label = "v3.x" > <!-- [ --> <!-- ] --> < span > v3.x< / span > < span > < 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" > < 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" > < / path > < 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" > < / polygon > < / svg > < span class = "external-link-icon-sr-only" > 在新窗口打开< / span > < / span > <!-- [ --> <!-- ] --> < / a > < / li > <!-- ] --> < / ul > < / div > < / div > < div class = "navbar-item" > < div class = "navbar-dropdown-wrapper" > < button class = "navbar-dropdown-title" type = "button" aria-label = "Select language" > < svg 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" > < 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 . 7
Dumping heap to arthas-output/dump.hprof < span class = "token punctuation" > ..< / span > .
Heap dump < span class = "token function" > file< / span > created
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < / div > < / div > < div class = "custom-container tip" > < p class = "custom-container-title" > 提示< / p > < p > 生成文件在< code > arthas-output< / code > 目录,可以通过浏览器下载: http://localhost:8563/arthas-output/< / p > < / div > < h3 id = "只-dump-live-对象" tabindex = "-1" > < a class = "header-anchor" href = "#只-dump-live-对象" aria-hidden = "true" > #< / a > 只 dump live 对象< / h3 > < div class = "language-bash ext-sh line-numbers-mode" > < pre class = "language-bash" > < code > < span class = "token punctuation" > [< / span > arthas@58205< span class = "token punctuation" > ]< / span > $ heapdump < span class = "token parameter variable" > --live< / span > /tmp/dump.hprof
Dumping heap to /tmp/dump.hprof < span class = "token punctuation" > ..< / span > .
Heap dump < span class = "token function" > file< / span > created
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < / div > < / div > < h2 id = "dump-到临时文件" tabindex = "-1" > < a class = "header-anchor" href = "#dump-到临时文件" aria-hidden = "true" > #< / a > dump 到临时文件< / h2 > < div class = "language-bash ext-sh line-numbers-mode" > < pre class = "language-bash" > < code > < span class = "token punctuation" > [< / span > arthas@58205< span class = "token punctuation" > ]< / span > $ heapdump
Dumping heap to /var/folders/my/wy7c9w9j5732xbkcyt1mb4g40000gp/T/heapdump2019-09-03-16-385121018449645518991.hprof< span class = "token punctuation" > ..< / span > .
Heap dump < span class = "token function" > file< / span > created
< / code > < / pre > < div class = "line-numbers" aria-hidden = "true" > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < / div > < / div > < / div > <!-- [ --> <!-- ] --> < / div > < footer class = "page-meta right-menu-padding" data-v-fdd717e0 > < div class = "meta-item edit-link" > < a class = "external-link meta-item-label" href = "https://github.com/alibaba/arthas/edit/master/site/docs/doc/heapdump.md" rel = "noopener noreferrer" target = "_blank" aria-label = "在 GitHub 上编辑此页" > <!-- [ --> <!-- ] --> < span > 在 GitHub 上编辑此页< / span > < span > < 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" > < 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" > < / path > < 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" > < / polygon > < / svg > < span class = "external-link-icon-sr-only" > 在新窗口打开< / span > < / span > <!-- [ --> <!-- ] --> < / a > < / div > < div class = "meta-item last-updated" > < span class = "meta-item-label" > Last Updated: < / span > <!-- --> < / div > < div class = "meta-item contributors" > < span class = "meta-item-label" > 贡献者: < / span > < span class = "meta-item-info" > <!-- [ --> <!-- [ --> < span class = "contributor" title = "email: hengyunabc@gmail.com" > hengyunabc< / span > <!-- [ --> , <!-- ] --> <!-- ] --> <!-- [ --> < span class = "contributor" title = "email: i@fatpandac.com" > Fatpandac< / span > <!-- [ --> , <!-- ] --> <!-- ] --> <!-- [ --> < span class = "contributor" title = "email: caojinsheng123@gmail.com" > cao< / span > <!-- [ --> , <!-- ] --> <!-- ] --> <!-- [ --> < span class = "contributor" title = "email: hengyunabc@users.noreply.github.com" > hengyunabc< / span > <!-- [ --> , <!-- ] --> <!-- ] --> <!-- [ --> < span class = "contributor" title = "email: hollowman186@vip.qq.com" > Hollow Man< / span > <!-- --> <!-- ] --> <!-- ] --> < / span > < / div > < / footer > < nav class = "page-nav right-menu-padding" data-v-fdd717e0 > < p class = "inner" > < span class = "prev" > < a href = "/doc/grep.html" class = "" aria-label = "grep" > <!-- [ --> <!-- ] --> grep <!-- [ --> <!-- ] --> < / a > < / span > < span class = "next" > < a href = "/doc/help.html" class = "" aria-label = "help" > <!-- [ --> <!-- ] --> help <!-- [ --> <!-- ] --> < / a > < / span > < / p > < / nav > <!-- [ --> <!-- ] --> < / main > <!-- ] --> < / div > <!-- --> <!-- ] --> < / div >
< script type = "module" src = "/assets/app.5e87b7e3.js" defer > < / script >
< / body >
< / html >