In the "race to TLC #250" thread Hagabard wanted to see my seti at linux scripts. Others might be interested, so here they are in a seperate thread.
The scripts are based on being in ~/seti with sub-dirs for each "cached" wu. These dirs must be made manually and have seti installed. The executeable "setiathome" could either be copied to each dir or it could be a symlink from each dir to make it easier to upgrade. "user_info.sah" and others should also be copied to each dir.
I don't remember which .sah files should be copied, but others should be able to help, or you could experiment. From a dir where you have "logged in" to seti, you could copy everything and just delete the "work_unit.sah".
~/seti/run
The file that runs seti "forever" - put it in a startup-script or make it a cronjob (or whatever)
It outputs to both ~/seti/seti.log and to stdout - I like have a window showing what it does. You could remove one or both from the script. The "sleep 300" is in case no WU's are ready, so it doesn't loop too fast - another personal preference.
~/seti/xfer
The script that up-/down-loads WU's. Either run it manually when your dial-up connection is up, or set it to run 1 or more times each day if your machine is "allways-on".
You can put your proxy-settings in the "./setiathome ..." line
~/seti/list
Shows the status of each WU
~/seti/listrep
Repeats list. Nice for a little status window
-------------
This should work on any other *NIX. They are based on tcsh - my default shell (it was the default shell on the first UNIX system I was a user on - it has stuck). You might have to adjust the path to tcsh - it isn't in /bin on the HP-UX I can login on.
I use 8 dirs named 1, 2, 3, 4, 5, 6, 7 and 8, but you can use any number of dirs with whatever names you want if you just edit the "foreach ..." lines in the scripts.
I've edited the scripts a little for display here - most of the output-text was in Danish. You might want to edit the "date" commands to show a shorter date-format.
In the output to stdout I use "echo -n" a lot - It doesn't leave a blank line under the text, so a status window can be one line smaller.
The scripts are based on being in ~/seti with sub-dirs for each "cached" wu. These dirs must be made manually and have seti installed. The executeable "setiathome" could either be copied to each dir or it could be a symlink from each dir to make it easier to upgrade. "user_info.sah" and others should also be copied to each dir.
I don't remember which .sah files should be copied, but others should be able to help, or you could experiment. From a dir where you have "logged in" to seti, you could copy everything and just delete the "work_unit.sah".
~/seti/run
The file that runs seti "forever" - put it in a startup-script or make it a cronjob (or whatever)
code:<HR>Code:#!/bin/tcsh<P>touch ~/seti/seti.log<P>while (1) foreach wu (1 2 3 4 5 6 7 8) cd ~/seti/${wu} echo "" if (-e work_unit.sah) then echo -n "WU ${wu} start `date`" echo "WU ${wu} start `date`" >> ../seti.log ./setiathome -nice 8 -stop_after_process >> ../seti.log else echo -n "WU ${wu} missing `date`" echo "WU ${wu} missing `date`" >> ../seti.log sleep 300 endif end # foreach end # while
It outputs to both ~/seti/seti.log and to stdout - I like have a window showing what it does. You could remove one or both from the script. The "sleep 300" is in case no WU's are ready, so it doesn't loop too fast - another personal preference.
~/seti/xfer
The script that up-/down-loads WU's. Either run it manually when your dial-up connection is up, or set it to run 1 or more times each day if your machine is "allways-on".
code:<HR>Code:#!/bin/tcsh foreach wu (1 2 3 4 5 6 7 8) if (-e ~/seti/${wu}/work_unit.sah) then echo WU ${wu} ready else echo WU ${wu} missing cd ~/seti/${wu} ./setiathome -stop_after_xfer endif end # for
You can put your proxy-settings in the "./setiathome ..." line
~/seti/list
Shows the status of each WU
code:<HR>Code:#!/bin/tcsh<P>foreach wu (1 2 3 4 5 6 7 8) echo "" echo -n "WU ${wu}: " if (-e ~/seti/$wu/work_unit.sah) then if (-s ~/seti/${wu}/state.sah) then echo -n `grep prog ~/seti/${wu}/state.sah | cut -c 8-9` else echo -n ready endif else echo -n done endif end # foreach
~/seti/listrep
Repeats list. Nice for a little status window
code:<HR>Code:#!/bin/tcsh while (1) clear echo -n `date` ~/seti/list<P> sleep 10m end
-------------
This should work on any other *NIX. They are based on tcsh - my default shell (it was the default shell on the first UNIX system I was a user on - it has stuck). You might have to adjust the path to tcsh - it isn't in /bin on the HP-UX I can login on.
I use 8 dirs named 1, 2, 3, 4, 5, 6, 7 and 8, but you can use any number of dirs with whatever names you want if you just edit the "foreach ..." lines in the scripts.
I've edited the scripts a little for display here - most of the output-text was in Danish. You might want to edit the "date" commands to show a shorter date-format.
In the output to stdout I use "echo -n" a lot - It doesn't leave a blank line under the text, so a status window can be one line smaller.