Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: tspacepilot on December 27, 2014, 08:51:16 PM



Title: run cgminer in background after logout (gnu/linux) [solved]
Post by: tspacepilot on December 27, 2014, 08:51:16 PM
Hi,

I got my usb miner running nicely with cgminer on my gnu/linux laptop.  However, this particular laptop sits in a closet and acts more like a fileserver than a laptop (the screen gave out on it years ago).  Therefore I ssh into it from another computer.

This is going dandy except that I want to logout of the ssh session and leave the miner running until I log in again later.

I experimented with:

$ ./cgminer ... &

But logout (ie, $ exit) stops the job.

And I tried:

$ screen cgminer ... &

But again, logout stops the job.

I'm sure there's some easy solution.  Let me know!

--TSP


Title: Re: run cgminer in background after logout (gnu/linux)
Post by: tspacepilot on December 28, 2014, 12:37:07 AM
I guess I could use a cron job for this, but surely there's some simpler way to keep a job running after you logout.  I'm so surprised no one has this on top of their heads .... alas.


Title: Re: run cgminer in background after logout (gnu/linux)
Post by: michelem on December 28, 2014, 09:34:35 AM
Hi,

I got my usb miner running nicely with cgminer on my gnu/linux laptop.  However, this particular laptop sits in a closet and acts more like a fileserver than a laptop (the screen gave out on it years ago).  Therefore I ssh into it from another computer.

This is going dandy except that I want to logout of the ssh session and leave the miner running until I log in again later.

I experimented with:

$ ./cgminer ... &

But logout (ie, $ exit) stops the job.

And I tried:

$ screen cgminer ... &

But again, logout stops the job.

I'm sure there's some easy solution.  Let me know!

--TSP

This should do the job:

Code:
screen -dmS cgminer ./cgminer


Title: Re: run cgminer in background after logout (gnu/linux)
Post by: tspacepilot on December 28, 2014, 07:02:51 PM
Hey, thanks michelem, I will try that.  I guess I shoulda read `man screen' eh? :)

EDIT: that did it!