Document address
Https://alibaba.github.io/arthas/install-detail.html
Start Installation
- I have installed the Windows version locally. Download the zip package.
- Follow the Quick Start to compile the demo program.
You can see that watch can directly get the running method return value.
- The dashboard command is used to view basic process information.
4. Monitor-C 5 demo hehe
import java.util.*;public class Demo { public static void main(String[] args) { List<String> list = new ArrayList<String>(); list.add("a"); list.add("b"); List<String> list2 = new ArrayList<String>(); list2.add("c"); list2.add("d"); int len = add(list, list2); } private static int add(List<String> list, List<String> list2) { int i = 100; while (i >= 0) { try { hehe(i); Thread.sleep(2000); } catch (Throwable t) { t.printStackTrace(); } i--; } list.addAll(list2); return list.size(); } private static void hehe(int i) { if (i == 0) { throw new RuntimeException("ZERO"); } haha(i); } private static void haha(int i){ }}
You can see that the monitor can view the method call frequency and failure status.
- Trace demo hehe
It shows the in-depth call and call time of a method.
- Watch demo hehe {Params [0], throwexp}-e
Observe the method to execute the input parameter
- TT-T demo hehe
Record the method call Information. You can view the parameters, return values, and thrown exceptions of the method call after the event, as if you returned to the call site through the time-space tunnel.
- Classloader
Number of class loaders in the current system and the number of classes loaded by each Loader
Installation and Use of Alibaba open-source project Arthur