Arthas from Alibaba, is an online trouble-shooting tool.
No JVM restart, no additional code changes. Arthas works as an observer, that is, it will never suspend your running threads.
$ java -jar arthas-boot.jar
Then select the application to be monitored.
- dashboard command
dashboardcommand allows you to view the real-time data panel of the current system.
- thread command
$ thread 1
thread 1command prints the stack of thread ID 1.
Arthas supports pipes, and you can find
thread 1 | grep 'main('.
- sc command
$ sc -d *MathGame
sccommand can be used to find the loaded classes in the JVM
- jad command
$ jad demo.MathGame
jadcommand can be used to decompile the byte code
- watch command
$ watch demo.MathGame primeFactors returnObj
watchcommand can view the parameter/return value/exception of the method.
paramsrefers to parameters
-x 2means the print depth is 2