mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-13 06:42:48 +00:00
new site style
This commit is contained in:
1 parent
6708b26f28
commit
0eaa3d1a3e
87 files changed
+2862
-2114
No files matched your search
+39
-29
@@ -32,6 +32,7 @@
|
||||
<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">
|
||||
|
||||
|
||||
|
||||
@@ -169,25 +170,25 @@
|
||||
<ol>
|
||||
<li><p class="first">Download the latest version</p>
|
||||
<p><strong>Latest version, Click To Download</strong>: <a class="reference external" href="http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST"><img alt="Arthas" src="https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square" /></a></p>
|
||||
<p>If the download speed is slow, try to use <a class="reference external" href="https://maven.aliyun.com/">Ali cloud mirror repository</a>, for example, to download version <code class="docutils literal notranslate"><span class="pre">3.x.x</span></code> (you can replace <code class="docutils literal notranslate"><span class="pre">3.x.x</span></code> in the example URL if you want to download other version), the download URL is: https://maven.aliyun.com/repository/public/com/taobao/arthas/arthas-packaging/3.x.x/arthas-packaging-3.x.x-bin.zip</p>
|
||||
<p>If the download speed is slow, try to use <a class="reference external" href="https://maven.aliyun.com/">Ali cloud mirror repository</a>, for example, to download version <tt class="docutils literal">3.x.x</tt> (you can replace <tt class="docutils literal">3.x.x</tt> in the example URL if you want to download other version), the download URL is: https://maven.aliyun.com/repository/public/com/taobao/arthas/arthas-packaging/3.x.x/arthas-packaging-3.x.x-bin.zip</p>
|
||||
</li>
|
||||
<li><p class="first">Unzip zip file</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>unzip arthas-packaging-bin.zip
|
||||
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">unzip arthas-packaging-bin.zip
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
<li><p class="first">Install Arthas</p>
|
||||
<p>It is recommended to completely remove all old versions of Arthas before installation.</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo su admin
|
||||
rm -rf /home/admin/.arthas/lib/* <span class="c1"># remove all the leftover of the old outdated Arthas</span>
|
||||
<span class="nb">cd</span> arthas
|
||||
./install-local.sh <span class="c1"># switch the user based on the owner of the target Java process.</span>
|
||||
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">sudo su admin
|
||||
rm -rf /home/admin/.arthas/lib/* # remove all the leftover of the old outdated Arthas
|
||||
cd arthas
|
||||
./install-local.sh # switch the user based on the owner of the target Java process.
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
<li><p class="first">Start Arthas</p>
|
||||
<p>Make sure <code class="docutils literal notranslate"><span class="pre">shutdown</span></code> the old Arthas server before start.</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>./as.sh
|
||||
<p>Make sure <tt class="docutils literal">shutdown</tt> the old Arthas server before start.</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">./as.sh
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -198,17 +199,17 @@ rm -rf /home/admin/.arthas/lib/* <span class="c1"># remove all the leftover of t
|
||||
<div class="section" id="linux-unix-mac">
|
||||
<span id="linux-unix-mac"></span><h3>Linux/Unix/Mac<a class="headerlink" href="#linux-unix-mac" title="Permalink to this headline">¶</a></h3>
|
||||
<p>You can install Arthas with one single line command on Linux, Unix, and Mac. Pls. copy the following command and paste it into the command line, then press <em>Enter</em> to run:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>curl -L https://alibaba.github.io/arthas/install.sh <span class="p">|</span> sh
|
||||
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">curl -L https://alibaba.github.io/arthas/install.sh | sh
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The command above will download the bootstrap script <code class="docutils literal notranslate"><span class="pre">as.sh</span></code> to the current directory. You can move it the any other place you want, or put its location in <code class="docutils literal notranslate"><span class="pre">$PATH</span></code>.</p>
|
||||
<p>You can enter its interactive interface by executing <code class="docutils literal notranslate"><span class="pre">as.sh</span></code>, or execute <code class="docutils literal notranslate"><span class="pre">as.sh</span> <span class="pre">-h</span></code> for more help information.</p>
|
||||
<p>The command above will download the bootstrap script <tt class="docutils literal">as.sh</tt> to the current directory. You can move it the any other place you want, or put its location in <tt class="docutils literal">$PATH</tt>.</p>
|
||||
<p>You can enter its interactive interface by executing <tt class="docutils literal">as.sh</tt>, or execute <tt class="docutils literal">as.sh -h</tt> for more help information.</p>
|
||||
</div>
|
||||
<div class="section" id="windows">
|
||||
<span id="windows"></span><h3>Windows<a class="headerlink" href="#windows" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Latest Version, Click To Download: <a class="reference external" href="http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.taobao.arthas&a=arthas-packaging&e=zip&c=bin&v=LATEST"><img alt="Arthas" src="https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square" /></a></p>
|
||||
<p>Download and unzip, then find <code class="docutils literal notranslate"><span class="pre">as.bat</span></code> from ‘bin’ directory. For now this script will only take one argument <code class="docutils literal notranslate"><span class="pre">pid</span></code>, which means you can only diagnose the local Java process. (Welcome any bat script expert to make it better :heart:)</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>as.bat <pid>
|
||||
<p>Download and unzip, then find <tt class="docutils literal">as.bat</tt> from ‘bin’ directory. For now this script will only take one argument <tt class="docutils literal">pid</tt>, which means you can only diagnose the local Java process. (Welcome any bat script expert to make it better :heart:)</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">as.bat <pid>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -219,34 +220,34 @@ rm -rf /home/admin/.arthas/lib/* <span class="c1"># remove all the leftover of t
|
||||
<ol>
|
||||
<li><p class="first">Locate java in the target JVM:</p>
|
||||
<ul class="simple">
|
||||
<li>Linux/Unix/Mac: <code class="docutils literal notranslate"><span class="pre">ps</span> <span class="pre">aux</span> <span class="pre">|</span> <span class="pre">grep</span> <span class="pre">java</span></code></li>
|
||||
<li>Linux/Unix/Mac: <tt class="docutils literal">ps aux | grep java</tt></li>
|
||||
<li>Windows: open the Process Monitor to search java</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p class="first">Assemble bootstrap command:</p>
|
||||
<p>Let’s suppose we are using <code class="docutils literal notranslate"><span class="pre">/opt/jdk1.8/bin/java</span></code>, then the command should be:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>/opt/jdk1.8/bin/java -Xbootclasspath/a:/opt/jdk1.8/lib/tools.jar <span class="se">\</span>
|
||||
-jar /tmp/arthas-packaging/arthas-core.jar <span class="se">\</span>
|
||||
-pid <span class="m">15146</span> <span class="se">\</span>
|
||||
-target-ip <span class="m">127</span>.0.0.1 -telnet-port <span class="m">3658</span> -http-port <span class="m">8563</span> <span class="se">\</span>
|
||||
-core /tmp/arthas-packaging/arthas-core.jar <span class="se">\</span>
|
||||
<p>Let’s suppose we are using <tt class="docutils literal">/opt/jdk1.8/bin/java</tt>, then the command should be:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">/opt/jdk1.8/bin/java -Xbootclasspath/a:/opt/jdk1.8/lib/tools.jar \
|
||||
-jar /tmp/arthas-packaging/arthas-core.jar \
|
||||
-pid 15146 \
|
||||
-target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 \
|
||||
-core /tmp/arthas-packaging/arthas-core.jar \
|
||||
-agent /tmp/arthas-packaging/arthas/arthas-agent.jar
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Note:</p>
|
||||
<ul class="simple">
|
||||
<li><code class="docutils literal notranslate"><span class="pre">-Xbootclasspath</span></code> adds tools.jar</li>
|
||||
<li><code class="docutils literal notranslate"><span class="pre">-jar</span> <span class="pre">/tmp/arthas-packaging/arthas-core.jar</span></code> specifies main entry</li>
|
||||
<li><code class="docutils literal notranslate"><span class="pre">-pid</span> <span class="pre">15146</span></code> specifies the target java process PID</li>
|
||||
<li><code class="docutils literal notranslate"><span class="pre">-target-ip</span> <span class="pre">127.0.0.1</span></code> specifies the IP</li>
|
||||
<li><code class="docutils literal notranslate"><span class="pre">-telnet-port</span> <span class="pre">3658</span> <span class="pre">-http-port</span> <span class="pre">8563</span></code> specifies telnet and HTTP ports for remote access</li>
|
||||
<li><code class="docutils literal notranslate"><span class="pre">-core</span> <span class="pre">/tmp/arthas-packaging/arthas-core.jar</span> <span class="pre">-agent</span> <span class="pre">/tmp/arthas-packaging/arthas/arthas-agent.jar</span></code> specifies core/agent jar package</li>
|
||||
<li><tt class="docutils literal">-Xbootclasspath</tt> adds tools.jar</li>
|
||||
<li><tt class="docutils literal">-jar /tmp/arthas-packaging/arthas-core.jar</tt> specifies main entry</li>
|
||||
<li><tt class="docutils literal">-pid 15146</tt> specifies the target java process PID</li>
|
||||
<li><tt class="docutils literal">-target-ip 127.0.0.1</tt> specifies the IP</li>
|
||||
<li><tt class="docutils literal">-telnet-port 3658 -http-port 8563</tt> specifies telnet and HTTP ports for remote access</li>
|
||||
<li><tt class="docutils literal">-core /tmp/arthas-packaging/arthas-core.jar -agent /tmp/arthas-packaging/arthas/arthas-agent.jar</tt> specifies core/agent jar package</li>
|
||||
</ul>
|
||||
<p>If you are running on JDK 1.9 or above,then it’s unncessary to add <code class="docutils literal notranslate"><span class="pre">tools.jar</span></code> in option <code class="docutils literal notranslate"><span class="pre">-Xbootclasspath</span></code>.</p>
|
||||
<p>You can find the logs from <code class="docutils literal notranslate"><span class="pre">~/logs/arthas/arthas.log</span></code>.</p>
|
||||
<p>If you are running on JDK 1.9 or above,then it’s unncessary to add <tt class="docutils literal">tools.jar</tt> in option <tt class="docutils literal">-Xbootclasspath</tt>.</p>
|
||||
<p>You can find the logs from <tt class="docutils literal">~/logs/arthas/arthas.log</tt>.</p>
|
||||
</li>
|
||||
<li><p class="first">Use telnet to connect once attaching to the target JVM (in step 2) succeeds</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>telnet <span class="m">127</span>.0.0.1 <span class="m">3658</span>
|
||||
<div class="highlight-bash notranslate"><div class="highlight hljs"><pre class="bash">telnet 127.0.0.1 3658
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -317,6 +318,15 @@ rm -rf /home/admin/.arthas/lib/* <span class="c1"># remove all the leftover of t
|
||||
|
||||
<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() {
|
||||
|
||||
Reference in new issue
Block a user