==========================================================================

		INSTALLATION NOTES FOR mod_benchmark

		VERSION: 1.1.0

==========================================================================

1.REQUIREMENTS
--------------

a) Linux 2.4.x
b) Apache 2.x.y
c) PHP 4.0.x with GD
d) MySQL 3.x.y (optional) or Sybase 10+ (optional)

Notes:
This Apache module has been only developped for Linux platforms.
It has been tested on 2.4.x kernel. It should (could ?) work on 2.2.x if
sysstat2.c file is checked towards the /proc/... files used.



2.INSTALLATION
--------------

2.1.Compilation
---------------

a) get the mod_benchmark-1.2.tar.gz archive and expand it under
   a directory

b) run ./configure with at least on the option to enable a DB manager:
	--enable-mysql
     or --enable-sybase

     and one of the two following options depending on your Apache server version:
        --with-apxs=[path to apxs]
     or --with -apxs2=[path to apxs]

     Example:
     
     ./configure --enable-mysql --with-mysqldir=/usr/include/mysql --with-apxs=/usr/sbin/apxs

c) run make

d) type "make install"
   Since the Makefile has been created by apxs, it will try to copy
   the module and its related file under the Apache module directory.

e) check that the following new files have been copied under the Apache module
   directory:
   	mod_benchmark.so
	benchmark-mysql.so (optional)
	benchmark-sybase.so (optional)

   mod_benchmark.so is the Apache module
   benchmark-mysql.so is the interface between the module and the MySQL database. 
   benchmark-sybase.so is the interface between the module and a SYBASE database.
   
   If you want to use another DB, create your own benchmark-db.c
   driver (it's very easy !).



2.2.Database table creation
---------------------------

mod_benchmark will log the measured requests and the alerts in a database.
You can use an existing DB or create a new one.

a) choose or create a database

b) run the "sql/mod_benchmark-mysql.sql" or "sql/mod_benchmark-sybase.sql" script 
   to create the tables in the DB

c) create a user/passwd that can access these tables, if necessary



3.APACHE CONFIGURATION
----------------------

a) edit the "httpd.conf" file and add the directives for "mod_benchmark":
   (see the directives.html file)
   Add a LoadModule directive to make apache load the module:

   	LoadModule benchmark_module modules_location/mod_benchmark.so

b) restart Apache



4.TEST APACHE
-------------

a) using your favorite browser, navigate through any location handled by
   "mod_benchmark" (1 is enough !)

b) connect to the DB and check one row has been inserted for each request.
   If not, check the error logs (Apache, MySQL, system...) and fix the bug.



5.STATISTICS VIEWER CONFIGURATION
---------------------------------

a) under the installation directory, there is a subdirectory named "benchmark",
   make a symbolic link for this subdir under your web server tree.

b) change the owner & group of "benchmark" subdir to reflect the owner & group
   normally used for your Apache server

c) cd to "benchmark" subdir

d) edit "yourglobals.inc.php" file and put the good DB parameters here...



6.TEST VIEWER
-------------

a) switch to your browser and navigate to the newly created "benchmark" subdir.
   
b) if your Apache server is configured to automatically return the "index.htm"
   file, you will see the control panel, otherwise, click on "index.htm" file

c) click on the "Mean Response Time" check box, select "All" and "From 1/1/2002"
   "To 1/1/2003" in the filter box. Select "Hour" and "Bar Graph" in the 
   parameter box. Press "Display" button.

d) a bar-graph and a table should appear !!! Congratulations.
   otherwise, there is a DB or PHP misconfiguration. The error message should
   be explicit enough. To help you, each SQL error is alos logged using the
   syslog facility.


THANKS FOR YOUR PATIENCE !

================================ EOF =====================================
