RealPath:
WebPath:
2016/12/03 17:40 (JST) 更新
ネットワーク >>

ノード情報取得

Contents

現在のノード接続数

bash
# bitcoin-cli getconnectioncount
8

自ノードの情報

bash
# bitcoin-cli getnetworkinfo
{
  "version": 130100,
  "subversion": "/Satoshi:0.13.1/",
  "protocolversion": 70014,
  "localservices": "000000000000000d",
  "localrelay": true,
  "timeoffset": 0,
  "connections": 8,
  "networks": [
    {
      "name": "ipv4",
      "limited": false,
      "reachable": true,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "ipv6",
      "limited": false,
      "reachable": true,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "onion",
      "limited": true,
      "reachable": false,
      "proxy": "",
      "proxy_randomize_credentials": false
    }
  ],
  "relayfee": 0.00001000,
  "localaddresses": [
    {
      "address": "xxx.xxx.xxx.xxx", ← ★ここは自マシンの IP アドレスになっているはず
      "port": 18333, ← ★今はテストネットに繋いでいるので 18333 ポートで待ちうけている
      "score": 1
    },
    {
      "address": "2001:e42:102:1818:xxx:xxx:xxx:xxx", ← ★こっちは IPv6 表記の IP アドレス
      "port": 18333,
      "score": 1
    }
  ],
  "warnings": ""
}

現在接続されている全ピアノード情報

bash
# bitcoin-cli getpeerinfo
[
  {
    "id": 1,
    "addr": "144.76.75.197:18333",
    "addrlocal": "xxx:xxx:xxx:xxx:54136",
    "services": "000000000000000d",
    "relaytxes": true,
    "lastsend": 1480722808,
    "lastrecv": 1480722808,
    "bytessent": 200486,
    "bytesrecv": 23389976,
    "conntime": 1480722609,
    "timeoffset": 0,
    "pingtime": 0.253619,
    "minping": 0.253619,
    "version": 70014,
    "subver": "/Satoshi:0.13.0/",
    "inbound": false,
    "startingheight": 1038089,
    "banscore": 0,
    "synced_headers": 1038089,
    "synced_blocks": 306009,
    "inflight": [
      306195,
      306202,
      306209,
      306216,
      306223,
      306230,
      306237,
      306244,
      306251,
      306257,
      306263,
      306269,
      306275,
      306281,
      306287,
      306426
    ],
    "whitelisted": false,
    "bytessent_per_msg": {
      "getaddr": 24,
      "getdata": 199041,
      "getheaders": 1053,
      "ping": 64,
      "pong": 64,
      "sendcmpct": 66,
      "sendheaders": 24,
      "verack": 24,
      "version": 126
    },
    "bytesrecv_per_msg": {
      "addr": 30082,
      "block": 23356302,
      "getheaders": 1053,
      "headers": 106,
      "inv": 2098,
      "ping": 64,
      "pong": 64,
      "sendcmpct": 33,
      "sendheaders": 24,
      "verack": 24,
      "version": 126
    }
  },
  {
    "id": 2,
    "addr": "[2600:3c00::f03c:91ff:fe50:58bb]:18333",
    "addrlocal": "[2001:e42:102:1818:xxx:xxx:xxx:xxx]:51428",
    "services": "000000000000000d",
    "relaytxes": true,
    "lastsend": 1480722808,
    "lastrecv": 1480722808,
    "bytessent": 272508,
    "bytesrecv": 31252190,
    "conntime": 1480722609,
    "timeoffset": 0,
    "pingtime": 0.16188,
    "minping": 0.16188,
    "version": 70014,
    "subver": "/Satoshi:0.13.1/",
    "inbound": false,
    "startingheight": 1038089,
    "banscore": 0,
    "synced_headers": 1038089,
    "synced_blocks": 306009,
    "inflight": [
      306409,
      306411,
      306427,
      306429,
      306431,
      306432,
      306433,
      306435,
      306436,
      306437,
      306438,
      306439,
      306441,
      306443,
      306444,
      306445
    ],
    "whitelisted": false,
    "bytessent_per_msg": {
      "getaddr": 24,
      "getdata": 271063,
      "getheaders": 1053,
      "ping": 64,
      "pong": 64,
      "sendcmpct": 66,
      "sendheaders": 24,
      "verack": 24,
      "version": 126
    },
    "bytesrecv_per_msg": {
      "addr": 30082,
      "block": 31218541,
      "getheaders": 1053,
      "headers": 106,
      "inv": 2040,
      "ping": 64,
      "pong": 64,
      "sendcmpct": 66,
      "sendheaders": 24,
      "verack": 24,
      "version": 126
    }
  },
  {
    ......以下同様に繋がってるノードの情報がズラズラと続く......
  }
]