Author

Topic: Hashes per second as bitcoind/JSON-RPC command (Read 11107 times)

full member
Activity: 210
Merit: 104
I wrote just such a command. The patch is pretty simple. It adds gethps and getkhps which return the value of the internal hashmeter. It also adds getkhps as a line in getinfo. The patch also adds ListReceived, but that is pretty crappy. It just lists the description line from the UI. I'll eventually get around to making it more JSON-ish if Satoshi doesn't add something similar to mainline.

You can get the patch (for r102) at http://www.alloscomp.com/bitcoin.
full member
Activity: 199
Merit: 2385
You can change it to print it every 30 seconds or whatever if you edit the code.. but it's really not going to change except when the computer is busy.
administrator
Activity: 5222
Merit: 13032
Search debug.log for "hashmeter". I have this in my status script for BitCoin:
Code:
grep hashmeter debug.log |tail -n3

An RPC command would be useful, though.
full member
Activity: 132
Merit: 101
It would be handy to see how many hashes per second are being performed by bitcoind.
So a command like "gethashespersecond" or "getkhashespersecond" would be great.
(If we add a "kilohashes per second" command, I suggest we return a floating point number, not an integer.)

So, what do you guys think?
Jump to: