<!DOCTYPE html>
< html lang = "en-US" >
< 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=" > < 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 > Advanced Usage | arthas< / title > < meta name = "description" content = "arthas user document" >
< link rel = "modulepreload" href = "/assets/app.a799ec6e.js" > < link rel = "modulepreload" href = "/assets/advanced-use.html.5ef1b804.js" > < link rel = "modulepreload" href = "/assets/advanced-use.html.051ef43d.js" > < link rel = "prefetch" href = "/assets/index.html.fc6fe773.js" > < link rel = "prefetch" href = "/assets/index.html.303ae9ec.js" > < link rel = "prefetch" href = "/assets/index.html.ad417e2a.js" > < link rel = "prefetch" href = "/assets/advanced-use.html.11577830.js" > < link rel = "prefetch" href = "/assets/advice-class.html.30be8b5c.js" > < link rel = "prefetch" href = "/assets/agent.html.478e63bb.js" > < link rel = "prefetch" href = "/assets/arthas-properties.html.e3240fdd.js" > < link rel = "prefetch" href = "/assets/arthas3.html.76d57c12.js" > < link rel = "prefetch" href = "/assets/async.html.45f0f3b0.js" > < link rel = "prefetch" href = "/assets/auth.html.f3cff3ae.js" > < link rel = "prefetch" href = "/assets/base64.html.4ec57369.js" > < link rel = "prefetch" href = "/assets/batch-support.html.b4aede0e.js" > < link rel = "prefetch" href = "/assets/cat.html.8fd88644.js" > < link rel = "prefetch" href = "/assets/classloader.html.7186247e.js" > < link rel = "prefetch" href = "/assets/cls.html.3d057407.js" > < link rel = "prefetch" href = "/assets/commands.html.693fbebe.js" > < link rel = "prefetch" href = "/assets/contact-us.html.20195493.js" > < link rel = "prefetch" href = "/assets/dashboard.html.209e0bb6.js" > < link rel = "prefetch" href = "/assets/docker.html.a0eb05f5.js" > < link rel = "prefetch" href = "/assets/download.html.2deec3fd.js" > < link rel = "prefetch" href = "/assets/dump.html.50ddfd6c.js" > < link rel = "prefetch" href = "/assets/echo.html.a1f5ce8f.js" > < link rel = "prefetch" href = "/assets/faq.html.3fd76b41.js" > < link rel = "prefetch" href = "/assets/getstatic.html.27112680.js" > < link rel = "prefetch" href = "/assets/grep.html.dacb4fa0.js" > < link rel = "prefetch" href = "/assets/groovy.html.f09fc852.js" > < link rel = "prefetch" href = "/assets/heapdump.html.9a327e6e.js" > < link rel = "prefetch" href = "/assets/help.html.e5e91b23.js" > < link rel = "prefetch" href = "/assets/history.html.c2319956.js" > < link rel = "prefetch" href = "/assets/http-api.html.340272fb.js" > < link rel = "prefetch" href = "/assets/idea-plugin.html.fa691dc4.js" > < link rel = "prefetch" href = "/assets/install-detail.html.3ad5b48c.js" > < link rel = "prefetch" href = "/assets/jad.html.b439ea1a.js" > < link rel = "prefetch" href = "/assets/jfr.html.a3b2ba6e.js" > < link rel = "prefetch" href = "/assets/jvm.html.cf096739.js" > < link rel = "prefetch" href = "/assets/keymap.html.a01789a5.js" > < link rel = "prefetch" href = "/assets/logger.html.d03a8f0c.js" > < link rel = "prefetch" href = "/assets/manual-install.html.9f2269f2.js" > < link rel = "prefetch" href = "/assets/mbean.html.6c96833e.js" > < link rel = "prefetch" href = "/assets/mc.html.255cc69c.js" > < link rel = "prefetch" href = "/assets/memory.html.e3662077.js" > < link rel = "prefetch" href = "/assets/monitor.html.bbbe19cc.js" > < link rel = "prefetch" href = "/assets/ognl.html.3a3047a0.js" > < link rel = "prefetch" href = "/assets/options.html.cd16814d.js" > < link rel = "prefetch" href = "/assets/perfcounter.html.0a700f02.js" > < link rel = "prefetch" href = "/assets/profiler.html.936fa1a4.js" > < link rel = "prefetch" href = "/assets/pwd.html.ba33c545.js" > < link rel = "prefetch" href = "/assets/quick-start.html.198ba0e7.js" > < link rel = "prefetch" href = "/assets/quit.html.7ac530c1.js" > < link rel = "prefetch" href = "/assets/redefine.html.ffb1192e.js" > < link rel = "prefetch" href = "/assets/release-notes.html.1d8a3dd4.js" > < link rel = "prefetch" href = "/assets/reset.html.a5e22012.js" > < link rel = "prefetch" href = "/assets/retransform.html.c64149ae.js" > < link rel = "prefetch" href = "/assets/save-log.html.2afe45b4.js" > < link rel = "prefetch" href = "/assets/sc.html.247dcf9f.js" > < link rel = "prefetch" href = "/assets/session.html.c7900924.js" > < link rel = "prefetch" href = "/assets/sm.html.41f4be43.js" > < link rel = "prefetch" href = "/assets/spring-boot-starter.html.55ed5500.js" > < link rel = "prefetch" href = "/assets/stack.html.4879f051.js" > < link rel = "prefetch" href = "/assets/start-arthas.html.f76a5b27.js" > < link rel = "prefetch" href = "/assets/stop.html.b66bc06b.js" > < link rel = "prefetch" href = "/assets/sysenv.html.cdb5ad58.js" > < link rel = "prefetch" href = "/assets/sysprop.html.cf8f14e1.js" > < link rel = "prefetch" href = "/assets/tee.htm
< link rel = "stylesheet" href = "/assets/style.da1934a3.css" >
< / head >
< body >
< div id = "app" > <!-- [ --> < div class = "theme-container" > <!-- [ --> < header class = "navbar" > < div class = "toggle-sidebar-button" title = "toggle sidebar" aria-expanded = "false" role = "button" tabindex = "0" > < div class = "icon" aria-hidden = "true" > < span > < / span > < span > < / span > < span > < / span > < / div > < / div > < span > < a href = "/en/" class = "" data-v-61144abc > <!-- --> < span class = "site-name can-hide" data-v-61144abc > arthas< / span > < span class = "navbar-version" data-v-61144abc > v3.6.5< / span > < / a > < / span > < div class = "navbar-items-wrapper" style = "" > <!-- [ --> <!-- ] --> < nav class = "navbar-items can-hide" > <!-- [ --> < div class = "navbar-item" > < a href = "/en/" class = "" aria-label = "HOME" > <!-- [ --> <!-- ] --> HOME <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < a class = "external-link" href = "/doc/arthas-tutorials.html?language=en&id=arthas-basics" rel = "noopener noreferrer" target = "_blank" aria-label = "ONLINE TUTORIALS" > <!-- [ --> <!-- ] --> < span > ONLINE TUTORIALS< / 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" > open in new window< / span > < / span > <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < a href = "/en/doc" class = "router-link-active" aria-label = "DOCS" > <!-- [ --> <!-- ] --> DOCS <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < a href = "/en/doc/commands.md" class = "" aria-label = "COMMANDS" > <!-- [ --> <!-- ] --> COMMANDS <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < a href = "/en/doc/download.md" class = "" aria-label = "DOWNLOAD" > <!-- [ --> <!-- ] --> DOWNLOAD <!-- [ --> <!-- ] --> < / a > < / div > < div class = "navbar-item" > < div class = "navbar-dropdown-wrapper" > < button class = "navbar-dropdown-title" type = "button" aria-label = "SOLUTIONS" > < span class = "title" > SOLUTIONS< / span > < span class = "arrow down" > < / span > < / button > < button class = "navbar-dropdown-title-mobile" type = "button" aria-label = "SOLUTIONS" > < span class = "title" > SOLUTIONS< / 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://cn.aliyun.com/product/aliware/mse?spm=arthas.topbar.0.0.0" rel = "noopener noreferrer" target = "_blank" aria-label = "Microservice solutions" > <!-- [ --> <!-- ] --> < span > Microservice solutions< / 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" > open in new window< / span > < / span > <!-- [ --> <!-- ] --> < / a > < / li > < li class = "navbar-dropdown-item" > < a class = "external-link" href = "https://www.aliyun.com/aliware/txc?spm=arthas.topbar.0.0.0" rel = "noopener noreferrer" target = "_blank" aria-label = "Distributed transaction solutions" > <!-- [ --> <!-- ] --> < span > Distributed transaction solutions< / 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" > open in new window< / span > < / span > <!-- [ --> <!-- ] --> < / a > < / li > < li class = "navbar-dropdown-item" > < a class = "external-link" href = "https://www.aliyun.com/product/aha
< span class = "token number" > 58883< / span > math-game.jar
< span class = "token number" > 58884< / span > Jps
< / 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 > < p > The < code > select< / code > option allows you to specify a process name, which is very convenient.< / p > < div class = "language-bash ext-sh line-numbers-mode" > < pre class = "language-bash" > < code > $ ./as.sh < span class = "token parameter variable" > --select< / span > math-game
Arthas script version: < span class = "token number" > 3.3< / span > .6
< span class = "token punctuation" > [< / span > INFO< span class = "token punctuation" > ]< / span > JAVA_HOME: /tmp/java/8.0.222-zulu
Arthas home: /Users/admin/.arthas/lib/3.3.6/arthas
Calculating attach execution time< span class = "token punctuation" > ..< / span > .
Attaching to < span class = "token number" > 59161< / span > using version /Users/admin/.arthas/lib/3.3.6/arthas< span class = "token punctuation" > ..< / span > .
real 0m0.572s
user 0m0.281s
sys 0m0.039s
Attach success.
telnet connecting to arthas server< span class = "token punctuation" > ..< / span > . current timestamp is < span class = "token number" > 1594280799< / span >
Trying < span class = "token number" > 127.0< / span > .0.1< span class = "token punctuation" > ..< / span > .
Connected to localhost.
Escape character is < span class = "token string" > ' ^]' < / span > < span class = "token builtin class-name" > .< / span >
,---. ,------. ,--------.,--. ,--. ,---. ,---.
/ O < span class = "token punctuation" > \< / span > < span class = "token operator" > |< / span > .--. < span class = "token string" > ' ' < / span > --. .--< span class = "token string" > ' | ' < / span > --< span class = "token string" > ' | / O \ ' < / span > .-< span class = "token string" > '
| .-. || ' < / span > --< span class = "token string" > ' .' < / span > < span class = "token operator" > |< / span > < span class = "token operator" > |< / span > < span class = "token operator" > |< / span > .--. < span class = "token operator" > ||< / span > .-. < span class = "token operator" > |< / span > < span class = "token variable" > < span class = "token variable" > `< / span > < span class = "token builtin class-name" > .< / span > < span class = "token variable" > `< / span > < / span > -.
< span class = "token operator" > |< / span > < span class = "token operator" > |< / span > < span class = "token operator" > |< / span > < span class = "token operator" > ||< / span > < span class = "token operator" > |< / span > < span class = "token punctuation" > \< / span > < span class = "token punctuation" > \< / span > < span class = "token operator" > |< / span > < span class = "token operator" > |< / span > < span class = "token operator" > |< / span > < span class = "token operator" > |< / span > < span class = "token operator" > |< / span > < span class = "token operator" > ||< / span > < span class = "token operator" > |< / span > < span class = "token operator" > |< / span > < span class = "token operator" > |< / span > .-< span class = "token string" > ' |
`--' < / span > < span class = "token variable" > < span class = "token variable" > `< / span > --' < span class = "token variable" > `< / span > < / span > --< span class = "token string" > ' ' < / span > --< span class = "token string" > ' `--' < / span > < span class = "token variable" > < span class = "token variable" > `< / span > --' < span class = "token variable" > `< / span > < / span > --< span class = "token string" > ' `--' < / span > < span class = "token variable" > < span class = "token variable" > `< / span > --' < span class = "token variable" > `< / span > < / span > -----'
wiki https://arthas.aliyun.com/doc
tutorials https://arthas.aliyun.com/doc/arthas-tutorials.html
version < span class = "token number" > 3.3< / span > .6
pid < span class = "token number" > 58883< / span >
< / 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 class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < div class = "line-number" > < / div > < / div > < / div > < h2 id = "user-data-report" tabindex = "-1" > < a class = "header-anchor" href = "#user-data-report" aria-hidden = "true" > #< / a > User data report< / h2 > < p > After the < code > 3.1.4< / code > version, arthas support user data report.< / p > < p > At startup, use the < code > stat-url< / code > option, such as: < code > ./as.sh --stat-url ' http://192.168.10.11:8080/api/stat' < / code > < / p > < p > There is a sample data report in the tunnel server that users can implement on their own.< / p > < p > < a 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" > StatController.java< 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" > open in new window< / span > < / span > < / a > < / p > < h2 id = "other-features" tabindex = "-1" > < a class = "header-anchor" href = "#other-features" aria-hidden = "true" > #< / a > Other features< / h2 > < ul > < li > < a href = "/en/doc/async.html" class = "" > Async support< / a > < / li > < li > < a href = "/en/doc/logger.html" class = "" > log the output< / a > < / li > < li > < a href = "/en/doc/batch-support.html" class = "" > batch< / a > < / li > < li > < a href = "https://github.com/alibaba/arthas/issues/11" target = "_blank" rel = "noopener noreferrer" > how to use ognl< 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" > open in new window< / span > < / span > < / a > < / li > < / ul > < / 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/en/doc/advanced-use.md" rel = "noopener noreferrer" target = "_blank" aria-label = "Edit this page on GitHub" > <!-- [ --> <!-- ] --> < span > Edit this page on 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" > open in new window< / span > < / span > <!-- [ --> <!-- ] --> < / a > < / div > < div class = "meta-item last-updated" > < span class = "meta-item-l
< script type = "module" src = "/assets/app.a799ec6e.js" defer > < / script >
< / body >
< / html >