Link Search Menu Expand Document Edit GitHub

List


Lists all the connected clients of this mqtt-cli shell session.

mqtt> list

Alias: mqtt> ls


Options

OptionLong VersionExplanationDefault
-l--longUse a long listing format with detailed information about the clients.false
-r--reverseReverse order while sorting.false
-s--subscriptionsList subscribed topics of the clients.false
-t--timeSort clients by their creation time.false
-U Do not sort.false

Help Options

OptionLong VersionExplanation
-h--helpDisplay help message for command.
-V--versionDisplay version information of the cli.

Examples

Connect two clients and list them by default settings

mqtt> con -i client1
client1@localhost> exit
mqtt> con -i client2
client2@localhost> ls
client1@localhost
client2@localhost

Connect a client and show detailed information about it

mqtt> con -i client
client@localhost> ls -l
total 1
CONNECTED    11:00:29 client1 localhost  1883 MQTT_5_0 NO_SSL

List subscriptions of all connected clients

client1@localhost> sub -t topic -t topic2 -t topic3
client1@localhost> ls -s
client1@localhost
 -subscribed topics: [topic2, topic3, topic]