modgzip2dlf1
Convert common log format with mod_gzip extensions web server log files to dlf
Usage
modgzip2dlf file
Overview
modgzip2dlf converts web server log file in the common log format with extensions for mod_gzip to www DLF.
mod_gzip is an Apache extension developed by RemoteCommunications, Inc. Sourcecode is free available from http://www.RemoteCommunications.com/apache/mod_gzip/mod_gzip. More informations can be found at http://www.RemoteCommunications.com/apache/mod_gzip/mod_gzip_faq.htm.
mod_gzip can log informations about the compression of pages by configuring Apache to log using the 'gzip' format which can be defined as follows:
LogFormat "%h %l %u %t \"%r\" %>s %b %{mod_gzip_result}n %{mod_gzip_compression_ratio}n" gzip
Mod_gzip extensions
The mod_gzip extensions adds two fields to the Common Log Format; see common2dlf(1):
gzip_result compression_ratio
gzip_result
|
The |
|---|---|
compressio_ratio
|
The ratio by which the content was compressed. A number from 0 to 100. |
Log example :
127.0.01 - - [11/03/2001 12:12:01 -0400] "GET / HTTP/1.0" 200 252 "-" "Mozilla/5.0" OK 49dsl1.myprovider.com - francis [11/03/2001 12:14:01 -0400] "GET /secret/ HTTP/1.0" 200 300 "http://www.example.com/index.html" "Mozilla/5.0" OK 74
Examples
To process a log as produced in the modgzip logformat:
$ modgzip2dlf < common.log
modgzip2dlf will be rarely used on its own, but is more likely called by lr_log2report:
$ lr_log2report modgzip < /var/log/httpd/common.log
Version
$Id: modgzip2dlf.in,v 1.10 2006/07/23 13:16:36 vanbaal Exp $
Releases
7 releases since Debian 3.0 (Woody); the text changed 6 times.