listeners

listeners 命令用于查询开启的 TCP 服务监听器。

命令描述
listeners查询开启的 TCP 服务监听器
listeners stop <Proto> <Port>停止监听端口,支持 mqtt:sslmqtt:tcphttp:dashboardhttp:managementmqtt:wsmqtt:wss 协议

listeners list

查询开启的 TCP 服务监听器:

  1. $ ./bin/emqx_ctl listeners
  2. listener on mqtt:ssl:8883
  3. acceptors : 16
  4. max_conns : 102400
  5. current_conn : 0
  6. shutdown_count : []
  7. listener on mqtt:tcp:0.0.0.0:1883
  8. acceptors : 8
  9. max_conns : 1024000
  10. current_conn : 0
  11. shutdown_count : []
  12. listener on mqtt:tcp:127.0.0.1:11883
  13. acceptors : 4
  14. max_conns : 1024000
  15. current_conn : 2
  16. shutdown_count : []
  17. listener on http:dashboard:18083
  18. acceptors : 2
  19. max_conns : 512
  20. current_conn : 0
  21. shutdown_count : []
  22. listener on http:management:8081
  23. acceptors : 2
  24. max_conns : 512
  25. current_conn : 0
  26. shutdown_count : []
  27. listener on mqtt:ws:8083
  28. acceptors : 2
  29. max_conns : 102400
  30. current_conn : 0
  31. shutdown_count : []
  32. listener on mqtt:wss:8084
  33. acceptors : 2
  34. max_conns : 16
  35. current_conn : 0
  36. shutdown_count : []

listener 参数说明:

Name描述
acceptorsTCP Acceptor 池
max_conns最大允许连接数
current_conns当前连接数
shutdown_count连接关闭原因统计

listeners stop

停止监听端口:

  1. $ ./bin/emqx_ctl listeners stop mqtt:tcp 0.0.0.0:1883
  2. Stop mqtt:tcp listener on 0.0.0.0:1883 successfully.