Bitcoin Forum
December 15, 2017, 03:04:03 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: run cgminer in background after logout (gnu/linux) [solved]  (Read 1882 times)
tspacepilot
Legendary
*
Offline Offline

Activity: 1400


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

1513350243
Hero Member
*
Offline Offline

Posts: 1513350243

View Profile Personal Message (Offline)

Ignore
1513350243
Reply with quote  #2

1513350243
Report to moderator
1513350243
Hero Member
*
Offline Offline

Posts: 1513350243

View Profile Personal Message (Offline)

Ignore
1513350243
Reply with quote  #2

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

Posts: 1513350243

View Profile Personal Message (Offline)

Ignore
1513350243
Reply with quote  #2

1513350243
Report to moderator
1513350243
Hero Member
*
Offline Offline

Posts: 1513350243

View Profile Personal Message (Offline)

Ignore
1513350243
Reply with quote  #2

1513350243
Report to moderator
1513350243
Hero Member
*
Offline Offline

Posts: 1513350243

View Profile Personal Message (Offline)

Ignore
1513350243
Reply with quote  #2

1513350243
Report to moderator
tspacepilot
Legendary
*
Offline Offline

Activity: 1400


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: 946



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 BTC: 1AvF29tTd6w8kvLuTp5QqLFbN6LTQDoGFQ - Try GigaWatt mining Tokens
tspacepilot
Legendary
*
Offline Offline

Activity: 1400


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!