Get a list of connected client IDs from MQTT client

前端 未结 6 2003
小鲜肉
小鲜肉 2020-12-15 10:13

As a mqtt client connected to mosquitto is it possible to retrieve a list of client IDs who are also connected to the broker?

6条回答
  •  半阙折子戏
    2020-12-15 10:36

    You could presumably get this information via the BASH commands netstat, grep and if necessary awk. If Mosquitto is using port 1883 then the following will tell you what you want I believe:

    sudo netstat | grep :1883

提交回复
热议问题