View Full Version : bandwidth usage
nphase
2004-12-30, 09:48 PM CST
does anyone know how to get the amount of GB of bandwidth used on a certain port on a certain IP from say.. a month ago until now?
nphase
2004-12-30, 10:24 PM CST
let me replace bandwidth with traffic (maybe that makes more sense?.. not GB/s, just plain GB ( or mb, or kb, or b.. i dont care.))
another way of looking at it: how much outoging traffic a certain _application_ has used over the past x days.
i dont necessarily need to know what it is, if i need to run a packet sniffer to get the data current to now, can you give me directions to that too?
:( *lost*
ewdi
2004-12-30, 10:38 PM CST
you can use a tool called MRTG, it monitors traffic and tell you how much it goes out and in /month/day/hour
nphase
2004-12-30, 11:07 PM CST
ok let me try a different approach.... is there any way to limit the bandwidth (this time i mean kb/s) per ip and port?
nphase
2004-12-31, 09:11 AM CST
anyone got any ideas?
ewdi
2004-12-31, 09:37 AM CST
well in apach eu can use mod_bandwidth, what otehr daemon are you serving and wating to limit access?
nphase
2004-12-31, 09:43 AM CST
well im trying to limit the outgoing bandwidth that an instance of shoutcast serv can use.. but since each shoutcast server streams off a different port and different ip (in our setup), i figured its also possible using a general bandwidth limiting program that has the ability to limit per source port and source ip.. and for each server i could a) replicate the process with a different configuration or b) add to the configuration and restart the program so it will also limit the otehr ports. (depending on how the program works)
pigpen
2004-12-31, 11:05 AM CST
maybe this is the right link for you: http://lartc.org/wondershaper/
nphase
2004-12-31, 11:55 AM CST
nope, im not trying to produce any of the goals stated on that page, just trying to throttle bandwidth of one port on a specific ip.
kosmosik
2004-12-31, 12:14 PM CST
nope, im not trying to produce any of the goals stated on that page, just trying to throttle bandwidth of one port on a specific ip.
you wan't to throttle it or count it? I mean you like to set up speed limits for this services or just to monitor how many bandwith they've consumed (over time) and if that amount gets exceeded than you wish to turn off the service? I don't get it... if you need to throttle bandwith than you need to use shaping as htb or cbq...
nphase
2004-12-31, 02:37 PM CST
throttle it.
whats htb?
pigpen
2005-01-01, 07:20 AM CST
this is exactly what wondershaper will do for you. without even knowing about htb or cbq... ;)
accountnewb
2005-01-01, 11:20 AM CST
ok let me try a different approach.... is there any way to limit the bandwidth (this time i mean kb/s) per ip and port?
Yes, but its somewhat complicated. Shorewall has the capability to do this. Here's something to get you started ... http://www.my-opensource.org/howto/qostrafficshaping-shorewall-wondershaper-howto.html
Is your goal to get QoS or to limit traffic for other reasons? Using the simpler rules in Squid is another way to ramp down some users and save on bandwidth.
IPTables can do what you posted (out of the box), but it would be pretty complex.
defkewl
2005-04-13, 09:52 AM CDT
Have you tried iptraf?
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.