bitcoin/bitcoin — pull request #1531 by jgarzik (2012-06-29 04:20:26+00:00)
Title: RPC: add 'getpeerinfo', returning easy-to-retrieve per-CNode data

This pull request adds 'getpeerinfo', initially returning low-hanging fruit available inside each CNode.

Once this initial form is OK'd, additional commits will add per-message statistics similar to those seen in now-closed req #1510.

Example output:
[
{
"addr" : "64.27.57.122:8333",
"services" : "1",
"last_send" : "1340943593",
"last_send_empty" : "1340943593",
"last_recv" : "1340943593",
"time_conn" : "1340943569",
"version" : 60001,
"subver" : "/Satoshi:0.6.3/",
"inbound" : false,
"time_release" : "0",
"start_height" : 186712,
"banscore" : 0
},
{
"addr" : "178.152.104.61:8333",
"services" : "1",
"last_send" : "1340943593",
"last_send_empty" : "1340943593",
"last_recv" : "1340943592",
"time_conn" : "1340943591",
"version" : 40000,
"subver" : "",
"inbound" : false,
"time_release" : "0",
"start_height" : 186712,
"banscore" : 0
}
]