Software Garden Servertest Program:
How To Use The Executable Version for Microsoft Windows
Detailed instructions for using the Servertest Executable Version for Microsoft Windows, with descriptions of all options and output fields.
INTRODUCTION

You use this program to get an indication of the average response time and pattern of timeouts when a browser accesses one or more websites. It simulates the basic operation of a browser, sending out periodic requests for web pages to one or more URLs. The results of each poll are shown on the screen, and optionally logged to a text logfile.

Here is an example of the program running interactively:

MSDOS window with text
EXECUTING THE PROGRAM

You can run the program in one of two ways: Either by straight execution or by command line execution.

Straight execution is when you just double-click on the the program in Windows Explorer in the directory where you saved it or on a shortcut you make to that program file. It is a good way to first start using the program. Straight execution will popup an MSDOS window in which to interact with the user.

Command line execution is when you have an MSDOS window, use a shortcut with command line options, or use the Windows Start / Run... command to execute the program file.

In all cases, if there are no option values given (which is always the case with straight execution) the program will start by prompting for the information it needs. In addition, before it exits, it will prompt once more, since often in such situations the window in which it runs will disappear on exit and you may want to first see the final output.

The documentation here mainly covers the interactive mode, in which it prompts for values. For more information about using command line options (which is most appropriate for technically oriented users who are comfortable with using programs that way) read the command line oriented documentation.

PROMPTS FOR SETTING OPTION VALUES

When executed normally, with no command line options, the program gets its option values by interactively prompting for them. It will print some text to the MSDOS window, and then wait for you to type a response, followed by pressing Enter. A default value will be shown in brackets, and a response consisting of just pressing Enter will accept that value.

Here is a description of each prompt in the order they appear:

Configuration File: (just press ENTER for none)
A configuration file contains preset values for options that can be used when the program is run to save you typing. This simple text file may be created with Notepad, and documentation on the contents can be found in the programmer-style online documentation.

The value you type in here is the name (or pathname) of the file. If you just press Enter, then no configuration file will be used. The configuration file is read after all of the interactive values have been read.

If you find yourself using the program repeatedly with the same values, you might find it worthwhile to use a configuration file, and perhaps even run the program in command line mode.

There are a few values that you cannot set when running interactively except by using a configuration file. These values are for setting the value of the "Agent" making the HTTP request (a value that often shows up in the web server log files).
Log to an output file [n]? (y/n)
This program can save copies of its testing output to a file. That file can be examined with a text editor to see a complete record of all tests, processed by another program, or anything else you may want. The file is also used to get information for "restarting" the program from where it left off.

To turn on logging to a file, answer with the letter "y" (and then press Enter). You will then be prompted for the filename (or pathname) of the file.

If you just press Enter, or give a value of "n", then the next two prompts will be skipped, and the next prompt will be for "Maxpolls".
Logfile filename []:
If you answered "y" to wanting to log to an output file, this prompt will appear.

Type in the filename (or pathname) of the file. If the file does not exist, there will be an attempt to create it. New output is always appended to the end of an existing file. Each time the program starts, a heading line is added to the file.
Restart polling from where left off in log [y]? (y/n)
If you answered "y" to wanting to log to an output file, this prompt will appear.

Unless you respond "n" here, the logfile will be read (if it exists) and the accumulated values for each URL being tested will be read in to let the calculations restart where they left off. The sequence number of the last poll executed is determined by looking for the highest poll sequence number in the logfile.
Maxpolls (number of tests for each URL) [1]:
This option is for specifying the number of tests to be made for each URL. After all the requests are made for a sequence number equal to maxpolls, the program returns. The default is 1 (a single test). If you plan to run this program for an extended period of time, restarting after any system shutdowns, you may want to set this number very high.

The program can usually be stopped early by pressing Ctrl-C, so there should be no problem with a high value that you do not expect to reach.
Poll frequency (time between tests in seconds) [3600]:
This is the time to wait between polls. After all of the URLs are tested in a single poll sequence, the program waits this number of seconds. The default is 3600 (poll once an hour).

If the value is less than 10 seconds (it may be as low as zero), then the program will still wait 10 seconds if the "maxpolls" is greater than 100. This is to prevent the inadvertent unfriendly behavior of massive requests to a server.
Timeout (max time to wait for each response in seconds) [30]:
This sets the maximum time the system will wait for each response before logging it as an unsuccessful, failed request. The default is 30 seconds.
URL to test, e.g., www.domain.com
(just press ENTER when no more):
Here is where you specify the URLs to access as the test of web server response. The URL should be typed without the "http://" part. You may specify any number of URLs, each one ended by pressing Enter. The program will respond with this prompt again. After specifying the last URL, just respond with Enter by itself.

You may specify most URLs acceptable to a browser, including specific files (such as www.domain.com/dir/file.html) as well as directories that will result in default index files (such as www.domain.com/dir/ or www.domain.com).
OUTPUT

The output consists of lines in one of the following forms:

n date time url fetchtime average (max) timeout-info
    

or:

n date time url FAILED: status line
    
For example:
33 2004-01-27 19:30:23 www.dom314.com  1  0.8 (30) 
33 2004-01-27 19:30:24 www.dom314.net FAILED: 500 read timeout

34 2004-01-27 19:45:26 www.dom314.com  0  0.8 (30) 
34 2004-01-27 19:45:26 www.dom314.net  1  0.6 (10) 4 timeouts (1.3%)
    

The fields are defined as follows:

n
The sequence number of the poll. Each poll consists of making HTTP GET requests to each of the URLs listed for test in turn, in the order defined. If more than one URL is being tested, then there will be multiple lines with the same sequence number.
date time
The date and time of the request, local to the computer running the program.
url
The URL being tested. This value is right justified with spaces to help the numbers following it line up for easy reading.
fetchtime
The number of seconds taken to receive a successful response to the request. This is an integer.
average
The average time for a response to all of the polls for this URL in this sequence. Calculated by dividing the total time for all successful responses by the number of successful responses for this URL.

Note that the number of polls to this URL may not correspond to the sequence number of the poll because this program may be restarted to add to an existing log but with a changed set of URLs to test.
max
The maximum time taken for a response in this sequence for this URL.
timeout-info
If there have been any failed requested for this URL, the total number of "timeouts" are listed, along with a percentage calculated by dividing the number of timeouts by the sum of the total successful requests and the total timeouts.
FAILED: status line
If the request fails for any reason, including a timeout or other error, then the word "FAILED:" is logged followed by the status information returned by the system, usually both as a number and some text.
NOTES

A poll frequency of every hour (3600 seconds, the default) or every 15 minutes (900 seconds) should be sufficient to get a good profile of a web server's behavior if run over a period of days.

Use a logfile and restart set to the default "y" to restart after a PC crash or shutdown. That will keep the statistics accumulating.

By testing more than one server at a time you can see when they all timeout, indicating that your Internet connection probably is not working in some way.

There are many reasons that a web page request can fail, so getting a few timeouts from even major professional web sites is not uncommon. Shared hosting servers often go down for scheduled maintenance, routers along the way can have problems, your connection to the Internet could undergo a short emergency shutdown while a part is replaced, a large download may swamp a shared Internet connection, etc. Timeout percentages of 0.1% to 0.9% over a series of weeks are not unusual.

If you want to use the program to do a long-term test of some servers, you may find it best to use it in the following way:

  • Create a configuration file setting needed option values, including the logfile filename, the maxpolls (set to some high number like 10000), the pollfrequency (to some value like 900 or 3600), and the URLs to test. For example:
    #
    # This is a sample configuration file
    #
    
    test=www.dom314.org
    test=www.dom314159.com
    
    logfile=servertest.log
    pollfrequency=900 # 15*60 = 15 minutes
    maxpolls=10000 # months...
        
  • Next, create a shortcut to the program file, with a command line option set to use the configuration file. For example, the Target could be:

    "C:\Program Files\Servertest\servertest.exe" -c config.txt

  • Finally, place a copy of the shortcut in your Start Menu\Programs\Startup directory so that it is run automatically when your computer starts.
OTHER INFORMATION

Date of this documentation: May 18, 2004

For program version: v1.00

The program is protected by copyright and subject to a license agreement. See the Legal section of this website. There is a fee for commercial use in certain cases set forth there.


(c) Copyright 2004 Software Garden, Inc.
All Rights Reserved.

Software Garden and Garden are registered trademarks of Software Garden, Inc.
Dan Bricklin's is a registered trademark of Daniel S. Bricklin.