getwww is a program used to do benchmarks on Web
servers by c't magazin (http://www.heise.de/ct).
The newest version is always at 
ftp://ftp.heise.de/pub/ct/ctsi/

The programm forks a certain number of processes, that
do HTTP GET requests in a loop and counts the
results. The code is under the GPL and should run on
Linux (other Unix variants might work, too). No Windows
version available (yet).


If you publish any numbers based on this program, 
please send me a note. Please mention my employer 
"c't magazin, http://www.heise.de/ct", as source of 
this program.

I used it sucessfully on client machines equipped with
a 486 CPU and 16 MB RAM with up to 64 processes.

Compilation:

Calling "make" should do the job.
Use "make SSL=1" to compile getwww-s, that can do SSL
(https-URLs) but requires openssl.

Usage:

./getwww-s [options] server n_proc
        [-v]    verbose output
        [-d]    debugging
        [-i]    ignore page size
        [-H]    check HTTP status message (implies -i)
        [-k]    use HTTP Keep-Alive requests (implies -i -H)
        [-S]    use HTTPS
        [-R level]      randomize pages in dir-hir
        [-r s]  set program run time in seconds
        [-u url]        set url to fetch
        [-p port]       port to connect [80]
	[-P]    Enable Compression of HTTP-data (deflate)
        [-f file]       read params from file
        [-F file]       read URLs from file (randomizing, implies -i)
        [-s host]       sync master host
        [-D num]        do db test (total number of entries)
        [-N num]        db test: number of entries (10)
        n_proc: number of pocesses (ignored with -f)
        Format of parameter file:
                [host] [port] [URL] [proc] [time] [rlevel]

Examples:

./getwww -u /8k.html -r 30 192.168.99.100 64

starts 64 processes fetching the same page for 30
seconds

./getwww -R 3 -u /rand3/ -r 30 192.168.99.100 64

fetches pages like /rand3/1/2/3/9.html. The numbers are
randomized.

./getwww -F ./urls -r 30 192.168.99.100 1

fetches URLs (like: /index1.html, only path, no
hostname supported) which are read from ./urls. Those
URLs are randomly selected for ervery get. Implies -i,
not compatible to -R

./getwww-s -S -r 30 /8k.html 192.168.99.100 1

SSL connect to port 443 and does HTTP over
SSL. (Try keepalive -k for an interesting performance
boost).

To sync processes from multiple clients use:

./master 2 &

ssh client1 "./getwww -u /8k.html -s 192.168.99.1 192.168.99.100 64" > c1
ssh client2 "./getwww -u /8k.html -s 192.168.99.1 192.168.99.100 64" > c2

The master waits for 2 clients to connect until he triggers them.

./getwww -i -r 180 -D 10000 -N 100 -u "/db100.php?from=%i&to=%i&sort=Einwohner" 192.168.99.100

creates URLs that can be used to do "random" database
queries. -D sets the number of existing database
entries, -N the number of entries returned. The first
%i is replaced by a random number between 1 and x1=D-N,
the second with x1+N

log2dat is a simple script to summarize all processes.
With pdat you can summarize over multiple runs with
different processes.

The perl script dirhir.pl creates a directory
hierarchy as needed for the -R option. 

enjoy,

juergen (ju@ct.heise.de)


