4

I am solo mining using monerod. When I run './monerod show_hr', I am told 'Hash Rate Logging is on', but I can't find the files. Where are they stored in Ubuntu 14.04?

Also, is it possible to redirect the output of this command to the display rather than a file so I can monitor the rate on a real-time basis?

4

The log file is ~/.bitmonero/bitmonero.log. On Windows, it is somewhere else which someone who knows will edit here soon.

The status command reports your hash rate. If you're running a detached monerod:

./monerod status

You could use watch to run this at whatever interval you want, eg:

watch -n 60 monerod status >> /tmp/monerod.log

Or you could grep the log, where the hash rate goes once requested by the show_hr command you included:

tail -f ~/.bitmonero/bitmonero.log | grep --line-buffered hashrate:

Edit: The hashrate isn't logged, as mentioned below. Another way, then:

(watch -t -n 60 './monerod status >> /tmp/monerod.log'&) 2>&1 2> /dev/null; tail -f /tmp/monerod.log

  • Not having much luck, sorry. I want to display a continuous hash rate on the terminal. I expect that the tail command you suggested will do that, but, when I run it, I get nothing, only a flashing cursor at the start of a blank line. Running the status command shows that I am mining and gives me the hash rate. But, when I check the bitmonero.log I see only error messages, no hash rates. A typical entry is: 2017-08-16 19:12:31.287 7f2011a7c780 INFO global contrib/epee/src/mlog.cpp:145 New log categories: *:WARNING,net:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO Sor – user592440 Aug 16 '17 at 23:25
  • Indeed, the hash rate isn't actually logged, you're right. I edited my answer with another command. – user36303 Aug 17 '17 at 20:54
0

"...so I can monitor the rate on a real-time basis?", "I want to display a continuous hash rate on the terminal."

you can do that if you run monerod interactive (no "--detach") and type command:

show_hr

But it's maybe a good idea to start monerod inside a "screen"-session, so you can switch it to background and log off the machine. Otherwise you have to keep the terminal open all the time. https://packages.debian.org/stretch/screen

screen
monerod 

... do whaterver interactively in monerod. Inside screen Ctrl-a "d" detaches session to backround. To get it back use:

screen -r 
    # or if you have more than one screen
screen -r PID

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.