![]() Copy the following command and paste it into the command line, then press Enter to run: You can install Arthas with one single line command on Linux, Unix, and Mac. Support get objects in the heap that are instances of the specified class.ĭownload arthas-boot.jar,Start with java command:īashjava -jar arthas-boot.jar -h Use as.sh.Supports telnet and websocket, which enables both local and remote diagnostics with command line and browsers.Supports command line interactive mode, with auto-complete feature enabled.Monitor system metrics, thread states and cpu usage, gc statistics, and etc.Monitor method invocation statistics, e.g.Trace the method invocation to find slow sub-invocations.This is useful when a developers wants to know the caller of the said method. Check the stack trace of specified method invocation.method parameter, return object, thrown exception, and etc. View the method invocation details, e.g.the number of classloaders, the number of classes loaded per classloader, the classloader hierarchy, possible classloader leaks, etc. Decompile a class to ensure the code is running as expected.(Useful for troubleshooting jar file conflicts) Check whether a class is loaded, or where the class is being loaded.Arthas works as an observer, which will never suspend your existing threads. No JVM restart, no additional code changes. A developer can troubleshoot your production issues on-the-fly. Time is money! This approach is inefficient! Besides, the issue may not be reproducible once the JVM is restarted, as described above.Īrthas was built to solve these issues. However, this is tricky as some issues cannot be reproduced easily on a different environment, or even disappear once restarted.Īnd if you're thinking of adding some logs to your code to help troubleshoot the issue, you will have to go through the following lifecycle test, staging, and then to production. More importantly, debugging in production environment is unacceptable, as it will suspend all the threads, resulting in the suspension of business services.ĭevelopers could always try to reproduce the same issue on the test/staging environment. If issues are encountered in production systems, it is impossible to use IDEs to debug the application remotely. Often times, the production system network is inaccessible from the local development environment. Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器ArthasĪrthas is a Java Diagnostic tool open sourced by Alibaba.Īrthas allows developers to troubleshoot production issues for Java applications without modifying code or restarting servers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |