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/start-arthas.html

313 lines
11 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!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 &mdash; Arthas 3.2.0 documentation</title>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<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" />
<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">
</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.2.0
</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 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"><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 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#">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>
</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> &raquo;</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">
<h1>Start Arthas<a class="headerlink" href="#start-arthas" title="Permalink to this headline"></a></h1>
<div class="section" id="interactive-mode">
<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 input the serial number of the process, eg : 1. Then hit ENTER.
[1]: 3088 org.jetbrains.idea.maven.server.RemoteMavenServer
* [2]: 12872 org.apache.catalina.startup.Bootstrap
[3]: 2455
Attaching to 12872...
,---. ,------. ,--------.,--. ,--. ,---. ,---.
/ O \ | .--. &#x27;&#x27;--. .--&#x27;| &#x27;--&#x27; | / O \ &#x27; .-&#x27;
| .-. || &#x27;--&#x27;.&#x27; | | | .--. || .-. |`. `-.
| | | || |\ \ | | | | | || | | |.-&#x27; |
`--&#x27; `--&#x27;`--&#x27; &#x27;--&#x27; `--&#x27; `--&#x27; `--&#x27;`--&#x27; `--&#x27;`-----&#x27;
$</pre></div>
</div>
</div>
<div class="section" id="non-interactive-mode">
<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 &lt;PID&gt;[@IP:PORT]</pre></div>
</div>
<div class="section" id="parameter-description">
<h3>Parameter Description<a class="headerlink" href="#parameter-description" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><em>PID</em>: Target Java process ID (Make sure that the user executing the command has sufficient permissions to operate the target Java process.)</p></li>
<li><p><em>IP</em>: The address that Arthas Server listens on, the default value is <code class="docutils literal notranslate"><span class="pre">127.0.0.1</span></code>. Arthas allows multiple users to access simultaneously without interfering with each other.</p></li>
<li><p><em>PORT</em>: Arthas Server portthe default value is 3658</p></li>
</ul>
</div>
<div class="section" id="sample">
<h3>Sample<a class="headerlink" href="#sample" title="Permalink to this headline"></a></h3>
<ul>
<li><p>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&#64;127.0.0.1:3658</p>
</div></blockquote>
</li>
</ul>
</div>
<div class="section" id="remote-diagnosis">
<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 <code class="docutils literal notranslate"><span class="pre">telnet</span></code> 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">
<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 <code class="docutils literal notranslate"><span class="pre">as.sh</span></code> script takes into account the current effective user, it is possible to run the script in the other rule, by specifying <code class="docutils literal notranslate"><span class="pre">-H</span></code> 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">
<h3>Windows Support<a class="headerlink" href="#windows-support" title="Permalink to this headline"></a></h3>
<p>Right now <code class="docutils literal notranslate"><span class="pre">as.bat</span></code> script supports one parameter only, which is: pid</p>
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">as.bat &lt;pid&gt;</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2018-2020, 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">
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>
</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");
if (window.location.hostname == "arthas.gitee.io") {
hm.src = "https://hm.baidu.com/hm.js?ecc1b0d9aeb73da1671876133211d4d3";
} else { // https://alibaba.github.io/arthas/
hm.src = "https://hm.baidu.com/hm.js?d5c5e25b100f0eb51a4c35c8a86ea9b4";
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>