If you've ever watched the movie Contact and felt the excitement that comes from the possibility of finding intelligent signals from outer space, you may find the SETI@home project interesting. Even if you're not interested in extraterrestrial life, this project does provide an interesting example of collaborative computing.
In today's article, I'd like to demonstrate the usage of FreeBSD's "setiathome" client and several of the GUI front ends that are available for this client from the ports collection.
Before I begin, what is collaborative computing? In a nutshell, it is a way to harness the processing power of CPUs running on many different computers so they can all work on a common project. Those who participate in a collaborative project "donate" idle CPU cycles to help process vast amounts of research data.
There are several such projects on the Internet, all of which give you the possibility of fame and fortune. The first is distributed.net. This site is currently hosting four projects that deal with testing the strength of encryption algorithms or calculating Golomb Rulers. If none of that makes any sense to you, the site also provides an introduction to the mathematical concepts behind each of the projects.
Another collaborative project deals with a mathematical concept known as Mersenne primes and can be found at The Great Internet Mersenne Prime Search. It's encouraging to read how a 20-year-old Canadian found the latest Mersenne prime on his 800MHz computer.
And the last project is the one we will be concentrating on today. The SETI@home site is a gold mine of fascinating information as well as FAQs and statistics regarding the project.
Okay, without any further ado, let's become the superuser and build the setiathome client:
su Password: cd /usr/ports/astro/setiathome
Once the build is finished, type
exit to leave the superuser account and
cd to return to your home directory.
Before we start building the GUI front ends, let's run
setiathome from the command line. This is important because the first time this application is run, it requires some user input to configure it. You'll also want either to be in your home directory, or to create and
cd into a subdirectory of your home directory that will hold the setiathome working files. I'll demonstrate this initial configuration as the user "genisis" in her home directory:
setiathome ----------------------------------------------------------- New software version - deleting temp files. SETI@home client. Platform: i386-unknown-freebsd2.2.8 Version: 3.03 SETI@home is sponsored by individual donors around the world. If you'd like to contribute to the project, please visit the SETI@home web site at http://setiathome.ssl.berkeley.edu. The project is also sponsored by the Planetary Society, the University of California, Sun Microsystems, Paramount Pictures, Fujifilm Computer Products, Informix, Engineering Design Team Inc, The Santa Cruz Operation (SCO), Intel, Quantum Corporation, and the SETI Institute. SETI@home was developed by David Gedye (Founder), David Anderson (Director), Dan Werthimer (Chief Scientist), Leonard Chung, Hiram Clawson, Jeff Cobb, Charles Congdon, Charlie Fenton, Kyle Granger, Eric Heien, Mike Hill, Michael Kang, Eric Korpela, Matt Lebofsky, Peter Leiser, Brad Silen, Woody Sullivan, and Adam Wight. Welcome to SETI@home. We use your email address to identify you. Please type: 1 to set up a new account (first-time users); 2 to log into an existing account (returning users). Your choice (1 or 2): 1 Your email address: email@example.com OK to show your email address on the SETI@home web site? (y/n): n Your name or nickname: Dru OK to show your name on the SETI@home web site? (y/n): n Your country number (Return see country list): Your country number: 38 Your postal code: K7P 2S9 Computer location: 0=unspecified 1=school 2=work 3=home :3 Here's your account info: Email address: firstname.lastname@example.org OK to show email address? no Name: Dru OK to show name? no Country: Canada Postal code: K7P 2S9 Computer location: Home Everything correct? (y/n) y -----------------------------------------------------------
Once your account information has been verified, wait for your client to connect to the database at Berkeley. Once you've logged in, you'll see the rest of the configuration:
----------------------------------------------------------- Logged in as Dru (email@example.com) Number of work units processed: 0 Total CPU time: 0.000000 Found data file: no. Found result header file: no. Getting data - connecting to server. Receiving data: 10K<snip the 10k increments>
Receiving data: 340K All data received. Scanning data file Data Info: Sky coordinates: 14.492 R.A., 9.510 Dec Recorded on: 2452001.74472 (Mon Apr 2 05:52:24 2001) Source: Arecibo Radio Observatory Base Frequency: 1.420625000 GHz Beginning analysis... (This is the last message displayed while the client works. To see progress messages between now and completion of processing, operate the client with the -verbose option. You can also see the progress of the client by looking at the 'prog=' line in the state.sah file. -----------------------------------------------------------
Once the configuration is finished, SETI@home will work quietly in the background, processing your job order. You'll note that you will have lost the prompt at this terminal, but you can use your Alt-F keys to navigate to other terminals. The configuration process creates several files with a
ls | grep .sah key.sah lock.sah outfile.sah pid.sah result_header.sah state.sah temp.sah user_info.sah version.sah work_unit.sah
To stop the client, press "Ctrl-C". You can also restart the client with the
verbose switch to monitor your progress:
Found data file: yes. Found result header file: yes. Scanning result header file. Beginning analysis... Doing baseline smoothing. Starting work for Doppler shift rate 0.000000, FFT length 2048 0.055015% done ... Searching for Pulses Starting work for Doppler shift rate 0.000000, FFT length 1024 ... Searching for Gaussians ... Searching for Pulses<etc.>
If you're not sure what Gaussians and Pulses are, the glossary at the project's site is quite helpful.
Now, let's build some ports that will give some visual representations of the data being processed. I'll start with "TkSETI"; you can see the screenshots for this program here.
Build the port like so:
su Password: cd /usr/ports/astro/tkseti make install clean exit
Once the build is finished, start an X Window session as a regular user. From an xterm, start the application by specifying the directory in which your *.sah files are located:
By default, this utility is setup to give an alert whenever you process a high Gaussian, Pulse, Spike, or Triplet. While initially exciting, I found that it quickly grew irritating. You can disable that and change some other settings by clicking on the Setup button.
This utility also has buttons to Run, Pause, and Kill the "setiathome" client, so you no longer have to start the client from the command prompt. It also comes with a sky map and the ability to check the Stats of your friends or a group.
The next port is "GKrellM", which is also found in
/usr/ports/astro. If you've never used GKrellM before, you are in for a treat as it is a really slick-looking piece of eye candy, and it's highly configurable with many available plugins. You can check out the screen shots and read about the themes and the plugins here.
Once you've built GKrellM, open up an xterm and type
gkrellm. If it is the first time you've run
gkrellm, it will give you the following message:
You can configure your monitors by right clicking on the top frame of GKrellM or by hitting the F1 key with the mouse in the GKrellM window. Read the info pages in the config for setup help.
To enable GKrellM, start the configuration utility as mentioned in the above message, click on Plugins, click on SETI@home, and enable.
Once it is enabled, it will show under the Plugins tree. Double-click on the SETI@home plugin which will take you to its Config tab. Type in the path to your state.sah file; for example, mine is
The last port I'd like to mention is "Ksetiwatch". This port requires KDE 2.2.2 in order to build successfully, so if you've been wavering on upgrading to the latest version of KDE, this may be your reason to do so. You can see the screenshots and read the online documentation for this utility here.
If you either have KDE 2.2.2 already installed or no version of KDE installed on your machine, you can build this port directly from
/usr/ports/astro/ksetiwatch. However, if you are running an older version of KDE, you will have to remove all traces of it before the build will be successful. Since I fell into this latter category, I proceeded like so:
su Password: pkg_info | grep kde
This returned about 10 related KDE packages. I used the
pkg_delete utility to remove each one of these, like so:
pkg_delete kde-2.2 pkg_delete kdemultimedia-2.2etc.
I then repeated the
pkg_info | grep kde to ensure that all the old packages were removed. Then I was able to build KDE 2.2.2. (Caution: This is a very long build.)
cd /usr/ports/x11/kde2 make install clean
Then I installed Ksetiwatch:
cd /usr/ports/astro/ksetiwatch make install clean exit
When I launched KDE 2.2.2 for the first time, I was pleased that it had retained all of my original settings, such as my wallpaper and customized menus and icons. And I was able to launch Ksetiwatch from the Applications menu.
When you first launch Ksetiwatch, right click within the Analysis window to Add your SETI@home location information. You'll need to browse for the directory that contains your
*.sah files and you can choose the options of starting and stopping the setiathome client when you start and stop the Ksetiwatch application. You can view the sky map by clicking on its button in the Data Info tab. To see the Gaussian, Pulse, and Triplet graphs, highlight your location in the Analysis tab, right click, and choose the appropriate graph from the Show menu.
A few final notes about the SETI@home application. If your firewall allows you to make outbound connections on port 80, meaning you are able to surf the Internet, you won't have any problems using the setiathome client. If you are worried about security, there is a security note in the FAQ on the project's Web site. The application itself shouldn't have any impact on your system's performance as it takes advantage of "idle" CPU cycles.
I hope you enjoyed today's article and will check out the world of collaborative computing. Who knows, maybe some day I'll see your name in the papers as the person whose CPU discovered something interesting.
Dru Lavigne is a network and systems administrator, IT instructor, author and international speaker. She has over a decade of experience administering and teaching Netware, Microsoft, Cisco, Checkpoint, SCO, Solaris, Linux, and BSD systems. A prolific author, she pens the popular FreeBSD Basics column for O'Reilly and is author of BSD Hacks and The Best of FreeBSD Basics.
Read more FreeBSD Basics columns.
Return to the BSD DevCenter.
Copyright © 2009 O'Reilly Media, Inc.