All Products
Search
Document Center

Application Real-Time Monitoring Service:Use Arthas diagnostics

Last Updated:Mar 11, 2026

When Java applications behave unexpectedly in production, reproducing the issue locally is often impractical. Arthas diagnostics in Application Real-Time Monitoring Service (ARMS) lets you inspect JVM internals, trace method execution, and examine object state in running processes -- without restarting the Java virtual machine (JVM) or installing additional tools.

Arthas uses bytecode enhancement technology. ARMS is completely integrated with all the capabilities of Arthas. Compared to self-managed Arthas, the ARMS-integrated version provides three advantages:

  • No local setup. No Java Development Kit (JDK) dependency, no downloads. Enable or disable diagnostics on demand.

  • Browser-based interface. Access the main diagnostic features through a visual UI instead of typing commands or expressions.

  • APM context awareness. Run the trace command to view the trace IDs of ARMS.

Note

Arthas performance analysis has been fully upgraded to continuous profiling. Continuous profiling can be enabled routinely and identifies CPU, memory, and I/O bottlenecks in Java programs, with statistics broken down by method name, class name, and line number.

Diagnostic capabilities

ARMS integrates six Arthas diagnostic features:

FeatureWhat it does
JVM overviewShows real-time memory usage, system information, system variables, and environment variables of a JVM process.
Thread time-consuming analysisShows thread time consumption and the real-time method stack of a specific thread in a JVM process.
Method execution analysisCaptures an execution record of any non-JDK method that meets specified conditions. Records parameters, exceptions, returned values, and execution duration of each internal method.
Object viewerDisplays real-time property values of any class instance.
Real-time dashboardShows live metrics for components such as Druid connection pool configurations, usage, and SQL query duration.
Arthas ShellProvides a command-line interface (CLI) for running Arthas commands directly.

Prerequisites

Before you begin, make sure that you have:

  • Application Monitoring Pro Edition -- Arthas is not available in other editions

  • ARMS agent version 2.7.1.3 or later

  • A Java application with data already imported to Application Monitoring (see Overview)

Note

Enable Arthas diagnostics only when actively troubleshooting. Disable it when not in use.

Enable Arthas

  1. Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Application List.

  2. On the Application List page, select a region in the top navigation bar and click the name of the application.

    Note

    Icons in the Language column indicate the application language: Java图标 Java | image Go | image Python | Hyphen (-): monitored in Managed Service for OpenTelemetry.

  3. In the left-side navigation pane, click Application Settings. On the page that appears, click the Custom Configuration tab.

  4. In the Arthas monitoring section, turn on Arthas switch. Optionally, specify the IP addresses on which to run diagnostics.

    Custom Configuration - Arthas monitoring

  5. Click Save.

Open the Arthas Diagnosis page

After you enable Arthas, navigate to the diagnostics interface:

  1. Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Application List.

  2. On the Application List page, select a region in the top navigation bar and click the name of the application.

  3. In the left-side navigation pane, choose Application Diagnosis > Arthas Diagnosis.

  4. Select the target application instance from the drop-down list at the top of the page.

    • If the ARMS agent is earlier than V2.7.1.3, a prompt appears to update the agent.

    • If the ARMS agent is V2.7.1.3 or later, instance diagnostics information is displayed.

JVM overview

The JVM overview tab is displayed by default when you open the Arthas Diagnosis page. It provides a real-time snapshot of the JVM in three sections:

  • JVM memory: Heap memory and non-heap memory usage, and garbage collection (GC) statistics.

    JVM memory

  • Operating system information: Average system load, operating system name and version, and Java version.

    Operating system information

  • Variable information: System variables and environment variables.

    Variable information

Analyze thread time consumption

The Thread time-consuming analysis tab shows all threads in the application, grouped by category. Use this tab to identify time-consuming threads.

  1. On the Arthas Diagnosis page, click the Thread time-consuming analysis tab. Similar threads are grouped into a single row. Each row shows the thread category name.

    Thread time-consuming analysis

  2. Click the + icon next to a thread category to expand it. Each thread entry shows the thread ID, CPU usage, and status.

  3. In the Actions column, click View the live stack to inspect the stack trace of a specific thread.

    Stack details

Analyze method execution

The Method execution analysis tab captures detailed execution records for any non-JDK method, including time consumption, input parameters, returned values, and internal call details. Use this tab to locate root causes of slow calls, missing logs, and non-reproducible issues.

  1. On the Arthas Diagnosis page, click the Method execution analysis tab.

  2. Enter a class name keyword in the search box and click the Search icon.

  3. From the search results, select the target class. Choose a method from the drop-down list on the right, then click OK. ARMS captures a random execution record of the selected method.

    Method execution analysis

Execution stack

The Execution Stack section on the left shows internal execution records of the selected method.

  • To inspect an internal method in detail, click Drill in in the Actions column.

  • To view annotated source code with execution duration for each internal method, click View Source Code next to Execution Stack.

Method execution result

The Method Execution Result section on the right shows:

  • Parameter values

  • Returned values

  • Exceptions

  • Member variables

  • Trace ID

Set execution conditions

To capture a method execution record that meets specific criteria, use the Set Execution Conditions section on the right:

  1. Select a reload method from the drop-down list.

  2. In the Select Initial Filter Key drop-down list, select a key type and click the arrow icon. Available key types:

    Note

    If a nested key is selected, continue specifying the field until a base field is reached.

    Key typeDescription
    params[n]The nth parameter of the method.
    returnObjThe returned value of the method.
    Method execution durationThe execution duration of the method.
    Exception thrown or notWhether an exception is thrown during execution.
  3. Select a condition.

  4. Enter a value.

  5. Click Add. The condition appears in the Current Filtering Conditions section.

    Set execution conditions

  6. In the upper-right corner of the Execution Stack section, click the Refresh icon to capture a new execution record based on the specified conditions.

View object properties

The objectViewer tab displays real-time property values of singleton objects. Use this tab to troubleshoot configuration errors, improper items in blacklists or whitelists, and abnormal member variable states.

  1. On the Arthas Diagnosis page, click the objectViewer tab.

  2. Enter a class name keyword in the search box and click the Search icon.

  3. Select the target class from the results, select an instance in the right-side pane, and click OK. The real-time field values of the instance are displayed.

    • Simple fields: Values appear directly in the Details column of the Real-time Field Values of Object section.

    • Complex fields: Click View Details in the Details column. The full field value appears in the Field Details section on the right. To view additional data beyond what can be deserialized, click the click hyperlink in the parentheses next to Details.

    Object viewer

Monitor components in real time

The Real-time board tab shows live metrics for components such as database connection pools and HTTP connection pools. Use this tab to identify resource-related issues.

  1. On the Arthas Diagnosis page, click the Real-time board tab.

  2. Select a dashboard from the drop-down list, select an instance, and click Add to board. The real-time component information is displayed. For example, a Druid connection pool dashboard shows basic configurations, connection pool status, and execution duration.

    Real-time dashboard

Use Arthas Shell

Note

Arthas Shell is available only in the following regions: China (Beijing), China (Shanghai), China (Hangzhou), China (Shenzhen), and China (Zhangjiakou).

The Arthas Shell tab provides a CLI for running Arthas commands directly against the selected instance.

Arthas Shell

What's next