一、登錄生產機器
上傳arthas-bin.zip ,上傳路徑自己定
rz 上傳文件
unzip 解壓zip包,ps:如果該命令不能使用,切換賬號到root,執行:yum
install -y
unzipzip
二、arthas 使用
看到這個界面,成功啓動arthas
arthas使用過程中遇到中文亂碼的問題,啓動時用這個命令:java -Dfile.encoding=UTF-8 -jar arthas-boot.jar
查看某個方法的入參,返回值
反編譯代碼看下是不是最新的
arthas 命令手敲太麻煩,IDEA插件可以快速生成各種命令,https://plugins.jetbrains.com/plugin/13581-arthas-idea
arthas命令大全,https://arthas.aliyun.com/doc/watch.html