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

		INSTALLATION NOTES FOR mod_benchmark

		VERSION: 1.5.0

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

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

a) Linux 2.4.x
b) Apache 2.x.y
c) PHP 4+
d) MySQL 3/4 (optional) or Sybase 10+ (optional)
e) a Browser that supports SVG 

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.5.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]	if you're using Apache 1.x
     or --with -apxs2=[path to apxs]	if you're using Apache 2.x

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

     Note: add the --withmysqldir=[dir] or --withsybasedir=[dir] option to indicate
     		the location of the required Include files.

c) run "make"

d) run "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 !) or send a mail to support@trickytools.com.



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 benchmark/directives.html file)
   Add a LoadModule directive to make apache load the module:

   	LoadModule benchmark_module modules_location/mod_benchmark.so

   Under Apache 1.x, you may also have to add the directive:

	AddModule mod_benchmark.c

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.html"
   file, you will see the control panel, otherwise, click on "index.html" file

c) Select the "1 Hour" Duration and leave the other parameters unchanged.
   Then press the "Get Report" button.

d) a chart 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 =====================================
