github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/cmd/cli/README.md (about) 1 pingmq 2 ====== 3 4 The following commands will run pingmq as a server, pinging the 8.8.8.0/28 CIDR block, and publishing the results to /ping/success/{ip} and /ping/failure/{ip} topics every 30 seconds. `sudo` is needed because we are using RAW sockets and that requires root privilege. 5 6 ``` 7 $ go build 8 $ sudo ./pingmq server -p 8.8.8.0/28 -i 30 9 ``` 10 11 The following command will run pingmq as a client, subscribing to /ping/failure/+ topic and receiving any failed ping attempts. 12 13 ``` 14 $ ./pingmq client -t /ping/failure/+ 15 8.8.8.6: Request timed out for seq 1 16 ``` 17 18 The following command will run pingmq as a client, subscribing to /ping/failure/+ topic and receiving any failed ping attempts. 19 20 ``` 21 $ ./pingmq client -t /ping/success/+ 22 8 bytes from 8.8.8.8: seq=1 ttl=56 tos=32 time=21.753711ms 23 ``` 24 25 One can also subscribe to a specific IP by using the following command. 26 27 ``` 28 $ ./pingmq client -t /ping/+/8.8.8.8 29 8 bytes from 8.8.8.8: seq=1 ttl=56 tos=32 time=21.753711ms 30 ``` 31 32 ### LICENSE 33 34 [GPLv3 Public License](https://github.com/e154/smart-home/blob/master/LICENSE)