httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alasdair Lumsden" <apa...@alivewww.com>
Subject RE: [users@httpd] bandwidth utilization reports
Date Thu, 22 May 2003 12:28:07 GMT
> I am hosting many virtual domains on my servers and want to be able to
> generate a report of utilization based on bandwidth used.   Any good
> proggies
> out there that I can use.
> 
> - Noah

I don't know of any specific programs, but personally I use pglogd.
Apache pipes its Access Log to pglogd, which then sticks it in a
database. Working out bandwidth usage per domain is as trivial as doing:

SELECT SUM(traffic) WHERE domain = 'mydomain.com' AND date >=
'2003-03-01' AND date < '2003-04-01'

Alternativly you can run awk on your access_log, doing something along
the lines of:

awk '{sum = sum + $10} END {print sum}' access_log

Obviously you'd have to adapt this so it does it for whatever domain you
want to total up, but you get the idea...


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message