Bitcoin Forum
May 03, 2024, 10:46:10 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: run cgminer in background after logout (gnu/linux) [solved]  (Read 2068 times)
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1076


I may write code in exchange for bitcoins.


View Profile
December 27, 2014, 08:51:16 PM
Last edit: December 28, 2014, 07:05:48 PM by tspacepilot
 #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
1714776370
Hero Member
*
Offline Offline

Posts: 1714776370

View Profile Personal Message (Offline)

Ignore
1714776370
Reply with quote  #2

1714776370
Report to moderator
1714776370
Hero Member
*
Offline Offline

Posts: 1714776370

View Profile Personal Message (Offline)

Ignore
1714776370
Reply with quote  #2

1714776370
Report to moderator
Remember that Bitcoin is still beta software. Don't put all of your money into BTC!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714776370
Hero Member
*
Offline Offline

Posts: 1714776370

View Profile Personal Message (Offline)

Ignore
1714776370
Reply with quote  #2

1714776370
Report to moderator
1714776370
Hero Member
*
Offline Offline

Posts: 1714776370

View Profile Personal Message (Offline)

Ignore
1714776370
Reply with quote  #2

1714776370
Report to moderator
tspacepilot (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1076


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: 1015
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 (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1076


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!