Current clients number in stats #838

Open
ig0r opened this Issue Dec 27, 2016 · 0 comments

Projects

None yet

1 participant

@ig0r
ig0r commented Dec 27, 2016

Environment

  • OS: Ubuntu 16.04 64-bit
  • Erlang/OTP: R18/7.3
  • EMQ: 2.0.5

Description

I'm testing a single node EMQTT 2.0.5 with the emqtt_benchmark tool.

Currently observing the following broker stats:

  • The dashboard UI shows:

screen shot 2016-12-28 at 00 10 39

  • CLI
root@mqtt02:~/emqttd# ./bin/emqttd_ctl broker stats
clients/count       : 11681
clients/max         : 12301
retained/count      : 3
retained/max        : 3
routes/count        : 16681
routes/max          : 16682
sessions/count      : 11681
sessions/max        : 12299
subscribers/count   : 16681
subscribers/max     : 16682
subscriptions/count : 16681
subscriptions/max   : 16682
topics/count        : 0
topics/max          : 0
root@mqtt02:~/emqttd#
  • listeners stats:
root@mqtt02:~/emqttd# ./bin/emqttd_ctl listeners
listener on mqtt:wss:8084
  acceptors       : 4
  max_clients     : 64
  current_clients : 0
  shutdown_count  : []
listener on mqtt:ws:8083
  acceptors       : 4
  max_clients     : 64
  current_clients : 0
  shutdown_count  : []
listener on mqtt:ssl:8883
  acceptors       : 4
  max_clients     : 512
  current_clients : 0
  shutdown_count  : []
listener on mqtt:tcp:1883
  acceptors       : 64
  max_clients     : 1000000
  current_clients : 11681
  shutdown_count  : [{closed,892}]
listener on dashboard:http:18083
  acceptors       : 2
  max_clients     : 512
  current_clients : 4
  shutdown_count  : []
root@mqtt02:~/emqttd#
  • netstat shows:
root@mqtt02:~/emqttd# netstat -an | grep 1883 | grep EST | wc -l
9497
root@mqtt02:~/emqttd#

Is there some inconsistency how the broker counts clients comparing to network connections from the netstat command output? Does the broker detect disconnected clients with delay?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment