SETIView/2 Cache is SETI@Home work unit caching program for OS/2.
I have a modem connection to the Internet. And my system was taking about 25 hours to process a work unit. This lead to a lot of slack time as it might complete a work unit in the middle of the night and not get a new one until I connected when I returned from work the next night. Then I saw some Windows based cache programs. One was a set of batch files that I thought could be run under OS/2. But, when I looked at them, I thought they were too complicated. So I decided to write my own. It started simple, but now it's probably as complicated as the ones I rejected!
The features of SVCache are:
As to the name: this doesn't have any real relation to my SETIView/2 program. But, I decided to keep the same "brand". I am intending to add a "cache" view to SETIView/2, but that will take a bit of time.
The installation and configuration is manual. Here are the steps:
Optional: Create program objects for SVCRun.CMD and SVCBuf.CMD. Or arrange for these to be run automatically. SVCBuf.CMD needs to be run when you are connected to the Internet.
At the moment configuration is pretty bad. It has to be done by modifying the REXX programs. At the top of each program, there are some variables to be set. These follow the line:
/* Customise here */
The changes are to be put inside the double quotation marks.
In SVCRun.CMD and SVCBuf.CMD the changes needed are:
seti_program_OS2 = "..\setiathome.exe"
- Defines name and place of the SETI@Home program for OS/2.
If you use a relative path, it must be relative to each cache directory.seti_program_Win = "..\setiathome-3.03.i386-winnt-cmdline.exe"
- Defines name and place of the SETI@Home program for Windows.
This must be the command line version.
If you use a relative path, it must be relative to each cache directory.seti_proxy = ""
- Define the proxy parameter to be used.seti_parameters = ""
- Defines any extra parameters to pass to SETI@Home. seti_Log_Dir = "..\1"
- directory where the SETILog.CSV file will be put.setiLog2_params = "/NOBACKUP"
- Additional parameters to pass to SETILOG2.CMD.
This plus seti_Log_Dir
will be passed to SETILOG2.CMD.
See SETILog2.CMD for details.SVCBuf.CMD also has the following:
start_delay = 60
- Number of seconds to delay the start
of processing. To run SVCache, change to the cache parent directory and:
SCVRun.CMD
. SCVBuf.CMD
. This must be done when you are connected to the internet. I run
it automatically from InJoy when I connect. SCVRun.CMD REMOVEHOSTNAME
.
This is only needed for machines that are not on all the time or run more than one OS.
See Sharing Work Units Between Machinesfor more details.There are some special files used in the cache directories:
Indicates the directory is a cache directory and is to be processed. SVCRun will attempt to process a valid work unit in the directory. SVCBuf will attempt to return finished work unit and get a new one. If there is no work unit in the directory, SVCBuf will attempt to retrieve a new work unit.
Put this in any directory that is not to be processed. This is mainly used if there are files in the directory that could be mistaken for a work unit. Or, if you want to keep a work unit. Or, when SVCBuf creates it after processing a directory with SVCACHE.STOP in it.
If this is found in a directory, the work unit will be completed by SVCRun. When the work unit is complete and SCVBuf is run, the work unit will be returned but a new one will not be retrieved to replace it. After returning the work unit, SVCBuf will rename this file to SVCACHE.NO .
If this is found in a directory, SVCBuf will retrieve a new work unit for the directory. After retrieving the work unit, SVCBuf will rename this file to SVCACHE.OK so that SVCRun will process it.
This file is created by SVCRun when it starts processing a work unit in a cache directory. See Sharing Work Units Between Machines for details of this file.
There are two parts to running SVCache - processing the work units and processing the cache.
When SVCRun.CMD is run, it will:
SVCRun chooses a work unit that meets these rules:
- An SVCACHE.HOST file exists, and its hostname and operating system are the same as for the current machine.
- The work unit that has been processed the most. This is determined from the state.sah file.
- The oldest work unit. This is based on the file "work_unit.sah".
The file SVCache.HOST records:
The other part in running SVCache is returning completed work units
and fetching new ones. This is done by SVCBuf. When it is started it:
start_delay
.RESULTS.SAH
exists.
If it does, the work unit has been completed and is to be returned.stop_after_send.txt.
This tells SETI@Home not to retrieve a new work unit after returning the current one.-stop_after_xfer
so that the new work
unit will not be processed.A work unit can be processed by more than one machine as long as they:
This means that if you have more than one OS/2 machine, they can process
the work units from the same cache. And if you shutdown one of them,
the others can finish processing the work unit.
To completely enable this, I run SVCRun.CMD REMOVEHOSTNAME
on my part-time OS/2 machine when shutting it down.
This removes the hostname from the SVCache.HOST file.
It is run from the XShutdown folder in XWorkPlace.
SETILog2.CMD is used to log the results of a processed work unit in a file to matche the format produced by SETILog. This is a CSV file that can be loaded into a spreadsheet or SETIWatch. SETILog2.CMD will also store the result, user_info and state SAH files for later examination.
SETILog2.CMD will take the following parameters:
directory name
- The directory where the SETILOG.CSV file is.
It will be created if it doesn't exist.
The default is the current directory.
/NOBACKUP
- Don't backup the SAH files.
/NOLOG
- Don't log the work unit to SETILOG.CSV.
/?
- Display help and exit.
Note: SETIWatch and SETILog are Windows programs to monitor and log SETI@Home work units. They are available from SETIWatch home page.
SVCache has been tested to run under Windows 2000 using the Regina Rexx interpreter. Version 3.0 beta was used. It should run correctly under any version of Windows that Regina supports, and that can run Windows command line SETI@Home client.
To use SVCache under Windows, you will need:
You will need to install the two packages according to the instructions at the above
web-sites or inside the packages and verify they are working.
Then, running SVCache is the same as running it under OS/2, except that the programs are run through the Regina interpreter.
So they must be run with a command like:
REGINA SVCRun.CMD
Note: I've done just enough with Regina to get this working on my laptop under Windows 2000. If you have any problems, I will see what I can do, but, if the problem is in Regina, I probably won't be much help.
start_delay
variable. Use it to start the processing after
your other initial network activities (such as retrieving your mail).
None!
If you find any bugs, please tell me at the contact address below. Tell me:
Note: This is a release history. Each file also has a change history included in the block comment at its start.
Except for SETILog2.CMD, this is Copyright (c) 2001-2002 David Forrester. All rights reserved.
SETILog2.CMD is based on someone elses work. But, I've lost all references to who this is. If it's yours, please tell me and I'll either remove it, or, give you the appropriate recognition.
This software is provided as is. No warranty is given by the author, expressed or implied. Use this software at your own risk. The author assumes no responsibility for any damage from the use of this software.
This software is freeware which means that it is free for use and distribution.
If you find any bugs, have any suggestions or simply want to say how wonderful or terrible SVCache is, drop me an e-mail
Author: | David Forrester |
e-mail: | davidfor@terrigal.net.au |
www: | OS2World web site |