Pages:
Author

Topic: [Guide]How to setup an automated headless LinuxCoin mining rig + watchdog (Read 20767 times)

newbie
Activity: 47
Merit: 0
You can create another script that runs every minute or 10 minutes to monitor.  For example:
Code:
#!/bin/bash

WHAT="phoenix"
CMD=`sudo ps -ef | grep -v grep | grep ${WHAT} | wc | awk '{print $1}'`

if [ ${CMD} -le 0 ]; then
  echo "stopped running.  restart here."
  exit 1
else
  echo "it's running.  no need to do anything."
fi
exit 0
This will look for a running instance of phoenix.  Of course, if you have more than one instance, you may have to fine tune what you are searching for to make it unique.  I have something similar that checks to make sure my miners are running.  And if it doesn't find it, the miner gets restarted.
sr. member
Activity: 302
Merit: 250
Can you help me add another feature to these scripts? I have another script running on the computer, and sometimes it crashes. Is there any way to have this script restart it without using the GPU workload as a trigger? Is there a command that checks if another script is running?
full member
Activity: 133
Merit: 100
so this start.sh, when executed from the terminal, as "sh /home/corelinux1/start.sh", everything goes fine, all 5 scripts are executed, the miners starts fine, the fans to, etc etc, except to the fact that the terminal where I executed didn't close itself (I want that)

I think it's supposed to be running, you can't kill it without killing the program running inside...
but yeah, Sorry I can't really help...I don't run ubuntu
full member
Activity: 133
Merit: 100
Yanz, I found the solution maybe you can update your guide,

I simply added the following to my start miner script.

xhost +
echo $DISPLAY > /home/user/.display

Huh weird...I originally had this but it caused and error message and I deleted it and it still works. I guess I still need it, thanks for sorting this out.
full member
Activity: 133
Merit: 100
I don't think you can run those by double clicking...
The autostart worked for me...
argg linux  Angry

Has anybody else (besides me) gotten it to work?

I used this guide, tweaked for my specific hardware...
http://forum.bitcoin.org/index.php?topic=7374.msg248025#msg248025
That's what I based this guide off of. Look in the first post...I linked it.
hero member
Activity: 711
Merit: 500
@bruno

Make your own thread, this isn't ubuntu 11 help
sr. member
Activity: 262
Merit: 250
Dubs Get
ok guys, help me out here with the autostart problem..

I have 5 scripts that need to be executed on the system boot.


start.sh:
Code:
#!/bin/bash
sleep 20
gnome-terminal --title gpu.overclock --command "sh /home/corelinux1/gpu.overclock.sh"
gnome-terminal --title gpu0.miner --geometry=+0+0 --command "sh /home/corelinux1/gpu0.miner.sh"
gnome-terminal --title gpu1.miner --geometry=-0+0 --command "sh /home/corelinux1/gpu1.miner.sh"
gnome-terminal --title gpu0.fan --geometry=+0-0 --command "sh /home/corelinux1/gpu0.fan.sh"
gnome-terminal --title gpu1.fan --geometry=-0-0 --command "sh /home/corelinux1/gpu1.fan.sh"


so this start.sh, when executed from the terminal, as "sh /home/corelinux1/start.sh", everything goes fine, all 5 scripts are executed, the miners starts fine, the fans to, etc etc, except to the fact that the terminal where I executed didn't close itself (I want that)


so I added the command "sh /home/corelinux1/start.sh" at the Startup Applications on System Settings (Ubuntu 11), but when the system goes up, every command from the script (execute the others scripts) is executed only if the previous script is closed, AND the miner scripts gives errors of pypopencl include (don't know why)...

the gpu.overclock.sh is executed, and then, the gpu0.miner.sh is only executed when the gpu.overlock.sh closes itself.. so the gpu0.miner.sh is executed and gives the include error, so, it closes itself too, making the gpu1.miner.sh execute and giving the same error... then when it closes, the gpu0.fan.sh is executed, but it don't give any errors, so it stays running and the gpu1.fan.sh is not executed at all, or only if I close the gpu0.fan terminal...


what a fuck should I do? this is making me crazy!!!

and sorry if it couldn't be more specific, but please help me out here...



ps:
oh, and I did another script called autostart.sh, with "sh /home/corelinux1/start.sh" on it, and replaced with the start.sh command on the Startup Applications, but it happens the same thing...



sr. member
Activity: 262
Merit: 250
Dubs Get
nvm, i did it (this problem) =p
hero member
Activity: 711
Merit: 500
Yanz, I found the solution maybe you can update your guide,

I simply added the following to my start miner script.

xhost +
echo $DISPLAY > /home/user/.display
newbie
Activity: 47
Merit: 0
I don't think you can run those by double clicking...
The autostart worked for me...
argg linux  Angry

Has anybody else (besides me) gotten it to work?

I used this guide, tweaked for my specific hardware...
http://forum.bitcoin.org/index.php?topic=7374.msg248025#msg248025
full member
Activity: 133
Merit: 100
I don't think you can run those by double clicking...
The autostart worked for me...
argg linux  Angry

Has anybody else (besides me) gotten it to work?
sr. member
Activity: 262
Merit: 250
Dubs Get
yanz, give me a help here please..

I followed you guide, but using ubuntu, and everything gone fine, except the scripts parts...



I've created the scripts that you asked, but when I run them, the terminal screen just popup and close...


for example, I've created the start.sh script with the following code

Code:
#!/bin/bash
sleep 4
gnome-terminal --title GPU0 --command "sh /home/corelinux1/gpu0.sh"
gnome-terminal --title GPU1 --command "sh /home/corelinux1/gpu1.sh"

and the gpu0 and gpu1.sh on the same location, but when I run this script, I get the sleep time and then the bot miner scripts popup and close



ps, the code for the miner

Code:
#!/bin/bash
cd ~/poclbm/
./poclbm.py user:pass@blablabla#serv1 --frames=15 --device=0 --worksize=128 --vectors --tolerance=1 --failback=3
have you tried running sh /home/corelinux1/gpu0.sh in the terminal manually?

yes, it works actually...

but when I double click the .sh file, it gives me error... =/

what should I do?




and how can I make the autostart at boot part? didn't work here your guide....






hero member
Activity: 711
Merit: 500
ASRock 890gx MOBO, Athlon x2 250, 2x1gb ddr3, 3x 5850s, 900w PSU...basic mining stuff

Thanks for trying I guess. I'm posting in the linux coin thread maybe they will know a little better what the problem is
full member
Activity: 133
Merit: 100
Well, the miners work fine. Im not sure what else it could be. How would I test that? Is there a way to start an x server?
I'm not quite sure. I'm not great with linux...this thread was just what I found to be working with a stock LinuxCoin install. Which evidently doesn't work for everyone. What's your hardware specs?
hero member
Activity: 711
Merit: 500
Well, the miners work fine. Im not sure what else it could be. How would I test that? Is there a way to start an x server?
full member
Activity: 133
Merit: 100
Are you doing this remotely over ssh or with a keyboard and monitor physically at that machine?

Plugged in with keyboard and monitor, I can try over ssh w.o monitor if you think tht might help
Well I googled the error and it seems to be from not having a physical monitor attached which is not your case. Have you tested that aticonfig properly installed and such? Check to see that everything is working manually.
full member
Activity: 133
Merit: 100
yanz, give me a help here please..

I followed you guide, but using ubuntu, and everything gone fine, except the scripts parts...



I've created the scripts that you asked, but when I run them, the terminal screen just popup and close...


for example, I've created the start.sh script with the following code

Code:
#!/bin/bash
sleep 4
gnome-terminal --title GPU0 --command "sh /home/corelinux1/gpu0.sh"
gnome-terminal --title GPU1 --command "sh /home/corelinux1/gpu1.sh"

and the gpu0 and gpu1.sh on the same location, but when I run this script, I get the sleep time and then the bot miner scripts popup and close



ps, the code for the miner

Code:
#!/bin/bash
cd ~/poclbm/
./poclbm.py user:pass@blablabla#serv1 --frames=15 --device=0 --worksize=128 --vectors --tolerance=1 --failback=3
have you tried running sh /home/corelinux1/gpu0.sh in the terminal manually?
hero member
Activity: 711
Merit: 500
Are you doing this remotely over ssh or with a keyboard and monitor physically at that machine?

Plugged in with keyboard and monitor, I can try over ssh w.o monitor if you think tht might help
sr. member
Activity: 262
Merit: 250
Dubs Get
yanz, give me a help here please..

I followed you guide, but using ubuntu, and everything gone fine, except the scripts parts...



I've created the scripts that you asked, but when I run them, the terminal screen just popup and close...


for example, I've created the start.sh script with the following code

Code:
#!/bin/bash
sleep 4
gnome-terminal --title GPU0 --command "sh /home/corelinux1/gpu0.sh"
gnome-terminal --title GPU1 --command "sh /home/corelinux1/gpu1.sh"

and the gpu0 and gpu1.sh on the same location, but when I run this script, I get the sleep time and then the bot miner scripts popup and close



ps, the code for the miner

Code:
#!/bin/bash
cd ~/poclbm/
./poclbm.py user:pass@blablabla#serv1 --frames=15 --device=0 --worksize=128 --vectors --tolerance=1 --failback=3
full member
Activity: 133
Merit: 100
Are you doing this remotely over ssh or with a keyboard and monitor physically at that machine?
Pages:
Jump to: