webclient is the program that makes requests of the target Web server and records timing data to represent the Web server's performance. It creates multiple instances of itself (either threads or processes) according to the "-n" command line option. Each instance then makes requests of the Web server, according to the list of load URLs that was provided. As the results of each request are received webclient records the amount of data received and the elapsed time. At the end of the test run webclient writes a results summary to its standard output stream.
Either the "-t run_time" or the "-l loop_count" option must be given.
The list of URLs to be used to generate load must be specified in exactly
one of three ways: with the "-u URL_file" option, by giving the URLs
as command line arguments, or by providing the list of URLs and weights
on the standard input stream in the same used for a URL file
(see FILES, below).
The sum of the weights in the URL list must not exceed the value
of RAND_MAX (from
The "-S seed" option uses a known seed value to start the random number
generator that chooses which page to request. The default is to use the
process ID number. Using the same seed gives better consistency from
run to run.
All the file names that are settable on the command line refer to files
on the system on which
webclient
is running.
The "-c webmasterhost:port" option tells the
webclient
process how to connect to a
webmaster
process. This option is not necessary if
webclient
is to run as a standalone process, not controlled by
webmaster.
Execution
After setting up its run parameters, a
webclient
process creates the number of instances of itself that is specified
by the "-n numclients" parameter. These instances may be processes
or threads; they're all called "processes" in this document.
The basic action for each
webclient
process is to issue an HTTP request and to measure the
length of time it takes for the request to be fulfilled. As soon
as the request is fulfilled and the time is saved,
webclient
makes another request.
When the test run completes,
webclient
reports its results. If the program is running standalone the
it writes the results summary to stdout. If the program is under
the control of
webmaster
it waits until it's polled, then writes its results to the master socket.
Test Load
If the run duration is specified with the "-l loop_count" option,
each
webclient
process requests the files in the URL list in order, traversing the
list
.I loop_count
times.
For a timed run ("-t run_time" option), the
webclient
processes use the weights from the URL list to decide how often
to request each URL from the server.
A pseudorandom number generator (\fIsrand()\fR) is used to choose which
URL to request. A larger value for the URL's weight means that it is to
be requested more often.
If a URL is given on the command line or if no weight is entered
on the URL's line in the list, the URL is assigned a weight of 1.
A URL in the list may be a full URL that contains the protocol
(always "http://"), the server name, an optional port number, and the
file name. Alternatively it may contain just the file name with a
leading slash ('/').
If no server name is given in the URL the Web
server name from the command line is used.
If no port number is given in the URL the value of "portnum" (the "-p
portnum" option or the default value) is used.
If a proxy server is to be tested, each URL in the URL list must
specify a server name.
Debug and trace output goes to the standard error stream by default.
If the "-R" command line flag is given, transaction information is written to a local file whose name is generated by appending the process ID to the string "logfile".
If the "-s" command line flag is given, all data from the Web server is written to a local file whose name is generated by appending the process ID to the string "savefile".
Other files used by webclient are specified on the command line. If no URL files are specified on the command line, webmaster tries to read the list of URLs from its standard input stream.
During a test run webmaster keeps a socket open to each webclient process. Make sure that the number of file descriptors available to webmaster is greater than the total number of webclient processes to be run. The "-R" and "-s" flags also each cause one file per webclient process to be opened.
File for load URL lists:
For each URL to be used to generate the test load, the URL list has an entry with the following form. Comments and blank lines in the list are ignored. Each comment starts with a hash character ('#') and continues to the end of the line.
<URL> <weight> [#<comment>]
WebStone was created by Silicon Graphics, Inc. Version 2.5 and later were developed by Mindcraft, Inc.
The command line options are too complicated.
It should not be an error to omit "-w webserver" from the command line if all URLs in the URL list contain server names.
When a proxy server is being tested, webclient should prepend the name of the Web server from the "-w servername" option if there is no server name in the URL from the URL list.