Claymore miner not work with screen or tmux

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I have 10 GPU attached to one system and want to mine with all, as ubuntu GUI not allow to run 10 GPU at a time, So will go with the command line and able to mine there.



Now I want to run my miner on system startup for particular this I am following this tutorial (step-7). I have done all the things as per tutorial but not able to start ./start_only_eth.bash command(no screen session created) in screen session.



If I am executing below command, I am able to find this session using "screen -ls" command.



screen -dmS ethm


Below is my script (demo.sh)



// update



#!/bin/bash
DEFAULT_DELAY=0
if [ "x$1" = "x" -o "x$1" = "xnone" ]; then
DELAY=$DEFAULT_DELAY
else
DELAY=$1
fi
sleep $DELAY
su aman -c "screen -dmS ethm /home/aman/Desktop/claymore/start_only_eth.bash"


I have added this script's path in rc.local file as mentioned in this tutorial (step-7).



below is my rc.local



#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

sh '/home/aman/Desktop/demo.sh'
exit 0


After restart if I execute "screen -ls" command I got below message



No Sockets found in /var/run/screen/S-aman.


Note: I think problem is not in rc.local, problem is in demo.sh. If try to execute demo.sh manually the script will fail and got above message.



//
//
-------------------------- With TMUX --------------------
//
//



I have also tried this with tmux, this time I am able to run miner(manually) in tmux session but again fail to run script using rc.local for this below is my demo.sh



#!/bin/bash
tmux new-session -d -n MINER
tmux send-keys -t MINER "cd /home/aman/Desktop/claymore" C-m
tmux send-keys -t MINER "./start_only_eth.bash" C-m


Below is what I am getting(console) when try to test rc.local



aman@aman-System-Product-Name:~$ sudo /etc/init.d/rc.local start
[sudo] password for aman:
[ ok ] Starting rc.local (via systemctl): rc.local.service.






share|improve this question





















  • What error message do you get when you run your script?
    – vidarlo
    Jun 2 at 16:59










  • I am getting "No Sockets found in /var/run/screen/S-aman." when executing screen -ls
    – Anand Suthar
    Jun 2 at 17:05










  • But what do you get when you start your script demo.sh in a terminal?
    – vidarlo
    Jun 2 at 17:17










  • 1.) If I run demo.sh (tmux) manually, mining will start but same script will not work with rc.local. 2) If I run demo.sh (screen) manually nothing will happen and also not work in rc.local. I am not getting any error in script. (They are just not working in rc.local - on system startup)
    – Anand Suthar
    Jun 2 at 17:20














up vote
0
down vote

favorite












I have 10 GPU attached to one system and want to mine with all, as ubuntu GUI not allow to run 10 GPU at a time, So will go with the command line and able to mine there.



Now I want to run my miner on system startup for particular this I am following this tutorial (step-7). I have done all the things as per tutorial but not able to start ./start_only_eth.bash command(no screen session created) in screen session.



If I am executing below command, I am able to find this session using "screen -ls" command.



screen -dmS ethm


Below is my script (demo.sh)



// update



#!/bin/bash
DEFAULT_DELAY=0
if [ "x$1" = "x" -o "x$1" = "xnone" ]; then
DELAY=$DEFAULT_DELAY
else
DELAY=$1
fi
sleep $DELAY
su aman -c "screen -dmS ethm /home/aman/Desktop/claymore/start_only_eth.bash"


I have added this script's path in rc.local file as mentioned in this tutorial (step-7).



below is my rc.local



#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

sh '/home/aman/Desktop/demo.sh'
exit 0


After restart if I execute "screen -ls" command I got below message



No Sockets found in /var/run/screen/S-aman.


Note: I think problem is not in rc.local, problem is in demo.sh. If try to execute demo.sh manually the script will fail and got above message.



//
//
-------------------------- With TMUX --------------------
//
//



I have also tried this with tmux, this time I am able to run miner(manually) in tmux session but again fail to run script using rc.local for this below is my demo.sh



#!/bin/bash
tmux new-session -d -n MINER
tmux send-keys -t MINER "cd /home/aman/Desktop/claymore" C-m
tmux send-keys -t MINER "./start_only_eth.bash" C-m


Below is what I am getting(console) when try to test rc.local



aman@aman-System-Product-Name:~$ sudo /etc/init.d/rc.local start
[sudo] password for aman:
[ ok ] Starting rc.local (via systemctl): rc.local.service.






share|improve this question





















  • What error message do you get when you run your script?
    – vidarlo
    Jun 2 at 16:59










  • I am getting "No Sockets found in /var/run/screen/S-aman." when executing screen -ls
    – Anand Suthar
    Jun 2 at 17:05










  • But what do you get when you start your script demo.sh in a terminal?
    – vidarlo
    Jun 2 at 17:17










  • 1.) If I run demo.sh (tmux) manually, mining will start but same script will not work with rc.local. 2) If I run demo.sh (screen) manually nothing will happen and also not work in rc.local. I am not getting any error in script. (They are just not working in rc.local - on system startup)
    – Anand Suthar
    Jun 2 at 17:20












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have 10 GPU attached to one system and want to mine with all, as ubuntu GUI not allow to run 10 GPU at a time, So will go with the command line and able to mine there.



Now I want to run my miner on system startup for particular this I am following this tutorial (step-7). I have done all the things as per tutorial but not able to start ./start_only_eth.bash command(no screen session created) in screen session.



If I am executing below command, I am able to find this session using "screen -ls" command.



screen -dmS ethm


Below is my script (demo.sh)



// update



#!/bin/bash
DEFAULT_DELAY=0
if [ "x$1" = "x" -o "x$1" = "xnone" ]; then
DELAY=$DEFAULT_DELAY
else
DELAY=$1
fi
sleep $DELAY
su aman -c "screen -dmS ethm /home/aman/Desktop/claymore/start_only_eth.bash"


I have added this script's path in rc.local file as mentioned in this tutorial (step-7).



below is my rc.local



#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

sh '/home/aman/Desktop/demo.sh'
exit 0


After restart if I execute "screen -ls" command I got below message



No Sockets found in /var/run/screen/S-aman.


Note: I think problem is not in rc.local, problem is in demo.sh. If try to execute demo.sh manually the script will fail and got above message.



//
//
-------------------------- With TMUX --------------------
//
//



I have also tried this with tmux, this time I am able to run miner(manually) in tmux session but again fail to run script using rc.local for this below is my demo.sh



#!/bin/bash
tmux new-session -d -n MINER
tmux send-keys -t MINER "cd /home/aman/Desktop/claymore" C-m
tmux send-keys -t MINER "./start_only_eth.bash" C-m


Below is what I am getting(console) when try to test rc.local



aman@aman-System-Product-Name:~$ sudo /etc/init.d/rc.local start
[sudo] password for aman:
[ ok ] Starting rc.local (via systemctl): rc.local.service.






share|improve this question













I have 10 GPU attached to one system and want to mine with all, as ubuntu GUI not allow to run 10 GPU at a time, So will go with the command line and able to mine there.



Now I want to run my miner on system startup for particular this I am following this tutorial (step-7). I have done all the things as per tutorial but not able to start ./start_only_eth.bash command(no screen session created) in screen session.



If I am executing below command, I am able to find this session using "screen -ls" command.



screen -dmS ethm


Below is my script (demo.sh)



// update



#!/bin/bash
DEFAULT_DELAY=0
if [ "x$1" = "x" -o "x$1" = "xnone" ]; then
DELAY=$DEFAULT_DELAY
else
DELAY=$1
fi
sleep $DELAY
su aman -c "screen -dmS ethm /home/aman/Desktop/claymore/start_only_eth.bash"


I have added this script's path in rc.local file as mentioned in this tutorial (step-7).



below is my rc.local



#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

sh '/home/aman/Desktop/demo.sh'
exit 0


After restart if I execute "screen -ls" command I got below message



No Sockets found in /var/run/screen/S-aman.


Note: I think problem is not in rc.local, problem is in demo.sh. If try to execute demo.sh manually the script will fail and got above message.



//
//
-------------------------- With TMUX --------------------
//
//



I have also tried this with tmux, this time I am able to run miner(manually) in tmux session but again fail to run script using rc.local for this below is my demo.sh



#!/bin/bash
tmux new-session -d -n MINER
tmux send-keys -t MINER "cd /home/aman/Desktop/claymore" C-m
tmux send-keys -t MINER "./start_only_eth.bash" C-m


Below is what I am getting(console) when try to test rc.local



aman@aman-System-Product-Name:~$ sudo /etc/init.d/rc.local start
[sudo] password for aman:
[ ok ] Starting rc.local (via systemctl): rc.local.service.








share|improve this question












share|improve this question




share|improve this question








edited Jun 2 at 17:08
























asked Jun 1 at 14:52









Anand Suthar

1086




1086











  • What error message do you get when you run your script?
    – vidarlo
    Jun 2 at 16:59










  • I am getting "No Sockets found in /var/run/screen/S-aman." when executing screen -ls
    – Anand Suthar
    Jun 2 at 17:05










  • But what do you get when you start your script demo.sh in a terminal?
    – vidarlo
    Jun 2 at 17:17










  • 1.) If I run demo.sh (tmux) manually, mining will start but same script will not work with rc.local. 2) If I run demo.sh (screen) manually nothing will happen and also not work in rc.local. I am not getting any error in script. (They are just not working in rc.local - on system startup)
    – Anand Suthar
    Jun 2 at 17:20
















  • What error message do you get when you run your script?
    – vidarlo
    Jun 2 at 16:59










  • I am getting "No Sockets found in /var/run/screen/S-aman." when executing screen -ls
    – Anand Suthar
    Jun 2 at 17:05










  • But what do you get when you start your script demo.sh in a terminal?
    – vidarlo
    Jun 2 at 17:17










  • 1.) If I run demo.sh (tmux) manually, mining will start but same script will not work with rc.local. 2) If I run demo.sh (screen) manually nothing will happen and also not work in rc.local. I am not getting any error in script. (They are just not working in rc.local - on system startup)
    – Anand Suthar
    Jun 2 at 17:20















What error message do you get when you run your script?
– vidarlo
Jun 2 at 16:59




What error message do you get when you run your script?
– vidarlo
Jun 2 at 16:59












I am getting "No Sockets found in /var/run/screen/S-aman." when executing screen -ls
– Anand Suthar
Jun 2 at 17:05




I am getting "No Sockets found in /var/run/screen/S-aman." when executing screen -ls
– Anand Suthar
Jun 2 at 17:05












But what do you get when you start your script demo.sh in a terminal?
– vidarlo
Jun 2 at 17:17




But what do you get when you start your script demo.sh in a terminal?
– vidarlo
Jun 2 at 17:17












1.) If I run demo.sh (tmux) manually, mining will start but same script will not work with rc.local. 2) If I run demo.sh (screen) manually nothing will happen and also not work in rc.local. I am not getting any error in script. (They are just not working in rc.local - on system startup)
– Anand Suthar
Jun 2 at 17:20




1.) If I run demo.sh (tmux) manually, mining will start but same script will not work with rc.local. 2) If I run demo.sh (screen) manually nothing will happen and also not work in rc.local. I am not getting any error in script. (They are just not working in rc.local - on system startup)
– Anand Suthar
Jun 2 at 17:20










1 Answer
1






active

oldest

votes

















up vote
0
down vote













cd /home/Desktop/claymore
su aman -c "screen -dmS ethm ./start_only_eth.bash"


There's multiple problems with this. First of all, the path is likely to be /home/username/Desktop/claymore. Second, the cd affects the current script, and is likely not carried over to screen, across the su.



Try:



su aman -c "screen -dmS ethm /home/username/Desktop/claymore/start_only_eth.bash"


If the script start_only_eth.bash requires to have PWD set to that directory, place a line with



cd /home/username/Desktop/claymore


as the second line of the script.



Replace username with the actual username.






share|improve this answer





















  • I have tried this but no luck for this I have update my question please check.
    – Anand Suthar
    Jun 2 at 16:06










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1042662%2fclaymore-miner-not-work-with-screen-or-tmux%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













cd /home/Desktop/claymore
su aman -c "screen -dmS ethm ./start_only_eth.bash"


There's multiple problems with this. First of all, the path is likely to be /home/username/Desktop/claymore. Second, the cd affects the current script, and is likely not carried over to screen, across the su.



Try:



su aman -c "screen -dmS ethm /home/username/Desktop/claymore/start_only_eth.bash"


If the script start_only_eth.bash requires to have PWD set to that directory, place a line with



cd /home/username/Desktop/claymore


as the second line of the script.



Replace username with the actual username.






share|improve this answer





















  • I have tried this but no luck for this I have update my question please check.
    – Anand Suthar
    Jun 2 at 16:06














up vote
0
down vote













cd /home/Desktop/claymore
su aman -c "screen -dmS ethm ./start_only_eth.bash"


There's multiple problems with this. First of all, the path is likely to be /home/username/Desktop/claymore. Second, the cd affects the current script, and is likely not carried over to screen, across the su.



Try:



su aman -c "screen -dmS ethm /home/username/Desktop/claymore/start_only_eth.bash"


If the script start_only_eth.bash requires to have PWD set to that directory, place a line with



cd /home/username/Desktop/claymore


as the second line of the script.



Replace username with the actual username.






share|improve this answer





















  • I have tried this but no luck for this I have update my question please check.
    – Anand Suthar
    Jun 2 at 16:06












up vote
0
down vote










up vote
0
down vote









cd /home/Desktop/claymore
su aman -c "screen -dmS ethm ./start_only_eth.bash"


There's multiple problems with this. First of all, the path is likely to be /home/username/Desktop/claymore. Second, the cd affects the current script, and is likely not carried over to screen, across the su.



Try:



su aman -c "screen -dmS ethm /home/username/Desktop/claymore/start_only_eth.bash"


If the script start_only_eth.bash requires to have PWD set to that directory, place a line with



cd /home/username/Desktop/claymore


as the second line of the script.



Replace username with the actual username.






share|improve this answer













cd /home/Desktop/claymore
su aman -c "screen -dmS ethm ./start_only_eth.bash"


There's multiple problems with this. First of all, the path is likely to be /home/username/Desktop/claymore. Second, the cd affects the current script, and is likely not carried over to screen, across the su.



Try:



su aman -c "screen -dmS ethm /home/username/Desktop/claymore/start_only_eth.bash"


If the script start_only_eth.bash requires to have PWD set to that directory, place a line with



cd /home/username/Desktop/claymore


as the second line of the script.



Replace username with the actual username.







share|improve this answer













share|improve this answer



share|improve this answer











answered Jun 2 at 15:26









vidarlo

6,98042139




6,98042139











  • I have tried this but no luck for this I have update my question please check.
    – Anand Suthar
    Jun 2 at 16:06
















  • I have tried this but no luck for this I have update my question please check.
    – Anand Suthar
    Jun 2 at 16:06















I have tried this but no luck for this I have update my question please check.
– Anand Suthar
Jun 2 at 16:06




I have tried this but no luck for this I have update my question please check.
– Anand Suthar
Jun 2 at 16:06












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1042662%2fclaymore-miner-not-work-with-screen-or-tmux%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491