一.1.Linux下载安装arthas
https://blog.csdn.net/minicto/article/details/82906220
tar -zvxf arthas.tar.gz
cd arthas
./install-local.sh
2.windows下载安装arthas
https://alibaba.github.io/arthas/install-detail.html#arthas-boot
解压
java -jar arthas-boot.jar
选择一个需要监控的进程ID回车
注意事项: 只支持jdk6(+) 以上版本,否则下面命令执行不成功
二.命令使用
1.示例代码
package com.arthas;
import java.util.UUID;
public class Test {
/**
*
* @return
*/
public static String uuid(){
return UUID.randomUUID().toString().replaceAll("-", "");
}
public static void main(String[] args) {
while(true){
System.out.println("uuid = " + uuid());