How to get the current hashRate in geth?

486 Views Asked by At

I started geth on mainnet I did miner.start() it logs when generating the DAG , getting block headers ...etc but when i do eth.hashrate it logs 0 also when i do miner.getHashRate() or miner.HashRate it throws an error saying that the function is undefined It happened before , and the account balance keeps infcreasing Is it a problem ? How can I get the current Hashrate ?

1

There are 1 best solutions below

0
q9f On

You can check your hashrate with eth.hashrate or miner.hashrate, the result is in H/s (Hash operations per second).

> eth.hashrate
712000

If it shows 0 it means the following:

  • either you are GPU mining: Geth an only report the hashrate of the internal CPU miner
  • or you are synchronizing the chain: the miner does not start until you are full synchronized
  • or you are generating a DAG file for the miner: the miner does not start until the DAG generation for the latest epoch is complete
  • or you just started mining very recently: the miner takes some minutes to compute the latest hashrate