Title: [Solved] Help Restarting Miners in Linuxcoin Post by: Reckman on July 25, 2011, 02:08:05 AM Been having trouble restarting stopped miners with linux coin, will pay for solution to this problem (i just need miners to restart when crashed/stuck), currently running the following:
Code: #!/bin/bash with the following errors Code: user@linuxcoin:~$ sh /home/user/restart.sh and in root Code: root@linuxcoin:/home/user# sh restart.sh Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Kermee on July 25, 2011, 02:33:11 AM I can give you a general idea:
1. Put 'DISPLAY=:0' in front of all of your 'aticonfig' commands. Example: Code: ld=`aticonfig --odgc --adapter=0 | grep "GPU load" | cut -c 30-35 | cut -d % -f 1` Should be: Code: ld=`DISPLAY=:0 aticonfig --odgc --adapter=0 | grep "GPU load" | cut -c 30-35 | cut -d % -f 1` 2. This error: Code: /home/user/restart.sh: 9: cannot create /home/user/cron_job.log: Permission denied Is probably occurring since it looks like you ran it as 'root' once so cron_job.log is owned by 'root' now. You can fix it by running: Code: sudo chown user /home/user/cron_job.log 3. This error: Code: kill: 9: Usage: kill [-s sigspec | -signum | -sigspec] [pid | job]... or Actually looks right if it's not finding one of your miner's running since the output of the awk from ps -ef would be empty. You're calling it 3 times. Do you really have 3 miners in your rig? -- If you do and still see that error, it's probably fine. That can occur if a miner is already 'turned' off. Cheers, Kermee Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Reckman on July 25, 2011, 02:42:50 AM Yes 3 cards, 3 miners
Its not restarting the miners though...applied your changes fixed the cron job error...but still broke :) It is logging that it restarts the miners Code: user@linuxcoin:~$ sh /home/user/restart.sh Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Kermee on July 25, 2011, 02:46:58 AM Paste the contents of /home/user/miner1.sh for me. You can remove the pool info, creds, etc.
Cheers, Kermee Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Reckman on July 25, 2011, 02:48:16 AM Code: #!/bin/bash The bootup script calls these shell files, and they work fine, opening each miner in a sep terminal named after the miner Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Kermee on July 25, 2011, 02:54:40 AM Change each minerX.sh to (of course incrementing DEVICE=0 through 2) this:
Code: #!/bin/bash Your restart.sh should look like this: Code: #!/bin/bash If the 'DISPLAY=:0' isn't fixing this: Code: (lxterminal:XXXX): Gtk-WARNING **: cannot open display: Double-check to make sure that X is running. X might of crashed... Cheers, Kermee Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Kermee on July 25, 2011, 03:00:49 AM Run this for me to:
Code: `cat /home/user/.display` Since I just noticed you have an export DISPLAY on it... Cheers, Kermee Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Reckman on July 25, 2011, 03:02:08 AM How do i check on X server? could i start it with the script?
Sorry im linux newb. Still getting similar output, below with one miner turned off Code: user@linuxcoin:~$ sh /home/user/restart.sh Run this for me to: Code: `cat /home/user/.display` Since I just noticed you have an export DISPLAY on it... Cheers, Kermee ran this, no output...restart.sh still giving same output Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Kermee on July 25, 2011, 03:20:20 AM How do i check on X server? could i start it with the script? Code: ps -ef | grep X | grep -v grep Tell me what the output is. Cheers, Kermee Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Reckman on July 25, 2011, 03:23:28 AM Ran it Once with all miners running, then restart.sh, then closed a miner and repeated. Thanks for you help, really appreciate it.
Code: user@linuxcoin:~$ ps -ef | grep X | grep -v grep Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Kermee on July 25, 2011, 03:26:20 AM Run this just to make sure:
Code: ps -ef | grep phoenix.py | grep -v grep Or you can just do a line-count: Code: ps -ef | grep phoenix.py | grep -v grep | wc -l You should get an output of '3'... Which means 3 phoenix.py miners are running. Cheers, Kermee Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Reckman on July 25, 2011, 03:34:14 AM with one miner off
user@linuxcoin:~$ ps -ef | grep phoenix.py | grep -v grep user 4685 4684 0 03:24 pts/2 00:00:03 /usr/bin/python ./phoenix.py -u http://reganreckman@gmail.com_bottom:regan10@pit.deepbit.net:8332/ -q 7 -k phatk BFI_INT VECTORS FASTLOOP=false AGGRESSION=11 DEVICE=1 user 4687 4686 0 03:24 pts/3 00:00:03 /usr/bin/python ./phoenix.py -u http://reganreckman@gmail.com_bottom:regan10@pit.deepbit.net:8332/ -q 7 -k phatk BFI_INT VECTORS FASTLOOP=false AGGRESSION=11 DEVICE=2 user@linuxcoin:~$ ps -ef | grep phoenix.py | grep -v grep| wc -l 2 user@linuxcoin:~$ Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: TripHammer on July 25, 2011, 05:20:00 AM Correct me if I'm wrong, but you also have the auto.sh file that runs after boot?
Code: #!/bin/bash I think this might help Kermee debug the problem, I'm having it too, whenever I've seen xhost + used it is usually always after an Code: export DISPLAY=:0 Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Kermee on July 25, 2011, 05:40:27 AM with one miner off user@linuxcoin:~$ ps -ef | grep phoenix.py | grep -v grep user 4685 4684 0 03:24 pts/2 00:00:03 /usr/bin/python ./phoenix.py -u http://reganreckman@gmail.com_bottom:regan10@pit.deepbit.net:8332/ -q 7 -k phatk BFI_INT VECTORS FASTLOOP=false AGGRESSION=11 DEVICE=1 user 4687 4686 0 03:24 pts/3 00:00:03 /usr/bin/python ./phoenix.py -u http://reganreckman@gmail.com_bottom:regan10@pit.deepbit.net:8332/ -q 7 -k phatk BFI_INT VECTORS FASTLOOP=false AGGRESSION=11 DEVICE=2 user@linuxcoin:~$ ps -ef | grep phoenix.py | grep -v grep| wc -l 2 user@linuxcoin:~$ Hrm. This is strange. Change miner0.sh to this: Code: cd /opt/miners/phoenix && /opt/miners/phoenix/phoenix.py -u http://reganreckman@gmail.com_bottom:regan10@pit.deepbit.net:8332/ -q 7 -k phatk BFI_INT VECTORS FASTLOOP=false AGGRESSION=7 DEVICE=0 Kill miner0, and then manually run the script by calling: Code: /home/user/miner1.sh And tell me what happens... I think 'restart.sh' is fine... It's your minerX.sh scripts which are the problem. Cheers, Kermee Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: gopher on July 25, 2011, 11:53:36 AM I would like to take a bit different approach to this. I just posted a detailed step-by-step guide on howto mine in linuxcoin headless. In a variation of the startminers.sh script, I would propose using timed loop to restart all phoenix.py processes once every 24 hrs. Will this work for you? Code:
Title: Re: [.5btc bounty] Help Restarting Miners in Linuxcoin Post by: Reckman on July 25, 2011, 01:10:46 PM Will try that when I get home kermee, I feel the minerX.sh script is fine, because the start.sh script calls them, and they load the miners fine, also upping the bounty to 1btc, I did not anticipate it would be this difficult to fix.
@gopher, that seems like an inefficient solution, the restart script cycles every minute @triphammer, no I followed this guide http://forum.bitcoin.org/index.php?topic=29021.0 Title: Re: [1btc bounty] Help Restarting Miners in Linuxcoin Post by: Reckman on July 25, 2011, 09:51:38 PM Added this to my start miner script, seemed to do the trick, this is now working correctly
xhost + echo $DISPLAY > /home/user/.display Karmee + Xtriphammer post addresses for donations Title: Re: [1btc bounty] Help Restarting Miners in Linuxcoin Post by: Kermee on July 25, 2011, 10:32:29 PM Added this to my start miner script, seemed to do the trick, this is now working correctly xhost + echo $DISPLAY > /home/user/.display Karmee + Xtriphammer post addresses for donations Sent to you in a PM. Code: xhost + Duh... Forgot about xhost... I just assumed those two would be already persistent in the environment. Keep those miners mining! Cheers, Kermee Title: Re: [Solved] Help Restarting Miners in Linuxcoin Post by: gopher on July 26, 2011, 07:05:10 AM @ Reckman
Do you mind posting the complete correct script, for the newbies? Title: Re: [Solved] Help Restarting Miners in Linuxcoin Post by: Reckman on July 26, 2011, 02:01:55 PM http://forum.bitcoin.org/index.php?topic=29021.0
Just add xhost+ and the other line to startminers or autostart script Title: Re: [Solved] Help Restarting Miners in Linuxcoin Post by: TripHammer on July 26, 2011, 04:55:58 PM Glad I could help, sent in PM
|