Is your feature request related to a problem? Please describe.
On Irc, I notice time and time again that many people can't tell what the output of listpeers means
when they are trying to understand poor performance. This should also be an FAQ "what to do
when your performance for nodes behind NAT sucks".
existing output
200 listpeers <ztaddr> <path> <latency> <version> <role>
200 listpeers 02598154e6 - -1 1.2.12 LEAF
200 listpeers 041ed59ab3 - -1 1.2.12 LEAF
200 listpeers 17d709436c 35.236.83.64/33526;12120;12120 213 1.2.13 LEAF
200 listpeers 17de20230e 172.16.2.42/53567;19623;10785 -1 1.2.12 LEAF
200 listpeers 393b3f5b54 - -1 1.2.4 LEAF
200 listpeers 50715cf0b4 95.216.67.172/9993;934;934 44 1.2.12 LEAF
200 listpeers 6edbf94227 - -1 1.2.12 LEAF
200 listpeers 8841408a2e 45.32.198.130/9993;1550565220631;4383 149 1.1.5 PLANET
200 listpeers 9d219039f3 188.166.94.177/9993;4528;4471 47 1.1.5 PLANET
200 listpeers bd31ba3482 147.75.195.41/9993;9562;9455 -1 1.2.12 LEAF
200 listpeers c7c8172af1 35.236.10.22/21021;3010;3010 165 1.2.13 LEAF
200 listpeers dcb64e8dc6 - -1 1.2.10 LEAF
200 listpeers e3b0e3e4ee 147.75.38.119/9993;11987;396 108 1.2.12 LEAF
Describe the solution you'd like
Describe alternatives you've considered
Pulling my hair out and repeatedly smashing my face into a wall. It would be less painful.
Additional context
I suggest the default output be 'only your approved peers' and a toggle '--earth or --planet' for listing the 'controllers'. Could I also suggest formatting it with proper spaces/tabs so that it is 'human readable'. Thanks.
@ort163 BTW you can use the -j flag and pipe ouput through a json post-processor like http://stedolan.github.io/jq/ but yep the default output should be easier to work with directly
I would also add the friendly name to the list. The address string is useless for a human.
200 listpeers <Name> <ztaddr> <path> <latency> <version> <role>
200 listpeers Bobs-VPS abcde12345 xx.yy.zz.193/9993;15561;4738 42 1.2.12 MOON
200 listpeers Bobs-PC c0ffeebeef2 - -1 1.2.4 LEAF
...
We propose to add a new command zerotier-cli peers that would output something like the following. Thoughts?
200 listpeers
<ztaddr> <ver> <role> <lat> <link> <lastTX> <lastRX> <path>
1af4a9c0e9 1.2.13 LEAF -1 RELAY
1a3ea36e2f 1.2.4 LEAF -1 RELAY
200feda6a7 1.2.12 LEAF -1 DIRECT 20044 59 34.225.97.147/43032
e2a55afda6 1.2.12 LEAF 3 DIRECT 6455 6455 10.187.69.26/9993
2cfaeef1cb 1.2.4 LEAF 111 DIRECT 24065 3652 208.52.183.247/9993
32fe8bfab5 1.2.4 LEAF 4 DIRECT 15453 11598 2001:0579:3102:0012:2cfa:1b81:e162:de02/9993
397a4fd2d7 1.2.12 LEAF -1 RELAY
3bebdad7ae 1.2.13 LEAF -1 RELAY
ea2e0a5fc1 1.2.4 LEAF 2071 DIRECT 5283 18340 45.33.107.117/9993
fe6cf6a0cc 1.2.12 LEAF 4 DIRECT 15453 2783 10.187.23.39/9993
Output of pretty names like those mentioned by @gregory-fitz will need to wait for now though.
Changes are now in dev branch. For a prettier view use zerotier-cli peers.
LGTM this is much more comprehensible thanks! all my peers show latency = -1 why is that?
It may not be available internally but showing link packet loss and throughput if that is available might also help troubleshoot or identify dodgy links.
Great, thanks for your thoughts. -1 is there simply for parsing consistency but could be removed in this prettier view since listpeers still exists.
As for link packet loss, we do now have a mechanism to compute various QoS metrics but that isn't exposed yet. Once it's ready for prime-time I'll put it in this view.
Most helpful comment
I would also add the friendly name to the list. The address string is useless for a human.