教程
先决条件
1. 安装 nats-top
go install github.com/nats-io/nats-top@latestsudo -E go install github.com/nats-io/nats-top2. 启动启用监控的 NATS 服务器
nats-server -m 82223. 启动 nats-top
nats-topnats-server version 0.6.6 (uptime: 2m2s)
Server:
Load: CPU: 0.0% Memory: 6.3M Slow Consumers: 0
In: Msgs: 0 Bytes: 0 Msgs/Sec: 0.0 Bytes/Sec: 0
Out: Msgs: 0 Bytes: 0 Msgs/Sec: 0.0 Bytes/Sec: 0
Connections: 0
HOST CID SUBS PENDING MSGS_TO MSGS_FROM BYTES_TO BYTES_FROM LANG VERSION4. 运行 NATS 客户端程序
5. 检查 nats-top 的统计信息
6. 对 nats-top 统计信息进行排序
7. 使用不同的排序选项
8. 显示已注册的订阅
9. 退出 nats-top
10. 以指定查询重新启动 nats-top
最后更新于