Arthas diagnostics

更新时间:
复制 MD 格式

The Cloud Toolkit plugin lets you use Arthas in your local IDE for local or remote diagnostics. This topic describes how to use Arthas for local and remote diagnostics in IntelliJ IDEA.

Prerequisites

Cloud Toolkit is installed and configured. For more information, see Install and configure Cloud Toolkit in IntelliJ IDEA.

Background information

Arthas is an open source Java diagnostic tool from Alibaba. It helps developers troubleshoot issues online, dynamically trace Java code, and monitor the JVM status in real time. Arthas supports JDK 6 or later and runs on Linux, Mac, and Windows systems. It uses a command-line interface and provides rich Tab-completion features to help locate and diagnose problems.

To learn about Arthas, see the Arthas Quick Start. For more advanced features, see Advanced Use.

Diagnose a local Java application

  1. Open your project in IntelliJ IDEA.

  2. In the top menu bar of IntelliJ IDEA, choose Tools > Alibaba Cloud > ... > Diagnostic Tools.

    The local diagnostics page opens. You can now start the diagnosis.

Diagnose an application on a remote server

  1. Open your project in IntelliJ IDEA.

  2. Add a server in IntelliJ IDEA. For more information, see Add a server.

  3. At the bottom of IntelliJ IDEA, click the Alibaba Cloud View tab, and then select the Host tab.

  4. In the Actions column for the destination instance, choose More > Diagnostic.

    If you use an Alibaba Cloud ECS instance as your server, click the Alibaba Cloud ECS tab at the top of the Alibaba Cloud View pane. Then, in the Actions column for the destination instance, choose More > Diagnostic.

    Note

    The first time you use Diagnostic Tools, Arthas is automatically installed and initialized. Wait for about one minute before you can use it.

    You can run a diagnosis from the Remote Diagnosis page.