How to check my sync status on Geth 1.5.5, Raspberry Pi 3

  • Have a Geth 1.5.5 node running on a raspberry pi 3. When I type in

    sudo systemctl status geth

    I'll get ever changing time and block information. Neat, but how do I know when I am synced up? Is there another sudo command I should do?

  • Continuing to research, need to enter the geth node console to enter special commands. The following works:

    geth attach

    Sends user to the geth node console.


    Produces a result like current block: 82,100; highest block 2,910,032.


    To go back to Pi prompt.

    when I am typing `eth.syncing` just getting `false` printed

    Wait a few seconds and it will prompt a result

    @Coren you can wait forever

    You pretty much need a supercomputer to run Ethereum nowadays.

    geth syntax for windows: `geth attach ipc:\\.\pipe\geth.ipc`

    @sreginogemoh `false` means you are fully synced already (technically just means that it is not syncing actually so I suppose maybe it could also mean you aren't syncing for some reason other than being fully sync'd ... hmmmm)

    @sreginogemoh false is good. It means you are up to date with the latest block and fully synched. It's stupidly counterintuitive as a user message but literally true: You are not syncing, you are synched.

  • After running your normal geth --fast command you can open a new window and run the "geth attach" command as this will attach you to the javascript interface

    $ geth attach

    Then you can use this script to have a nice output of what is happening. It is very rudimentary but works really well to give you an idea of how long you will still need to wait. First wait 10 seconds (as the first ETA is incorrect) then after the second display of estimates you will start to see the actual numbers.

    var lastPercentage = 0;var lastBlocksToGo = 0;var timeInterval = 10000;
        var percentage = eth.syncing.currentBlock/eth.syncing.highestBlock*100;
        var percentagePerTime = percentage - lastPercentage;
        var blocksToGo = eth.syncing.highestBlock - eth.syncing.currentBlock;
        var bps = (lastBlocksToGo - blocksToGo) / (timeInterval / 1000)
        var etas = 100 / percentagePerTime * (timeInterval / 1000)
        var etaM = parseInt(etas/60,10);
        console.log(parseInt(percentage,10)+'% ETA: '+etaM+' minutes @ '+bps+'bps');
        lastPercentage = percentage;lastBlocksToGo = blocksToGo;

    This will give you an output similar to this:

    85% ETA: 573 minutes @ 134.4bps
    86% ETA: 533 minutes @ 144.3bps
    86% ETA: 442 minutes @ 173.9bps

    Hello, this helps me a lot to see the ETAs being continuously printed in the terminal. I would choose this as the answer if I were to ask the question.

    Or like this: 99% ETA: 399672 minutes @ 0.2bps 99% ETA: 399672 minutes @ 0.2bps 99% ETA: 399672 minutes @ 0.2bps 99% ETA: 399672 minutes @ 0.2bps 99% ETA: 399672 minutes @ 0.2bps Ethereum is dead to me.

    @Dagelf you're probably "stuck" on state trie syncing. read more about in this issue (find comments by maintainer **karalabe**)

    This works well, but I've noticed that block sync times vary *a lot*. I've synced multiple times in parity and while for a long time block times were at around 1-2blocks per second for multiple hours (ETA of 100 days), but then it finished over night anyways

    its gives me an empty set `{}`

    @Dagelf RIP, my friend.

  • While running geth sync process, I used geth attach and then used eth.syncing on geth console.

    eth.syncing on "geth attach" console.

    I could get block info. And if you're just after running geth command itself, you need to wait until geth starts "real" syncing process. Otherwise you'll see false.

    geth version result

    Version: 1.7.2-stable
    Git Commit: 1db4ecdc0b9e828ff65777fb466fc7c1d04e0de9
    Architecture: amd64
    Protocol Versions: [63 62]
    Network Id: 1
    Go Version: go1.9.1
    Operating System: darwin
  • Firstly you will need to connect to the running geth process from a second terminal

    $ geth attach

    As the other answers have stated the structure you are interested is eth.syncing

    To see the remaining blocks you could do

    > eth.syncing.highestBlock - eth.syncing.currentBlock

    And for the remaining states

    > eth.syncing.knownStates - eth.syncing.pulledStates
  • You can use web3.eth.syncing, i.e.:

    server:~# geth attach
    > web3.eth.syncing
      currentBlock: 4504031,
      highestBlock: 4660759,
      knownStates: 31357681,
      pulledStates: 31357680,
      startingBlock: 4504031

    Or the same as above but async using getSyncing:

    web3.eth.getSyncing(callback(error, result){ ... })
  • Eth syncing percent:

    eth.syncing.currentBlock * 100 / eth.syncing.highestBlock

    That formula works when you are syncing in full mode. In fast mode a large part is downloading states and the formula doesn't take that into account.

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM