13

I have started bitcoind on my linux box. How can I ask it what its status is? I assume it is downloading the blockchain and will continue to do so for hours or days. How can I find out where it is in this process?

13

I found the easiest way to do this (version 0.12) is to issue the command (not case sensitive):

bitcoin-cli getblockchaininfo

Then, compare the blocks received field, to the headers field. The blocks received should increase steadily until it matches the headers field, at which point the client is synced.

Once the client is synced you can check if the client is accepting inbound transactions by issuing the command:

bitcoin-cli getconnectioncount 

If you have 0 connections, something is wrong. If you have 8 connections, then it means you are only doing outbound connections (which might be the case if you just want to use your client to execute your own personal transactions, not verify everyone else's). If you have more than 8 connections, then it means you are accepting inbound connections and are acting as a full node (good for you).

Two additional ways to get information about your node is to use GetNetTotals which returns information about network traffic, including bytes in, bytes out, and the current time, and GetNetworkInfo which provides information about your connections to other nodes.

  • how do you accomplish this on a mac? – zero_cool Oct 29 '17 at 18:35
  • Or for regtest mode, bitcoin-cli -regtest getblockchaininfo. – Jus12 Nov 30 '17 at 8:11
7

You can also just tail the debug.log file in a new terminal window while bitcoind is running. It shows current block height i.e. height=181888 and percentage of download complete i.e. progress=68.189662 and keeps running in the window, so you see the progress.

On Linux: tail -f ~/.bitcoin/debug.log

On Mac: tail -f $HOME/Library/Application\ Support/Bitcoin/debug.log

  • 1
    log2_work is not a percentage of progress. It indicates how much the cummulative hashrate of the network is. For progress look at the 'progress=0..." field. – Pieter Wuille Nov 27 '17 at 20:45
  • ah thanks, was busy copying from the terminal and the numbers look the same. hehe – Herald Smit Nov 27 '17 at 20:48
5

run bitcoind getinfo, compare the block count to the current block height of several major block explorers such as:

https://blockchain.info/

https://www.blocktrail.com/BTC

https://blockexplorer.com/

http://blockr.io/

If your block count matches the block height from those sites, your block chain is in sync. If it does not match the difference in block height is how far you are behind (approximately 10 minutes per block)

3

bitcoin-cli getinfo will display the information you're looking for,

OR simply bitcoin-cli getblockcount and compare the blockcount in your machine with the one in a block-explorer online

  • This call was removed in version 0.16.0. Use the appropriate fields from: - getblockchaininfo: blocks, difficulty, chain - getnetworkinfo: version, protocolversion, timeoffset, connections, proxy, relayfee, warnings - getwalletinfo: balance, keypoololdest, keypoolsize, paytxfee, unlocked_until, walletversion – Stevie Mar 16 '18 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.