#-c 最大的客戶端數據, -i:時間間隔 -t:訂閱主題 -q:訂閱方式 ./emqtt_bench_sub -c 50000 -i 10 -t bench/%i -q 2
notice: You should not set '-c' option more than 60K for TCP ports limit on one interface.
client 26148 EXIT: {shutdown,eaddrnotavail} Topics: ["bench/%i"] conneted: 23854
關於一直報”shutdown,eaddrnotavail”是因為測試的客戶機端口號分配不足,並不是服務端無法分配端口號。
報錯總結
conneted: 138 client 49863 EXIT: {shutdown,eaddrnotavail} #分配不了端口 [error] [Client <0.7267.0>] CONNACK Timeout! client 7590 EXIT: {shutdown,connack_timeout} #鏈接超時 conneted: 191 client 49810 EXIT: {shutdown,econnrefused} #鏈接被拒絕
#查看端口號使用命令
netstat -npta | grep <端口號>
#查看端口號使用數量
netstat -npta |grep <端口號> | wc -l