5

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?

user36303
  • 34,928
  • 2
  • 58
  • 123
user592440
  • 61
  • 1
  • 4

2 Answers2

6

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

user36303
  • 34,928
  • 2
  • 58
  • 123
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
georg
  • 1
  • 1