Welcome to LITTLEWHITEDOG.COM
 Telling it like it is...    
Navigation
· Home
· Articles
· Chat
· Downloads
· Forum
· Journal
· Search
· Stories Archive
· Submit News
· Surveys
· Topics
· Web Links
· Your Account

Distributed Computing
· SETI Team News
· SETI Team Info
· Folding Team News
· Folding Team Info

Social Bookmark

del.icio.us

Running SETI@Home as a NT / 2000 / XP Service





Author: Demon
Posted on: 6/3/2003
Discuss: In the forums



So... you already run SETI@home. You think they're out there and you want to be the one who makes contact. Good for you.

You've got a few computers which you can devote to this worthy cause and you want to be able to leave them alone to number-crunch, secure in the knowledge that they'll do so without your intervention, even if the computers reboot.

"Can it be done?" I hear you ask. My friends, the answer is yes. I'm here to show you how.


Prerequisites
This is what you'll need:
  1. Your brain. You'd be surprised how many people forget this.

  2. A computer, running Windows NT 4, Windows 2000 or Windows XP.

  3. Administrative privileges on item 2.

  4. The Windows NT / Windows 2000 Resource Kit, installed on item 2. This is optional - see later.

  5. The SETI@home command-line client. You can get this from here. Yes, I know the URL has "Unix" in it, but trust me: the file you need is there. It should be called i386-winnt-cmdline.exe. I'm not linking directly to the file since it's mirrored and the mirrors may change. I'm sure you can find it. You're smart; you found this page, after all. The actual file name for the current version is setiathome-3.03.i386-winnt-cmdline.exe; feel free to change this to something shorter. You'll need to type it in a few times and the name really doesn't matter. I've changed mine to SETIclient.exe; this is what you'll see in the illustrations. (If you're one of those mutant freaks running Windows NT on an Alpha platform then you're on your own. There is a command-line client available. I'm not testing it since I don't have an Alpha system and I don't know anyone else who does either.)

  6. To know whether or not you use a proxy server. This includes such proxy-type programs as CookieCop and SETI Queue, among others. If you're not sure, ask your friendly neighbourhood administrator. He/She'll probably want to know why, but you can make up some excuse. We administrators are dumb. You end-users can fool us every time. If, on the other hand, you are the administrator, then rock on! Do this to all your users' PCs. They don't need or use all of that computing power at their disposal. You may as well make use of it.

  7. A permanent connection to the Internet. This may work with an automatic dial-on-demand RAS connection, but I've not tested it.


Preparing the Files
Right. You've got everything listed above and you're raring to go. You do have everything above, don't you? Want to double-check?

Here we go. Put the SETI@home command-line client somewhere safe. I suggest C:SETI but the choice is up to you.

If the Resource Kit is not installed on the computer then grab the two programs below from another computer which already has the Resource Kit installed.

In the directory where you installed the Resource Kit you'll see two programs: INSTSRV.EXE and SRVANY.EXE

Copy INSTSRV.EXE and SRVANY.EXE to the same directory as the SETI@home command-line client. You should now have three files in there.


Installing the Service
Now for the scary stuff. Click on Start - Run. Type CMD and press Return to open a Command Prompt window. It should look something like this: (yours may have different fonts and/or colours; I like mine small since it makes it more difficult for curious cow-orkers to see from a distance what I'm doing).



The following instructions assume you've taken my advice and put the three files into C:SETI. If you haven't then be sure to substitute the correct drive letter and/or directory names. Unless explicitly stated otherwise, press Return after each instruction.
Type CD SETI
Type INSTSRV SETI@home C:SETISRVANY.EXE
You should see this:




Removing the Service
If you make a mistake, such as misspelling the service name, don't panic. All you have to do is type INSTSRV REMOVE.

Then you can try again. For example:




Editing the Registry
Now you need to configure the service you've just installed. Type REGEDIT and press Return.

If you've never seen this program before then stop. Pause for a minute. This is a powerful tool. With it you can tweak Windows' performance so that it hums along, or you can completely ruin it altogether. I have occasionally done the former and often done the latter. If you make any mistakes with this program they can be fatal. Fatal to Windows, that is, not to you. Unless, of course, it's not your computer, in which case it could very well be fatal to you. You might get a LART applied to you by your friendly administrator.

Follow these instructions, don't be tempted to poke around anywhere else, and you will be fine.

This program has a similar interface to Explorer. The containers / directories / folders are on the left and their contents appear on the right.

Click on the next to HKEY_LOCAL_MACHINE.
Click on the next to SYSTEM.
Click on the next to CurrentControlSet.
Click on the next to Services.
Scroll down and click on the next to SETI@home.
Click on SETI@home itself.

You should now see this:



Now, right-click on SETI@home then click on New and then Key.



Type Parameters and press Return.



Click on Parameters. Now right-click once in the right-hand pane, then click on New and then String Value.



Type AppDirectory and press Return.

Double-click on AppDirectory and type C:SETI in the Value data box. Click on OK.



Right-click again and choose New - String Value again.

Type Application and press Return.

Double-click on Application and type C:SETISETIclient.exe in the Value data box. If you are behind a proxy you must also type -proxy :. Click on OK.

You can see in this illustration that I am behind a proxy server. In this example the server address is 192.168.0.20 and the port is 8000. If you need to supply proxy details then make sure you get the right values. If you get this wrong then your SETI@home command-line client will not be able to talk to the outside world and it won't be able to do any work. You wouldn't want that, would you?



Don't forget: if you've changed the file or directory names on your own computer then make sure that you change the relevant instructions to match the file / directory names you've chosen.

You're about halfway there. You can go for a break soon. I promise.

Okay. You're finished with Registry Editor, so you can close it.


Configuring the SETI@home Command-Line Client
Now, back to the Command Prompt. You need to run the command-line client manually once so that it can connect to the main SETI@home servers and get some data to analyse.

Make sure you're still in the directory where your SETI command-line client is. If you are not behind a proxy server then type SETIclient and press Return. If you are behind a proxy then type SETIclient -proxy -proxy : and then press Return.



If you've never used SETI@home before then type 1 and press Return. If you are an existing SETI@home user then type 2 and press Return.

Whichever option you choose, at some point the program will try to make contact with the SETI@home servers. If it has any problems you will probably see an error message with wording like this, or similar:



If this happens then check that your internet connection is working. Can you see any websites? Can you connect to other machines? Check that you've got the proxy settings correct (if you use a proxy). Check that your friendly neighbourhood administrator hasn't blocked this program from the proxy (while keeping a port or two open for his own SETI@home clients...). There may be other causes, too. Use your initiative.

Okay. Now the instructions split: one set for new SETI@home users and one set for existing SETI@home users. Follow whichever is appropriate for you.


New Users
You'll be asked a series of questions:
  • Your e-mail address
  • Permission to display your e-mail address on the SETI@home website
  • Your chosen nickname
  • Permission to display your chosen nickname on the SETI@home website
  • Your country number (see later)
  • Your postal code
  • Where you're using the SETI@home client



SETI@home maintains a list of countries in alphabetical order and assigns numbers to them. When you're asked for your country number you can enter it directly if you already know it, or press Return to scroll through the list until you see the number for your country. A word of warning to any smart-arses who want to enter their international telephone country code: the numbering system is not based on that, even though the United States is at number 1 in the list. Nice try.

Once you've entered your details and answered 'y' to the 'Everything correct?' question you may have to wait a minute or two, depending on the speed of your connection, while an account is created for you. If you have duplicated someone else's e-mail address then SETI@home won't care. Whoever has that e-mail address will get the credit for your work, so be careful!

Once your account is created the client program will start to download data. It will download approximately 340KB in 10KB chunks. You'll see progress on the screen.



When the client program has downloaded all the data it needs you will see one final message, and then the program will sit there. The client program will count all the way up. I have edited the image for brevity. Don't worry.



Now jump down to the Starting the Service section.


Existing Users
Your choices are a wee bit easier. After choosing to log into an existing account you will be asked one question: your e-mail address.



If you provide an e-mail address which has not been registered then you will see this error message: No account with that email address. If you enter someone else's e-mail address they will get the credit for your work, so be careful! Once you provide a valid e-mail address the client program will start to download data in 10KB chunks, up to approximately 340KB.



When the client program has downloaded all the data it needs you will see one final message, and then the program will sit there. The client program will count all the way up. I have edited the image for brevity. Don't worry.


Starting the Service
Press CTRL - BREAK to stop the SETI@home command-line client. You don't need it running any more.

Type NET START SETI@home and press Return. You should see The SETI@home service is starting. A few seconds later you should then see The SETI@home service was started successfully.

If you get an error message indicating that the service didn't start then go back to editing the Registry and double-check everything that you've done. If necessary, you can completely remove the SETI@home service and start from the beginning.

If you want verification that the service is genuinely running and that Windows didn't just lie to you, press CTRL - SHIFT - ESC to bring up Windows Task Manager. Somewhere in the list (you may have to scroll) you will see SETIclient.exe.



Most of the time when the command-line client is running it will use 99% of the CPU time. However, it's a well-behaved application and it runs in Low priority so if other applications want to use the CPU it will let them. You should not notice much of a performance hit when using this. You won't be able to alter the priority from Windows Task Manager; services' priorities are fixed. A word of warning: if you mess around with these instructions to try to get the command-line client to run at Normal or even High priority then on your own head be it. If you successfully manage to get it to run at High priority then your system will take a severe performance hit. Don't even think about Realtime. I mean it. The Operating System needs to run at Realtime. SETI@home doesn't. Okay?

The final steps vary depending on whether you're using Windows NT or Windows 2000 (if you're using XP then just follow the 2000 link. I'll do an XP-specific bit later). Choose wisely, Grasshopper. And no, that doesn't mean go off and use Linux instead.


Final Steps for Windows NT
The last thing to do is to tell your computer to reboot automatically in the event of a kernel STOP error (blue screen).

Right-click on the My Computer icon and choose Properties. In the window which appears click on Startup/Shutdown. Then click on Automatically reboot. If you're using Windows NT Server then this option (and some of the others) may already be selected.

If the option is already selected then click on Cancel to close the window.

If the option was not already selected and you have just chosen it then click on OK and then answer Yes when prompted.



You're done! You can now let Windows NT reboot, or you can log off, or you can just carry on doing whatever it was you were doing before you read all of this.


Final Steps for Windows 2000
The last thing to do is to tell your computer to reboot automatically in the event of a kernel STOP error (blue screen).

Right-click on the My Computer icon and choose Properties. In the window which appears click on Advanced. Now click on Startup and Recovery.... Then click on Automatically reboot. If you're using Windows 2000 Server then this option (and some of the others) may already be selected.

If the option is already selected then click on Cancel to close the Startup and Recovery window and then Cancel again to close the System Properties window.

If the option was not already selected and you have just chosen it then click on OK to close the Startup and Recovery window (clicking on OK to get rid of the pop-up dialog), click OK to close the System Properties window and then answer Yes when prompted.



You're done! You can now let Windows 2000 reboot, or you can log off, or you can just carry on doing whatever it was you were doing before you read all of this.


Running Multiple Instances
There are two options open to you if you want to run more than one copy of the command-line client at the same time.

If you make a new directory (for example C:SETI2) and copy SETIclient.exe and user_info.sah into it then you can create a new service (for example SETI@home2) and edit it to use the new location.

You can repeat this process as many times as you like, as long as each instance of the service has a unique name and each copy of SETIclient.exe is in a unique directory. The command-line client will not let you run more than one copy from the same directory.

You could create a script to start or stop every instance of the service automatically.

There is also a program out there called SETI Driver which allows you to run multiple instances of the SETI@home command-line client. When it's running it just sits in your System Tray, much like the normal SETI@home graphical client does.

It is possible to set this program up as a service (don't forget to run it manually once first!). When the service loads it will spawn as many copies of the SETI@home command-line client as you specified when you were setting it up.

The drawback to this is that if you stop the service for any reason it may not stop the spawned command-line clients. You may still see them listed in Windows Task Manager. This is because you have made SETI Driver the service, not the command-line client. You may need to stop the individual command-line clients manually, using either the Windows Task Manager, or KILL.EXE from the Resource Kit.

If you're going to use SETI Driver then you may find it preferable not to set it up as a service and just run it manually. The choice is yours.

Note: If you run multiple instances of the SETI@home command-line client then they will each get less processor time than one instance on its own would. It will take longer for each client to process each Work Unit. The tradeoff is that if you balance the number of instances just right, you may end up processing more Work Units per day anyway.


Deploying SETI@home to Multiple PCs Remotely
If you've got administrative rights on your network and you've got lots of PCs at your disposal then what better use for them than to run SETI@home?

It's too much of a drag to visit each PC and follow this tutorial each time. Far better to use the powers of remote administration to do it. To this end I wrote a script which will do just that. It's called SETI@home Remote Manager and you can download it here.

This nifty utility will let you install, remove, start, stop and query the status of the SETI@home service, all from the comfort of your own desk. Aren't I good to you?

The usual disclaimers and provisos apply. Basically, I believe this works, but it ain't my fault if it trashes your network and starts World War III, 'kay?


Dual-Processor Systems
I don't have a dual-processor computer at my disposal (sniff... sniff...). Well, okay, I do really, but the server admins at work would kill me if I installed SETI@home on the main servers. I shall update this article to cover dual-processor rigs if and when I finally get my greasy mitts on one.


Good luck!
I hope I've covered everything you'll need to know. If you have any questions then please visit the Little White Dog Forums.









Copyright © by LWD All Rights Reserved.

Published on: 2004-01-23 (21761 reads)

[ Go Back ]
Content ©


This site designed and hosted by littleblackdog.com
All product names throughout this site are trademarks or registered trademarks of their respective holders.
Copyright 2000-2012, littleblackdog.com | All rights reserved | Please read our legal info
No portion of this site may be duplicated without specific permission from the site owner.

Web site engine code is Copyright © 2003 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.