From: " DiskMan" <nobody@thewheel.com>
Subject: Re: Seti@home
Date: Mon, 28 Feb 2005 21:47:56 GMT [thread overview]
Message-ID: <gkMUd.15815$3V3.4109@twister.rdc-kc.rr.com> (raw)
In-Reply-To: J4idnYkMO50PEb7fRVn-ug@comcast.com
Oh, heres a initd script for ya if you like:
#This script is a sample script to allow the seti
# You have to link /etc/rc.d/rc.<your run level>/S99seti
#When using the script, your seti client will always
# -launched with "/etc/rc.d/initd/seti start"
# -stoped with "/etc/rc.d/initd/seti stop"
# -restarted with "/etc/rc.d/initd/seti restart"
# -watched with "/etc/rc.d/initd/seti status"
# -be logged with "/etc/rc.d/initd/seti log"
# 30 0 * * * "/etc/rc.d/initd/seti log"
SETI_CLIENT_DIR=/usr/scientific/setiathome-3.03
#This direcory contains the root of setiathome's workspace
SETI_DIR=/usr/scientific/setiathome-3.03
#This file is generated by setiathome and we need it
SETI_LOCK_FILE=/var/lock/seti.lock
echo -n "Starting computing seti: "
${SETI_CLIENT_DIR}/setiathome -nice 15 -nolock -proxy 66.28.250.122 >
/dev/null &
echo -n "Shutting down seti: "
killall setiathome
running=`ps -A | grep setiathome`
echo "Usage: seti {start|stop|restart|status}"
[root@jericho em86-0.4]# cat /etc/rc.d/init.d/seti
#!/bin/bash
# chkconfig: 2345 30 60
# Source function library
. /etc/rc.d/init.d/functions
################################################
#This script is a sample script to allow the seti
#client to run as a service on a linux box.
#
#Install Notes :
#
# customize the two first variables of the script
# make a symbolic link from
# You have to link /etc/rc.d/rc.<your run level>/S99seti
# to this file to make it run.
# start the service (or reboot :-) )
# check it works with the status option
#
#
#How this works ?
#
#When using the script, your seti client will always
#run in the same folder (that you can choose) ,
#this is a "clean" way to run it.
#The service can be:
# -launched with "/etc/rc.d/initd/seti start"
# -stoped with "/etc/rc.d/initd/seti stop"
# -restarted with "/etc/rc.d/initd/seti restart"
# -watched with "/etc/rc.d/initd/seti status"
# -be logged with "/etc/rc.d/initd/seti log"
#As the last option (log) in quite unsual,
#it is intended to be used with the cron daemon
#to allow users to log their progress in some file
#so that can get a good idea of there current score
#and progress.
#Here are the 2 lines to type in your crontab :
# SHELL=/bin/bash
# 30 0 * * * "/etc/rc.d/initd/seti log"
#You must have write permission on all the files
#to add it to your crontab.
#Author Stephane NICOLAS
#<snicolas@iad.ift.ulaval.ca>
#This program is distributed under the terms of the GPL.
#You can get a copy of it at
#http://www.fsf.org/copyleft/copyleft.html#translations
################################################
#This variable points to the client's executable directory
#change this value to define the location of your client.
#We do NOT need the client to be in your $PATH
SETI_CLIENT_DIR=/usr/scientific/setiathome-3.03
#This direcory contains the root of setiathome's workspace
#you can customize it.
SETI_DIR=/usr/scientific/setiathome-3.03
#This file is generated by setiathome and we need it
SETI_LOG_FILE=$SETI_DIR/state.sah
#this file is lock file we create to ensure one and
#only one client is launched
SETI_LOCK_FILE=/var/lock/seti.lock
case "$1" in
start)
echo -n "Starting computing seti: "
more ${SETI_DIR}/user_info.sah | awk -F = '$1 == "nresults" { print $2}'
cd $SETI_DIR
${SETI_CLIENT_DIR}/setiathome -nice 15 -nolock -proxy 66.28.250.122 >
/dev/null &
touch $SETI_LOCK_FILE
;;
stop)
echo -n "Shutting down seti: "
more ${SETI_DIR}/user_info.sah | awk -F = ' $1 == "nresults" { print
$2 }'
killall setiathome
rm -f $SETI_LOCK_FILE
echo
;;
restart)
$0 stop
$0 start
;;
status)
echo -n "Seti work unit completed: "
more ${SETI_DIR}/user_info.sah | awk -F = ' $1 == "nresults" { print $2}'
running=`ps -A | grep setiathome`
#thanks to Toan for this bug fix
if( [ "${running}" = " " ] )
then
echo "Seti client is not running."
else
echo -n "Seti client runs since "
echo ${running} | awk -F " " '{ print $3 }'
echo -n "The current work unit is completed at "
more $SETI_LOG_FILE | grep prog | awk -F "=" '{ print $2 } '
fi
echo -n "Last result returned at ("
more ${SETI_DIR}/user_info.sah | grep last_result_time | awk -F "(" '{
print $2 }'
echo ""
;;
log)
/bin/date >> $SETI_DIR/log
$0 status >> $SETI_DIR/log
echo "*******************************************" >> $SETI_DIR/log
;;
*)
echo "Usage: seti {start|stop|restart|status}"
exit 1
esac
next prev parent reply other threads:[~2005-02-28 21:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-28 16:15 Seti@home Jim Woodruff
2005-02-28 20:27 ` Seti@home DiskMan
2005-02-28 20:49 ` Seti@home Måns Rullgård
2005-02-28 20:54 ` Seti@home DiskMan
2005-02-28 21:26 ` Seti@home Jim Woodruff
2005-02-28 21:46 ` Seti@home DiskMan
2005-02-28 22:19 ` Seti@home Jim Woodruff
2005-02-28 21:47 ` DiskMan [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-05-16 4:00 SETI@Home rsimpson
1999-05-17 4:00 ` SETI@Home root
[not found] ` <3741739A.B596ED75@home.com>
1999-05-19 4:00 ` SETI@Home root
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox