SETI script and the Console app

May 06, '01 05:36:39PM

Contributed by: robh

I run the SETI@home command line program on both cpus in my OSX box. After doing this for many months I finally got sick of seeing their terminal icons in the dock, so decided to run SETI in the background and not tie up a terminal (or two) to monitor SETI output.

Read the rest of this article for an excellent tutorial on how to set up Seti to run without requiring a terminal window...

Here is the script I use:

#!/bin/csh -f

cd /Users/rob/Seti/cpu$1
while (1)
./setiathome -nice 20 >/dev/console
sleep 600
end

I run the script like this:
/Users/rob/bin/start_SETI 1 &
/Users/rob/bin/start_SETI 2 &

cpu$1 is translated to cpu1 or cpu2 respectively, so that the SETIs run from 2 different directories.

The infinite while loop is there to keep restarting SETI should it ever crash (it does crash about once a month :-)

To stop the SETI program from spewing output to a terminal or some black hole, I redirect the output to /dev/console.

I always leave the Console.app (in /Applications/Utilities) running so that I can see system messages and error diagnostics. (Console tip: console remembers its shape and location, so resize and move it till you're happy. Also, use the preferences to make it disappear (hide) a short while after showing new output).

So now when SETI has something to tell me, the console appears automagically and I don't have to keep 2 terminal windows around to monitor SETI diagnostic messages.

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20010506173639411