Apache::Bwlog - Vhost bandwidth logger for mod_perl.


Apache-Bwlog documentation  | view source Contained in the Apache-Bwlog distribution.

Index


Apache::Bwlog

Top

Apache::Bwlog - Vhost bandwidth logger for mod_perl.

SYNOPSIS

Top

  Place this in the httpd.conf file :

  PerlLogHandler Apache::Bwlog

  Apache Directives

  	This value is required if plan to use the module at all.  This can be placed globally
	to effect all virtual hosts on the machine, or in a single VirtualHost context which 
	only activates logging for that host

  


  	Set the "bitbucket" maximum before purging the current counter.  Be aware that setting
	this value to low can add a lot of disk I/O, and or CPU time.  For a high volume site 
	a large number is recommended here.  Defaults to 100,000 bytes.

  	Valid types are currently "file" and "mysql".  The mysql portion requires the directives
	described below.







	Resets the value for where your vhost bwlogs are stored if the file option is chosen. 
	This option defaults to : /usr/local/apache/logs

Table Create Syntax For mysql driver

Top

	The following create will work for the mysql database :

	CREATE TABLE `bw_log` (
	  `bw_id` bigint(20) NOT NULL auto_increment,
	  `vhost` varchar(100) NOT NULL default '',
	  `bytes_sent` bigint(20) NOT NULL default '0',
	  `time_stamp` timestamp(14) NOT NULL,
	  PRIMARY KEY (`bw_id`)
	) 	

	


	


ABSTRACT

Top

	httpd.conf Example.

	PerlLogHandler Apache::Bwlog

	PerlSetVar Bwlog_mysql_user bw_user
	PerlSetVar Bwlog_mysql_password bw_password
	PerlSetVar Bwlog_mysql_server 127.0.0.1
	PerlSetVar Bwlog_mysql_database bw_logger
	PerlSetVar Bwlog_mysql_tablename bw_log

	PerlSetVar Bwlog active
	PerlSetVar Bwlog_threshold 100000
	PerlSetVar Bwlog_logtype mysql

 





DESCRIPTION

Top

  This module will do per virtual host bandwidth logging.  Fun fun fun.

EXPORT

None by default.

SEE ALSO

Top

 mod_perl, perl, apache

AUTHOR

Top

Lloyd Richardson lloyd@drlabs.org

COPYRIGHT AND LICENSE

Top


Apache-Bwlog documentation  | view source Contained in the Apache-Bwlog distribution.