SoFunction
Updated on 2025-04-09

Detailed Guide to Installing and Uninstalling Java Diagnostic Tools Arthas

introduction

Arthas is a powerful Java diagnostic tool open source by Alibaba, which can help developers monitor and diagnose the running status of Java applications in real time without restarting the application. Whether it is performance analysis, memory leak troubleshooting, or dynamic tracking method calls, Arthas provides rich functional support. This article will introduce in detail the various installation methods, usage methods and uninstallation steps of Arthas to help developers quickly get started and apply them to actual development.

1. Introduction to Arthas

Arthas is a Java-based diagnostic tool that supports JDK 6+, and can monitor and diagnose the running status of Java applications in real time without restarting the application. It provides a rich set of commands, including thread analysis, memory analysis, method tracking, hot update and other functions, and is a powerful tool for Java developers to solve online problems.

1.1 Core features of Arthas

  • Real-time monitoring: Check the running status of the JVM, including threads, memory, GC and other information.
  • Dynamic tracking: Track the call status of the method and analyze performance bottlenecks.
  • Hot updates: Dynamically modify the bytecode of the class without restarting the application.
  • Decompile: View the source code of the loaded class.
  • Performance Analysis: Generate flame maps and position performance issues.

2. Arthas installation

Arthas provides a variety of installation methods, including quick installation, full installation, manual installation, and installation via rpm/deb package. Each installation method will be described in detail below.

2.1 Quick installation (recommended)

2.1.1 Use

It is the recommended installation method of Arthas and is suitable for most scenarios. Just download and run.

  1. download
curl -O /
  • Start Arthas:
java -jar 
  • Print help information:
java -jar  -h
  • Use Alibaba Cloud Mirror to speed up downloads (optional):
java -jar  --repo-mirror aliyun --use-http

2.1.2 Using the script

For Linux/Unix/Mac users, you can useArthas with one click script.

  • Download and install:
curl -L / | sh
  • Start Arthas:
./
  • Print help information:
./ -h

2.2 Full installation

If you need to use all the features of Arthas, you can choose to install them in full.

  • Download the latest version of Arthas compression package:Download link

  • After decompression, enter the directory and start:

java -jar 
  • Print help information:
java -jar  -h

2.3 Manual installation

Manual installation is suitable for scenarios where a custom installation path or special configuration is required.

  • Download Arthas's compressed package:Download link

  • Unzip to the specified directory.

  • Start Arthas:

java -jar /path/to/

2.4 Installation via rpm/deb

For Linux users, Arthas can be installed through the rpm/deb package.

2.4.1 Install the deb package

  • Download the deb package:Download link

  • Install the deb package:

sudo dpkg -i arthas*.deb

2.4.2 Install the rpm package

  • Download the rpm package:Download link

  • Install the rpm package:

sudo rpm -i arthas*.rpm

2.4.3 Commands after installation using deb/rpm

After the installation is completed, you can directly execute the following command to start Arthas:

2.5 Using Arthas with Cloud Toolkit Plugin

Cloud Toolkit is an IDE plug-in launched by Alibaba Cloud that supports one-click diagnostic remote servers. The Cloud Toolkit plugin makes it easy to use Arthas to diagnose remote servers in your local IDE.

  1. Install the Cloud Toolkit plug-in (supports IntelliJ IDEA and Eclipse).
  2. Configure remote server information.
  3. Use the Arthas function for diagnosis.

3. Offline help document

If you need to use Arthas in an offline environment, you can download the offline help document.

  1. Download the latest version of offline documentation:Download link
  2. After decompression, open it through the browserView the document.

4. Arthas Uninstall

If Arthas is no longer needed, you can uninstall it by following the steps below.

4.1 Linux/Unix/Mac Platform

Delete the installation directory of Arthas:

rm -rf ~/.arthas/

Delete the log directory of Arthas:

rm -rf ~/logs/arthas

4.2 Windows Platform

  1. Delete the user's home directory.arthasFolder.
  2. Delete the user's home directorylogs/arthasFolder.

5. Things to note

  • JDK 6/7 Support: If you need to diagnose the JDK 6/7 application, please download the Arthas version.
  • Permissions issues: Ensure that the user running Arthas has permissions to the target process, otherwise it may not be possible to attach to the target process.
  • Network issues: If the download speed is slow, you can use Alibaba Cloud Mirror to speed up the download.

6. Summary

Arthas is a powerful Java diagnostic tool that can help developers quickly locate and solve various problems in Java applications. This article details the various installation methods, usage methods, and uninstall steps of Arthas, covering everything from quick installation to full deployment. Whether beginners or advanced users, you can quickly get started with Arthas through this article and apply it to actual development.

Through Arthas, developers can easily implement real-time monitoring, dynamic tracking, hot updates and other functions, greatly improving the development and operation and maintenance efficiency of Java applications. I hope this article can provide readers with valuable reference and help the Java development journey.

The above is the detailed guide to installing and uninstalling Java diagnostic tool Arthas. For more information about Java Arthas installation and uninstallation, please follow my other related articles!