days
-1
0
hours
-2
0
minutes
-2
-8
seconds
0
-3
search
Troubleshooting what others cannot

Introducing Arthas, a Java diagnostic tool from heaven

Eirini-Eleni Papadopoulou
java
© Shutterstock / ImageFlow  

This week has been onwards and upwards for Java! New interesting projects coming from all around. And today shouldn’t be any different! We present you Arthas, a Java diagnostic tool open sourced by the Chinese giant, Alibaba. Let’s take a closer look.

We have a new Java tool coming our way and it looks very promising!

Contrary to Arthas Menethil and his purely evil nature, Arthas – the Java diagnostic tool is a thing from heaven!

Arthas is a Java diagnostic tool that promises to help developers troubleshoot production issues for Java applications without modifying the code or restarting the server and it has been open sourced by the Chinese e-commerce, retail, Internet, and AI giant, Alibaba.

When encountering issues in the production system, it is impossible to use IDE to debug the application remotely, not to mention that debugging in production is unacceptable – it will suspend all the threads and that leads to business unavailability.

With Arthas, you can now troubleshoot your production issue on-the-fly with no JVM restart or additional code changes needed. Arthas works as an observer, which will never suspend your existing threads.

There is a catch, though!

Card

Guides, Javadoc and comments are in Chinese, so if you are a non-Chinese speaker, you’re in for a surprise! There is, however, an English version of README.md on GitHub, so you can get the basic info on the tool.

SEE ALSO: “If you’re a Java developer and you’re writing microservices, Helidon is a great choice”

The team behind Arthas reassures us that the English version of the documentation is on its way and you can always contribute here, if interested.

For now, let’s take a closer look at Arthas’ main features:

  • Useful for trouble-shooting jar file conflicts
  • Decompile a class to ensure the code is running as expected
  • View classloader statistics
  • View the method invocation details
  • Check the stack trace of specified method invocation
  • Trace the method invocation to find slow sub-invocations
  • Monitor method invocation statistics
  • Monitor system metrics, thread states and CPU usage, gc statistics, and etc
  • Support command line interactive mode, with auto-completed feature enabled.
  • Support telnet and WebSocket, enabling both local and remote diagnostics with command line and browsers

Getting started

You can install Arthas on Linux/Unix/Mac by running
curl -L https://alibaba.github.io/arthas/install.sh | sh and start it with ./as.sh

To install it on Windows, you can download the latest binary here, unzip the file, go to the bin directory and run as.bat $PID

bgoewr

Author
Eirini-Eleni Papadopoulou
Eirini-Eleni Papadopoulou is an assistant editor for JAXenter.com. Just finished her masters in Modern East Asian Studies and plans to continue with her old hobby that is computer science.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of