next up previous contents
Next: Basic Operation Up: RUNNING DRONE Previous: Getting the Documentation

A Concrete Example

If you would like to see how to use Drone, or if you would like to test your installation, there is a simple stub application named Stublet that is designed to exercise Drone. All Stublet does is parse its command-line options, read an input file, sleep for an interval specified by the parameter sleepInt, and then output two files named report.runNum and popdump.runNum, where runNum is the current run.

Stublet is written in ANSI C. When you install Drone, you also compile Stublet. If you need to install Stublet on other hosts, you can type

% make install CC=cc
in the examples/stublet directory, where cc is the name of the ANSI C compiler on your system (for instance, gcc).

To see how Stublet operates, type the following lines:

% cd examples/stublet
% stublet -Istublet.in -batchmode -Nrun1 -S123456789 -Dparam1=7
-Dparam2=orange -Dparam3=0.5 -Dparam4=1
This tells Stublet to run in batch mode (actually Stublet's only mode), to read the input file stublet.in, that the current run is run1, and that the run seed is 123456789 (the seed has no effect on Stublet's operation). Then the parameters param1, param2, param3, and param4 are set to dummy values; these parameters also have no effect on Stublet's execution.

The sample input file stublet.in contains the line

# set sleepInt = 10
which causes Stublet to sleep for 10 seconds. Stublet reads in stublet.in, sleeps for 10 seconds, and then produces the files report.run1 and popdump.run1.

You can get usage information for Stublet by typing

% stublet -h
and version information by typing
% stublet -batchmode -v

Now that you've seen how Stublet works, let's use Drone to do an experiment using Stublet. Go back to the top-level Drone directory.

% cd ../..
Next, edit the control file examples/stublet/stublet.ctrl. You will need to change the line
param rootDir = experimentRoot
so that experimentRoot is the full path where you would like the results and other directories to be stored. For now, you can simply set rootDir to be the full path where you have installed Drone. You can then use the string $rootDir in any of the paths in the control file, and $rootDir will be replaced by the value of rootDir.

If necessary, change the line

param programDir = $rootDir/examples/stublet
to
param programDir = stubletDir
where stubletDir is the absolute path of the directory that contains Stublet on your system. Initially, programDir is defined relative to rootDir, but there is no need for this.

You may also have to change the line

param emailAddr =
in the same control file to
param emailAddr = yourEmailAddress
Drone will notify you by email when the experiment has finished, or if an error occurs. By default, if emailAddr is set to an empty string, as in the first line, the email address that Drone uses to send you email is set to your login ID on the computer that is running Drone.

After you have edited and saved the control file, type

% drone examples/stublet/stublet.ctrl
You should see something like the following:
galilei% drone examples/stublet/stublet.ctrl
Drone version 1.01
Started on Wed Nov  6 05:10:11 1996

Reading control file...
Initializing...
Running...
Going into the background...
galilei%
After several minutes you should get an email notifying you that the experiment has finished. If you haven't changed any of the paths in the control file, the results should be stored in the directory examples/stublet/experimentDir/experiment-1. See Section 2.4 for full details on what Drone does during an experiment, and on the files that are produced.

To test Drone on a set of remote hosts, change the line

param useLocalhost = 1
in the control file examples/stublet/stublet.ctrl to read
param useLocalhost = 0
You also need to edit the host file examples/stublet/stublet.hosts so that it contains a list of available hosts on the Internet, one per line. You must have an account on each host, with the same login ID and password for all of them.

Make sure that Stublet is installed on each of the hosts, and that it is located at the same path on all of them. If necessary, change the line

param programDir = $rootDir/examples/stublet
in the control file to
param programDir = stubletDir
where stubletDir is the absolute path where you have installed Stublet on the remote hosts.

Then type

% drone examples/stublet/stublet.ctrl
in the top-level directory. You should see something like the following:
galilei% drone examples/stublet/stublet.ctrl
Drone version 1.01
Started on Wed Nov  6 05:18:53 1996

Reading control file...
Initializing...

login:
Type your login ID for the remote hosts. Then you will get prompted twice for your password:
login: streak
Password:
Re-enter password:
After entering your password, you will see:
Running...
Going into the background...
galilei%
Again, you should get an email after several minutes telling you that the experiment has finished. The results should be stored in
examples/stublet/experimentDir/experiment-2
If you get any error messages, see Section 6.2. Make sure that you have installed Expect and Drone correctly, that you have correctly modified the files
examples/stublet/stublet.ctrl and examples/stublet/stublet.hosts, and that you have installed the Stublet application at the same path on each host.

Congratulations! You've successfully used Drone on a single computer and on a set of remote hosts.


next up previous contents
Next: Basic Operation Up: RUNNING DRONE Previous: Getting the Documentation

Drone 1.01 User's Guide
Theodore C. Belding
Wed Nov 13 03:53:22 EST 1996