Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
per-user bandwidth monitor
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mno
Guru
Guru


Joined: 29 Dec 2003
Posts: 454
Location: Toronto, Canada

PostPosted: Sat Jun 12, 2004 11:23 pm    Post subject: per-user bandwidth monitor Reply with quote

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
View user's profile Send private message
pakman
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jan 2004
Posts: 100

PostPosted: Tue Jun 15, 2004 6:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
zbindere
Guru
Guru


Joined: 27 May 2004
Posts: 356
Location: Switzerland

PostPosted: Tue Jun 15, 2004 7:17 pm    Post subject: Reply with quote

for me the following start script worked:
http://freshmeat.net/projects/cbq.init
Back to top
View user's profile Send private message
mno
Guru
Guru


Joined: 29 Dec 2003
Posts: 454
Location: Toronto, Canada

PostPosted: Tue Jun 15, 2004 8:00 pm    Post subject: Reply with quote

Thanks a lot for the replies!
_________________
"Hello and goodbye. As always." | You can't use   here?? | Unanswered
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum