Various Questions

Questions and Answers : Unix/Linux : Various Questions
Message board moderation

To post messages, you must log in.

AuthorMessage
Temujin
Volunteer tester

Send message
Joined: 19 Oct 99
Posts: 292
Credit: 47,872,052
RAC: 0
United Kingdom
Message 577443 - Posted: 28 May 2007, 16:25:28 UTC

We've got Pete up & running now.

There was a small error in his boinc startup script so we changed chown -R boinc.boinc ~boinc to chown -R boinc:users /home/boinc (not sure why that was in there but we left it in)

Also got a desktop shortcut to boinc_manager working for him but needed to give him a blank gui_rpc file for it to work.

And we got him running chickens core2 app

happy crunching Pete
ID: 577443 · Report as offensive
Pete Marsh

Send message
Joined: 24 Sep 02
Posts: 1
Credit: 1,266,239
RAC: 1
United Kingdom
Message 577307 - Posted: 28 May 2007, 11:04:53 UTC
Last modified: 28 May 2007, 11:24:45 UTC

I've just started on SUSE 10.2 (dual boot with Vista on one machine and XP on the other) after running Seti (plus others) on MS platforms for many years but I'm struggling with a few bits and it's been many years since I was hands on with any flavour of Unix so...

I need help as follows:
1) I can't get the manager to connect to the client except when I run it via the shell (./run_manager) as root. I'd like to set up an icon through KDE.
2) Although I've read a number of threads with different builds available, I can't determine which is right (most efficient) for an Intel Quad Core (2.66Ghz) chipset.
3) It only appears to run when the Manager is active an yet it does show itself as an enabled service.

Any help you can supply would be much appreciated.

Regards

Pete

NB: With regard to item 1 above, I've followed instructions from this page (http://abcbeta.math.leidenuniv.nl/forum_user_posts.php?userid=215) and managed to get BOINC to run as a service (I've cut the key information from the post (below)).

Clicking on boincmanager or boinc icon is not correct, you must run it from console - I use mc for going to boinc directory and start boincmanager - boinc core I start automatically on startup as a service. Distro OpenSUSE 10.2:

1. create new user "boinc" useradd boinc
2. go to home/boinc
3. create new directory BOINC
4. go to directory etc/init.d (with root privilegs)
5. create new file boinc with this content

#!/bin/sh
#
# BOINC - start and stop the BOINC client daemon on Unix
#
# Unix start/stop script to run the BOINC client as a daemon at
# system startup, as the 'boinc' user (not root!).
#
# This version works on Red Hat Linux, Fedora Core, Mandrake,
# and Slackware Linux, and should work on generic Linux systems
# provided they have 'pidof'. Metadata for chkconfig and the SUSE
# equivalent INIT info are included below.
#
# Usage: boinc { start | stop | status | restart }
#
###
# chkconfig: 345 71 29
# description: This script starts the local BOINC client as a daemon
# For more information about BOINC (the Berkeley Open Infrastructure
# for Network Computing) see http://boinc.ssl.berkeley.edu
# processname: boinc
# config: /etc/sysconfig/boinc
#
### BEGIN INIT INFO
# Provides: boinc
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Description: This script starts the local BOINC client as a daemon
# For more information about BOINC (the Berkeley Open Infrastructure
# for Network Computing) see http://boinc.ssl.berkeley.edu
### END INIT INFO
#
# Eric Myers <myers@vassar.edu> - 27 July 2004
# Department of Physics and Astronomy, Vassar College, Poughkeepsie NY
# @(#) $Id: boinc,v 2.4 2005/05/24 14:00:07 myers Exp $
########################################################################

# Defaults, which can be overridden by /etc/sysconfig/boinc

BOINCUSER=boinc
BOINCDIR=/home/boinc/BOINC
BUILD_ARCH=i686-pc-linux-gnu

# Log and error files (you should rotate these occasionally)
LOGFILE=boinc.log
ERRORLOG=error.log

# Mandrake 10.1 really wants a lock file...
LOCKDIR=/var/lock/subsys

# BOINC options:
#BOINCOPTS="-allow_remote_gui_rpc" # opens up your machine to the world!
BOINCOPTS="-return_results_immediately -allow_remote_gui_rpc"

# Just set the path to what is needed, nothing more (for security)

PATH=/sbin:/bin:/usr/sbin:/usr/bin
export PATH

# Init script function library. This stuff is Red Hat specific,
# but if the functions are not found we create our own simple replacements.
# (The idea for replacing the functions comes from OpenAFS. Thanks guys!)

if [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
function echo_success () { echo -n " [ OK ] " ; }
function echo_failure () { echo -n " [FAILED] " ; }
function echo_warning () { echo -n " [WARNING] " ; }
function killproc() {
PID=`pidof -s -x -o $$ -o $PPID -o %PPID $1`
[ $PID ] && kill $PID ; }
fi


# su on Linux seems to need this to be set to work properly
export TERM dumb


# Look for any local configuration settings:

if [ -f /etc/sysconfig/boinc ]; then
. /etc/sysconfig/boinc
fi


## Locate the working directory

if [ ! -d $BOINCDIR ]; then
echo "Cannot find BOINC directory $BOINCDIR "
exit 7
fi


## Locate the executable, either boinc_client,
## or boinc with highest version number

BOINCEXE=$BOINCDIR/boinc
if [ ! -x $BOINCEXE ]; then
BOINCEXE=`/bin/ls -1 $BOINCDIR/boinc_*_$BUILD_ARCH 2>/dev/null | tail -1 `
fi

if [ ! -x "$BOINCEXE" ]; then
echo "Cannot find/run BOINC executable. $BOINCEXE "
exit 2
fi



## Functions: $1 is start/stop/status/restart

case "$1" in
start)
cd $BOINCDIR

if [ -f lockfile ] ; then
echo -n "Another instance of BOINC is running (lockfile exists)."
echo_failure
echo
exit 4
fi

if [ ! -f client_state.xml ] ; then
echo -n "The BOINC client requires initialization."
echo_warning
echo
fi

echo -n "Starting BOINC client as a daemon: "
chown -R boinc.boinc ~boinc
su $BOINCUSER -c "$BOINCEXE $BOINCOPTS" >>$LOGFILE 2>>$ERRORLOG &
sleep 1
PID=`pidof -s -x -o $$ -o $PPID -o %PPID $BOINCEXE`
if [ $PID ]; then
touch $LOCKDIR/boinc
echo_success
else
echo_failure
fi
echo
;;

stop)
cd $BOINCDIR
if [ ! -f lockfile -a ! -f $LOCKDIR/boinc ] ; then
echo -n "BOINC is not running (no lockfile found)."
echo_success
else
echo -n "Stopping BOINC client daemon: "
killproc $BOINCEXE && echo_success || echo_failure
# clean up in any case
rm -f $BOINCDIR/lockfile
rm -f $LOCKDIR/boinc
fi
echo
;;

restart)
$0 stop
$0 start
;;

status)
PID=`pidof -x -o $$ -o $PPID -o %PPID boinc_client`
if [ "$PID" == "" ]; then
PID=`pidof -x -o $$ -o $PPID -o %PPID $BOINCEXE`
fi
if [ "$PID" != "" ]; then
echo "BOINC client is running (pid $PID)."
else
if [ -f $BOINCDIR/lockfile -o -f $LOCKDIR/boinc ]; then
echo "BOINC is stopped but lockfile exists."
else
echo "BOINC client is stopped."
fi
fi
;;

*)
echo "Usage: boinc {start|stop|restart|status}"
exit 1
esac

exit

#EOF#

6. add new service: chkconfig --add boinc
(it will start boinc after start of linux - no need be loged)

7. try run service: service boinc start (or restart computer)
and see in /home/boinc/BOINC/boinc.log whats happen

Service can be stopped by: service boinc stop
This script is not from me and I know that it is working on different distros.

My recommendations is change privilages for BOINC directory to no limitation for all users.
ID: 577307 · Report as offensive

Questions and Answers : Unix/Linux : Various Questions


 
©2020 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.