Ubuntu Init Script

Message boards : BOINC client : Ubuntu Init Script
Message board moderation

To post messages, you must log in.

AuthorMessage
Matt LaPlante

Send message
Joined: 9 Feb 06
Posts: 3
United States
Message 4236 - Posted: 8 May 2006, 4:56:28 UTC

I've created a simple init script to work under Ubuntu systems. Download the Linux client from the Boinc site and run it. Get it configured as you want it. Place the init script in /etc/init.d, and change the BOINC_DIR variable to the location you extract BOINC to. Use update-rc.d to add the init script to the default run group.

#! /bin/sh
#
# Matt LaPlante - 5/8/06
# /etc/init.d/boinc: start and stop the BOINC distributed computing client

BOINC_DIR="/home/me/BOINC"
PID_FILE="/var/run/boinc.pid"

test -f /lib/lsb/init-functions || exit 1
. /lib/lsb/init-functions

case "$1" in
  start)
		log_begin_msg "Starting BOINC distributed computing client..."
		start-stop-daemon -b -d $BOINC_DIR --start --quiet -m -p $PID_FILE --exec \\
			$BOINC_DIR/boinc -- -daemon -dir $BOINC_DIR || log_end_msg 1
		log_end_msg 0
	;;
  stop)
		log_begin_msg "Stopping BOINC distributed computing client..."
    start-stop-daemon --stop --quiet -p $PID_FILE || log_end_msg 1
    log_end_msg 0
    ;;
  status)
		cd $BOINC_DIR && ./boinc_cmd --get_state
		;;
  *)
    log_success_msg "Usage: /etc/init.d/boinc {start|stop|status}"
    exit 1
esac

exit 0
ID: 4236 · Report as offensive
MikeToth1001
Avatar

Send message
Joined: 23 Dec 06
Posts: 14
United States
Message 7349 - Posted: 8 Jan 2007, 23:35:48 UTC

Seeing that Ubuntu has roots in Debian, would this work on my Debian systems? I've found INIT scripts for just about every other distro out there, except Debian.

AdvTHANKSance
ID: 7349 · Report as offensive
ohiomike
Avatar

Send message
Joined: 26 Dec 06
Posts: 26
United States
Message 7356 - Posted: 9 Jan 2007, 16:42:27 UTC

It is better to start the task using "nice". This will cause all client tasks to also be run in the nice mode. That way it only hogs resources when they are not needed else where. Un-attended both my CPUs peg on 100%, but when I am doing something, the tasks back-off to allow good user performance. See "man nice".


ID: 7356 · Report as offensive
Metod, S56RKO

Send message
Joined: 9 Sep 05
Posts: 128
Slovenia
Message 7373 - Posted: 10 Jan 2007, 13:21:33 UTC - in response to Message 7356.  

It is better to start the task using "nice". This will cause all client tasks to also be run in the nice mode.


You don't need to start boinc CC niced. It'll start scientific applications niced as much as possible anyway. This is design feature, albeit some users would like to bypass it due to some reason I can't understand.
Metod ...
ID: 7373 · Report as offensive
clownius

Send message
Joined: 17 Feb 07
Posts: 35
Australia
Message 8280 - Posted: 17 Feb 2007, 13:12:17 UTC

Im not shure how dated this thread is but in the Universe repositories of Ubuntu (and obviously the derivatives Kubuntu etc) there is a BOINC package that sets up all the scripts and stuff for you. Works great on my Kubuntu systems.
ID: 8280 · Report as offensive
River~~
Avatar

Send message
Joined: 12 Mar 07
Posts: 59
Message 8825 - Posted: 17 Mar 2007, 7:33:21 UTC - in response to Message 8280.  
Last modified: 17 Mar 2007, 7:34:34 UTC

Im not shure how dated this thread is but in the Universe repositories of Ubuntu (and obviously the derivatives Kubuntu etc) there is a BOINC package that sets up all the scripts and stuff for you. Works great on my Kubuntu systems.


There have been two flavours of Debian around for a while, Sarge which is two years old and stable, and Etch which is expected to become stable 'soon'

Debian Sarge does not have an official BOINC package.

Debian Etch does have a supported BOINC package.

So I'd guess that when Ubuntu moved over from taking its upstream packages from Sarge to Etch, it probably picked up BOINC on the way, either that or it picked up the Debian 'backport'.

MikeThoth:

Seeing that Ubuntu has roots in Debian, would this work on my Debian systems? I've found INIT scripts for just about every other distro out there, except Debian.


I'd suggest the backport of their BOINC package into Sarge, see http://wiki.debian.org/BOINC. Skip down the page to the install section.

HTH

R~~
ID: 8825 · Report as offensive
clownius

Send message
Joined: 17 Feb 07
Posts: 35
Australia
Message 9303 - Posted: 2 Apr 2007, 7:57:38 UTC

I do believe Ubuntu takes the latest testing snapshot when working on a new version. Well from what im told anyway and often backports testing things like kernels into the current build. The 64 bit BOINC setup reports itself wrong at the moment but if you install Augustine's client over the top of the one from the Universe it works fine with all scripts intact.
ID: 9303 · Report as offensive
j2satx

Send message
Joined: 31 Aug 05
Posts: 51
United States
Message 9422 - Posted: 8 Apr 2007, 12:00:32 UTC - in response to Message 8825.  

Im not shure how dated this thread is but in the Universe repositories of Ubuntu (and obviously the derivatives Kubuntu etc) there is a BOINC package that sets up all the scripts and stuff for you. Works great on my Kubuntu systems.


There have been two flavours of Debian around for a while, Sarge which is two years old and stable, and Etch which is expected to become stable 'soon'

Debian Sarge does not have an official BOINC package.

Debian Etch does have a supported BOINC package.

So I'd guess that when Ubuntu moved over from taking its upstream packages from Sarge to Etch, it probably picked up BOINC on the way, either that or it picked up the Debian 'backport'.

MikeThoth:

Seeing that Ubuntu has roots in Debian, would this work on my Debian systems? I've found INIT scripts for just about every other distro out there, except Debian.


I'd suggest the backport of their BOINC package into Sarge, see http://wiki.debian.org/BOINC. Skip down the page to the install section.

HTH

R~~


What is the advantage of getting BOINC from the Ubuntu distro?

The official and/or latest BOINC downloads and installs just fine on my machines.

ID: 9422 · Report as offensive
Studebaker Hawk
Avatar

Send message
Joined: 21 Feb 07
Posts: 22
Canada
Message 9425 - Posted: 8 Apr 2007, 14:35:47 UTC - in response to Message 9422.  
Last modified: 8 Apr 2007, 14:38:38 UTC

What is the advantage of getting BOINC from the Ubuntu distro?

The official and/or latest BOINC downloads and installs just fine on my machines.


The advantage is that BOINC is included in Ubuntu's software repository. That allows crunchers to download and install BOINC and BOINC updates using Linux's software update facility. Not only is the download and installation fairly automated, the updater software checks dependencies which means it checks to see which libraries BOINC requires. If your libraries need to be updated then it updates those too.

I think another advantage might be that the people maintaining the repository compile BOINC on the various versions of Ubuntu to ensure that you get updates that will run on whatever Ubuntu version you have installed? If they don't actually compile it then they likely at least check to see if the official compile from Berkeley runs properly on Ubuntu? If the latest official BOINC has a major problem then the repository maintainers can hold back that update and save Ubuntu users some grief.

I am not saying all this "automaticness" is the best way. It's only as good as the people who maintain the automation behind the scenes. If they screw up then you get screwed, automatically. There are advantages to doing it all manually if you have the time and expertise. People who don't have time and expertise prefer to have it automated. As more people drop Windows and migrate to Linux I think automated downloads/updates will grow in popularity.

ID: 9425 · Report as offensive
clownius

Send message
Joined: 17 Feb 07
Posts: 35
Australia
Message 9448 - Posted: 9 Apr 2007, 7:31:54 UTC

From actually using it im sorry to say its still on 5.4.11 at the moment so it doesn't keep up to date well. The only advantage i have seen so far as it includes all the scripts to automatically start BOINC etc and adds BOINC to your menus. Basically its integration it gives you.
If there is another (all to common where i live) power outage that outlasts my UPS i know that when each machine fires up again it will start crunching even if no-one is home to log back in. This can be done yourself but its all to much effort for me when its just a button click away.
Lastly as it is behind i generally update the BOINC version myself and its dead simple to do.
Do the rather horrid standard BOINC install (can you tell i prefer not to use the command line lol).
Rename boinc to boinc_client
Copy and paste this (also boinc_cmd and boincmgr) into /usr/bin and your now using the latest version and have all the scripts etc intact.
ID: 9448 · Report as offensive
j2satx

Send message
Joined: 31 Aug 05
Posts: 51
United States
Message 9466 - Posted: 9 Apr 2007, 16:21:53 UTC - in response to Message 9425.  

What is the advantage of getting BOINC from the Ubuntu distro?

The official and/or latest BOINC downloads and installs just fine on my machines.


The advantage is that BOINC is included in Ubuntu's software repository. That allows crunchers to download and install BOINC and BOINC updates using Linux's software update facility. Not only is the download and installation fairly automated, the updater software checks dependencies which means it checks to see which libraries BOINC requires. If your libraries need to be updated then it updates those too.

I think another advantage might be that the people maintaining the repository compile BOINC on the various versions of Ubuntu to ensure that you get updates that will run on whatever Ubuntu version you have installed? If they don't actually compile it then they likely at least check to see if the official compile from Berkeley runs properly on Ubuntu? If the latest official BOINC has a major problem then the repository maintainers can hold back that update and save Ubuntu users some grief.

I am not saying all this "automaticness" is the best way. It's only as good as the people who maintain the automation behind the scenes. If they screw up then you get screwed, automatically. There are advantages to doing it all manually if you have the time and expertise. People who don't have time and expertise prefer to have it automated. As more people drop Windows and migrate to Linux I think automated downloads/updates will grow in popularity.



I can see the point of it being in the repository, except that the BOINC isn't maintained.

I use the Ubuntu "update" all the time and will be glad when it gets connected to Linspires CNR.

ID: 9466 · Report as offensive
j2satx

Send message
Joined: 31 Aug 05
Posts: 51
United States
Message 9467 - Posted: 9 Apr 2007, 16:25:12 UTC - in response to Message 9448.  

From actually using it im sorry to say its still on 5.4.11 at the moment so it doesn't keep up to date well. The only advantage i have seen so far as it includes all the scripts to automatically start BOINC etc and adds BOINC to your menus. Basically its integration it gives you.
If there is another (all to common where i live) power outage that outlasts my UPS i know that when each machine fires up again it will start crunching even if no-one is home to log back in. This can be done yourself but its all to much effort for me when its just a button click away.
Lastly as it is behind i generally update the BOINC version myself and its dead simple to do.
Do the rather horrid standard BOINC install (can you tell i prefer not to use the command line lol).
Rename boinc to boinc_client
Copy and paste this (also boinc_cmd and boincmgr) into /usr/bin and your now using the latest version and have all the scripts etc intact.


I can see your point. I'm more inclined to be hands on and don't have anything automated. I enjoy the piddling and micro-managing BOINC and want to know when my machines crashed and whether or not anything happened to them. I start them all manually and when I'm done checking things out, I start BOINC. I don't even use "service".

ID: 9467 · Report as offensive

Message boards : BOINC client : Ubuntu Init Script

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.