Bitcoin Forum
March 29, 2024, 09:59:53 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Stratum mining proxy started in a cron job, can I see it ?  (Read 885 times)
danny.nl (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
November 01, 2013, 03:51:09 PM
 #1

Ok, installed the Stratum mining proxy on a small Xubuntu thing and it's running okay.
Also put it in a cron-job so it starts when booting the thing up... and actually it is running as I can see on my blades.
But I would like to see the screen output of the proxy running as did as before when I started it manually... how do I do that ? Huh

Thanks in advance !!
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711706393
Hero Member
*
Offline Offline

Posts: 1711706393

View Profile Personal Message (Offline)

Ignore
1711706393
Reply with quote  #2

1711706393
Report to moderator
1711706393
Hero Member
*
Offline Offline

Posts: 1711706393

View Profile Personal Message (Offline)

Ignore
1711706393
Reply with quote  #2

1711706393
Report to moderator
1711706393
Hero Member
*
Offline Offline

Posts: 1711706393

View Profile Personal Message (Offline)

Ignore
1711706393
Reply with quote  #2

1711706393
Report to moderator
compdudeBT
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
November 03, 2013, 03:55:45 AM
 #2

Since you're starting the mining proxy from a cron job, the output of the job is discarded, since cron jobs are normally automated tasks. To interact with the proxy after it has started, you can run the proxy in a "screen" session using the screen command, allowing you to view the output while it runs. To do so, amend your cron job so that it looks like:

15 7 * * * /usr/bin/screen -dmS ANameForTheScreenSession commandIwantToRunInScreen

where:

  • /usr/bin/screen is the location of the screen command; make sure you already have screen installed by running `which screen` which should return the location, or install it by using `apt-get install screen`.
  • ANameForTheScreenSession is a name to identify the session
  • commandIwantToRunInScreen is the command you used to start the mining proxy

If all goes well, after the cron job starts again, you should be able to view the proxy by running `screen -r ANameForTheScreenSession`. Once in the screen session, you can disconnect from the session by pressing Ctrl-A + D; the proxy will continue to run in the background.

References:
http://www.linuxquestions.org/questions/linux-software-2/running-screen-in-a-cron-job-349153/
http://ss64.com/bash/screen.html

EDIT: If your proxy cron job is running as root, then the screen session will also run as root. If this is the case, simply prepend "sudo" to the command used to view the session.

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!