httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Muhammad Rizwan Khan <>
Subject Re: [users@httpd] Band Monitoring tool for apache
Date Sat, 29 May 2004 06:09:45 GMT

Thanks for your usefull reply. I am liitle confused while using access_log, 
plz. tell me the right way to read/use it. I am sending you 2 enteries of my 
access_log file for example: - - [23/May/2004:12:16:41 +0600] "GET /images/yes.jpg HTTP/1.1" 404 
283 "" "Mozilla/5.0 (X11; 
U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01" - - [23/May/2004:12:16:48 +0600] "GET /images/yes.jpg HTTP/1.1" 404 
283 "" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) 
Gecko/20021120 Netscape/7.01"

Now by reading these enteries how can i check that how many bytes were sent?
If these enteries are not helpfull for giving example. then plz. give me any 
other entry as an example from your access_log file, which explains that how 
many bytes were sent.

On Monday 24 May 2004 22:37, Brent 'Dax' Royal-Gordon wrote:
> Muhammad Rizwan Khan wrote:
> > I am using apache as web server on my hosting server running on redhat. I
> > want to monitor band width of sites which each site is consuming, how i
> > can check this. Is there any utility/tool is avialable to monitor band
> > width for each hosted domain.
> If you use either Common or Combined format for your access_logs, the
> log will incude an entry indicating how many bytes were sent in each
> response.  Then you can simply sum up the byte counts for entries in a
> particular time frame to find out how many bytes Apache transmitted.  A
> Perl one-liner does the trick with my (slightly modified--there's an
> extra field for vhost right after the date) logs:
>      perl -ane'$h{$F[5]}+=$F[10];END{print"$_: $h{$_}\n"for keys%h}' \
>      access_log
> Figuring out how that works is left as an exercise for the reader.  :^)


Muhammad Rizwan Khan

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message