Open pirate opened 3 years ago
It's one - :)
Since the general intention was to have this run as a service, it does not print it's info out by default, however I can do some terminal auto detection to improve this, in the mean time use -debug.showstats
Example:
$ ./sping -peers 198.16.109.36 -debug.showstats
2021/03/03 19:04:10 Listening on[::]:9523
it is now: 2021-03-03 19:04:11.000241999 +0000 GMT m=+0.500559754
it is now: 2021-03-03 19:04:12.000174134 +0000 GMT m=+1.500491809
2021/03/03 19:04:12 [198.16.109.36] RX: 8.131386ms TX: 0s [Loss RX: 0/0 | Loss TX 0/0]
it is now: 2021-03-03 19:04:13.000262113 +0000 GMT m=+2.500579860
2021/03/03 19:04:13 [198.16.109.36] RX: 8.721114ms TX: 9.952331ms [Loss RX: 0/0 | Loss TX 0/0]
it is now: 2021-03-03 19:04:14.000221753 +0000 GMT m=+3.500539455
2021/03/03 19:04:14 [198.16.109.36] RX: 8.76663ms TX: 9.729724ms [Loss RX: 0/0 | Loss TX 0/0]
it is now: 2021-03-03 19:04:15.00023491 +0000 GMT m=+4.500552661
2021/03/03 19:04:15 [198.16.109.36] RX: 7.946334ms TX: 10.087415ms [Loss RX: 0/0 | Loss TX 0/0]
it is now: 2021-03-03 19:04:16.000171033 +0000 GMT m=+5.500488772
2021/03/03 19:04:16 [198.16.109.36] RX: 7.820656ms TX: 9.761386ms [Loss RX: 0/0 | Loss TX 0/0]
it is now: 2021-03-03 19:04:17.000168161 +0000 GMT m=+6.500485862
Ah, makes sense, I didn't see any error message about the args so I assumed you were using an argparsing library that could handle both -flag
and --flag
.
Added your example here: https://github.com/benjojo/sping/pull/5
I don't know why but the -flag
form gives me the heebie jeebies, I always do --flag
if the flag is more than a single character like -f
.
This looks very cool! I'm just curious how to use the CLI interface and Web interface. (and is the web UI required / or is the CLI the main interaction method?)
First I tried passing the ping target using
--peers
with a hostnameHost 1: macOS Catalina (Go 1.15)
Host 2: Ubuntu 20.04 (Go 1.13
Then I tried using IPs instead of hostnames with no luck
Host 1
Host 2
Question
How can I get the
node1->node2 = ??ms
andnode2->node1 = ??ms
latency average between two hosts using the./sping
CLI or Web UI?