apache logging wrong bandwidth usage

jackc

Verified User
Joined
Jan 19, 2007
Messages
334
It seems apache is logging the bandwidth usage all wrong, 421_b013_multilanguage.exe this file only 163MB. This person is downloading using a multi-thread download tool, somehow apache is not logging the actual data is sent instead of something else, other files and other people download using multi-thread download tool has the same problem.
Any idea how to fix?
Using CentOS 4.5, apache 2.2, php5 built by custombuild.

Code:
218.19.xxx.xxx - - [27/May/2007:05:35:42 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 92816379 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:48:23 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 69489782 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:48:30 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 69037367 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:43:51 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 152149270 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:50:22 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 75680738 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:14 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 119814784 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:48:43 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 119450268 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:30 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 59089203 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:48:52 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 112098978 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:47:12 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 104325744 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:47 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 56049806 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:48 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 157856858 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:54 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 152265744 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:49 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 19789183 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:34 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 117539088 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:55 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 130272886 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:55 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 125587625 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:56 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 69847383 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:56 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 130272886 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:55 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 130272886 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:55 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 130272886 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:56 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 109300903 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:56 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 130272886 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
218.19.xxx.xxx - - [27/May/2007:05:51:57 +0800] "GET /u/software/2007-03/31/421_b013_multilanguage.exe HTTP/1.1" 206 19585357 "http://web.xxx.com/download/software-159.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
 
found the problem.
In httpd 2.0, unlike 1.3, the %b and %B format strings do not represent the number of bytes sent to the client, but simply the size in bytes of the HTTP response (which will differ, for instance, if the connection is aborted, or if SSL is used). The %O format provided by mod_logio will log the actual number of bytes sent over the network.
 
%b swapped with %O for the default apache 2 configs in custombuild.
The customapache apache 2 httpd.conf is not changed because mod_logio isn't present.

John
 
Back
Top