BOINC as a service to start at boot
I want to have BOINC start when I boot my machine where would i have to put reference to the boinc shell script for it to do this? I mean I want this to start even before the x server starts. so if i'm not logged in, it can still run.
the path to my boinc file is /home/gelan/pgms/BOINC/ do I have to put a symlink somewhere? I'm really not sure how to go about this. |
Re: BOINC as a service to start at boot
Quote:
What I did was create a user "boinc" and have the process run as that user. Do not allow BOINC to run as root. I did what it says to do on this page to get BOINC to start at boot: http://www.spy-hill.com/~myers/help/boinc/unix.html There are a couple of modifications you may have to make with your daemon script to get it to start as a service. Post back if this does not work for you. |
How should I edit the script he gave? I have no clue what to do.
and where do I put it? I tried putting it in the /etc/init.d/ as boinc, but when I ran the command service boinc start it gave an error Cannot find boinc service What do i do? |
Quote:
The script he gave has 2 or 3 lines in it at the beginning that say this: BOINCUSER=boinc BOINCDIR=/var/lib/boinc BUILD_ARCH=i686-pc-linux-gnu BOINCEXE=/usr/bin/boinc_client Now, you will need to edit these to fit your needs if you didn't do it exactly like he said in that article. For example, if your boinc directory is like mine it's in /home/boinc, not /var/lib/boinc. You should therefore change that line to read: BOINCDIR=/home/boinc You will also need to rename your boinc executable to whatever it says in this BOINCEXE line. I named mine "boinc", so that line in mine looks like this: BOINCEXE=/home/boinc/boinc Now once you have it edited you need to put it where it says to put it (/etc/rc.d/init.d) and make sure you saved it as "boinc" and make sure you make it executable (chmod a+x boinc). Also make sure you chmod your boinc executables to make them executable. Make sure you do this so it will add boinc as a service: chkconfig --add boinc Also, you need to make sure you change the permissions on your /home/boinc directory and all files within to give you (not just root) permissions. do this by cd'ing into /home/boinc and then do this (as root): chown boinc:users * if there are any folders in the /home/boinc directory make sure you change the permissions on them also. Now you should be able to start the boinc service with "service boinc start" You can stop it with "service boinc stop", and if you want to restart you can do a "service boinc restart". Hope this helps |
hmm.. now whenever i try to start the service, it fails...
# service boinc start Starting BOINC client as a daemon: [FAILED] hmm... Thank you so much for taking the time to go through all of this for me, I know how hard it is to break stuff down to simple steps like this. |
can you start boinc as root? su to root and then cd to the /home/boinc directory (or wherever boinc's home is) and do this:
Code:
./boinc & |
changing the BOINCUSER to root allows me to start the service now, but It doesn't seem like it's actually computing anything.
Why don't I want to do this? Why is it bad to run this as root? |
Quote:
OK this sounds like a permissions problem to me. Check to make sure your boinc directory and EVERYTHING in there is owned by boinc. Do this as follows: Code:
ls -l Code:
chown boinc:user * Are you running SETI? If so, you will have a /home/boinc/projects directory as well. You must change the ownership of that as well as everything in it to boinc as well, using the same procedure. Also, did you connect to a project? If you didn't, you won't be computing anything for sure. |
excellent! it works as the boinc user now, but I'm still not seeing it using any CPU power... i open ksysguard and look at the boinc process, and it doesn't use any cpu power. but before, when I ran it inside my normal user account, I would see it using almost all of the CPU power.
I am attached to the setiathome project, and i made sure it was attached by running the boinc mgr as the webpage you linked to told me to. Hmm... |
when you run it as boinc user, do this:
Code:
ps -aux |
doh! I forgot about that, that it's not the boinc process, it's the setiathome one that does the work!
Thanks, it's working like a charm now! thanks so much! Hopefully all this will help someone else in the future, eh? Thanks again! |
Just set it up on another box in about 5 minutes, awesome, thanks!
|
Quote:
On a related note, are you using optimized clients? |
That's true, I expected to find a lot more information on here about the boinc clients!
No, I couldn't get the AMD 64 client to work at all. I'm using the general x86 linux client. I just don't feel like i'm getting the most out of my AMD dual core... |
Can't really help with the AMD stuff ... wish I could.
There is one more thing I forgot to mention. If your computer gets shut down improperly (power failure), BOINC will not restart as you'd expect. This is due to the presence of a lockfile that prevents it. The lockfile gets created when the service is started and deleted when it is stopped. When the power goes out, the lockfile does not get deleted. You can find it in your boinc directory. To get around this problem, you can edit that script as follows: Code:
# Mandrake 10.1 really wants a lock file... Code:
# Mandrake 10.1 really wants a lock file... Code:
cd $BOINCDIR That's it, except for you not using the optimized clients, your setup is exactly like mine. You might find an optimized client here or here's a bunch of places to look here There are several, you should try a few - maybe one will work. Don't forget to try both the optimized seti client AND the optimized boinc client. Both can make a difference. |
All times are GMT -5. The time now is 11:33 PM. |