update doc 3.1.2

This commit is contained in:
hengyunabc committed 2019-09-09 14:49:55 +08:00
1 parent 1afcb5035d
commit 39091052c1
206 files changed
+8994 -6117

No files matched your search

+81 -90
View File
@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Advanced Usage &mdash; Arthas 3.1.1 documentation</title>
<title>Advanced Usage &mdash; Arthas 3.1.2 documentation</title>
@@ -19,13 +19,20 @@
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/overrides.css" type="text/css" />
@@ -37,21 +44,16 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/github.min.css">
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<div class="wy-side-nav-search" >
@@ -65,7 +67,7 @@
<div class="version">
3.1.1
3.1.2
</div>
@@ -92,6 +94,7 @@
<ul class="current">
<li class="toctree-l1"><a class="reference external" href="https://alibaba.github.io/arthas/arthas-tutorials?language=en">Online tutorials(Recommend)</a></li>
<li class="toctree-l1"><a class="reference internal" href="install-detail.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="download.html">Download</a></li>
<li class="toctree-l1"><a class="reference internal" href="quick-start.html">Quick start</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Advanced usage</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#basic">Basic</a></li>
@@ -115,12 +118,13 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="commands.html">Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="web-console.html">WebConsole</a></li>
<li class="toctree-l1"><a class="reference internal" href="docker.html">Docker</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/issues?q=label%3Auser-case">User cases</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered">Questions and answers</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas">Fork me at GitHub</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md">CONTRIBUTING</a></li>
<li class="toctree-l1"><a class="reference internal" href="release-notes.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/blob/master/CONTRIBUTING">Compile and debug/CONTRIBUTING</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/alibaba/arthas/releases">Release Notes</a></li>
</ul>
@@ -188,88 +192,92 @@
<div itemprop="articleBody">
<div class="section" id="advanced-usage">
<span id="advanced-usage"></span><h1>Advanced Usage<a class="headerlink" href="#advanced-usage" title="Permalink to this headline"></a></h1>
<h1>Advanced Usage<a class="headerlink" href="#advanced-usage" title="Permalink to this headline"></a></h1>
<div class="section" id="basic">
<span id="basic"></span><h2>Basic<a class="headerlink" href="#basic" title="Permalink to this headline"></a></h2>
<h2>Basic<a class="headerlink" href="#basic" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>help - display Arthas help</li>
<li>cls - clear the screen</li>
<li><a class="reference internal" href="cat.html"><span class="doc">cat</span></a> - Concatenate and print files</li>
<li><a class="reference internal" href="pwd.html"><span class="doc">pwd</span></a> - Return working directory name</li>
<li>session - display current session information</li>
<li><a class="reference internal" href="reset.html"><span class="doc">reset</span></a> - reset all the enhanced classes. All enhanced classes will also be reset when Arthas server is closed by <tt class="docutils literal">shutdown</tt></li>
<li>version - print the version for the Arthas attached to the current Java process</li>
<li>history - view command history</li>
<li>quit/exit - exit the current Arthas session, without effecting other sessions</li>
<li>shutdown - terminate the Arthas server, all Arthas sessions will be destroyed</li>
<li><a class="reference internal" href="keymap.html"><span class="doc">keymap</span></a> - keymap for Arthas keyboard shortcut</li>
<li><p>help - display Arthas help</p></li>
<li><p>cls - clear the screen</p></li>
<li><p><a class="reference internal" href="cat.html"><span class="doc">cat</span></a> - Concatenate and print files</p></li>
<li><p><a class="reference internal" href="pwd.html"><span class="doc">pwd</span></a> - Return working directory name</p></li>
<li><p>session - display current session information</p></li>
<li><p><a class="reference internal" href="reset.html"><span class="doc">reset</span></a> - reset all the enhanced classes. All enhanced classes will also be reset when Arthas server is closed by <code class="docutils literal notranslate"><span class="pre">shutdown</span></code></p></li>
<li><p>version - print the version for the Arthas attached to the current Java process</p></li>
<li><p>history - view command history</p></li>
<li><p>quit/exit - exit the current Arthas session, without effecting other sessions</p></li>
<li><p>shutdown - terminate the Arthas server, all Arthas sessions will be destroyed</p></li>
<li><p><a class="reference internal" href="keymap.html"><span class="doc">keymap</span></a> - keymap for Arthas keyboard shortcut</p></li>
</ul>
</div>
<div class="section" id="jvm">
<span id="jvm"></span><h2>JVM<a class="headerlink" href="#jvm" title="Permalink to this headline"></a></h2>
<h2>JVM<a class="headerlink" href="#jvm" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><a class="reference internal" href="dashboard.html"><span class="doc">dashboard</span></a> - dashboard for the system’s real-time data</li>
<li><a class="reference internal" href="thread.html"><span class="doc">thread</span></a> - show java thread information</li>
<li><a class="reference internal" href="jvm.html"><span class="doc">jvm</span></a> - show JVM information</li>
<li><a class="reference internal" href="sysprop.html"><span class="doc">sysprop</span></a> - view/modify system properties</li>
<li><a class="reference internal" href="sysenv.html"><span class="doc">sysenv</span></a> — view system environment variables</li>
<li><a class="reference internal" href="getstatic.html"><span class="doc">getstatic</span></a> - examine class’s static properties</li>
<li><strong>New!</strong> <a class="reference internal" href="ognl.html"><span class="doc">ognl</span></a> - execute ongl expression</li>
<li><strong>New!</strong> <a class="reference internal" href="mbean.html"><span class="doc">mbean</span></a> - show Mbean information</li>
<li><p><a class="reference internal" href="dashboard.html"><span class="doc">dashboard</span></a> - dashboard for the system’s real-time data</p></li>
<li><p><a class="reference internal" href="thread.html"><span class="doc">thread</span></a> - show java thread information</p></li>
<li><p><a class="reference internal" href="jvm.html"><span class="doc">jvm</span></a> - show JVM information</p></li>
<li><p><a class="reference internal" href="sysprop.html"><span class="doc">sysprop</span></a> - view/modify system properties</p></li>
<li><p><a class="reference internal" href="sysenv.html"><span class="doc">sysenv</span></a> — view system environment variables</p></li>
<li><p><a class="reference internal" href="vmoption.html"><span class="doc">vmoption</span></a> - view/modify the vm diagnostic options.</p></li>
<li><p><a class="reference internal" href="logger.html"><span class="doc">logger</span></a> - print the logger information, update the logger level</p></li>
<li><p><a class="reference internal" href="getstatic.html"><span class="doc">getstatic</span></a> - examine class’s static properties</p></li>
<li><p><a class="reference internal" href="ognl.html"><span class="doc">ognl</span></a> - execute ongl expression</p></li>
<li><p><a class="reference internal" href="mbean.html"><span class="doc">mbean</span></a> - show Mbean information</p></li>
<li><p><a class="reference internal" href="heapdump.html"><span class="doc">heapdump</span></a> - dump java heap in hprof binary format, like <code class="docutils literal notranslate"><span class="pre">jmap</span></code></p></li>
</ul>
</div>
<div class="section" id="class-classloader">
<span id="class-classloader"></span><h2>class/classloader<a class="headerlink" href="#class-classloader" title="Permalink to this headline"></a></h2>
<h2>class/classloader<a class="headerlink" href="#class-classloader" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><a class="reference internal" href="sc.html"><span class="doc">sc</span></a> - check the info for the classes loaded by JVM</li>
<li><a class="reference internal" href="sm.html"><span class="doc">sm</span></a> - check methods info for the loaded classes</li>
<li><a class="reference internal" href="jad.html"><span class="doc">jad</span></a> - decompile the specified loaded classes</li>
<li><a class="reference internal" href="mc.html"><span class="doc">mc</span></a> - Memory compiler, compiles <tt class="docutils literal">.java</tt> files into <tt class="docutils literal">.class</tt> files in memory</li>
<li><a class="reference internal" href="redefine.html"><span class="doc">redefine</span></a> - load external <tt class="docutils literal">*.class</tt> files and re-define it into JVM</li>
<li><a class="reference internal" href="dump.html"><span class="doc">dump</span></a> - dump the loaded classes in byte code to the specified location</li>
<li><a class="reference internal" href="classloader.html"><span class="doc">classloader</span></a> - check the inheritance structure, urls, class loading info for the specified class; using classloader to get the url of the resource e.g. <tt class="docutils literal">java/lang/String.class</tt></li>
<li><p><a class="reference internal" href="sc.html"><span class="doc">sc</span></a> - check the info for the classes loaded by JVM</p></li>
<li><p><a class="reference internal" href="sm.html"><span class="doc">sm</span></a> - check methods info for the loaded classes</p></li>
<li><p><a class="reference internal" href="jad.html"><span class="doc">jad</span></a> - decompile the specified loaded classes</p></li>
<li><p><a class="reference internal" href="mc.html"><span class="doc">mc</span></a> - Memory compiler, compiles <code class="docutils literal notranslate"><span class="pre">.java</span></code> files into <code class="docutils literal notranslate"><span class="pre">.class</span></code> files in memory</p></li>
<li><p><a class="reference internal" href="redefine.html"><span class="doc">redefine</span></a> - load external <code class="docutils literal notranslate"><span class="pre">*.class</span></code> files and re-define it into JVM</p></li>
<li><p><a class="reference internal" href="dump.html"><span class="doc">dump</span></a> - dump the loaded classes in byte code to the specified location</p></li>
<li><p><a class="reference internal" href="classloader.html"><span class="doc">classloader</span></a> - check the inheritance structure, urls, class loading info for the specified class; using classloader to get the url of the resource e.g. <code class="docutils literal notranslate"><span class="pre">java/lang/String.class</span></code></p></li>
</ul>
</div>
<div class="section" id="monitor-watch-trace-related">
<span id="monitor-watch-trace-related"></span><h2>monitor/watch/trace - related<a class="headerlink" href="#monitor-watch-trace-related" title="Permalink to this headline"></a></h2>
<h2>monitor/watch/trace - related<a class="headerlink" href="#monitor-watch-trace-related" title="Permalink to this headline"></a></h2>
<blockquote>
<div><strong>Attention</strong>: commands here are taking advantage of byte-code-injection, which means we are injecting some <a class="reference external" href="https://en.wikipedia.org/wiki/Aspect-oriented_programming">aspects</a> into the current classes for monitoring and statistics purpose. Therefore when use it for online troubleshooting in your production environment, you’d better <strong>explicitly specify</strong> classes/methods/criteria, and remember to remove the injected code by <tt class="docutils literal">shutdown</tt> or <tt class="docutils literal">reset</tt>.</div></blockquote>
<div><p><strong>Attention</strong>: commands here are taking advantage of byte-code-injection, which means we are injecting some <a class="reference external" href="https://en.wikipedia.org/wiki/Aspect-oriented_programming">aspects</a> into the current classes for monitoring and statistics purpose. Therefore when use it for online troubleshooting in your production environment, you’d better <strong>explicitly specify</strong> classes/methods/criteria, and remember to remove the injected code by <code class="docutils literal notranslate"><span class="pre">shutdown</span></code> or <code class="docutils literal notranslate"><span class="pre">reset</span></code>.</p>
</div></blockquote>
<ul class="simple">
<li><a class="reference internal" href="monitor.html"><span class="doc">monitor</span></a> - monitor method execution statistics</li>
<li><a class="reference internal" href="watch.html"><span class="doc">watch</span></a> - display the input/output parameter, return object, and thrown exception of specified method invocation</li>
<li><a class="reference internal" href="trace.html"><span class="doc">trace</span></a> - trace the execution time of specified method invocation</li>
<li><a class="reference internal" href="stack.html"><span class="doc">stack</span></a> - display the stack trace for the specified class and method</li>
<li><a class="reference internal" href="tt.html"><span class="doc">tt</span></a> - time tunnel, record the arguments and returned value for the methods and replay</li>
<li><p><a class="reference internal" href="monitor.html"><span class="doc">monitor</span></a> - monitor method execution statistics</p></li>
<li><p><a class="reference internal" href="watch.html"><span class="doc">watch</span></a> - display the input/output parameter, return object, and thrown exception of specified method invocation</p></li>
<li><p><a class="reference internal" href="trace.html"><span class="doc">trace</span></a> - trace the execution time of specified method invocation</p></li>
<li><p><a class="reference internal" href="stack.html"><span class="doc">stack</span></a> - display the stack trace for the specified class and method</p></li>
<li><p><a class="reference internal" href="tt.html"><span class="doc">tt</span></a> - time tunnel, record the arguments and returned value for the methods and replay</p></li>
</ul>
</div>
<div class="section" id="options">
<span id="options"></span><h2>options<a class="headerlink" href="#options" title="Permalink to this headline"></a></h2>
<h2>options<a class="headerlink" href="#options" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><a class="reference internal" href="options.html"><span class="doc">options</span></a> - check/set Arthas global options</li>
<li><p><a class="reference internal" href="options.html"><span class="doc">options</span></a> - check/set Arthas global options</p></li>
</ul>
</div>
<div class="section" id="pipe">
<span id="pipe"></span><h2>pipe<a class="headerlink" href="#pipe" title="Permalink to this headline"></a></h2>
<p>Arthas provides <tt class="docutils literal">pipe</tt> to process the result returned from commands further, e.g. <tt class="docutils literal">sm java.lang.String * | grep 'index'</tt>. Commands supported in <tt class="docutils literal">pipe</tt>:</p>
<h2>pipe<a class="headerlink" href="#pipe" title="Permalink to this headline"></a></h2>
<p>Arthas provides <code class="docutils literal notranslate"><span class="pre">pipe</span></code> to process the result returned from commands further, e.g. <code class="docutils literal notranslate"><span class="pre">sm</span> <span class="pre">java.lang.String</span> <span class="pre">*</span> <span class="pre">|</span> <span class="pre">grep</span> <span class="pre">'index'</span></code>. Commands supported in <code class="docutils literal notranslate"><span class="pre">pipe</span></code>:</p>
<ul class="simple">
<li>grep - filter the result with the given keyword</li>
<li>plaintext - remove the ANSI color</li>
<li>wc - count lines</li>
<li><p>grep - filter the result with the given keyword</p></li>
<li><p>plaintext - remove the ANSI color</p></li>
<li><p>wc - count lines</p></li>
</ul>
</div>
<div class="section" id="async-in-background">
<span id="async-in-background"></span><h2>async in background<a class="headerlink" href="#async-in-background" title="Permalink to this headline"></a></h2>
<p><a class="reference internal" href="async.html"><span class="doc">async</span></a> can be handy when a problem is hardly to reproduce in the production environment, e.g. one <tt class="docutils literal">watch</tt> condition may happen only once in one single day.</p>
<h2>async in background<a class="headerlink" href="#async-in-background" title="Permalink to this headline"></a></h2>
<p><a class="reference internal" href="async.html"><span class="doc">async</span></a> can be handy when a problem is hardly to reproduce in the production environment, e.g. one <code class="docutils literal notranslate"><span class="pre">watch</span></code> condition may happen only once in one single day.</p>
<ul class="simple">
<li>job control - use <tt class="docutils literal">></tt> to redirect result into the log file, use <tt class="docutils literal">&</tt> to put the job to the background. Job keeps running even if the session is disconnected (the session lifecycle is 1 day by default)</li>
<li>jobs - list all jobs</li>
<li>kill - forcibly terminate the job</li>
<li>fg - bring the suspend job to the foreground</li>
<li>bg - put the job to run in the background</li>
<li><p>job control - use <code class="docutils literal notranslate"><span class="pre">&gt;</span></code> to redirect result into the log file, use <code class="docutils literal notranslate"><span class="pre">&amp;</span></code> to put the job to the background. Job keeps running even if the session is disconnected (the session lifecycle is 1 day by default)</p></li>
<li><p>jobs - list all jobs</p></li>
<li><p>kill - forcibly terminate the job</p></li>
<li><p>fg - bring the suspend job to the foreground</p></li>
<li><p>bg - put the job to run in the background</p></li>
</ul>
</div>
<div class="section" id="web-console">
<span id="web-console"></span><h2>Web Console<a class="headerlink" href="#web-console" title="Permalink to this headline"></a></h2>
<h2>Web Console<a class="headerlink" href="#web-console" title="Permalink to this headline"></a></h2>
<p>Arthas supports living inside a browser. The communication between arthas and browser is via websocket.</p>
<div class="toctree-wrapper compound">
<ul>
@@ -278,7 +286,7 @@
</div>
</div>
<div class="section" id="other-features">
<span id="other-features"></span><h2>Other features<a class="headerlink" href="#other-features" title="Permalink to this headline"></a></h2>
<h2>Other features<a class="headerlink" href="#other-features" title="Permalink to this headline"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="async.html">Async support</a></li>
@@ -301,7 +309,7 @@
<a href="web-console.html" class="btn btn-neutral float-right" title="Web Console" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="quick-start.html" class="btn btn-neutral" title="Quick Start" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<a href="quick-start.html" class="btn btn-neutral float-left" title="Quick Start" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
@@ -310,7 +318,7 @@
<div role="contentinfo">
<p>
&copy; Copyright 2018-2019, Alibaba Middleware Group, and contributors.
&copy; Copyright 2018-2019, Alibaba Middleware Group, and contributors
</p>
</div>
@@ -327,33 +335,16 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'3.1.1',
LANGUAGE:'en',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<div class="github-fork-ribbon-wrapper right">
<div class="github-fork-ribbon">
<a href="https://github.com/alibaba/arthas" target="_blank">Fork me at GitHub</a>