<liclass="toctree-l1"><aclass="reference external"href="https://github.com/alibaba/arthas/issues?q=label%3Aquestion-answered">Questions and answers</a></li>
<liclass="toctree-l1"><aclass="reference external"href="https://github.com/alibaba/arthas">Fork me at GitHub</a></li>
<liclass="toctree-l1"><aclass="reference external"href="https://github.com/alibaba/arthas/blob/master/CONTRIBUTING.md#">Compile and debug/CONTRIBUTING</a></li>
<li><p><aclass="reference internal"href="tee.html"><spanclass="doc">tee</span></a> - Copies standard input to standard output, making a copy in zero or more files.</p></li>
<li><p><aclass="reference internal"href="reset.html"><spanclass="doc">reset</span></a> - reset all the enhanced classes. All enhanced classes will also be reset when Arthas server is closed by <codeclass="docutils literal notranslate"><spanclass="pre">stop</span></code></p></li>
<li><p><aclass="reference internal"href="mbean.html"><spanclass="doc">mbean</span></a> - show Mbean information</p></li>
<li><p><aclass="reference internal"href="heapdump.html"><spanclass="doc">heapdump</span></a> - dump java heap in hprof binary format, like <codeclass="docutils literal notranslate"><spanclass="pre">jmap</span></code></p></li>
<li><p><aclass="reference internal"href="sc.html"><spanclass="doc">sc</span></a> - check the info for the classes loaded by JVM</p></li>
<li><p><aclass="reference internal"href="sm.html"><spanclass="doc">sm</span></a> - check methods info for the loaded classes</p></li>
<li><p><aclass="reference internal"href="jad.html"><spanclass="doc">jad</span></a> - decompile the specified loaded classes</p></li>
<li><p><aclass="reference internal"href="mc.html"><spanclass="doc">mc</span></a> - Memory compiler, compiles <codeclass="docutils literal notranslate"><spanclass="pre">.java</span></code> files into <codeclass="docutils literal notranslate"><spanclass="pre">.class</span></code> files in memory</p></li>
<li><p><aclass="reference internal"href="redefine.html"><spanclass="doc">redefine</span></a> - load external <codeclass="docutils literal notranslate"><spanclass="pre">*.class</span></code> files and re-define it into JVM</p></li>
<li><p><aclass="reference internal"href="dump.html"><spanclass="doc">dump</span></a> - dump the loaded classes in byte code to the specified location</p></li>
<li><p><aclass="reference internal"href="classloader.html"><spanclass="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. <codeclass="docutils literal notranslate"><spanclass="pre">java/lang/String.class</span></code></p></li>
<div><p><strong>Attention</strong>: commands here are taking advantage of byte-code-injection, which means we are injecting some <aclass="reference external"href="https://en.wikipedia.org/wiki/Aspect-oriented_programming">aspects</a> into the current classes for monitoring and statistics purpose. Therefore, when using 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 <codeclass="docutils literal notranslate"><spanclass="pre">stop</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">reset</span></code>.</p>
<li><p><aclass="reference internal"href="watch.html"><spanclass="doc">watch</span></a> - display the input/output parameter, return object, and thrown exception of specified method invocation</p></li>
<li><p><aclass="reference internal"href="trace.html"><spanclass="doc">trace</span></a> - trace the execution time of specified method invocation</p></li>
<li><p><aclass="reference internal"href="stack.html"><spanclass="doc">stack</span></a> - display the stack trace for the specified class and method</p></li>
<li><p><aclass="reference internal"href="tt.html"><spanclass="doc">tt</span></a> - time tunnel, record the arguments and returned value for the methods and replay</p></li>
<li><p><aclass="reference internal"href="profiler.html"><spanclass="doc">profiler</span></a> - use <aclass="reference external"href="https://github.com/jvm-profiling-tools/async-profiler">async-profiler</a> to generate flame graph</p></li>
<h2>pipe<aclass="headerlink"href="#pipe"title="Permalink to this headline">¶</a></h2>
<p>Arthas provides <codeclass="docutils literal notranslate"><spanclass="pre">pipe</span></code> to process the result returned from commands further, e.g. <codeclass="docutils literal notranslate"><spanclass="pre">sm</span><spanclass="pre">java.lang.String</span><spanclass="pre">*</span><spanclass="pre">|</span><spanclass="pre">grep</span><spanclass="pre">'index'</span></code>. Commands supported in <codeclass="docutils literal notranslate"><spanclass="pre">pipe</span></code>:</p>
<h2>async in background<aclass="headerlink"href="#async-in-background"title="Permalink to this headline">¶</a></h2>
<p><aclass="reference internal"href="async.html"><spanclass="doc">async</span></a> can be handy when a problem is hardly to reproduce in the production environment, e.g. one <codeclass="docutils literal notranslate"><spanclass="pre">watch</span></code> condition may happen only once in one single day.</p>
<li><p>job control - use <codeclass="docutils literal notranslate"><spanclass="pre">></span></code> to redirect result into the log file, use <codeclass="docutils literal notranslate"><spanclass="pre">&</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>
<h2>User data report<aclass="headerlink"href="#user-data-report"title="Permalink to this headline">¶</a></h2>
<p>After the <codeclass="docutils literal notranslate"><spanclass="pre">3.1.4</span></code> version, arthas support user data report.</p>
<p>At startup, use the <codeclass="docutils literal notranslate"><spanclass="pre">stat-url</span></code> option, such as: <codeclass="docutils literal notranslate"><spanclass="pre">./as.sh</span><spanclass="pre">--stat-url</span><spanclass="pre">'http://192.168.10.11:8080/api/stat'</span></code></p>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.