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/en/doc/http-api.html

385 lines
133 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!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=&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>Http API | arthas</title><meta name="description" content="arthas user document">
<link rel="modulepreload" href="/assets/app.5024572d.js"><link rel="modulepreload" href="/assets/http-api.html.9ba1dee0.js"><link rel="modulepreload" href="/assets/arthas-web-ui.89f4fc6d.js"><link rel="modulepreload" href="/assets/http-api.html.08106e49.js"><link rel="prefetch" href="/assets/index.html.0310d6b7.js"><link rel="prefetch" href="/assets/index.html.26b36e14.js"><link rel="prefetch" href="/assets/index.html.f81666f3.js"><link rel="prefetch" href="/assets/advanced-use.html.d19ed71d.js"><link rel="prefetch" href="/assets/advice-class.html.1d3efc8d.js"><link rel="prefetch" href="/assets/agent.html.03c76533.js"><link rel="prefetch" href="/assets/arthas-properties.html.0a68e303.js"><link rel="prefetch" href="/assets/arthas3.html.e9ff98d3.js"><link rel="prefetch" href="/assets/async.html.2d7e17b7.js"><link rel="prefetch" href="/assets/auth.html.e6d4b91c.js"><link rel="prefetch" href="/assets/base64.html.867d2b97.js"><link rel="prefetch" href="/assets/batch-support.html.520a314a.js"><link rel="prefetch" href="/assets/cat.html.0e3f9bec.js"><link rel="prefetch" href="/assets/classloader.html.abb8c597.js"><link rel="prefetch" href="/assets/cls.html.67a6c0fd.js"><link rel="prefetch" href="/assets/commands.html.03ccce33.js"><link rel="prefetch" href="/assets/contact-us.html.fca90e78.js"><link rel="prefetch" href="/assets/dashboard.html.a1edecce.js"><link rel="prefetch" href="/assets/docker.html.71dad61b.js"><link rel="prefetch" href="/assets/download.html.d73305eb.js"><link rel="prefetch" href="/assets/dump.html.c3686557.js"><link rel="prefetch" href="/assets/echo.html.47b2931c.js"><link rel="prefetch" href="/assets/faq.html.6193ecbd.js"><link rel="prefetch" href="/assets/getstatic.html.90b40e46.js"><link rel="prefetch" href="/assets/grep.html.36066f19.js"><link rel="prefetch" href="/assets/groovy.html.041e64fb.js"><link rel="prefetch" href="/assets/heapdump.html.5f1f0a0f.js"><link rel="prefetch" href="/assets/help.html.cc8081c7.js"><link rel="prefetch" href="/assets/history.html.799a682b.js"><link rel="prefetch" href="/assets/http-api.html.6176e7ac.js"><link rel="prefetch" href="/assets/idea-plugin.html.a7268a5f.js"><link rel="prefetch" href="/assets/install-detail.html.8e837092.js"><link rel="prefetch" href="/assets/jad.html.2f34aa50.js"><link rel="prefetch" href="/assets/jfr.html.9b233b9d.js"><link rel="prefetch" href="/assets/jvm.html.66acd429.js"><link rel="prefetch" href="/assets/keymap.html.7cd121a8.js"><link rel="prefetch" href="/assets/logger.html.2598a2ad.js"><link rel="prefetch" href="/assets/manual-install.html.b48552bf.js"><link rel="prefetch" href="/assets/mbean.html.865d8303.js"><link rel="prefetch" href="/assets/mc.html.417d96c3.js"><link rel="prefetch" href="/assets/memory.html.bb61b4be.js"><link rel="prefetch" href="/assets/monitor.html.8168838f.js"><link rel="prefetch" href="/assets/ognl.html.5a4b1f35.js"><link rel="prefetch" href="/assets/options.html.4862477c.js"><link rel="prefetch" href="/assets/perfcounter.html.96e8509c.js"><link rel="prefetch" href="/assets/profiler.html.3785275e.js"><link rel="prefetch" href="/assets/pwd.html.9d18ed39.js"><link rel="prefetch" href="/assets/quick-start.html.faa996a0.js"><link rel="prefetch" href="/assets/quit.html.99d279b0.js"><link rel="prefetch" href="/assets/redefine.html.c75cc086.js"><link rel="prefetch" href="/assets/release-notes.html.3c31db7c.js"><link rel="prefetch" href="/assets/reset.html.5a9cddf1.js"><link rel="prefetch" href="/assets/retransform.html.ce38448b.js"><link rel="prefetch" href="/assets/save-log.html.037bac18.js"><link rel="prefetch" href="/assets/sc.html.556dbf54.js"><link rel="prefetch" href="/assets/session.html.3205414e.js"><link rel="prefetch" href="/assets/sm.html.87672a15.js"><link rel="prefetch" href="/assets/spring-boot-starter.html.e00635b2.js"><link rel="prefetch" href="/assets/stack.html.82c27723.js"><link rel="prefetch" href="/assets/start-arthas.html.8895ebb1.js"><link rel="prefetch" href="/assets/stop.html.37513358.js"><link rel="prefetch" href="/assets/sysenv.html.fae02d4a.js"><link rel="prefetch" href="/assets/sysprop.html.0c2447a7.js"><link rel="prefetch" href="/assets/tee.html.65a6dcbf.js"><link rel="prefetch" href="/assets/thread.html.7d4f783c.js"><link rel="prefetch" href="/assets/trace.html.7fc97a55.js"><link rel="prefetch" href="/assets/tt.html.2f8ba6a9.js"><link rel="prefetch" href="/assets/tunnel.html.f6c95c19.js"><link rel="prefetch" href="/assets/version.html.65d1d217.js"><link rel="prefetch" href="/assets/vmoption.html.4a4452fc.js"><link rel="prefetch" href="/assets/vmtool.html.785e15b0.js"><link rel="prefetch" href="/assets/watch.html.8ab01f20.js"><link rel="prefetch" href="/assets/web-console.html.ee889bc8.js"><link rel="prefetch" href="/assets/index.html.4473f26b.js"><link rel="prefetch" href="/assets/advanced-use.html.1a28f6a5.js"><link rel="prefetch" href="/assets/advice-class.html.d8ad50b3.js"><link rel="prefetch" href="/assets/agent.html.7961745e.js"><link rel="prefetch" href="/assets/arthas-properties.html.8021fe71.js"><link rel="prefetch" href="/assets/async.html.cee6c639.js"><link rel="prefetch" href="/assets/auth.html.d9567203.js"><link rel="prefetch" href="/assets/base64.html.f23d1c1a.js"><link rel="prefetch" href="/assets/batch-support.html.316cd7e8.js"><link rel="prefetch" href="/assets/cat.html.4335c5dc.js"><link rel="prefetch" href="/assets/classloader.html.bf7956ab.js"><link rel="prefetch" href="/assets/cls.html.97d2b84f.js"><link rel="prefetch" href="/assets/commands.html.15628afe.js"><link rel="prefetch" href="/assets/contact-us.html.903f2e33.js"><link rel="prefetch" href="/assets/dashboard.html.bcc51fa6.js"><link rel="prefetch" href="/assets/docker.html.6569bd54.js"><link rel="prefetch" href="/assets/download.html.c6ec554d.js"><link rel="prefetch" href="/assets/dump.html.ceb6ce3f.js"><link rel="prefetch" href="/assets/echo.html.78d074ba.js"><link rel="prefetch" href="/assets/faq.html.ae91bbb1.js"><link rel="prefetch" href="/assets/getstatic.html.238af461.js"><link rel="prefetch" href="/assets/grep.html.765b9db4.js"><link rel="prefetch" href="/assets/groovy.html.07ba29d4.js"><link rel="prefetch" href="/assets/heapdump.html.45aa4058.js"><link rel="prefetch" href="/assets/help.html.6b5e680d.js"><link rel="prefetch" href="/assets/history.html.cbd4f1dc.js"><link rel="prefetch" href="/assets/idea-plugin.html.696d1a9b.js"><link rel="prefetch" href="/assets/install-detail.html.ada22454.js"><link rel="prefetch" href="/assets/jad.html.a61a52e4.js"><link rel="prefetch" href="/assets/jfr.html.a65beb58.js"><link rel="prefetch" href="/assets/jvm.html.b8b1aa17.js"><link rel="prefetch" href="/assets/keymap.html.4b97d548.js"><link rel="prefetch" href="/assets/logger.html.4c886eeb.js"><link rel="prefetch" href="/assets/manual-install.html.b1712f99.js"><link rel="prefetch" href="/assets/mbean.html.e50ffcee.js"><link rel="prefetch" href="/assets/mc.html.aa0438cf.js"><link rel="prefetch" href="/assets/memory.html.bc85782d.js"><link rel="prefetch" href="/assets/monitor.html.c8fd104a.js"><link rel="prefetch" href="/assets/ognl.html.5fa32203.js"><link rel="prefetch" href="/assets/options.html.e9d3bf7d.js"><link rel="prefetch" href="/assets/perfcounter.html.6022385f.js"><link rel="prefetch" href="/assets/profiler.html.6187e56a.js"><link rel="prefetch" href="/assets/pwd.html.ac6fa9ed.js"><link rel="prefetch" href="/assets/quick-start.html.e2dbf20d.js"><link rel="prefetch" href="/assets/quit.html.3576a0df.js"><link rel="prefetch" href="/assets/redefine.html.647030fe.js"><link rel="prefetch" href="/assets/release-notes.html.9cd9ef9a.js"><link rel="prefetch" href="/assets/reset.html.aea64667.js"><link rel="prefetch" href="/assets/retransform.html.d2256f08.js"><link rel="prefetch" href="/assets/save-log.html.2e2ab47b.js"><link rel="prefetch" href="/assets/sc.html.73cdcc54.js"><link rel="prefetch" href="/assets/session.html.f299a357.js"><link rel="prefetch" href="/assets/sm.html.6fb2da77.js"><link rel="prefetch" href="/assets/spring-boot-starter.html.d3fe861a.js"><link rel="prefetch" href="/assets/stack.html.3a3543ef.js"><link rel="prefetch" href="/assets/start-arthas.html.89aedbd5.js"><link rel="prefetch" href="/assets/stop.html.375aab78.js"><link rel="prefetch" href="/assets/sysenv.html.eebfa441.js"><link rel="prefetch" href="/assets/sysprop.html.d2af9b76.js"><link rel="prefetch" href="/assets/tee.html.3b901b19.js"><link rel="prefetch" href="/assets/thread.html.7bd6ce5a.js"><link rel="prefetch" href="/assets/trace.html.1816b5e5.js"><link rel="prefetch" href="/assets/tt.html.9fd40d2c.js"><link rel="prefetch" href="/assets/tunnel.html.c4dbd72e.js"><link rel="prefetch" href="/assets/version.html.94606777.js"><link rel="prefetch" href="/assets/vmoption.html.07f6d06f.js"><link rel="prefetch" href="/assets/vmtool.html.6ca46c5c.js"><link rel="prefetch" href="/assets/watch.html.61dde141.js"><link rel="prefetch" href="/assets/web-console.html.7f55a6b5.js"><link rel="prefetch" href="/assets/intro.html.fb69e77b.js"><link rel="prefetch" href="/assets/user-question-history11440.html.0050c901.js"><link rel="prefetch" href="/assets/user-question-history11442.html.2b6f935c.js"><link rel="prefetch" href="/assets/user-question-history11443.html.f6cd4964.js"><link rel="prefetch" href="/assets/user-question-history11444.html.ce992129.js"><link rel="prefetch" href="/assets/user-question-history11450.html.2756279b.js"><link rel="prefetch" href="/assets/user-question-history11451.html.3d594a86.js"><link rel="prefetch" href="/assets/user-question-history11452.html.e94aac28.js"><link rel="prefetch" href="/assets/user-question-history11453.html.8a135789.js"><link rel="prefetch" href="/assets/user-question-history11454.html.7bbd3f53.js"><link rel="prefetch" href="/assets/user-question-history11466.html.6a554403.js"><link rel="prefetch" href="/assets/user-question-history11467.html.dfe7d3f0.js"><link rel="prefetch" href="/assets/user-question-history11468.html.07400649.js"><link rel="prefetch" href="/assets/user-question-history11469.html.267c96b6.js"><link rel="prefetch" href="/assets/user-question-history11784.html.56fcf97f.js"><link rel="prefetch" href="/assets/user-question-history11795.html.d21e8e72.js"><link rel="prefetch" href="/assets/user-question-history11809.html.47e34f67.js"><link rel="prefetch" href="/assets/user-question-history11810.html.3f2e0760.js"><link rel="prefetch" href="/assets/user-question-history11814.html.89c2563e.js"><link rel="prefetch" href="/assets/user-question-history12453.html.163bc9ad.js"><link rel="prefetch" href="/assets/user-question-history12454.html.fcccb708.js"><link rel="prefetch" href="/assets/user-question-history12455.html.3aed1fc8.js"><link rel="prefetch" href="/assets/user-question-history12706.html.3cf454ba.js"><link rel="prefetch" href="/assets/user-question-history12715.html.824bab31.js"><link rel="prefetch" href="/assets/user-question-history12716.html.aea93112.js"><link rel="prefetch" href="/assets/user-question-history12740.html.6d3a85f1.js"><link rel="prefetch" href="/assets/user-question-history12741.html.7155ebde.js"><link rel="prefetch" href="/assets/user-question-history13448.html.a659e900.js"><link rel="prefetch" href="/assets/user-question-history13504.html.f86b0c17.js"><link rel="prefetch" href="/assets/user-question-history13506.html.756c0aef.js"><link rel="prefetch" href="/assets/user-question-history13507.html.b410fde5.js"><link rel="prefetch" href="/assets/user-question-history13508.html.3cfbd3ac.js"><link rel="prefetch" href="/assets/user-question-history13509.html.be494725.js"><link rel="prefetch" href="/assets/user-question-history13510.html.4b10ee98.js"><link rel="prefetch" href="/assets/user-question-history13511.html.a4c61493.js"><link rel="prefetch" href="/assets/user-question-history13512.html.e198ca8d.js"><link rel="prefetch" href="/assets/user-question-history13513.html.e75202ae.js"><link rel="prefetch" href="/assets/user-question-history13522.html.46939f73.js"><link rel="prefetch" href="/assets/user-question-history14763.html.140717c7.js"><link rel="prefetch" href="/assets/user-question-history14831.html.de4216e5.js"><link rel="prefetch" href="/assets/user-question-history14832.html.22fc1910.js"><link rel="prefetch" href="/assets/user-question-history14833.html.b17c1b6b.js"><link rel="prefetch" href="/assets/user-question-history14834.html.e96bfd10.js"><link rel="prefetch" href="/assets/user-question-history14840.html.b43bc59a.js"><link rel="prefetch" href="/assets/user-question-history14843.html.f49a7feb.js"><link rel="prefetch" href="/assets/user-question-history15167.html.1f0041fe.js"><link rel="prefetch" href="/assets/user-question-history15543.html.8f8a0315.js"><link rel="prefetch" href="/assets/user-question-history15726.html.fd6ce750.js"><link rel="prefetch" href="/assets/user-question-history15728.html.ccdc912d.js"><link rel="prefetch" href="/assets/user-question-history15729.html.471a1b8f.js"><link rel="prefetch" href="/assets/user-question-history15730.html.bd03a518.js"><link rel="prefetch" href="/assets/user-question-history15731.html.559f9f08.js"><link rel="prefetch" href="/assets/user-question-history15735.html.80cab5b9.js"><link rel="prefetch" href="/assets/user-question-history15736.html.412f1499.js"><link rel="prefetch" href="/assets/user-question-history15737.html.18923199.js"><link rel="prefetch" href="/assets/user-question-history15738.html.6ceeca93.js"><link rel="prefetch" href="/assets/user-question-history15739.html.86e3a2dc.js"><link rel="prefetch" href="/assets/user-question-history15740.html.e1844f14.js"><link rel="prefetch" href="/assets/404.html.954ede21.js"><link rel="prefetch" href="/assets/index.html.30ce3385.js"><link rel="prefetch" href="/assets/index.html.a40e9b51.js"><link rel="prefetch" href="/assets/index.html.d646c9e0.js"><link rel="prefetch" href="/assets/advanced-use.html.69173a07.js"><link rel="prefetch" href="/assets/advice-class.html.44dc3045.js"><link rel="prefetch" href="/assets/agent.html.76c735d0.js"><link rel="prefetch" href="/assets/arthas-properties.html.81d42c35.js"><link rel="prefetch" href="/assets/arthas3.html.0b19650f.js"><link rel="prefetch" href="/assets/async.html.dda2afae.js"><link rel="prefetch" href="/assets/auth.html.07bdc876.js"><link rel="prefetch" href="/assets/base64.html.bcead116.js"><link rel="prefetch" href="/assets/batch-support.html.4641bd67.js"><link rel="prefetch" href="/assets/cat.html.17a41250.js"><link rel="prefetch" href="/assets/classloader.html.4284e89d.js"><link rel="prefetch" href="/assets/cls.html.7418b29d.js"><link rel="prefetch" href="/assets/commands.html.9195266b.js"><link rel="prefetch" href="/assets/contact-us.html.5761289f.js"><link rel="prefetch" href="/assets/dashboard.html.a121fb6b.js"><link rel="prefetch" href="/assets/docker.html.03d1872a.js"><link rel="prefetch" href="/assets/download.html.17050c97.js"><link rel="prefetch" href="/assets/dump.html.150553f5.js"><link rel="prefetch" href="/assets/echo.html.b6e5f092.js"><link rel="prefetch" href="/assets/faq.html.0adab3f6.js"><link rel="prefetch" href="/assets/getstatic.html.585460ac.js"><link rel="prefetch" href="/assets/grep.html.7bfe65a7.js"><link rel="prefetch" href="/assets/groovy.html.9814fe6a.js"><link rel="prefetch" href="/assets/heapdump.html.03900a35.js"><link rel="prefetch" href="/assets/help.html.1a9f5df9.js"><link rel="prefetch" href="/assets/history.html.7fdc3fbc.js"><link rel="prefetch" href="/assets/http-api.html.d43050d6.js"><link rel="prefetch" href="/assets/idea-plugin.html.eaa87fb3.js"><link rel="prefetch" href="/assets/install-detail.html.c7db59fe.js"><link rel="prefetch" href="/assets/jad.html.538333fc.js"><link rel="prefetch" href="/assets/jfr.html.5892aad4.js"><link rel="prefetch" href="/assets/jvm.html.a09c582f.js"><link rel="prefetch" href="/assets/keymap.html.f350d350.js"><link rel="prefetch" href="/assets/logger.html.77aef58f.js"><link rel="prefetch" href="/assets/manual-install.html.b52b3383.js"><link rel="prefetch" href="/assets/mbean.html.fb10ca7f.js"><link rel="prefetch" href="/assets/mc.html.5651a161.js"><link rel="prefetch" href="/assets/memory.html.51f06c97.js"><link rel="prefetch" href="/assets/monitor.html.0c917472.js"><link rel="prefetch" href="/assets/ognl.html.51c27cdf.js"><link rel="prefetch" href="/assets/options.html.061c0499.js"><link rel="prefetch" href="/assets/perfcounter.html.7a2e7783.js"><link rel="prefetch" href="/assets/profiler.html.7d7d2c16.js"><link rel="prefetch" href="/assets/pwd.html.94331a5b.js"><link rel="prefetch" href="/assets/quick-start.html.d0d7d085.js"><link rel="prefetch" href="/assets/quit.html.07d23945.js"><link rel="prefetch" href="/assets/redefine.html.b51d4760.js"><link rel="prefetch" href="/assets/release-notes.html.97884707.js"><link rel="prefetch" href="/assets/reset.html.8d888519.js"><link rel="prefetch" href="/assets/retransform.html.33e2a183.js"><link rel="prefetch" href="/assets/save-log.html.65bbf18d.js"><link rel="prefetch" href="/assets/sc.html.b97ba863.js"><link rel="prefetch" href="/assets/session.html.f12fb284.js"><link rel="prefetch" href="/assets/sm.html.b1573b78.js"><link rel="prefetch" href="/assets/spring-boot-starter.html.62c01266.js"><link rel="prefetch" href="/assets/stack.html.f9218289.js"><link rel="prefetch" href="/assets/start-arthas.html.386fe5e8.js"><link rel="prefetch" href="/assets/stop.html.1809fc4b.js"><link rel="prefetch" href="/assets/sysenv.html.d3ed1a43.js"><link rel="prefetch" href="/assets/sysprop.html.d5a36f08.js"><link rel="prefetch" href="/assets/tee.html.100828a3.js"><link rel="prefetch" href="/assets/thread.html.1c837b34.js"><link rel="prefetch" href="/assets/trace.html.29692689.js"><link rel="prefetch" href="/assets/tt.html.23b440e4.js"><link rel="prefetch" href="/assets/tunnel.html.b5499e98.js"><link rel="prefetch" href="/assets/version.html.3e704c32.js"><link rel="prefetch" href="/assets/vmoption.html.82b62241.js"><link rel="prefetch" href="/assets/vmtool.html.aa90ec1f.js"><link rel="prefetch" href="/assets/watch.html.6bbe9bc3.js"><link rel="prefetch" href="/assets/web-console.html.dbc0dbf0.js"><link rel="prefetch" href="/assets/index.html.4201d415.js"><link rel="prefetch" href="/assets/advanced-use.html.90868e26.js"><link rel="prefetch" href="/assets/advice-class.html.0ca455a3.js"><link rel="prefetch" href="/assets/agent.html.251dddae.js"><link rel="prefetch" href="/assets/arthas-properties.html.938af046.js"><link rel="prefetch" href="/assets/async.html.5ce1d1ce.js"><link rel="prefetch" href="/assets/auth.html.2a003b09.js"><link rel="prefetch" href="/assets/base64.html.00f201c7.js"><link rel="prefetch" href="/assets/batch-support.html.6043e5f6.js"><link rel="prefetch" href="/assets/cat.html.6b2e0086.js"><link rel="prefetch" href="/assets/classloader.html.413109bd.js"><link rel="prefetch" href="/assets/cls.html.29b1f806.js"><link rel="prefetch" href="/assets/commands.html.e8942ef3.js"><link rel="prefetch" href="/assets/contact-us.html.4526730f.js"><link rel="prefetch" href="/assets/dashboard.html.7edf7acb.js"><link rel="prefetch" href="/assets/docker.html.03ba71a6.js"><link rel="prefetch" href="/assets/download.html.8810095d.js"><link rel="prefetch" href="/assets/dump.html.4991b48d.js"><link rel="prefetch" href="/assets/echo.html.7650a83b.js"><link rel="prefetch" href="/assets/faq.html.ea3e918c.js"><link rel="prefetch" href="/assets/getstatic.html.500e6219.js"><link rel="prefetch" href="/assets/grep.html.bf503089.js"><link rel="prefetch" href="/assets/groovy.html.49d078a1.js"><link rel="prefetch" href="/assets/heapdump.html.660526d5.js"><link rel="prefetch" href="/assets/help.html.e42cbec6.js"><link rel="prefetch" href="/assets/history.html.5ede54ab.js"><link rel="prefetch" href="/assets/idea-plugin.html.f5332dbc.js"><link rel="prefetch" href="/assets/install-detail.html.71fdac53.js"><link rel="prefetch" href="/assets/jad.html.6c5585d2.js"><link rel="prefetch" href="/assets/jfr.html.10e316af.js"><link rel="prefetch" href="/assets/jvm.html.c7b9fd8f.js"><link rel="prefetch" href="/assets/keymap.html.97636b0c.js"><link rel="prefetch" href="/assets/logger.html.ab691e29.js"><link rel="prefetch" href="/assets/manual-install.html.a031e342.js"><link rel="prefetch" href="/assets/mbean.html.9062fe0b.js"><link rel="prefetch" href="/assets/mc.html.c72bf29a.js"><link rel="prefetch" href="/assets/memory.html.911264fb.js"><link rel="prefetch" href="/assets/monitor.html.b861dd2b.js"><link rel="prefetch" href="/assets/ognl.html.d4bc1bc8.js"><link rel="prefetch" href="/assets/options.html.9e19bd7d.js"><link rel="prefetch" href="/assets/perfcounter.html.e3509839.js"><link rel="prefetch" href="/assets/profiler.html.9a5939c8.js"><link rel="prefetch" href="/assets/pwd.html.8c00c7c7.js"><link rel="prefetch" href="/assets/quick-start.html.17597d6b.js"><link rel="prefetch" href="/assets/quit.html.f2004fd3.js"><link rel="prefetch" href="/assets/redefine.html.8f763ba4.js"><link rel="prefetch" href="/assets/release-notes.html.ceca27da.js"><link rel="prefetch" href="/assets/reset.html.531c57ec.js"><link rel="prefetch" href="/assets/retransform.html.883cb847.js"><link rel="prefetch" href="/assets/save-log.html.10fd1804.js"><link rel="prefetch" href="/assets/sc.html.e5ed7927.js"><link rel="prefetch" href="/assets/session.html.792ab981.js"><link rel="prefetch" href="/assets/sm.html.b6c4fc05.js"><link rel="prefetch" href="/assets/spring-boot-starter.html.4487a31e.js"><link rel="prefetch" href="/assets/stack.html.b1dc93b3.js"><link rel="prefetch" href="/assets/start-arthas.html.0c0dcba7.js"><link rel="prefetch" href="/assets/stop.html.b94ef499.js"><link rel="prefetch" href="/assets/sysenv.html.dd2920eb.js"><link rel="prefetch" href="/assets/sysprop.html.9ee76be9.js"><link rel="prefetch" href="/assets/tee.html.690e39e8.js"><link rel="prefetch" href="/assets/thread.html.989bc148.js"><link rel="prefetch" href="/assets/trace.html.272a5864.js"><link rel="prefetch" href="/assets/tt.html.5ad78537.js"><link rel="prefetch" href="/assets/tunnel.html.59bde372.js"><link rel="prefetch" href="/assets/version.html.1fb9c5ad.js"><link rel="prefetch" href="/assets/vmoption.html.4f720b39.js"><link rel="prefetch" href="/assets/vmtool.html.a6a8ee75.js"><link rel="prefetch" href="/assets/watch.html.06497348.js"><link rel="prefetch" href="/assets/web-console.html.1d818a20.js"><link rel="prefetch" href="/assets/intro.html.0082fd51.js"><link rel="prefetch" href="/assets/user-question-history11440.html.fb0525c1.js"><link rel="prefetch" href="/assets/user-question-history11442.html.e0a55c65.js"><link rel="prefetch" href="/assets/user-question-history11443.html.d1528876.js"><link rel="prefetch" href="/assets/user-question-history11444.html.e2b6bc77.js"><link rel="prefetch" href="/assets/user-question-history11450.html.2b09f6c7.js"><link rel="prefetch" href="/assets/user-question-history11451.html.c76df7ae.js"><link rel="prefetch" href="/assets/user-question-history11452.html.9879b76b.js"><link rel="prefetch" href="/assets/user-question-history11453.html.2e92595b.js"><link rel="prefetch" href="/assets/user-question-history11454.html.f568c6c3.js"><link rel="prefetch" href="/assets/user-question-history11466.html.3fc8a828.js"><link rel="prefetch" href="/assets/user-question-history11467.html.bb6b861a.js"><link rel="prefetch" href="/assets/user-question-history11468.html.46029e3a.js"><link rel="prefetch" href="/assets/user-question-history11469.html.ab94d023.js"><link rel="prefetch" href="/assets/user-question-history11784.html.a62744ce.js"><link rel="prefetch" href="/assets/user-question-history11795.html.a7d68a33.js"><link rel="prefetch" href="/assets/user-question-history11809.html.f163cb5f.js"><link rel="prefetch" href="/assets/user-question-history11810.html.38c867bc.js"><link rel="prefetch" href="/assets/user-question-history11814.html.225c060b.js"><link rel="prefetch" href="/assets/user-question-history12453.html.36bebf20.js"><link rel="prefetch" href="/assets/user-question-history12454.html.3ee1574c.js"><link rel="prefetch" href="/assets/user-question-history12455.html.4d2487f7.js"><link rel="prefetch" href="/assets/user-question-history12706.html.5d0d9e70.js"><link rel="prefetch" href="/assets/user-question-history12715.html.fe834021.js"><link rel="prefetch" href="/assets/user-question-history12716.html.86dedfd1.js"><link rel="prefetch" href="/assets/user-question-history12740.html.58af5398.js"><link rel="prefetch" href="/assets/user-question-history12741.html.d9c4d211.js"><link rel="prefetch" href="/assets/user-question-history13448.html.8cc59a67.js"><link rel="prefetch" href="/assets/user-question-history13504.html.b57725ff.js"><link rel="prefetch" href="/assets/user-question-history13506.html.0039dbf9.js"><link rel="prefetch" href="/assets/user-question-history13507.html.2c3580b6.js"><link rel="prefetch" href="/assets/user-question-history13508.html.611f806a.js"><link rel="prefetch" href="/assets/user-question-history13509.html.25c5b6f6.js"><link rel="prefetch" href="/assets/user-question-history13510.html.cc949a92.js"><link rel="prefetch" href="/assets/user-question-history13511.html.6a3406dd.js"><link rel="prefetch" href="/assets/user-question-history13512.html.b13b9408.js"><link rel="prefetch" href="/assets/user-question-history13513.html.db786eb4.js"><link rel="prefetch" href="/assets/user-question-history13522.html.d86e15d9.js"><link rel="prefetch" href="/assets/user-question-history14763.html.e50d35b1.js"><link rel="prefetch" href="/assets/user-question-history14831.html.5aaf9c3b.js"><link rel="prefetch" href="/assets/user-question-history14832.html.851282a7.js"><link rel="prefetch" href="/assets/user-question-history14833.html.37da3c74.js"><link rel="prefetch" href="/assets/user-question-history14834.html.f09d5dea.js"><link rel="prefetch" href="/assets/user-question-history14840.html.e8ff334a.js"><link rel="prefetch" href="/assets/user-question-history14843.html.77cae64b.js"><link rel="prefetch" href="/assets/user-question-history15167.html.281cc072.js"><link rel="prefetch" href="/assets/user-question-history15543.html.0cbc55e8.js"><link rel="prefetch" href="/assets/user-question-history15726.html.40b6ceb9.js"><link rel="prefetch" href="/assets/user-question-history15728.html.5cfa5a28.js"><link rel="prefetch" href="/assets/user-question-history15729.html.ec291ed8.js"><link rel="prefetch" href="/assets/user-question-history15730.html.4bca5864.js"><link rel="prefetch" href="/assets/user-question-history15731.html.a3a956ae.js"><link rel="prefetch" href="/assets/user-question-history15735.html.7ea6b4e5.js"><link rel="prefetch" href="/assets/user-question-history15736.html.88204631.js"><link rel="prefetch" href="/assets/user-question-history15737.html.2c7d5321.js"><link rel="prefetch" href="/assets/user-question-history15738.html.1ec98456.js"><link rel="prefetch" href="/assets/user-question-history15739.html.2ab5138c.js"><link rel="prefetch" href="/assets/user-question-history15740.html.b1ca6209.js"><link rel="prefetch" href="/assets/404.html.49fbe4f8.js">
<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="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-a8869d06><!----><span class="site-name can-hide" data-v-a8869d06>arthas</span><span class="navbar-version" data-v-a8869d06>v4.0.4</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&amp;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="VERSIONS"><span class="title">VERSIONS</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="VERSIONS"><span class="title">VERSIONS</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/en/" 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">open in new window</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 .712.287Q17 4.575 17 5t-.288.713Q16.425 6 16 6h-1.9q-.525 1.775-1.425 3.45q-.9 1.675-2.225 3.15l2.4 2.45l-.75 2.05L9 14l-4.3 4.3q-.275.275-.7.275q-.425 0-.7-.275q-.275-.275-.275-.7q0-.425.275-.7l4.35-4.35q-.675-.775-1.25-1.563q-.575-.787-1.025-1.662Q5.1 8.8 5.35 8.4t.875-.4q.25 0 .525.162q.275.163.4.388Z"></path></svg><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" 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 .712.287Q17 4.575 17 5t-.288.713Q16.425 6 16 6h-1.9q-.525 1.775-1.425 3.45q-.9 1.675-2.225 3.15l2.4 2.45l-.75 2.05L9 14l-4.3 4.3q-.275.275-.7.275q-.425 0-.7-.275q-.275-.275-.275-.7q0-.425.275-.7l4.35-4.35q-.675-.775-1.25-1.563q-.575-.787-1.025-1.662Q5.1 8.8 5.35 8.4t.875-.4q.25 0 .525.162q.275.163.4.388Z"></path></svg><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a href="/doc/http-api.html" class="" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a aria-current="page" href="/en/doc/http-api.html" class="router-link-active router-link-exact-active router-link-active" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a class="external-link" href="https://github.com/alibaba/arthas" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewbox="0 0 24 24" style="height:1.25rem;width:1.25rem;vertical-align:bottom;"><path fill="currentColor" d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33c.85 0 1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2Z"></path></svg><!----><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><button class="toggle-color-mode-button" title="toggle color mode"><svg style="" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z" fill="currentColor"></path><path d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z" fill="currentColor"></path><path d="M2 15.005h5v2H2z" fill="currentColor"></path><path d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 25.005h2v5h-2z" fill="currentColor"></path><path d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z" fill="currentColor"></path><path d="M25 15.005h5v2h-5z" fill="currentColor"></path><path d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z" fill="currentColor"></path><path d="M15 2.005h2v5h-2z" fill="currentColor"></path></svg><svg style="display:none;" class="icon" focusable="false" viewBox="0 0 32 32"><path d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z" fill="currentColor"></path></svg></button><div id="docsearch-container"></div></div></header><!--]--><div class="sidebar-mask"></div><!--[--><aside class="sidebar"><nav class="navbar-items"><!--[--><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&amp;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="VERSIONS"><span class="title">VERSIONS</span><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" type="button" aria-label="VERSIONS"><span class="title">VERSIONS</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/en/" 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">open in new window</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 .712.287Q17 4.575 17 5t-.288.713Q16.425 6 16 6h-1.9q-.525 1.775-1.425 3.45q-.9 1.675-2.225 3.15l2.4 2.45l-.75 2.05L9 14l-4.3 4.3q-.275.275-.7.275q-.425 0-.7-.275q-.275-.275-.275-.7q0-.425.275-.7l4.35-4.35q-.675-.775-1.25-1.563q-.575-.787-1.025-1.662Q5.1 8.8 5.35 8.4t.875-.4q.25 0 .525.162q.275.163.4.388Z"></path></svg><span class="arrow down"></span></button><button class="navbar-dropdown-title-mobile" 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 .712.287Q17 4.575 17 5t-.288.713Q16.425 6 16 6h-1.9q-.525 1.775-1.425 3.45q-.9 1.675-2.225 3.15l2.4 2.45l-.75 2.05L9 14l-4.3 4.3q-.275.275-.7.275q-.425 0-.7-.275q-.275-.275-.275-.7q0-.425.275-.7l4.35-4.35q-.675-.775-1.25-1.563q-.575-.787-1.025-1.662Q5.1 8.8 5.35 8.4t.875-.4q.25 0 .525.162q.275.163.4.388Z"></path></svg><span class="right arrow"></span></button><ul style="display:none;" class="navbar-dropdown"><!--[--><li class="navbar-dropdown-item"><a href="/doc/http-api.html" class="" aria-label="简体中文"><!--[--><!--]--> 简体中文 <!--[--><!--]--></a></li><li class="navbar-dropdown-item"><a aria-current="page" href="/en/doc/http-api.html" class="router-link-active router-link-exact-active router-link-active" aria-label="English"><!--[--><!--]--> English <!--[--><!--]--></a></li><!--]--></ul></div></div><div class="navbar-item"><a class="external-link" href="https://github.com/alibaba/arthas" rel="noopener noreferrer" target="_blank" aria-label="GitHub"><!--[--><!--]--><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewbox="0 0 24 24" style="height:1.25rem;width:1.25rem;vertical-align:bottom;"><path fill="currentColor" d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33c.85 0 1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2Z"></path></svg><!----><!--[--><!--]--></a></div><!--]--></nav><!--[--><!--]--><ul class="sidebar-items"><!--[--><li><p tabindex="0" class="sidebar-item sidebar-heading active">DOCS <!----></p><ul style="" class="sidebar-item-children"><!--[--><li><a href="/en/doc/" class="router-link-active sidebar-item" aria-label="Introduction"><!--[--><!--]--> Introduction <!--[--><!--]--></a><!----></li><li><a href="/en/doc/quick-start.html" class="sidebar-item" aria-label="Quick Start"><!--[--><!--]--> Quick Start <!--[--><!--]--></a><!----></li><li><a href="/en/doc/install-detail.html" class="sidebar-item" aria-label="Install Arthas"><!--[--><!--]--> Install Arthas <!--[--><!--]--></a><!----></li><li><a href="/en/doc/download.html" class="sidebar-item" aria-label="Download"><!--[--><!--]--> Download <!--[--><!--]--></a><!----></li><li><a href="/en/doc/advice-class.html" class="sidebar-item" aria-label="Fundamental Fields in Expressions"><!--[--><!--]--> Fundamental Fields in Expressions <!--[--><!--]--></a><!----></li><li><a href="/en/doc/commands.md" class="sidebar-item collapsible" aria-label="All Commands"><!--[--><!--]--> All Commands <!--[--><!--]--></a><ul style="display:none;" class="sidebar-item-children"><!--[--><li><a href="/en/doc/auth.html" class="sidebar-item" aria-label="auth"><!--[--><!--]--> auth <!--[--><!--]--></a><!----></li><li><a href="/en/doc/base64.html" class="sidebar-item" aria-label="base64"><!--[--><!--]--> base64 <!--[--><!--]--></a><!----></li><li><a href="/en/doc/cat.html" class="sidebar-item" aria-label="cat"><!--[--><!--]--> cat <!--[--><!--]--></a><!----></li><li><a href="/en/doc/classloader.html" class="sidebar-item" aria-label="classloader"><!--[--><!--]--> classloader <!--[--><!--]--></a><!----></li><li><a href="/en/doc/cls.html" class="sidebar-item" aria-label="cls"><!--[--><!--]--> cls <!--[--><!--]--></a><!----></li><li><a href="/en/doc/dashboard.html" class="sidebar-item" aria-label="dashboard"><!--[--><!--]--> dashboard <!--[--><!--]--></a><!----></li><li><a href="/en/doc/dump.html" class="sidebar-item" aria-label="dump"><!--[--><!--]--> dump <!--[--><!--]--></a><!----></li><li><a href="/en/doc/echo.html" class="sidebar-item" aria-label="echo"><!--[--><!--]--> echo <!--[--><!--]--></a><!----></li><li><a href="/en/doc/getstatic.html" class="sidebar-item" aria-label="getstatic"><!--[--><!--]--> getstatic <!--[--><!--]--></a><!----></li><li><a href="/en/doc/grep.html" class="sidebar-item" aria-label="grep"><!--[--><!--]--> grep <!--[--><!--]--></a><!----></li><li><a href="/en/doc/heapdump.html" class="sidebar-item" aria-label="heapdump"><!--[--><!--]--> heapdump <!--[--><!--]--></a><!----></li><li><a href="/en/doc/help.html" class="sidebar-item" aria-label="help"><!--[--><!--]--> help <!--[--><!--]--></a><!----></li><li><a href="/en/doc/history.html" class="sidebar-item" aria-label="history"><!--[--><!--]--> history <!--[--><!--]--></a><!----></li><li><a href="/en/doc/jad.html" class="sidebar-item" aria-label="jad"><!--[--><!--]--> jad <!--[--><!--]--></a><!----></li><li><a href="/en/doc/jfr.html" class="sidebar-item" aria-label="jfr"><!--[--><!--]--> jfr <!--[--><!--]--></a><!----></li><li><a href="/en/doc/jvm.html" class="sidebar-item" aria-label="jvm"><!--[--><!--]--> jvm <!--[--><!--]--></a><!----></li><li><a href="/en/doc/keymap.html" class="sidebar-item" aria-label="keymap"><!--[--><!--]--> keymap <!--[--><!--]--></a><!----></li><li><a href="/en/doc/logger.html" class="sidebar-item" aria-label="logger"><!--[--><!--]--> logger <!--[--><!--]--></a><!----></li><li><a href="/en/doc/mbean.html" class="sidebar-item" aria-label="mbean"><!--[--><!--]--> mbean <!--[--><!--]--></a><!----></li><li><a href="/en/doc/mc.html" class="sidebar-item" aria-label="mc"><!--[--><!--]--> mc <!--[--><!--]--></a><!----></li><li><a href="/en/doc/memory.html" class="sidebar-item" aria-label="memory"><!--[--><!--]--> memory <!--[--><!--]--></a><!----></li><li><a href="/en/doc/monitor.html" class="sidebar-item" aria-label="monitor"><!--[--><!--]--> monitor <!--[--><!--]--></a><!----></li><li><a href="/en/doc/ognl.html" class="sidebar-item" aria-label="ognl"><!--[--><!--]--> ognl <!--[--><!--]--></a><!----></li><li><a href="/en/doc/options.html" class="sidebar-item" aria-label="options"><!--[--><!--]--> options <!--[--><!--]--></a><!----></li><li><a href="/en/doc/perfcounter.html" class="sidebar-item" aria-label="perfcounter"><!--[--><!--]--> perfcounter <!--[--><!--]--></a><!----></li><li><a href="/en/doc/profiler.html" class="sidebar-item" aria-label="profiler"><!--[--><!--]--> profiler <!--[--><!--]--></a><!----></li><li><a href="/en/doc/pwd.html" class="sidebar-item" aria-label="pwd"><!--[--><!--]--> pwd <!--[--><!--]--></a><!----></li><li><a href="/en/doc/quit.html" class="sidebar-item" aria-label="quit"><!--[--><!--]--> quit <!--[--><!--]--></a><!----></li><li><a href="/en/doc/redefine.html" class="sidebar-item" aria-label="redefine"><!--[--><!--]--> redefine <!--[--><!--]--></a><!----></li><li><a href="/en/doc/reset.html" class="sidebar-item" aria-label="reset"><!--[--><!--]--> reset <!--[--><!--]--></a><!----></li><li><a href="/en/doc/retransform.html" class="sidebar-item" aria-label="retransform"><!--[--><!--]--> retransform <!--[--><!--]--></a><!----></li><li><a href="/en/doc/sc.html" class="sidebar-item" aria-label="sc"><!--[--><!--]--> sc <!--[--><!--]--></a><!----></li><li><a href="/en/doc/session.html" class="sidebar-item" aria-label="session"><!--[--><!--]--> session <!--[--><!--]--></a><!----></li><li><a href="/en/doc/sm.html" class="sidebar-item" aria-label="sm"><!--[--><!--]--> sm <!--[--><!--]--></a><!----></li><li><a href="/en/doc/stack.html" class="sidebar-item" aria-label="stack"><!--[--><!--]--> stack <!--[--><!--]--></a><!----></li><li><a href="/en/doc/stop.html" class="sidebar-item" aria-label="stop"><!--[--><!--]--> stop <!--[--><!--]--></a><!----></li><li><a href="/en/doc/sysenv.html" class="sidebar-item" aria-label="sysenv"><!--[--><!--]--> sysenv <!--[--><!--]--></a><!----></li><li><a href="/en/doc/sysprop.html" class="sidebar-item" aria-label="sysprop"><!--[--><!--]--> sysprop <!--[--><!--]--></a><!----></li><li><a href="/en/doc/tee.html" class="sidebar-item" aria-label="tee"><!--[--><!--]--> tee <!--[--><!--]--></a><!----></li><li><a href="/en/doc/thread.html" class="sidebar-item" aria-label="thread"><!--[--><!--]--> thread <!--[--><!--]--></a><!----></li><li><a href="/en/doc/trace.html" class="sidebar-item" aria-label="trace"><!--[--><!--]--> trace <!--[--><!--]--></a><!----></li><li><a href="/en/doc/tt.html" class="sidebar-item" aria-label="tt"><!--[--><!--]--> tt <!--[--><!--]--></a><!----></li><li><a href="/en/doc/version.html" class="sidebar-item" aria-label="version"><!--[--><!--]--> version <!--[--><!--]--></a><!----></li><li><a href="/en/doc/vmoption.html" class="sidebar-item" aria-label="vmoption"><!--[--><!--]--> vmoption <!--[--><!--]--></a><!----></li><li><a href="/en/doc/vmtool.html" class="sidebar-item" aria-label="vmtool"><!--[--><!--]--> vmtool <!--[--><!--]--></a><!----></li><li><a href="/en/doc/watch.html" class="sidebar-item" aria-label="watch"><!--[--><!--]--> watch <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><a href="/en/doc/advanced-use.md" class="sidebar-item active collapsible" aria-label="Other features"><!--[--><!--]--> Other features <!--[--><!--]--></a><ul style="" class="sidebar-item-children"><!--[--><li><a href="/en/doc/async.html" class="sidebar-item" aria-label="Arthas Async Jobs"><!--[--><!--]--> Arthas Async Jobs <!--[--><!--]--></a><!----></li><li><a href="/en/doc/save-log.html" class="sidebar-item" aria-label="Log command outputs"><!--[--><!--]--> Log command outputs <!--[--><!--]--></a><!----></li><li><a href="/en/doc/docker.html" class="sidebar-item" aria-label="Docker"><!--[--><!--]--> Docker <!--[--><!--]--></a><!----></li><li><a href="/en/doc/web-console.html" class="sidebar-item" aria-label="Web Console"><!--[--><!--]--> Web Console <!--[--><!--]--></a><!----></li><li><a href="/en/doc/tunnel.html" class="sidebar-item" aria-label="Arthas Tunnel"><!--[--><!--]--> Arthas Tunnel <!--[--><!--]--></a><!----></li><li><a href="/en/doc/idea-plugin.html" class="sidebar-item" aria-label="IDEA Plugin"><!--[--><!--]--> IDEA Plugin <!--[--><!--]--></a><!----></li><li><a href="/en/doc/arthas-properties.html" class="sidebar-item" aria-label="Arthas Properties"><!--[--><!--]--> Arthas Properties <!--[--><!--]--></a><!----></li><li><a href="/en/doc/agent.html" class="sidebar-item" aria-label="Start as a Java Agent"><!--[--><!--]--> Start as a Java Agent <!--[--><!--]--></a><!----></li><li><a href="/en/doc/spring-boot-starter.html" class="sidebar-item" aria-label="Arthas Spring Boot Starter"><!--[--><!--]--> Arthas Spring Boot Starter <!--[--><!--]--></a><!----></li><li><a aria-current="page" href="/en/doc/http-api.html" class="router-link-active router-link-exact-active router-link-active sidebar-item active" aria-label="Http API"><!--[--><!--]--> Http API <!--[--><!--]--></a><!----></li><li><a href="/en/doc/batch-support.html" class="sidebar-item" aria-label="Batch Processing"><!--[--><!--]--> Batch Processing <!--[--><!--]--></a><!----></li><!--]--></ul></li><li><a href="/en/doc/faq.html" class="sidebar-item" aria-label="FAQ"><!--[--><!--]--> FAQ <!--[--><!--]--></a><!----></li><li><a class="external-link sidebar-item" href="https://github.com/alibaba/arthas/issues?q=label%3Auser-case" rel="noopener noreferrer" target="_blank" aria-label="User cases"><!--[--><!--]--><span>User cases</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><a class="external-link sidebar-item" href="https://github.com/alibaba/arthas" rel="noopener noreferrer" target="_blank" aria-label="Star me at github"><!--[--><!--]--><span>Star me at 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><!----></li><li><a class="external-link sidebar-item" href="https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md" rel="noopener noreferrer" target="_blank" aria-label="Compile and debug/CONTRIBUTING"><!--[--><!--]--><span>Compile and debug/CONTRIBUTING</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><a class="external-link sidebar-item" href="https://github.com/alibaba/arthas/releases" rel="noopener noreferrer" target="_blank" aria-label="Release Notes"><!--[--><!--]--><span>Release Notes</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><a href="/en/doc/contact-us.md" class="sidebar-item" aria-label="Contact us"><!--[--><!--]--> Contact us <!--[--><!--]--></a><!----></li><!--]--></ul></li><!--]--></ul><!--[--><!--]--></aside><!--]--><!--[--><main class="page" data-v-fdd717e0><!--[--><!--]--><div class="right-menu-padding theme-default-content" data-v-fdd717e0><!--[--><!--]--><div class="right-menu-wrapper" data-v-fdd717e0 data-v-64666cd5><div class="right-menu-margin" data-v-64666cd5><div class="right-menu-title" data-v-64666cd5>Table of Contents</div><div class="right-menu-content" data-v-64666cd5><!--[--><!--]--></div></div></div><div data-v-fdd717e0><h1 id="http-api" tabindex="-1"><a class="header-anchor" href="#http-api" aria-hidden="true">#</a> Http API</h1><p><a href="https://arthas.aliyun.com/doc/arthas-tutorials.html?language=en&amp;id=case-http-api" target="_blank" rel="noopener noreferrer"><code>Http API</code> online tutorial<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="overview" tabindex="-1"><a class="header-anchor" href="#overview" aria-hidden="true">#</a> Overview</h2><p>Http API provides a RESTful-like interactive interface, and both requests and responses data in JSON format. Compared with Telnet/WebConsole&#39;s output unstructured text data, Http API can provide structured data and support more complex interactive functions, such as a series of diagnostic operations in specific application scenarios.</p><h3 id="access-address" tabindex="-1"><a class="header-anchor" href="#access-address" aria-hidden="true">#</a> Access address</h3><p>The Http API address is: <code>http://ip:port/api</code>, the request parameters must be submitted using <code>POST</code>. Such as POST <code>http://127.0.0.1:8563/api</code>.</p><p>Note: The telnet port <code>3658</code> has compatibility issues with the Chrome browser. It is recommended to use the http port <code>8563</code> to access the http api.</p><h3 id="request-data-format" tabindex="-1"><a class="header-anchor" href="#request-data-format" aria-hidden="true">#</a> Request data format</h3><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;action&quot;</span><span class="token operator">:</span> <span class="token string">&quot;exec&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;requestId&quot;</span><span class="token operator">:</span> <span class="token string">&quot;req112&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;sessionId&quot;</span><span class="token operator">:</span> <span class="token string">&quot;94766d3c-8b39-42d3-8596-98aee3ccbefb&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;consumerId&quot;</span><span class="token operator">:</span> <span class="token string">&quot;955dbd1325334a84972b0f3ac19de4f7_2&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;command&quot;</span><span class="token operator">:</span> <span class="token string">&quot;version&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;execTimeout&quot;</span><span class="token operator">:</span> <span class="token string">&quot;10000&quot;</span>
<span class="token punctuation">}</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></div><p>Request data format description:</p><ul><li><code>action</code> : The requested action/behavior, please refer to &quot;Request Actions&quot; for optional values.</li><li><code>requestId</code> : Optional request ID, generated by the client.</li><li><code>sessionId</code> : Arthas session ID, one-time command does not need to set the session ID.</li><li><code>consumerId</code> : Arthas consumer ID, used for multi-person sharing sessions.</li><li><code>command</code> : Arthas command line</li><li><code>execTimeout</code> : Timeout for executing commands (ms), default value is 30000.</li></ul><p>Note: Different actions use different parameters. Set the parameters according to the specific action.</p><h3 id="request-actions" tabindex="-1"><a class="header-anchor" href="#request-actions" aria-hidden="true">#</a> Request Actions</h3><p>Currently supported request actions are as follows:</p><ul><li><code>exec</code> : The command is executed synchronously, and the command results is returned after the command execution end or interrupted.</li><li><code>async_exec</code> : The command is executed asynchronously, and the scheduling result of the command is returned immediately. The command execution result is obtained through <code>pull_results</code> action.</li><li><code>interrupt_job</code> : To interrupt the foreground command of the session, similar to the function of Telnet <code>Ctrl + c</code>.</li><li><code>pull_results</code> : Get the result of the command executed asynchronously, and execute it repeatedly in http long-polling mode.</li><li><code>init_session</code> : Create new session.</li><li><code>join_session</code> : Join the session, used to support multiple people sharing the same Arthas session.</li><li><code>close_session</code> : Close the session.</li></ul><h3 id="response-status" tabindex="-1"><a class="header-anchor" href="#response-status" aria-hidden="true">#</a> Response status</h3><p>The state attribute in the response indicates the request processing state, and its value is as follows:</p><ul><li><code>SCHEDULED</code>: When the command is executed asynchronously, it means that the job has been created, and may not be executed yet or is being executed;</li><li><code>SUCCEEDED</code>: The request is processed successfully (completed status);</li><li><code>FAILED</code>: Request processing failed (completed status), usually accompanied by a message explaining the reason;</li><li><code>REFUSED</code>: The request is rejected (completed status), usually accompanied by a message explaining the reason;</li></ul><h2 id="one-time-command" tabindex="-1"><a class="header-anchor" href="#one-time-command" aria-hidden="true">#</a> One-time command</h2><p>Similar to executing batch commands, the one-time commands are executed synchronously. No need to create a session, no need to set the <code>sessionId</code> option.</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;action&quot;</span><span class="token operator">:</span> <span class="token string">&quot;exec&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;command&quot;</span><span class="token operator">:</span> <span class="token string">&quot;&lt;Arthas command line&gt;&quot;</span>
<span class="token punctuation">}</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></div><p>For example, get the Arthas version number:</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">-Ss</span> <span class="token parameter variable">-XPOST</span> http://localhost:8563/api <span class="token parameter variable">-d</span> <span class="token string">&#39;
{
&quot;action&quot;:&quot;exec&quot;,
&quot;command&quot;:&quot;version&quot;
}
&#39;</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></div><p>The response is as follows:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;state&quot;</span><span class="token operator">:</span> <span class="token string">&quot;SUCCEEDED&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;sessionId&quot;</span><span class="token operator">:</span> <span class="token string">&quot;ee3bc004-4586-43de-bac0-b69d6db7a869&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;body&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">&quot;results&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;version&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;version&quot;</span><span class="token operator">:</span> <span class="token string">&quot;3.3.7&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">5</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">5</span><span class="token punctuation">,</span>
<span class="token property">&quot;statusCode&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;status&quot;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token property">&quot;timeExpired&quot;</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
<span class="token property">&quot;command&quot;</span><span class="token operator">:</span> <span class="token string">&quot;version&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobStatus&quot;</span><span class="token operator">:</span> <span class="token string">&quot;TERMINATED&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">5</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</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></div><p>Response data format description:</p><ul><li><code>state</code>: Request processing status, refer to the description of &quot;Response Status&quot;.</li><li><code>sessionId </code>: Arthas session ID, one-time command to automatically create and destroy temporary sessions.</li><li><code>body.jobId</code>: The job ID of the command, all output results of the same job are the same jobId.</li><li><code>body.jobStatus</code>: The job status of the command.</li><li><code>body.timeExpired</code>: Whether the job execution timed out.</li><li><code>body/results</code>: Command execution results.</li></ul><p><strong>Command result format description</strong></p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;version&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;version&quot;</span><span class="token operator">:</span> <span class="token string">&quot;3.3.7&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">5</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">5</span><span class="token punctuation">,</span>
<span class="token property">&quot;statusCode&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;status&quot;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</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></div><ul><li><code>type</code> : The command result type, except for the special ones such as <code>status</code>, the others remain the same as the Arthas command name. Please refer to the section &quot;<a href="#special_command_results">Special command results</a>&quot;.</li><li><code>jobId</code> : The job ID of the command.</li><li>Other fields are the data of each different command.</li></ul><p>Note: You can also use a one-time command to execute continuous output commands such as watch/trace, but you can&#39;t interrupt the command execution, and there may be hang up for a long time. Please refer to the example in the &quot;<a href="#change_watch_value_to_map">Make watch command output a map object</a>&quot; section.</p><p>Please try to deal with it in the following way:</p><ul><li>Set a reasonable <code>execTimeout</code> to forcibly interrupt the command execution after the timeout period is reached to avoid a long hang.</li><li>Use the <code>-n</code> parameter to specify a smaller number of executions.</li><li>Ensure the methods of the command matched can be successfully hit and the <code>condition-express</code> is written correctly. If the <code>watch/trace</code> does not hit, even if <code>-n 1</code> is specified, it will hang and wait until the execution timeout.</li></ul><h2 id="session-interaction" tabindex="-1"><a class="header-anchor" href="#session-interaction" aria-hidden="true">#</a> Session interaction</h2><p>Users create and manage Arthas sessions, which are suitable for complex interactive processes. The access process is as follows:</p><ul><li>Create a session</li><li>Join the session (optional)</li><li>Pull command results</li><li>Execute a series of commands</li><li>Interrupt command execution</li><li>Close the session</li></ul><h3 id="create-session" tabindex="-1"><a class="header-anchor" href="#create-session" aria-hidden="true">#</a> Create session</h3><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">-Ss</span> <span class="token parameter variable">-XPOST</span> http://localhost:8563/api <span class="token parameter variable">-d</span> <span class="token string">&#39;
{
&quot;action&quot;:&quot;init_session&quot;
}
&#39;</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></div><p>Response result:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;sessionId&quot;</span><span class="token operator">:</span> <span class="token string">&quot;b09f1353-202c-407b-af24-701b744f971e&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;consumerId&quot;</span><span class="token operator">:</span> <span class="token string">&quot;5ae4e5fbab8b4e529ac404f260d4e2d1_1&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;state&quot;</span><span class="token operator">:</span> <span class="token string">&quot;SUCCEEDED&quot;</span>
<span class="token punctuation">}</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></div><p>The new session ID is: <code>b09f1353-202c-407b-af24-701b744f971e</code>, and consumer ID is: <code>5ae4e5fbab8b4e529ac404f260d4e2d1_1</code>.</p><h3 id="join-session" tabindex="-1"><a class="header-anchor" href="#join-session" aria-hidden="true">#</a> Join session</h3><p>Specify the session ID to join, and the server will assign a new consumer ID. Multiple consumers can receive the same command results of target session. This interface is used to support multiple people sharing the same session or refreshing the page to retrieve the session history.</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">-Ss</span> <span class="token parameter variable">-XPOST</span> http://localhost:8563/api <span class="token parameter variable">-d</span> <span class="token string">&#39;
{
&quot;action&quot;:&quot;join_session&quot;,
&quot;sessionId&quot; : &quot;b09f1353-202c-407b-af24-701b744f971e&quot;
}
&#39;</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></div><p>Response result:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;consumerId&quot;</span><span class="token operator">:</span> <span class="token string">&quot;8f7f6ad7bc2d4cb5aa57a530927a95cc_2&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;sessionId&quot;</span><span class="token operator">:</span> <span class="token string">&quot;b09f1353-202c-407b-af24-701b744f971e&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;state&quot;</span><span class="token operator">:</span> <span class="token string">&quot;SUCCEEDED&quot;</span>
<span class="token punctuation">}</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></div><p>The new consumer ID is <code>8f7f6ad7bc2d4cb5aa57a530927a95cc_2 </code> .</p><h3 id="pull-command-results" tabindex="-1"><a class="header-anchor" href="#pull-command-results" aria-hidden="true">#</a> Pull command results</h3><p>The action of pulling the command result message is <code>pull_results</code>. Please use the Http long-polling method to periodically pull the result messages. The consumer&#39;s timeout period is 5 minutes. After the timeout, you need to call <code>join_session</code> to allocate a new consumer.</p><p>Each consumer is allocated a cache queue separately, and the pull order does not affect the content received by the consumer.</p><p>The request parameters require session ID and consumer ID:</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">-Ss</span> <span class="token parameter variable">-XPOST</span> http://localhost:8563/api <span class="token parameter variable">-d</span> <span class="token string">&#39;
{
&quot;action&quot;:&quot;pull_results&quot;,
&quot;sessionId&quot; : &quot;b09f1353-202c-407b-af24-701b744f971e&quot;,
&quot;consumerId&quot; : &quot;8f7f6ad7bc2d4cb5aa57a530927a95cc_2&quot;
}
&#39;</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></div><p>Use Bash scripts to regularly pull results messages:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token keyword">while</span> <span class="token boolean">true</span><span class="token punctuation">;</span> <span class="token keyword">do</span> <span class="token function">curl</span> <span class="token parameter variable">-Ss</span> <span class="token parameter variable">-XPOST</span> http://localhost:8563/api <span class="token parameter variable">-d</span> <span class="token string">&#39;
{
&quot;action&quot;:&quot;pull_results&quot;,
&quot;sessionId&quot; : &quot;2b085b5d-883b-4914-ab35-b2c5c1d5aa2a&quot;,
&quot;consumerId&quot; : &quot;8ecb9cb7c7804d5d92e258b23d5245cc_1&quot;
}
&#39;</span> <span class="token operator">|</span> json_pp<span class="token punctuation">;</span> <span class="token function">sleep</span> <span class="token number">2</span><span class="token punctuation">;</span> <span class="token keyword">done</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></div><p>Note: The <code>json_pp</code> tool formats the output content as pretty json.</p><p>The response content is as follows:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;body&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">&quot;results&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;inputStatus&quot;</span><span class="token operator">:</span> <span class="token string">&quot;DISABLED&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;input_status&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;message&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">&quot;message&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Welcome to arthas!&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;tutorials&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://arthas.aliyun.com/doc/arthas-tutorials.html&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;time&quot;</span><span class="token operator">:</span> <span class="token string">&quot;2020-08-06 15:56:43&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;welcome&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">&quot;pid&quot;</span><span class="token operator">:</span> <span class="token string">&quot;7909&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;wiki&quot;</span><span class="token operator">:</span> <span class="token string">&quot;https://arthas.aliyun.com/doc&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;version&quot;</span><span class="token operator">:</span> <span class="token string">&quot;3.3.7&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;inputStatus&quot;</span><span class="token operator">:</span> <span class="token string">&quot;ALLOW_INPUT&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;input_status&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">0</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token property">&quot;sessionId&quot;</span><span class="token operator">:</span> <span class="token string">&quot;b09f1353-202c-407b-af24-701b744f971e&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;consumerId&quot;</span><span class="token operator">:</span> <span class="token string">&quot;8f7f6ad7bc2d4cb5aa57a530927a95cc_2&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;state&quot;</span><span class="token operator">:</span> <span class="token string">&quot;SUCCEEDED&quot;</span>
<span class="token punctuation">}</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 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><h3 id="execute-commands-asynchronously" tabindex="-1"><a class="header-anchor" href="#execute-commands-asynchronously" aria-hidden="true">#</a> Execute commands asynchronously</h3><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">-Ss</span> <span class="token parameter variable">-XPOST</span> http://localhost:8563/api <span class="token parameter variable">-d</span> <span class="token string">&#39;&#39;</span>&#39;
<span class="token punctuation">{</span>
<span class="token string">&quot;action&quot;</span><span class="token builtin class-name">:</span><span class="token string">&quot;async_exec&quot;</span>,
<span class="token string">&quot;command&quot;</span><span class="token builtin class-name">:</span><span class="token string">&quot;watch demo.MathGame primeFactors <span class="token entity" title="\&quot;">\&quot;</span>{params, returnObj, throwExp}<span class="token entity" title="\&quot;">\&quot;</span> &quot;</span>,
<span class="token string">&quot;sessionId&quot;</span> <span class="token builtin class-name">:</span> <span class="token string">&quot;2b085b5d-883b-4914-ab35-b2c5c1d5aa2a&quot;</span>
<span class="token punctuation">}</span>
<span class="token string">&#39;&#39;</span>&#39;
</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></div><p>Response of <code>async_exec</code>:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;sessionId&quot;</span><span class="token operator">:</span> <span class="token string">&quot;2b085b5d-883b-4914-ab35-b2c5c1d5aa2a&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;state&quot;</span><span class="token operator">:</span> <span class="token string">&quot;SCHEDULED&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;body&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">&quot;jobStatus&quot;</span><span class="token operator">:</span> <span class="token string">&quot;READY&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">&quot;command&quot;</span><span class="token operator">:</span> <span class="token string">&quot;watch demo.MathGame primeFactors \&quot;{params, returnObj, throwExp}\&quot; &quot;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</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></div><ul><li><code>state</code> : The status of <code>SCHEDULED</code> means that the command has been parsed and generated the job, but the execution has not started.</li><li><code>body.jobId</code> : The job id of command execution, filter the command results output in <code>pull_results</code> according to this job ID.</li><li><code>body.jobStatus</code> : The job status <code>READY</code> means that execution has not started.</li></ul><p>The shell output of the script that continuously pulls the result message:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;body&quot;</span> <span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">&quot;results&quot;</span> <span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;type&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;command&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span> <span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">&quot;state&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;SCHEDULED&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;command&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;watch demo.MathGame primeFactors \&quot;{params, returnObj, throwExp}\&quot; &quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;inputStatus&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;ALLOW_INTERRUPT&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span> <span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;input_status&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;success&quot;</span> <span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span> <span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">&quot;effect&quot;</span> <span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">&quot;listenerId&quot;</span> <span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">&quot;cost&quot;</span> <span class="token operator">:</span> <span class="token number">24</span><span class="token punctuation">,</span>
<span class="token property">&quot;classCount&quot;</span> <span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token property">&quot;methodCount&quot;</span> <span class="token operator">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;enhancer&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;sizeLimit&quot;</span> <span class="token operator">:</span> <span class="token number">10485760</span><span class="token punctuation">,</span>
<span class="token property">&quot;expand&quot;</span> <span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span> <span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;watch&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;cost&quot;</span> <span class="token operator">:</span> <span class="token number">0.071499</span><span class="token punctuation">,</span>
<span class="token property">&quot;ts&quot;</span> <span class="token operator">:</span> <span class="token number">1596703453237</span><span class="token punctuation">,</span>
<span class="token property">&quot;value&quot;</span> <span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">[</span>
<span class="token number">-170365</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token null keyword">null</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;stackTrace&quot;</span> <span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;className&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;demo.MathGame&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;classLoaderName&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;app&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;methodName&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;primeFactors&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;nativeMethod&quot;</span> <span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
<span class="token property">&quot;lineNumber&quot;</span> <span class="token operator">:</span> <span class="token number">46</span><span class="token punctuation">,</span>
<span class="token property">&quot;fileName&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;MathGame.java&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
...
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token property">&quot;localizedMessage&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;number is: -170365, need &gt;= 2&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;@type&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;java.lang.IllegalArgumentException&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;message&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;number is: -170365, need &gt;= 2&quot;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
<span class="token property">&quot;type&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;watch&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;cost&quot;</span> <span class="token operator">:</span> <span class="token number">0.033375</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span> <span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">&quot;ts&quot;</span> <span class="token operator">:</span> <span class="token number">1596703454241</span><span class="token punctuation">,</span>
<span class="token property">&quot;value&quot;</span> <span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">[</span>
<span class="token number">1</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token punctuation">[</span>
<span class="token number">2</span><span class="token punctuation">,</span>
<span class="token number">2</span><span class="token punctuation">,</span>
<span class="token number">2</span><span class="token punctuation">,</span>
<span class="token number">2</span><span class="token punctuation">,</span>
<span class="token number">13</span><span class="token punctuation">,</span>
<span class="token number">491</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token null keyword">null</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token property">&quot;sizeLimit&quot;</span> <span class="token operator">:</span> <span class="token number">10485760</span><span class="token punctuation">,</span>
<span class="token property">&quot;expand&quot;</span> <span class="token operator">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span>
<span class="token punctuation">]</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token property">&quot;consumerId&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;8ecb9cb7c7804d5d92e258b23d5245cc_1&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;sessionId&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;2b085b5d-883b-4914-ab35-b2c5c1d5aa2a&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;state&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;SUCCEEDED&quot;</span>
<span class="token punctuation">}</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 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 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 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><p>The <code>value</code> of the watch command result is the value of watch-experss, and the above command is <code>{params, returnObj, throwExp}</code>, so the value of the watch result is an array of length 3, and each element corresponds to the expression in the corresponding order.</p><p>Please refer to the section &quot;<a href="#change_watch_value_to_map">Make watch command output a map object</a>&quot;.</p><h3 id="interrupt-command-execution" tabindex="-1"><a class="header-anchor" href="#interrupt-command-execution" aria-hidden="true">#</a> Interrupt command execution</h3><p>Interrupt the running foreground job of the session:</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">-Ss</span> <span class="token parameter variable">-XPOST</span> http://localhost:8563/api <span class="token parameter variable">-d</span> <span class="token string">&#39;&#39;</span>&#39;
<span class="token punctuation">{</span>
<span class="token string">&quot;action&quot;</span><span class="token builtin class-name">:</span><span class="token string">&quot;interrupt_job&quot;</span>,
<span class="token string">&quot;sessionId&quot;</span> <span class="token builtin class-name">:</span> <span class="token string">&quot;2b085b5d-883b-4914-ab35-b2c5c1d5aa2a&quot;</span>
<span class="token punctuation">}</span>
<span class="token string">&#39;&#39;</span>&#39;
</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></div><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;state&quot;</span><span class="token operator">:</span> <span class="token string">&quot;SUCCEEDED&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;body&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">&quot;jobStatus&quot;</span><span class="token operator">:</span> <span class="token string">&quot;TERMINATED&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">3</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</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></div><h3 id="close-session" tabindex="-1"><a class="header-anchor" href="#close-session" aria-hidden="true">#</a> Close session</h3><p>Specify the session ID to close the session.</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">-Ss</span> <span class="token parameter variable">-XPOST</span> http://localhost:8563/api <span class="token parameter variable">-d</span> <span class="token string">&#39;&#39;</span>&#39;
<span class="token punctuation">{</span>
<span class="token string">&quot;action&quot;</span><span class="token builtin class-name">:</span><span class="token string">&quot;close_session&quot;</span>,
<span class="token string">&quot;sessionId&quot;</span> <span class="token builtin class-name">:</span> <span class="token string">&quot;2b085b5d-883b-4914-ab35-b2c5c1d5aa2a&quot;</span>
<span class="token punctuation">}</span>
<span class="token string">&#39;&#39;</span>&#39;
</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></div><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;state&quot;</span><span class="token operator">:</span> <span class="token string">&quot;SUCCEEDED&quot;</span>
<span class="token punctuation">}</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></div><h2 id="authentication" tabindex="-1"><a class="header-anchor" href="#authentication" aria-hidden="true">#</a> Authentication</h2><ul><li>Reference: <a href="/en/doc/auth.html" class="">auth</a></li></ul><h2 id="web-ui" tabindex="-1"><a class="header-anchor" href="#web-ui" aria-hidden="true">#</a> Web UI</h2><p><img src="/images/arthas-web-ui.png" alt="" title="arthas web ui"></p><p>A Web UI based on Http API, visit url : <a href="http://127.0.0.1:8563/ui" target="_blank" rel="noopener noreferrer">http://127.0.0.1:8563/ui<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><p>Completed functions:</p><ul><li>Create a session</li><li>Copy and open the url to join the session, share the session with multiple people</li><li>Continuously pull session command result messages</li><li>Refresh the web page or join the session to pull command messages history</li><li>Control input or interrupt command status</li></ul><p>Pending function:</p><ul><li>Improve the readability of command result messages</li><li>Support automatic completion of input commands and command templates</li><li>Provide command help</li><li>Support personal profile settings</li></ul><p><a id="special_command_results"></a></p><h2 id="special-command-results" tabindex="-1"><a class="header-anchor" href="#special-command-results" aria-hidden="true">#</a> Special command results</h2><h3 id="status" tabindex="-1"><a class="header-anchor" href="#status" aria-hidden="true">#</a> status</h3><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">5</span><span class="token punctuation">,</span>
<span class="token property">&quot;statusCode&quot;</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;status&quot;</span>
<span class="token punctuation">}</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></div><p><code>type</code> is <code>status</code> to indicate the command execution status:</p><p>After each command is executed, there is a unique status result. If the <code>statusCode</code> is 0, it means the execution is successful, and the <code>statusCode</code> is a non-zero value that means the execution failed, similar to the process exit code.</p><p>When the command execution fails, an error message is generally provided, such as:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">&quot;message&quot;</span><span class="token operator">:</span> <span class="token string">&quot;The argument &#39;class-pattern&#39; is required&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;statusCode&quot;</span><span class="token operator">:</span> <span class="token number">-10</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;status&quot;</span>
<span class="token punctuation">}</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></div><h3 id="input-status" tabindex="-1"><a class="header-anchor" href="#input-status" aria-hidden="true">#</a> input_status</h3><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;inputStatus&quot;</span><span class="token operator">:</span> <span class="token string">&quot;ALLOW_INPUT&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;input_status&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">0</span>
<span class="token punctuation">}</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></div><p><code>type</code> is <code>input_status</code> to indicate input status:</p><p>It is used to control user input during UI interaction, and a change message will be sent before and after each command is executed.</p><p>Possible values of <code>inputStatus</code>:</p><ul><li><code>ALLOW_INPUT</code> : Allow users to enter commands, which means that the session has no foreground command being executed and can accept new command.</li><li><code>ALLOW_INTERRUPT</code> : Allow the user to interrupt the command execution, indicating that a command is currently being executed, and the user can send <code>interrupt_job</code> to interrupt the execution.</li><li><code>DISABLED</code> : In the disabled state, commands cannot be entered or interrupted.</li></ul><h3 id="command" tabindex="-1"><a class="header-anchor" href="#command" aria-hidden="true">#</a> command</h3><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;command&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">&quot;state&quot;</span><span class="token operator">:</span> <span class="token string">&quot;SCHEDULED&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;command&quot;</span><span class="token operator">:</span> <span class="token string">&quot;watch demo.MathGame primeFactors \&quot;{params, returnObj, throwExp}\&quot; &quot;</span>
<span class="token punctuation">}</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></div><p><code>type</code> is <code>command</code> to indicate the input command data:</p><p>It is used for the interactive UI to echo the commands entered by the user. The pulled session command message history will contain messages of type <code>command</code>, which can be processed in order.</p><h3 id="enhancer" tabindex="-1"><a class="header-anchor" href="#enhancer" aria-hidden="true">#</a> enhancer</h3><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;success&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
<span class="token property">&quot;jobId&quot;</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">&quot;effect&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">&quot;listenerId&quot;</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">&quot;cost&quot;</span><span class="token operator">:</span> <span class="token number">24</span><span class="token punctuation">,</span>
<span class="token property">&quot;classCount&quot;</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token property">&quot;methodCount&quot;</span><span class="token operator">:</span> <span class="token number">1</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;enhancer&quot;</span>
<span class="token punctuation">}</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></div><p><code>type</code> is <code>enhancer</code> to indicate the result of class enhancement:</p><p>Commands such as <code>trace/watch/jad/tt</code> need to enhance the class and will receive this <code>enhancer</code> result. It may happen that the result of <code>enhancer</code> is successful, but there is no hit method. The client can prompt the user according to the result of <code>enhancer</code>.</p><h2 id="cases" tabindex="-1"><a class="header-anchor" href="#cases" aria-hidden="true">#</a> Cases</h2><h3 id="get-classpath-of-java-application" tabindex="-1"><a class="header-anchor" href="#get-classpath-of-java-application" aria-hidden="true">#</a> Get classpath of Java application</h3><p>Get system properties of the Java application through Http api and extract the value of <code>java.class.path</code>.</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token assign-left variable">json_data</span><span class="token operator">=</span><span class="token variable"><span class="token variable">$(</span><span class="token function">curl</span> <span class="token parameter variable">-Ss</span> <span class="token parameter variable">-XPOST</span> http://localhost:8563/api <span class="token parameter variable">-d</span> <span class="token string">&#39;
{
&quot;action&quot;:&quot;exec&quot;,
&quot;command&quot;:&quot;sysprop&quot;
}&#39;</span><span class="token variable">)</span></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></div><ul><li>Extract value with <code>sed</code>:</li></ul><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token assign-left variable">class_path</span><span class="token operator">=</span><span class="token variable"><span class="token variable">$(</span><span class="token builtin class-name">echo</span> $json_data <span class="token operator">|</span> <span class="token function">tr</span> <span class="token parameter variable">-d</span> <span class="token string">&#39;\n&#39;</span> <span class="token operator">|</span> <span class="token function">sed</span> <span class="token string">&#39;s/.*&quot;java.class.path&quot;:&quot;\([^&quot;]*\).*/\1/&#39;</span><span class="token variable">)</span></span>
<span class="token builtin class-name">echo</span> <span class="token string">&quot;classpath: <span class="token variable">$class_path</span>&quot;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><ul><li>Extract value with <code>json_pp/awk</code>:</li></ul><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token assign-left variable">class_path</span><span class="token operator">=</span><span class="token variable"><span class="token variable">$(</span><span class="token builtin class-name">echo</span> $json_data <span class="token operator">|</span> <span class="token function">tr</span> <span class="token parameter variable">-d</span> <span class="token string">&#39;\n&#39;</span> <span class="token operator">|</span> json_pp <span class="token operator">|</span> <span class="token function">grep</span> java.class.path <span class="token operator">|</span> <span class="token function">awk</span> -F<span class="token string">&#39;&quot;&#39;</span> <span class="token string">&#39;{ print $4 }&#39;</span><span class="token variable">)</span></span>
<span class="token builtin class-name">echo</span> <span class="token string">&quot;classpath: <span class="token variable">$class_path</span>&quot;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p>Output:</p><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>classpath: demo-arthas-spring-boot.jar
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>NOTE:</p><ul><li><code>echo $json_data | tr -d &#39;\n&#39;</code> : Delete line breaks (the value of <code>line.separator</code>) to avoid affecting the processing of <code>sed</code>/<code>json_pp</code> commands.</li><li><code>awk -F&#39;&quot;&#39; &#39;{ print $4 }&#39;</code> : Use double quote as delimiter</li></ul><p><a id="change_watch_value_to_map"></a></p><h3 id="make-watch-command-output-a-map-object" tabindex="-1"><a class="header-anchor" href="#make-watch-command-output-a-map-object" aria-hidden="true">#</a> Make watch command output a map object</h3><p>The result value of <code>watch</code> is generated by calculating the <code>watch-express</code> ognl expression. You can change the ognl expression to generate the desired value, please refer to <a href="https://commons.apache.org/dormant/commons-ognl/language-guide.html" target="_blank" rel="noopener noreferrer">OGNL document<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><div class="custom-container tip"><p class="custom-container-title">TIP</p><p>Maps can also be created using a special syntax.</p><p>#{ &quot;foo&quot; : &quot;foo value&quot;, &quot;bar&quot; : &quot;bar value&quot; }</p><p>This creates a Map initialized with mappings for &quot;foo&quot; and &quot;bar&quot;.</p></div><p>The following command generates values in map format:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">watch</span> *MathGame prime* <span class="token string">&#39;#{ &quot;params&quot; : params, &quot;returnObj&quot; : returnObj, &quot;throwExp&quot;: throwExp}&#39;</span> <span class="token parameter variable">-x</span> <span class="token number">2</span> <span class="token parameter variable">-n</span> <span class="token number">5</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>Execute the above command in Telnet shell/WebConsole, the output result:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token assign-left variable">ts</span><span class="token operator">=</span><span class="token number">2020</span>-08-06 <span class="token number">16</span>:57:20<span class="token punctuation">;</span> <span class="token punctuation">[</span>cost<span class="token operator">=</span><span class="token number">0</span>.241735ms<span class="token punctuation">]</span> <span class="token assign-left variable">result</span><span class="token operator">=</span>@LinkedHashMap<span class="token punctuation">[</span>
@String<span class="token punctuation">[</span>params<span class="token punctuation">]</span>:@Object<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">[</span>
@Integer<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span>,
<span class="token punctuation">]</span>,
@String<span class="token punctuation">[</span>returnObj<span class="token punctuation">]</span>:@ArrayList<span class="token punctuation">[</span>
@Integer<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span>,
@Integer<span class="token punctuation">[</span><span class="token number">241</span><span class="token punctuation">]</span>,
@Integer<span class="token punctuation">[</span><span class="token number">379</span><span class="token punctuation">]</span>,
<span class="token punctuation">]</span>,
@String<span class="token punctuation">[</span>throwExp<span class="token punctuation">]</span>:null,
<span class="token punctuation">]</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></div><p>Execute the above command with Http api, pay attention to escaping the JSON double quotes:</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">-Ss</span> <span class="token parameter variable">-XPOST</span> http://localhost:8563/api <span class="token parameter variable">-d</span> @- <span class="token operator">&lt;&lt;</span> <span class="token string">EOF
{
&quot;action&quot;:&quot;exec&quot;,
&quot;execTimeout&quot;: 30000,
&quot;command&quot;:&quot;watch *MathGame prime* &#39;#{ <span class="token entity" title="\&quot;">\&quot;</span>params<span class="token entity" title="\&quot;">\&quot;</span> : params, <span class="token entity" title="\&quot;">\&quot;</span>returnObj<span class="token entity" title="\&quot;">\&quot;</span> : returnObj, <span class="token entity" title="\&quot;">\&quot;</span>throwExp<span class="token entity" title="\&quot;">\&quot;</span>: throwExp}&#39; -n 3 &quot;
}
EOF</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></div><p>Http api execution result:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;body&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
...
<span class="token property">&quot;results&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
...
<span class="token punctuation">{</span>
...
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;watch&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;value&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">&quot;params&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token number">1</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token property">&quot;returnObj&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token number">2</span><span class="token punctuation">,</span>
<span class="token number">5</span><span class="token punctuation">,</span>
<span class="token number">17</span><span class="token punctuation">,</span>
<span class="token number">23</span><span class="token punctuation">,</span>
<span class="token number">23</span>
<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">{</span>
...
<span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;watch&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;value&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">&quot;params&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token number">-98278</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token property">&quot;throwExp&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">&quot;@type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;java.lang.IllegalArgumentException&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;localizedMessage&quot;</span><span class="token operator">:</span> <span class="token string">&quot;number is: -98278, need &gt;= 2&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;message&quot;</span><span class="token operator">:</span> <span class="token string">&quot;number is: -98278, need &gt;= 2&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;stackTrace&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span>
...
<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
...
<span class="token punctuation">}</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 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><p>You can see that the value of the watch result becomes a map object, and the program can read value through a key .</p></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/http-api.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-label">Last Updated: </span><!----></div><div class="meta-item contributors"><span class="meta-item-label">Contributors: </span><span class="meta-item-info"><!--[--><!--[--><span class="contributor" title="email: hengyunabc@gmail.com">hengyunabc</span><!--[-->, <!--]--><!--]--><!--[--><span class="contributor" title="email: kylixs@qq.com">gongdewei</span><!--[-->, <!--]--><!--]--><!--[--><span class="contributor" title="email: i@fatpandac.com">Fatpandac</span><!--[-->, <!--]--><!--]--><!--[--><span class="contributor" title="email: haoyixing@kuaishou.com">haoyixing</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="/en/doc/spring-boot-starter.html" class="" aria-label="Arthas Spring Boot Starter"><!--[--><!--]--> Arthas Spring Boot Starter <!--[--><!--]--></a></span><span class="next"><a href="/en/doc/batch-support.html" class="" aria-label="Batch Processing"><!--[--><!--]--> Batch Processing <!--[--><!--]--></a></span></p></nav><!--[--><!--]--></main><!--]--></div><!----><!--]--></div>
<script type="module" src="/assets/app.5024572d.js" defer></script>
</body>
</html>