Bitcoin Forum
November 16, 2018, 11:30:59 PM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: run cgminer in background after logout (gnu/linux) [solved]  (Read 1925 times)
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1015


I may write code in exchange for bitcoins.


View Profile
December 27, 2014, 08:51:16 PM
 #1

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
1542411059
Hero Member
*
Offline Offline

Posts: 1542411059

View Profile Personal Message (Offline)

Ignore
1542411059
Reply with quote  #2

1542411059
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1542411059
Hero Member
*
Offline Offline

Posts: 1542411059

View Profile Personal Message (Offline)

Ignore
1542411059
Reply with quote  #2

1542411059
Report to moderator
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1015


I may write code in exchange for bitcoins.


View Profile
December 28, 2014, 12:37:07 AM
 #2

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.
michelem
Legendary
*
Offline Offline

Activity: 999
Merit: 1000



View Profile WWW
December 28, 2014, 09:34:35 AM
 #3

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

Get Minera. Your next bitcoin mining dashboard. Donations are welcome
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1015


I may write code in exchange for bitcoins.


View Profile
December 28, 2014, 07:02:51 PM
 #4

Hey, thanks michelem, I will try that.  I guess I shoulda read `man screen' eh? Smiley

EDIT: that did it!
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!