Re: [LARTC] Re: Bandwidth Metering

2004-09-29 Thread Daniel Frederiksen
Hej Patrick Again there might be to ways I think. You could log the traffic via libpcap or netfilter. Netfilter could be set up to log specific traffic and afterwords you could parse the logfile and flush it. The collected data could then be put into a RRD base and graphed. The parsing of the

Re: [LARTC] Re: Bandwidth Metering

2004-09-29 Thread Daniel Frederiksen
Hey Patrick I seem to have forgotten the point that you want to relate the bandwidth usages to a user. In the perl script you posted a link for, the author uses lsof. This sollution is ok, if the connection is still in the list, however if you accumulate in a log from netfilter, the probability

Re: [LARTC] Re: Bandwidth Metering

2004-09-29 Thread Patrick Coleman
Sure - what I want to do is set up a colocated webhost/shell server, and sell people accounts. However, I only have 2000mb upstream/2000mb downstream free bandwidth, after which I start getting charged extra. Therefore, I want to give *each user* a bandwidth quota, which if they go over they can

Re[2]: [LARTC] Re: Bandwidth Metering

2004-09-29 Thread diab
Hi Patrick, Iptables is capaple of matching/marking packets based on the uid or guid of the owner of the process that generates traffic. It's also possible to run apache as a different user for every virtual host (apache suexec wrapper needed), so owner matching would also work there. For

Re[3]: [LARTC] Re: Bandwidth Metering

2004-09-29 Thread diab
d It's also possible to run apache as a different user for every virtual d host (apache suexec wrapper needed), so owner matching would also d work there. Actually it turned out that Non-CGI requests are still processed with the user specified in the main User directive. so it won't work for

[LARTC] Re: Bandwidth Metering

2004-09-28 Thread Patrick Coleman
Thanks for those links. I'm building this server from scratch, so kernel recompiling is fine. But will these tools be able to monitor the bandwidth of individual users on the server itself? I realise you grab the apache logs to monitor bandwidth for web servers, but what about other services, say