Gentoo Archives: gentoo-server

From: Chris Schwerdt <chris.schwerdt@×××××××××××××××.com>
To: gentoo-server@g.o
Subject: RE: [gentoo-server] Measure/Control traffic per user/customer
Date: Tue, 09 Dec 2003 15:15:25
Message-Id: 002d01c3be99$80215e10$ac00a8c0@psicusoftware.com
In Reply to: [gentoo-server] Measure/Control traffic per user/customer by Florian Huber
1 I have a bit of experience with this issue. I've installed
2 mod_throttle which allows me to monitor bytes transferred per vhost (w/ out
3 apache2 + perchild). Mod_throttle also has a statistics page (tab
4 delimited) that I have written a script to parse through and continually
5 update vhost transfer totals. Mod_throttle also allows you to set a limit
6 on bytes transferred per vhost. I use analog for vhost reporting. If you
7 have qmail, you can install qmailanalog and get per vhost byte statistics
8 and merge that w/ totals from mod_throttle. Most ftp daemons will allow you
9 to log all files transferred. I have not looked at the iptables owner match
10 but from what I have seen it is only applicable in the OUTPUT chain.
11 Basically everything I've put together is a major hack job linking users and
12 applications they use. I have no monitoring of individual users bandwidth
13 consumption when they are on the local machine but I do monitor the
14 interface bandwidth and if I see that jumping really high I can track down
15 the offending user. Also, apache2 perchild + php is crap. I'd look into
16 using the php+suexec patch. If anyone has any all-in-one solutions or
17 better ideas, I'd be interested in hearing about it.
18
19 References:
20 Mod_throttle: http://www.snert.com/Software/mod_throttle/
21 Qmailanalog: http://cr.yp.to/qmailanalog.html
22 PHP SuExec: http://www.localhost.nl/patches/
23
24 Chris Schwerdt
25
26 -----Original Message-----
27 From: Florian Huber [mailto:florian.huber@×××××××××××.de]
28 Sent: Tuesday, December 09, 2003 2:06 AM
29 To: gentoo-server@g.o
30 Subject: [gentoo-server] Measure/Control traffic per user/customer
31
32
33 Hi list,
34 does anyone of you have a good solution for measuring the monthly traffic
35 amount for several customers on a web-hosting machine?
36
37 I've heard about logging apache with a per-vhost basis and then caclulate
38 the traffic. But what about ftp, mail or http headers? And which program do
39 you suggest for logfile analysis? webalizer? analog et. al.?
40
41 The second solution I'm thinking of is using iptables with the owner-match
42 rule and apache2 with the perchild mpm which both are marked as
43 experimental! Has anyone already experience with this?
44
45 If tried apache2 + perchild mpm + mod_php, but apache does not start
46 anymore. I think it's related to pear, but I had no to search the internet
47 yet.
48
49 TIA
50 Florian Huber

Replies

Subject Author
RE: [gentoo-server] Measure/Control traffic per user/customer Florian Huber <florian.huber@×××××××××××.de>