Automating boinc?

Questions and Answers : Unix/Linux : Automating boinc?
Message board moderation

To post messages, you must log in.

AuthorMessage
Mhalligan

Send message
Joined: 30 Nov 03
Posts: 2
Credit: 74,382
RAC: 0
United States
Message 86262 - Posted: 15 Mar 2005, 5:35:04 UTC

Is there a good way to automate the starting of boinc? I've got 100 servers I need to burn-in with setiathome for a week. It'd be nice to not have to log into every once of them to start the program once it's been distributed.

ID: 86262 · Report as offensive
parkut
Volunteer tester

Send message
Joined: 9 Aug 99
Posts: 69
Credit: 9,779,243
RAC: 0
United States
Message 86333 - Posted: 15 Mar 2005, 14:59:26 UTC

I use a cron job running hourly as root that checks
to see if boinc is running, and if not, run the script
below. Since boinc occasionally seems to go to sleep
when switching between projects, I test by looking at
the system load. On a single CPU machine, that
basically is only running boinc, the system load
will be 1.00.


if uptime | grep " 0.00" ; then ./boinc.cmd > /dev/null 2> /dev/null; else exit ; fi


#boinc.cmd
#!/bin/sh

killall boinc;sleep 4
cd /home/william/boinc
./boinc >> boinc.log 2>> error.log &
cd ~

ID: 86333 · Report as offensive
[AF>Linux]Arnaud
Volunteer tester

Send message
Joined: 3 Apr 99
Posts: 70
Credit: 4,852
RAC: 0
France
Message 86948 - Posted: 17 Mar 2005, 12:01:58 UTC

Hello,
I have the same question but as i'm a newbie, I don't know how to use the previous script written by duemling.

I would like boinc to start automatically when I start KDE LINUX
I use mandrake 10.0 and BOINC 4.27
I don't want to use boinc as a service, but just want BOINC to start so that I can control it with Boincmanager on another computer.
Boinc is in /home/arnaud/boinc folder and to launch it I type:

cd /home/arnaud/boinc
./boinc

Can someone tell me how to automate these 2 lines when KDE starts ?


Arnaud
ID: 86948 · Report as offensive
simplify / aki
Volunteer tester

Send message
Joined: 30 May 99
Posts: 61
Credit: 2,801,095
RAC: 0
Germany
Message 86979 - Posted: 17 Mar 2005, 13:45:11 UTC - in response to Message 86948.  

> Hello,
> I have the same question but as i'm a newbie, I don't know how to use the
> previous script written by duemling.
>
> I would like boinc to start automatically when I start KDE LINUX
> I use mandrake 10.0 and BOINC 4.27
> I don't want to use boinc as a service, but just want BOINC to start so that I
> can control it with Boincmanager on another computer.
> Boinc is in /home/arnaud/boinc folder and to launch it I type:
>
> cd /home/arnaud/boinc
> ./boinc
>
> Can someone tell me how to automate these 2 lines when KDE starts ?

#!/bin/bash
cd /home/arnaud/boinc ; ./boinc

copy this 2 lines in an editor (kedit) and save it for example as "startboinc".
chmod +x startboinc
now copy the script to /home/arnaud/.kde/Autostart
ID: 86979 · Report as offensive
[AF>Linux]Arnaud
Volunteer tester

Send message
Joined: 3 Apr 99
Posts: 70
Credit: 4,852
RAC: 0
France
Message 87005 - Posted: 17 Mar 2005, 15:48:08 UTC

Hi simplify / aki
Thanks for your reply: it works very fine :o)
Arnaud
ID: 87005 · Report as offensive
Michael Hearne

Send message
Joined: 28 Nov 02
Posts: 3
Credit: 133,201
RAC: 0
United States
Message 90225 - Posted: 24 Mar 2005, 4:30:48 UTC

I am running boinc-4.19 on Mandrake-10.1

I tried putting boinc in /usr/local/bin (boinc_4.19_i686-pc-linux-gnu renamed boinc). Then for each user, I made a directory /home/user/.boinc. Then I placed a script in /home/user/.kde/Autostart, which in turn started work in the user's .boinc directory.

This worked alright for local logins, but not for remote logins because a single binary can't work on several users workunits simultaneously.

So I moved a copy of the binary (boinc) into each user's .boinc directory, and placed a script to it in /home/user/.kde/Autostart. This starts seti and other projects as soon as the user logs in. This will be a little different for Gnome, I use KDE.

Examples:

In /home/user/.kde/Autostart, for start on boot:

#!/bin/sh
# boinc
cd /home/mhearne/.boinc
chown -R mhearne:mhearne *
./boinc &
exit 0

In /home/user/.boinc, for manual start and stop:

#!/bin/sh
# boincstart
cd /home/mhearne/.boinc
chown -R mhearne:mhearne *
./boinc &
exit 0

#!/bin/sh
# boincstop
kill `ps aux | grep boinc | grep -v grep | awk '{print $2}'`

Please note backticks above are _not_ single quotes. An hourly cron job is also a very good idea, I was using that before automation, but this way I'm sure boinc is running. mhearne (myself) = $USER

So, no cool graphics, but the work is getting done. Just set it and forget it.

HTH

Michael

RLU #352695
35.14N - 101.50W
ID: 90225 · Report as offensive
Profile Keepers

Send message
Joined: 20 Feb 03
Posts: 3
Credit: 2,078
RAC: 0
Germany
Message 94418 - Posted: 3 Apr 2005, 15:40:49 UTC - in response to Message 86333.  

A good possibility to start boinc automatically in various runlevels is to put the following Script in /etc/init.d :

#!/bin/sh
cd /location/where/boinc-is ; ./boinc-script

You can name this Script like you want to.

Then you make this script runnable with the following command: chmod +x script

Now we look at /etc/init.d/rc3.d and if you want rc5.d (just the runlevel you want it to be started, I prefer 3 and 5; 3 is the lowest because this is the one where network comes into play).

I have no Sxxx or Kxxx - Scripts which are higher than S21, so I name them S22.

Here we go, creating the Symlinks:

ln -s /etc/init.d/boinc-script /etc/init.d/rc3.d/S22boinc
ln -s /etc/init.d/boinc-script /etc/init.d/rc3.d/K22boinc

The Sxx is the starting one, the Kxx is the killing one.

You can do that with runlevel 5, just do the same.

Be sure to change the Names etc. like you used them at your Computer.

I hope this was help four you.
ID: 94418 · Report as offensive
Lovok

Send message
Joined: 23 Apr 01
Posts: 1
Credit: 1,296,781
RAC: 0
Czech Republic
Message 94932 - Posted: 4 Apr 2005, 20:04:35 UTC

In SuSE, it's very easy to implement init way of starting BOINC like in Keepers guide, thanks to Yast. Simply run installer of development version 4.27 of BOINC, it creates BOINC directory in user home directory including startup script named run_client. Copy that script into /etc/init.d

su
cp BOINC/run_client /etc/init.d/BOINC

then run Yast runlevel editor, which will now detect BOINC script and do the rest with few clicks :)

When boinc core is running, you can monitor and configure it by runing BOINC/boincmgr GUI ...
ID: 94932 · Report as offensive
Profile Tim Taylor
Avatar

Send message
Joined: 12 Sep 99
Posts: 15
Credit: 3,345,914
RAC: 11
United States
Message 173408 - Posted: 1 Oct 2005, 18:54:19 UTC - in response to Message 94932.  
Last modified: 1 Oct 2005, 18:55:29 UTC

In SuSE, it's very easy to implement init way of starting BOINC like in Keepers guide, thanks to Yast. Simply run installer of development version 4.27 of BOINC, it creates BOINC directory in user home directory including startup script named run_client. Copy that script into /etc/init.d

su
cp BOINC/run_client /etc/init.d/BOINC

then run Yast runlevel editor, which will now detect BOINC script and do the rest with few clicks :)

When boinc core is running, you can monitor and configure it by runing BOINC/boincmgr GUI ...


I'm completely new to Linux. I'm running Suse 9.3 that I installed last night. Yes I'm that new.

Can you explain this any better? It's Greek and Latin put together. Where do I find the /etc/init.d? Where is the Yast runlevel editor?

Also I get a connection refused when I run the boincmgr. Failed with error 2. There is also no .KDE directory as listed in the other above posts.

Thanks

Tim





ID: 173408 · Report as offensive
Dotsch
Volunteer tester
Avatar

Send message
Joined: 9 Jun 99
Posts: 2422
Credit: 919,393
RAC: 0
Germany
Message 173413 - Posted: 1 Oct 2005, 19:44:11 UTC

I have writen configurable script collection for start/stop boinc via the rc scripts in the runlevels. It keeps boinc running (restarting if it will abort), and will write a email (syslog entry is on my todolist), if it will abort.
If you wan't, I can upload it to my webserver for download.

ID: 173413 · Report as offensive
Profile Tim Taylor
Avatar

Send message
Joined: 12 Sep 99
Posts: 15
Credit: 3,345,914
RAC: 11
United States
Message 173417 - Posted: 1 Oct 2005, 20:02:47 UTC - in response to Message 94932.  
Last modified: 1 Oct 2005, 20:04:50 UTC

OK, The above didn't work after I found out how to do it. But this one did.

#!/bin/bash
cd /home/arnaud/boinc ; ./boinc

copy this 2 lines in an editor (kedit) and save it for example as "startboinc".
chmod +x startboinc
now copy the script to /home/arnaud/.kde/Autostart

I just found it all by trial and error and different scripts. And yes, I'm interested in seeing more info on the webserver that was mentioned.

This Linux stuff isn't so bad after all.



ID: 173417 · Report as offensive

Questions and Answers : Unix/Linux : Automating boinc?


 
©2025 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.