This is the help doc commit of #20764 without the rest of the PR or anything new since the 0.21.0 branch-off in order to target giving users a -netinfo help doc for 0.21.
- to test the new help
0$ ./src/bitcoin-cli -netinfo help
- to see the updated short help
0$ ./src/bitcoin-cli -help | grep -A4 netinfo
0$ ./src/bitcoin-cli -netinfo help
1-netinfo level|"help"
2
3Returns a network peer connections dashboard with information from the remote server.
4Under the hood, -netinfo fetches the data by calling getpeerinfo and getnetworkinfo.
5An optional integer argument from 0 to 4 can be passed for different peers listings.
6Pass "help" to see this detailed help documentation.
7If more than one argument is passed, only the first one is read and parsed.
8Suggestion: use with the Linux watch(1) command for a live dashboard; see example below.
9
10Arguments:
111. level (integer 0-4, optional) Specify the info level of the peers dashboard (default 0):
12 0 - Connection counts and local addresses
13 1 - Like 0 but with a peers listing (without address or version columns)
14 2 - Like 1 but with an address column
15 3 - Like 1 but with a version column
16 4 - Like 1 but with both address and version columns
172. help (string "help", optional) Print this help documentation instead of the dashboard.
18
19Result:
20
21* The peers listing in levels 1-4 displays all of the peers sorted by direction and minimum ping time:
22
23 Column Description
24 ------ -----------
25 <-> Direction
26 "in" - inbound connections are those initiated by the peer
27 "out" - outbound connections are those initiated by us
28 type Type of peer connection
29 "full" - full relay, the default
30 "block" - block relay; like full relay but does not relay transactions or addresses
31 net Network the peer connected through ("ipv4", "ipv6", "onion", "i2p", or "cjdns")
32 mping Minimum observed ping time, in milliseconds (ms)
33 ping Last observed ping time, in milliseconds (ms)
34 send Time since last message sent to the peer, in seconds
35 recv Time since last message received from the peer, in seconds
36 txn Time since last novel transaction received from the peer and accepted into our mempool, in minutes
37 blk Time since last novel block passing initial validity checks received from the peer, in minutes
38 age Duration of connection to the peer, in minutes
39 asmap Mapped AS (Autonomous System) number in the BGP route to the peer, used for diversifying
40 peer selection (only displayed if the -asmap config option is set)
41 id Peer index, in increasing order of peer connections since node startup
42 address IP address and port of the peer
43 version Peer version and subversion concatenated, e.g. "70016/Satoshi:21.0.0/"
44
45* The connection counts table displays the number of peers by direction, network, and the totals
46 for each, as well as a column for block relay peers.
47
48* The local addresses table lists each local address broadcast by the node, the port, and the score.
49
50Examples:
51
52Connection counts and local addresses only
53> bitcoin-cli -netinfo
54
55Compact peers listing
56> bitcoin-cli -netinfo 1
57
58Full dashboard
59> bitcoin-cli -netinfo 4
60
61Full live dashboard, adjust --interval or --no-title as needed (Linux)
62> watch --interval 1 --no-title bitcoin-cli -netinfo 4
63
64See this help
65> bitcoin-cli -netinfo help