<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Start Arthas — Arthas 3.0.6-SNAPSHOT documentation</title> <link rel="shortcut icon" href="_static/favicon.ico"/> <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" /> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <script src="_static/center_page.js"></script> <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"> <a href="index.html" class="icon icon-home"> Arthas </a> <div class="version"> 3.0.6-SNAPSHOT </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <ul> <li class="toctree-l1"><a class="reference internal" href="install-detail.html">Installation</a></li> <li class="toctree-l1"><a class="reference internal" href="quick-start.html">Quick start</a></li> <li class="toctree-l1"><a class="reference internal" href="advanced-use.html">Advanced usage</a></li> <li class="toctree-l1"><a class="reference internal" href="commands.html">Commands</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> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">Arthas</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html">Docs</a> »</li> <li>Start Arthas</li> <li class="wy-breadcrumbs-aside"> <a href="https://github.com/alibaba/arthas/blob/master/site/src/site/sphinx/en/start-arthas.md" class="fa fa-github"> Edit on GitHub</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="start-arthas"> <span id="start-arthas"></span><h1>Start Arthas<a class="headerlink" href="#start-arthas" title="Permalink to this headline">¶</a></h1> <div class="section" id="interactive-mode"> <span id="interactive-mode"></span><h2>Interactive Mode<a class="headerlink" href="#interactive-mode" title="Permalink to this headline">¶</a></h2> <div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">./as.sh </pre></div> </div> <div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">➜ bin git:(develop) ✗ ./as.sh Found existing java process, please choose one and hit RETURN. [1]: 3088 org.jetbrains.idea.maven.server.RemoteMavenServer * [2]: 12872 org.apache.catalina.startup.Bootstrap [3]: 2455 Attaching to 12872... ,---. ,------. ,--------.,--. ,--. ,---. ,---. / O \ | .--. ''--. .--'| '--' | / O \ ' .-' | .-. || '--'.' | | | .--. || .-. |`. `-. | | | || |\ \ | | | | | || | | |.-' | `--' `--'`--' '--' `--' `--' `--'`--' `--'`-----' $ </pre></div> </div> </div> <div class="section" id="non-interactive-mode"> <span id="non-interactive-mode"></span><h2>Non-Interactive Mode<a class="headerlink" href="#non-interactive-mode" title="Permalink to this headline">¶</a></h2> <p>Startup script is as follows:</p> <div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">./as.sh <PID>[@IP:PORT] </pre></div> </div> <div class="section" id="parameter-description"> <span id="parameter-description"></span><h3>Parameter Description<a class="headerlink" href="#parameter-description" title="Permalink to this headline">¶</a></h3> <ul class="simple"> <li><em>PID</em>: Target Java process ID (Make sure that the user executing the command has sufficient permissions to operate the target Java process.)</li> <li><em>IP</em>: The address that Arthas Server listens on, the default value is <tt class="docutils literal">127.0.0.1</tt>. Arthas allows multiple users to access simultaneously without interfering with each other.</li> <li><em>PORT</em>: Arthas Server port,the default value is 3658</li> </ul> </div> <div class="section" id="sample"> <span id="sample"></span><h3>Sample<a class="headerlink" href="#sample" title="Permalink to this headline">¶</a></h3> <ul> <li><p class="first">If IP and PORT are not specified, then the default values are 127.0.0.1 and 3658</p> <blockquote> <div><p>./as.sh 12345</p> </div></blockquote> <p>Equivalent to:</p> <blockquote> <div><p>./as.sh 12356@127.0.0.1:3658</p> </div></blockquote> </li> </ul> </div> <div class="section" id="remote-diagnosis"> <span id="remote-diagnosis"></span><h3>Remote Diagnosis<a class="headerlink" href="#remote-diagnosis" title="Permalink to this headline">¶</a></h3> <p>After starting Arthas Server on the target Java process, users can use <tt class="docutils literal">telnet</tt> connect to the remote Arthas Server, for example:</p> <div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">telnet 192.168.1.119 3658 </pre></div> </div> </div> <div class="section" id="sudo-support"> <span id="sudo-support"></span><h3>sudo Support<a class="headerlink" href="#sudo-support" title="Permalink to this headline">¶</a></h3> <p>Usually online environment will only grant users privilege as low as possible, instead, all advanced operations are through sudo-list. Since <tt class="docutils literal">as.sh</tt> script takes into account the current effective user, it is possible to run the script in the other rule, by specifying <tt class="docutils literal">-H</tt> option like this:</p> <div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">sudo -u admin -H ./as.sh 12345 </pre></div> </div> </div> <div class="section" id="windows-support"> <span id="windows-support"></span><h3>Windows Support<a class="headerlink" href="#windows-support" title="Permalink to this headline">¶</a></h3> <p>Right now <tt class="docutils literal">as.bat</tt> script supports one parameter only, which is: pid</p> <div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">as.bat <pid> </pre></div> </div> </div> </div> </div> </div> </div> <footer> <hr/> <div role="contentinfo"> <p> © Copyright 2018, Alibaba Middleware Group, and contributors. </p> </div> Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> </div> </div> </section> </div> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT:'./', VERSION:'3.0.6-SNAPSHOT', 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">Fork me at GitHub</a> </div> </div> <script type="text/javascript" src="_static/add_badges.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.5.0/highlightjs-line-numbers.min.js"></script> <script> document.querySelectorAll('div.hljs > pre').forEach(function(block) { hljs.highlightBlock(block); hljs.lineNumbersBlock(block); }); </script> <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> </body> </html>