Squid does not do the accounting, but does provide you with logs of
proxied requests that you can easily summarize for accounting using awk or
another good text log processing tool.
Example AWK program, summarizing your traffic per IP
-- cut here --
{
bytes[$3] += $5;
requests[$3] += 1;
}
END {
for (ip in bytes) {
print ip, bytes[ip], requests[ip];
}
}
-- end --
On Wednesday 09 January 2002 14.20, Boniforti Flavio wrote:
> Hello everybody!
>
> I want to do accounting on a per-IP basis, only counting HTTP FTP and
> related traffic.
>
> Is this possible to do with squid?
>
> I was thinking about doing it with the help of iptables, but I noticed
> that if I want to check traffic on ports 80, 21 and so on, I get 0 bytes
> counted. That's because I'm using port 8080 and squid, is this thought
> right??
>
> Now, if so, would it be correct to check the bytes passing through my
> proxy port???
>
> Thanx in advance...
>
>
> Boniforti Flavio
> Informa Srl
> Via 42 Martiri, 165
> 28924 Verbania (VB)
> Tel +39 0323 586216
> Fax +39 0323 586672
> http://www.co-ver.it/informa
-- MARA Systems AB, Giving you basic free Squid support Customized solutions, packaged solutions and priority support available on requestReceived on Wed Jan 09 2002 - 12:08:29 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:05:48 MST