This PR is inspired by laanwj’s python script mentioned in #19405, which it turns out I ended up using every day and extending because I got hooked on using it to monitor Bitcoin peer connections.
For the full experience, run ./src/bitcoin-cli -netinfo 4
On Linux, try it with watch watch ./src/bitcoin-cli -netinfo 4
Help doc
0$ ./src/bitcoin-cli -help | grep -A3 netinfo
1 -netinfo
2 Get network peer connection information from the remote server. An
3 optional integer argument from 0 to 4 can be passed for different
4 peers listings (default: 0).