Software Garden Servertest Program:
Perl Version for Mac OS X
This page tells you how to install and run the Normal Perl Version on Apple Mac OS X.

Servertest is written in the Perl computer language. In order to run, it requires a copy of the Perl language system which is usually installed on computers running Mac OS X. This page tells you how to run it as a normal Perl program under OS X. You run it using the Terminal program that gives access to a Unix "shell" window. This method of operation is oriented towards users with technical experience who are comfortable downloading a program file and running programs from the command line in the Terminal program. It only requires minimal experience with Unix.

Here is a screen shot of the program running:

terminal window with text

In addition to running interactively, with prompts for input, you can run it with command line options and configuration files.

The system requirements are: Mac OS X version 10.3 (it may run on other versions, but these instructions only cover 10.3), Internet connection, 30KB disk space, Perl language system with the LWP::UserAgent package (see below for installing the package).


Follow these instructions to install and run this version:

  • Make sure that you have Perl and that you have the correct packages installed. See Mac OS X 10.3 Setup page for step-by-step instructions.

    Once you have Perl installed, then you can run Perl programs from the command line in a Terminal program window by executing "perl programname" (or just by executing the ".pl" program directly if the file permissions include "execute").

  • Read the Software Garden License Agreement to make sure that you understand the restrictions and rights that apply to this program. Non-commercial use is free but there is a fee for commercial use and distribution. Definitions of "Commercial Use" and instructions for payment can be found there.

    If you do not agree to the license, do not download or use the program. You may not use or copy the program except under terms of the license. Payment for Commercial Use can be made through the Payment Page.

  • Download the Normal Perl Version by clicking this link to download a tar archive file with the program. Extract it into the directory where you downloaded it with the Terminal Window command "tar -xvf servertest-1-0.tar".

    servertest-1-0.tar file, version 1.0, 30KB

    Alternatively, you can view the unarchived text source of the single program file by clicking this link and save it on your disk with File / Save As... (does not work correctly with Internet Explorer but does with Safari):

    servertest.txt, version 1.0 (servertest source as text)

    The source code is a text file, with extension ".txt". Save it to disk and then rename it to "".
  • You run the program by executing the command:

    perl option values

    If you just run the program with no option values (e.g., just run "perl"), then the program will prompt for option values and automatically pause for input before exiting.

    When executing the program, you can exit before it's finished by pressing Ctrl-C.

    If the program displays an error message when run complaining about a missing module, such as LWP, or LWP::UserAgent, see the Mac Perl Setup page for documentation about getting the correct Perl packages.

To uninstall the program:

  • Delete the program file (and the tar archive file if you downloaded that).

Documentation for using this version of Servertest is available online on the Command Line Execution Documentation page. Many users should find the program self-explanatory if run without options (in which case it will prompt for input), or with the "-h" Help option.

Documentation is also in the source code itself in Perl pod format. To read it from the command line, run "perldoc". You can also just read it in the source code itself with a normal text editor.


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 computer 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
    pollfrequency=900 # 15*60 = 15 minutes
    maxpolls=10000 # months...
  • Next, create a shell script to execute the program, with a command line option set to use the configuration file. For example, the script could contain:

    cd directory with program and files
    perl -c config.txt
  • Finally, run the script whenever you restart the computer. (For example, by having the script in your System Preferences / Accounts / Startup Items list.)

(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.