<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>
<li>session - display current session information</li>
<li><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">shutdown</span></code></li>
<li>version - print the version for the Arthas attached to the current Java process</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><aclass="reference internal"href="keymap.html"><spanclass="doc">keymap</span></a> - keymap for Arthas keyboard shortcut</li>
<li><aclass="reference internal"href="sc.html"><spanclass="doc">sc</span></a> - check the info for the classes loaded by JVM</li>
<li><aclass="reference internal"href="sm.html"><spanclass="doc">sm</span></a> - check methods info for the loaded classes</li>
<li><aclass="reference internal"href="dump.html"><spanclass="doc">dump</span></a> - dump the loaded classes in byte code to the specified location</li>
<li><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</li>
<li><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></li>
<spanid="monitor-watch-trace-related"></span><h2>monitor/watch/trace - related<aclass="headerlink"href="#monitor-watch-trace-related"title="Permalink to this headline">¶</a></h2>
<div><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 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 <codeclass="docutils literal notranslate"><spanclass="pre">shutdown</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">reset</span></code>.</div></blockquote>
<li><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</li>
<li><aclass="reference internal"href="trace.html"><spanclass="doc">trace</span></a> - trace the execution time of specified method invocation</li>
<li><aclass="reference internal"href="stack.html"><spanclass="doc">stack</span></a> - display the stack trace for the specified class and method</li>
<li><aclass="reference internal"href="tt.html"><spanclass="doc">tt</span></a> - time tunnel, record the arguments and returned value for the methods and replay</li>
<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">org.apache.log4j.Logger</span><spanclass="pre">|</span><spanclass="pre">grep</span><spanclass="pre"><init></span></code>. Commands supported in <codeclass="docutils literal notranslate"><spanclass="pre">pipe</span></code>:</p>
<spanid="async-in-background"></span><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 enviornment, e.g. one <codeclass="docutils literal notranslate"><spanclass="pre">watch</span></code> condition may happen only once in one single day.</p>
<li>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)</li>
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>.