This document explains how to compile and run flood.
Flood is built around Apache Portable Runtime - specifically apr and apr-util. For some arcane unknown reason (probably laziness on our part - patches welcomed), flood also requires the httpd-2.0 source directory to build.
Flood has been primarily developed on Linux and Solaris. FreeBSD is also known to work. Since flood is build around APR, any APR-supported platform should work without too much hassle. We expect Win32 would work with some additional magic provided someone has the time and inclination to do so. APR has completed most of the dirty work, but none of the current flood developers use Win32.
The current copy of flood is available via anonymous CVS access (via pserver). "anoncvs" is the password. Flood also depends on the apr and apr-util packages available from the same CVS site. (Again, if someone wants to strip out the httpd-2.0 specific parts of our build, please be our guest and submit patches to us for this. Until then, you need to also checkout httpd-2.0.)
% cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login % cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co httpd-2.0 % cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co httpd-test % cd httpd-2.0/srclib % cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr % cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr-util
Now that you have all of the required modules checked out, you now need to generate the configure scripts and execute them for your platform. Note that the httpd-2.0 configure will run the apr and apr-util configuration scripts.
% cd httpd-2.0 % ./buildconf % ./configure % cd ../httpd-test/flood % ./buildconf % ./configure --with-httpd=<absolute path to httpd-2.0>
At this time, flood does not use an installed version of apr or apr-util. So, you just need to compile apr and apr-util and then flood will use the built libraries.
% cd httpd-2.0 % make all % cd ../httpd-test/flood % make all
By default, flood is a static executable, so the executable is relocatable. There are some example flood profiles in the examples/ directory.
% ./flood examples/round-robin.xml > foo.out
The foo.out file generated above is in a simple easy-to-parse format. There are some included shell and awk scripts in the examples directory that provide some easy mechanisms to extract info from the flood output files.
% ./examples/analyze-relative foo.out
If you have any questions, please email the test-dev@httpd.apache.org list.