Operating System - Linux
1822004 Members
4105 Online
109639 Solutions
New Discussion юеВ

Re: Bandwidth monitoring/throttling on RH8

 
tpfraz
Advisor

Bandwidth monitoring/throttling on RH8

Hello,
I'm running RedHat 8 with Apache2.
I am hosting multiple websites for different clients using virtual hosts in Apache (all on the same server).
I am trying to find a way to monitor individual bandwidth usage and hopefully limit this usage.
Is this possible from within Linux?

I have heard of MRTG with SNMP. Is this a good and secure solution?
I have also heard of modules to be used with Apache. I think this is only for limiting and not monitoring, it that correct?

Finally, I also hope to use whatever solution I find for complete bandwidth monitoring/throttling and not just for Apache related traffic.

Any advise or suggestions?
Thanks...

-Travis
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Bandwidth monitoring/throttling on RH8

This article is interesting.
http://www.faqchest.com/linux/SERVER-LINUX/linux-98/linux-9803/linux98030400_13467.html

This post recommends a tool called ntop
http://www.linuxquestions.org/questions/archive/3/2002/09/2/29926

It can be found on http://www.sourceforge.net

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Stuart Browne
Honored Contributor

Re: Bandwidth monitoring/throttling on RH8

Monitoring constant flow, yes, MRTG is probably the easiest/best way to do things. Yes, assuming you have a well set up firewall, it's completely secure (see http://www.mrtg.org)

To limit apache, there were modules to limit the amount any given socket can transfer (speed wise) at a given moment. These currently don't exist for Apache v2 however.

For overall, and changable you might want to read the Advanced Networking how to for Linux, and read through the "Quality of Service" stuff (using 'tc' and the things in-built into the kernel - http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.qdisc.html).

Otherwise if you just want to know how much data has gone out, there's always the IPTables accounting features.
One long-haired git at your service...
tpfraz
Advisor

Re: Bandwidth monitoring/throttling on RH8

Okay, thanks for the tips.

Say a web-hosting company wanted to limit the amount of bandwidth their customers were allowed to use each month.
How would this normally be done?
From the router maybe? Or something else?

I know this is a common thing that hosting companies do. I just don't know if doing it from within Linux is the best approach.

-Travis
Steven E. Protter
Exalted Contributor

Re: Bandwidth monitoring/throttling on RH8

In general you use one of the programs above to monitor and report back bandwidth use. Anyone that goes over is assessed a fee.

There are a lot of webhosters that don't charge a fee or have a very high threashold for making such a charge. So long as the user agreement is clear thats the way to go.

In geneal, my webhosting customers will not tolerate their sites going down if they exceed quota. They will pay a fee if they get popular and consume too much band width.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com