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/assets/start-arthas.html.802129f5.js

19 lines
7.3 KiB
JavaScript

import{_ as a,o as s,c as e,d as n}from"./app.391b0e4e.js";const t={},r=n(`<h1 id="start-arthas" tabindex="-1"><a class="header-anchor" href="#start-arthas" aria-hidden="true">#</a> Start Arthas</h1><h2 id="interactive-mode" tabindex="-1"><a class="header-anchor" href="#interactive-mode" aria-hidden="true">#</a> Interactive Mode</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>./as.sh
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>\u279C bin git:<span class="token punctuation">(</span>develop<span class="token punctuation">)</span> \u2717 ./as.sh
Found existing java process, please choose one and input the serial number of the process, eg <span class="token builtin class-name">:</span> <span class="token number">1</span>. Then hit ENTER.
<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span>: <span class="token number">3088</span> org.jetbrains.idea.maven.server.RemoteMavenServer
* <span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span>: <span class="token number">12872</span> org.apache.catalina.startup.Bootstrap
<span class="token punctuation">[</span><span class="token number">3</span><span class="token punctuation">]</span>: <span class="token number">2455</span>
Attaching to <span class="token number">12872</span><span class="token punctuation">..</span>.
,---. ,------. ,--------.,--. ,--. ,---. ,---.
/ O <span class="token punctuation">\\</span> <span class="token operator">|</span> .--. <span class="token string">&#39;&#39;</span>--. .--<span class="token string">&#39;| &#39;</span>--<span class="token string">&#39; | / O \\ &#39;</span> .-<span class="token string">&#39;
| .-. || &#39;</span>--<span class="token string">&#39;.&#39;</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> .--. <span class="token operator">||</span> .-. <span class="token operator">|</span><span class="token variable"><span class="token variable">\`</span><span class="token builtin class-name">.</span> <span class="token variable">\`</span></span>-.
<span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">||</span> <span class="token operator">|</span><span class="token punctuation">\\</span> <span class="token punctuation">\\</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">||</span> <span class="token operator">|</span> <span class="token operator">|</span> <span class="token operator">|</span>.-<span class="token string">&#39; |
\`--&#39;</span> <span class="token variable"><span class="token variable">\`</span>--&#39;<span class="token variable">\`</span></span>--<span class="token string">&#39; &#39;</span>--<span class="token string">&#39; \`--&#39;</span> <span class="token variable"><span class="token variable">\`</span>--&#39; <span class="token variable">\`</span></span>--<span class="token string">&#39;\`--&#39;</span> <span class="token variable"><span class="token variable">\`</span>--&#39;<span class="token variable">\`</span></span>-----&#39;
$
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="non-interactive-mode" tabindex="-1"><a class="header-anchor" href="#non-interactive-mode" aria-hidden="true">#</a> Non-Interactive Mode</h2><p>Startup script is as follows:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>./as.sh <span class="token operator">&lt;</span>PID<span class="token operator">&gt;</span><span class="token punctuation">[</span>@IP:PORT<span class="token punctuation">]</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="parameter-description" tabindex="-1"><a class="header-anchor" href="#parameter-description" aria-hidden="true">#</a> Parameter Description</h3><ul><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 <code>127.0.0.1</code>. Arthas allows multiple users to access simultaneously without interfering with each other.</li><li><em>PORT</em>: Arthas Server port\uFF0Cthe default value is 3658</li></ul><h3 id="sample" tabindex="-1"><a class="header-anchor" href="#sample" aria-hidden="true">#</a> Sample</h3><ul><li><p>If IP and PORT are not specified, then the default values are 127.0.0.1 and 3658</p><blockquote><p>./as.sh 12345</p></blockquote><p>Equivalent to:</p><blockquote><p>./as.sh 12356@127.0.0.1:3658</p></blockquote></li></ul><h3 id="remote-diagnosis" tabindex="-1"><a class="header-anchor" href="#remote-diagnosis" aria-hidden="true">#</a> Remote Diagnosis</h3><p>After starting Arthas Server on the target Java process, users can use <code>telnet</code> connect to the remote Arthas Server, for example\uFF1A</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>telnet <span class="token number">192.168</span>.1.119 <span class="token number">3658</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="sudo-support" tabindex="-1"><a class="header-anchor" href="#sudo-support" aria-hidden="true">#</a> sudo Support</h3><p>Usually online environment will only grant users privilege as low as possible, instead, all advanced operations are through sudo-list. Since <code>as.sh</code> script takes into account the current effective user, it is possible to run the script in the other rule, by specifying <code>-H</code> option like this:</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token function">sudo</span> -u admin -H ./as.sh <span class="token number">12345</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="windows-support" tabindex="-1"><a class="header-anchor" href="#windows-support" aria-hidden="true">#</a> Windows Support</h3><p>Right now <code>as.bat</code> script supports one parameter only, which is: pid</p><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>as.bat <span class="token operator">&lt;</span>pid<span class="token operator">&gt;</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,20),o=[r];function i(p,l){return s(),e("div",null,o)}var d=a(t,[["render",i],["__file","start-arthas.html.vue"]]);export{d as default};