EMQX命令


 
emqx start     啟動
emqx_ctl status  檢查運行狀態
emqx uninstall    服務卸載
emqx restart    重啟
emqx stop     停止
./bin/emqx_ctl status  檢查運行狀態
./bin/emqx_ctl     查看幫助命令
 
跟蹤日志
./bin/emqx_ctl trace start client [client id] ./bin/wwz.log     通過client id跟蹤日志寫到wwz.log文件中
./bin/emqx_ctl trace stop client [client id]           停止通過client id跟蹤
./bin/emqx_ctl trace start topic [topic主題] ./bin/wwz.log   通過client id跟蹤日志寫到文件wwz.log中
./bin/emqx_ctl trace stop topic [topic主題]         停止通過topic跟蹤
./bin/emqx_ctl trace list                 查詢跟蹤
./bin/emqx_ctl log primary-level debug         調整日志級別為debug
tail -100f ./log/wwz.log  實時打印日志
 
 
如果 EMQ 安裝在本機,則使用瀏覽器打開地址  http://127.0.0.1:18083 ,輸入默認用戶名 admin 與默認密碼 public ,登錄進入 Dashboard。如果忘記了管理控制台密碼,使用 管理命令 重置或新建管理賬號
 
羅列一些重要的指標
Received---接收到的MQTT報文數
Sent---發送的MQTT報文數
Connect---幾次MQTT連接
Connack---幾次MQTT確認連接請求
Disconnect---幾次MQTT連接斷開
Pingreq---ping request 個數,在一個心跳周期內,客戶端會發送一條pingreq到服務端
Pingresq---ping response 個數,服務端收到pingreq的請求之后,會立即響應一個兩個字節固定格式的pingresq消息
Published/received---收到的Published報文個數
Published/sent---發送的Published報文個數
Puback/received---收到的Puback報文個數
Puback/sent---發送的Puback報文個數
Puback/missed---沒收到的Puback報文個數
Pubcomp/received---收到的Pubcomp報文個數
Pubcomp/sent---發送的Pubcomp報文個數
Pubcomp/missed---失去的Pubcomp報文個數
Pubrec/received---收到的Pubrec報文個數
Pubrec/sent---發送的Pubrec報文個數
Pubrec/missed---失去的Pubrec報文個數
Pubrel/received---收到的Pubrel報文個數
Pubrel/sent---發送的Pubrel報文個數
Pubrel/missed---失去的Pubrel報文個數
Subscribe---發送的訂閱數
Suback---發送返回的訂閱數
Unsubscribe---發送的取消訂閱數
Unsuback---發送返回的取消訂閱數
The message data 消息數
Received---收到的消息數
Sent---發出的消息數
Dropped---丟失的消息數(在收到消息后,該消息無人訂閱)
Retained---保留的消息數
Qos0/received---收到的qos0消息數
Qos0/sent---發送的qos0消息數
Qos1/received---收到的qos1消息數
Qos1/sent---發送的qos1消息數
Qos2/received---收到的qos2消息數
Qos2/sent---發送的qos2消息數
Qos2/dropped---丟失的qos2消息數
The bytes data 流量收發統計(字節)
Received---收到的流量字節
Sent---發送的流量字節
 
任意節點上使用 ./bin/emqx_ctl cluster status 命令查詢集群狀態:
Cluster status: [{running_nodes,['emqx@192.168.233.111',
              'emqx@192.168.233.112',
              'emqx@192.168.233.113']}]
 
 
 
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM