update tunnel.md

This commit is contained in:
hengyunabc 2021-03-09 15:26:42 +08:00
parent c51bfaaf6e
commit 9dbcee7bd1
2 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,8 @@ For the above example, go to [http://47.75.156.201/arthas/?port=80](http://47.75
### Best practices
> Note that the agentId must be unique, otherwise it will conflict on the tunnel server and not work properly.
If the arthas agent is configured with `appName`, the generated agentId will be prefixed with `appName`.
For example, if you add the startup parameter `as.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name demoapp`, the generated agentId might be `demoapp_URJZ5L48RPBR2ALI5K4V`.

View File

@ -49,6 +49,7 @@ as.sh --tunnel-server 'ws://47.75.156.201:80/ws'
* 如果有特殊需求,可以通过`--agent-id`参数里指定agentId。默认情况下会生成随机ID。
attach成功之后会打印出agentId比如
```bash
@ -88,6 +89,8 @@ id URJZ5L48RPBR2ALI5K4V
### 最佳实践
> 注意agentId要保持唯一否则会在tunnel server上冲突不能正常工作。
如果 arthas agent配置了 `appName`则生成的agentId会带上`appName`的前缀。
比如在加上启动参数:`as.sh --tunnel-server 'ws://127.0.0.1:7777/ws' --app-name demoapp` 则生成的agentId可能是`demoapp_URJZ5L48RPBR2ALI5K4V`。