Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Upgrade | 3 comments | Create New Account
Click here to return to the 'Upgrade' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Upgrade
Authored by: babbage on May 07, '01 12:21:48PM
You might want to consider getting a more recent version of the S@H software. I'm running:
/Users/chris/setiathome-3.03.powerpc-apple-darwin1.2% setiathome -version
SETI@home client.
Platform: powerpc-apple-darwin1.2
Version: 3.03

[...sniiiiip]

The version I installed last week came with a very helpful README file that seem to give a more straightforward approach here. A relevant section reads as follows:

    If you want setiathome to be started automatically, you can
    set up a cron job.  Add the following line to your crontab:

    0 * * * * cd ; ./setiathome -nice 19 > /dev/null 2> /dev/null

    Where  is the directory where the setiathome client is installed.
    This cron job will attempt to start the client at the top of every hour.
    If it is already running, the next invocation will do nothing.
    If the client is not running, it will be started.
    For more information on cron jobs see the crontab(1) manual page.

As per your advice, it might be a good idea to chance /dev/null to /dev/console, but otherwise, this seems like a better approach to me. It runs as a cron job, so the system will run it even when you're not logged in (or someone else is logged in, or whatever). No monkeying around with new terminals for it etc.

The bit I'm not sure about is how you might want to adjust things for a multiprocessor setting. I have no experience with this, and perhaps things should indeed be done differently. All the same, I still feel that going through the cron system is a better strategy overall.

[ Reply to This | # ]

Upgrade (not)
Authored by: robh on May 07, '01 12:58:07PM

I'm running the 3.03 version and aware of their cron suggestion.

The problem with the cron method is that every time cron tries to start a new SETI it will output a warning that there's one already running. Now if you follow their advice and dump all output into the bit bucket (/dev/null), then there's no problem, but you never see ANY output. If you redirect the output to /dev/console then you'll see a warning every time cron fires it up. Even if it's once an hour it can be a distraction. Using my script, SETI is only (re)started when an earlier invocation has crashed or terminated.

Pick the method that suits you best.



[ Reply to This | # ]
Upgrade (not)
Authored by: babbage on May 07, '01 02:22:55PM
Ok, so adjust the cronjob to only launch if setiathome isn't running:
0 * * * * cd setidir; ((ps ax | grep seti | grep -v grep) || ./setiathome -nice 19) > /dev/console 2> /dev/console

Check for the presense of the setiathome process, filter out the check itself, and if the check fails then launch seti again. There's probably about a million ways to do this ("timtowtdi"), but as a general rule I still think that ways that work through the cron system are going to be more suitable than ways that try to avoid or work around it.

My actual line goes to /dev/console (now, but I may put it back to /dev/null if I decide I'd rather have it run quietly), and more importantly it also sends an email if anything goes wrong (which seems like a better alert mechanism than the console anyway, at least to me -- it can go to another machine, can be read later, etc).

[ Reply to This | # ]