Home >Java >javaTutorial >How to use SpringBoot integrated java diagnostic tool Arthas
<dependency> <groupId>com.taobao.arthas</groupId> <artifactId>arthas-spring-boot-starter</artifactId> <version>3.6.7</version> </dependency>
arthas: # telnetPort、httpPort为 -1 ,则不listen telnet端口,为 0 ,则随机telnet端口 # 如果是防止一个机器上启动多个 arthas端口冲突。可以配置为随机端口,或者配置为 -1,并且通过tunnel server来使用arthas。 # ~/logs/arthas/arthas.log (用户目录下面)里可以找到具体端口日志 telnetPort: -1 httpPort: -1 # 127.0.0.1只能本地访问,0.0.0.0则可网络访问,但是存在安全问题 ip: 127.0.0.1 appName: arthas_test # 默认情况下,会生成随机ID,如果 arthas agent配置了 appName,则生成的agentId会带上appName的前缀。 agent-id: hsehdfsfghhwertyfad # tunnel-server地址 tunnel-server: ws://127.0.0.1:7777/ws
Here are suggestions The agent_id is configured in advance. Arthas are required for subsequent console connections.
Remotely manage/connect multiple Agents through Arthas Tunnel Server/Client
1. 下载arthas-tunnel-server-3.6.7-fatjar.jar https://github.com/alibaba/arthas/releases 2. 运行 windows java -jar arthas-tunnel-server-3.6.7-fatjar.jar linux nohup java -jar arthas-tunnel-server-3.6.7-fatjar.jar > /dev/null 2>&1 & 3.登录查看注册上来的应用 http://127.0.0.1:8080/actuator/arthas 登陆用户名是arthas 密码在arthas tunnel server的日志里可以找到,比如: Using generated security password: 6e00d3bd-e2b3-4147-b959-63854347cdc1
Enter the address: http://127.0.0.1:8080/ and enter agent_id. The interface is as shown below.
dashboard, the real-time data panel of the current system
The above is the detailed content of How to use SpringBoot integrated java diagnostic tool Arthas. For more information, please follow other related articles on the PHP Chinese website!