2

I wanted to be able to run Geth in the background without having to think about it in order to assist the network. So I created a .plist and added it to /library/launchagents. Now when I start my computer, Geth starts up and runs in the background.

However there are times that I want to be able to interact with Geth and view the running script in Terminal. Is it possible to reattach Geth to Terminal?

If not, can anyone recommend a better way that I can run Geth in the background?

Thanks

1 Answer 1

1

If you just want a console, you can run geth attach to connect to a running geth instance, and it will give you the same effect as geth console. If you need the output from the main terminal (i.e. the various logs about blocks and whatnot) you might be able to redirect the output to a file and read said file, perhaps with tail.

1
  • Thanks for your reply. It is the logs I am looking for. I want to check to see if Geth is behaving correctly when started from /library/Launchagents. On one occasion in particular it took up all my CPU and was downloading a hell of a lot of data, whereas it is usually clocking a maximum of 4-5% of CPU and downloading only a trickle of data. It was not caused by needing to catch up with the blockchain, because this happened after a restart. I'm not really comfortable with Terminal so I am struggling a bit.
    – user7302
    Mar 31, 2017 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.