Arthas是Alibaba开源的Java诊断工具,深受开发者喜爱。
Arthas
Github:https://github.com/alibaba/arthas
文档:https://arthas.aliyun.com/doc/
Arthas 最新发布了 3.5.5 版本,主要支持macOS ARM64架构,以及改进易用性。
目前vmtool的动态库文件是由github action构建的。但github action还不支持mac M1环境,所以vmtool命令之前没支持mac M1机器。
vmtool
但通过交叉编译的方式,在使用clang编译时指定多个arch就可以生成所谓的Fat Library,即在一个文件里同时支持多种架构。
Fat Library
-arch x86_64 -arch arm64
使用file命令可以查看vmtool使用的dylib已经同时支持x86_64和arm64:
file
dylib
x86_64
arm64
$ file lib/libArthasJniLibrary.dylib lib/libArthasJniLibrary.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64:Mach-O 64-bit dynamically linked shared library arm64] lib/libArthasJniLibrary.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 lib/libArthasJniLibrary.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
升级到2.5版本后,profiler命令只支持生成html格式结果,不再支持svg格式了。html格式可以更好的查找过滤。
profiler
html
svg
比如在查找File关键字之后,可以看到紫色的高亮结果:
File
紫色
目前WebConsole默认只支持向上回滚1000行,但有的命令输出结果很长,之前的结果就会被覆盖掉。因此增加scrollback参数,用户可以自定义配置。比如
scrollback
http://localhost:8563/?scrollback=2000
在使用低版本JDK attach高版本JDK 进程时,可能会抛出异常IOException: Non-numeric value found - int expected,但实际上已经attach成功。这对用户会造成困扰。
IOException: Non-numeric value found - int expected
因此改进为打印提示,但仍然会成功连接,用户可以直接诊断。
profiler wiki: https://arthas.aliyun.com/doc/jad.html
Release 日志: https://github.com/alibaba/arthas/releases/tag/arthas-all-3.5.5
2021中国开源项目评选,请投Arthas一票!
评论删除后,数据将无法恢复
Arthas 发布 3.5.5 版本,支持 macOS ARM64 架构,改进易用性
Arthas是Alibaba开源的Java诊断工具,深受开发者喜爱。Github:https://github.com/alibaba/arthas
文档:https://arthas.aliyun.com/doc/
Arthas 最新发布了 3.5.5 版本,主要支持macOS ARM64架构,以及改进易用性。
vmtool 命令支持macOS ARM64架构
目前
vmtool的动态库文件是由github action构建的。但github action还不支持mac M1环境,所以vmtool命令之前没支持mac M1机器。但通过交叉编译的方式,在使用clang编译时指定多个arch就可以生成所谓的
Fat Library,即在一个文件里同时支持多种架构。使用
file命令可以查看vmtool使用的dylib已经同时支持x86_64和arm64:async-profiler 升级到2.5版本,生成html结果支持查找,支持macOS ARM64架构
升级到2.5版本后,
profiler命令只支持生成html格式结果,不再支持svg格式了。html格式可以更好的查找过滤。比如在查找
File关键字之后,可以看到紫色的高亮结果:WebConsole支持配置向上回滚行数
目前WebConsole默认只支持向上回滚1000行,但有的命令输出结果很长,之前的结果就会被覆盖掉。因此增加
scrollback参数,用户可以自定义配置。比如http://localhost:8563/?scrollback=2000
改进低版本JDK attach高版本JDK支持
在使用低版本JDK attach高版本JDK 进程时,可能会抛出异常
IOException: Non-numeric value found - int expected,但实际上已经attach成功。这对用户会造成困扰。因此改进为打印提示,但仍然会成功连接,用户可以直接诊断。
总结
profiler wiki: https://arthas.aliyun.com/doc/jad.html
Release 日志: https://github.com/alibaba/arthas/releases/tag/arthas-all-3.5.5
2021中国开源项目评选,请投Arthas一票!