View previous topic :: View next topic |
Author |
Message |
mno Guru
Joined: 29 Dec 2003 Posts: 454 Location: Toronto, Canada
|
Posted: Sat Jun 12, 2004 11:23 pm Post subject: per-user bandwidth monitor |
|
|
Hi guys,
Can anyone recommend a package or several packages that would allow me to detect bandwidth usage on a per-user basis? If no package is available, can anyone recommend an efficient way of doing this with the tools that are available?
Thanks,
Max _________________ "Hello and goodbye. As always." | You can't use here?? | Unanswered |
|
Back to top |
|
|
pakman Tux's lil' helper
Joined: 06 Jan 2004 Posts: 100
|
Posted: Tue Jun 15, 2004 6:42 pm Post subject: |
|
|
I'm not aware of anything to do this at the moment, might be worth browsing around freshmeat.net
[edit] unless you just want it for apache, in which case use 1.3 and mod_throttle http://www.snert.com/Software/mod_throttle/
The way I'd probably approach it would be to look at the iptables --uid-owner and --gid-owner functions. Theres a project called ipac-ng to give traffic totals from iptables. http://sourceforge.net/projects/ipac-ng/ (its also in portage) If you could get the different users traffic flowing through different iptables chains then perhaps ipac-ng can total them all up, that could work. I've not used this software though so can't say how well it functions.
Another possibility would be to use the iptables --mangle option to mark each users packets, then use tc/iproute QoS tools to classify them (you don't need to actually do any QoS on them for this to work, just pass each different marked packet into a different class) then the output from "tc show" would give you the traffic totals for each class, i.e. each user. Theres a limit to how many different marks you can use though, I believe about 255. A bit on marking packets with netfilter here: http://lartc.org/howto/lartc.netfilter.html
Last edited by pakman on Tue Jun 15, 2004 7:34 pm; edited 1 time in total |
|
Back to top |
|
|
zbindere Guru
Joined: 27 May 2004 Posts: 356 Location: Switzerland
|
|
Back to top |
|
|
mno Guru
Joined: 29 Dec 2003 Posts: 454 Location: Toronto, Canada
|
Posted: Tue Jun 15, 2004 8:00 pm Post subject: |
|
|
Thanks a lot for the replies! _________________ "Hello and goodbye. As always." | You can't use here?? | Unanswered |
|
Back to top |
|
|
|