Re: wanted A tool to measure bandwidth....

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Simon

For billing have a look at pmacct. It's very stable, reliable and accurate.

<from the website>
pmacct is a small set of passive network monitoring tools to measure,
account and aggregate IPv4 and IPv6 traffic; aggregation revolves
around the key concept of primitives (VLAN id, source and destination
MAC addresses, hosts, networks, AS numbers, ports, IP protocol and
ToS/DSCP field are supported) which may be arbitrarily combined to
build custom aggregation methods; support for historical data
breakdown, triggers and packet tagging, filtering, sampling.
Aggregates can be stored into memory tables, SQL databases (MySQL or
PostgreSQL) or simply pushed to stdout. Data is collected either using
libpcap (and optionally promiscuous mode of the listening interface)
or reading Netflow v1/v5/v7/v8/v9 packets coming from the network.
</from the website>

http://www.ba.cnr.it/~paolo/pmacct/ for more info

You can do extremely powerful analysis on the captured data, give it a shot!

HTH

On 5/23/05, Simon Byrnand <simon@xxxxxxxxxxx> wrote:
> At 21:22 12/05/2005, Kenneth Kalmer wrote:
> 
> >On 5/12/05, Dmytro O. Redchuk <dor@xxxxxxx> wrote:
> > > On Thu, May 12, 2005 at 05:51:28AM +0100, KartheeK wrote:
> > > > Hello Everybody,
> > > > I have configured a Linux box that does traffic shaping. Its working
> > wonderfully fine, just as expected...Now i want to measure the bandwidth
> > consumed by each of my hosts....But I dont want SNMP to run on all the
> > hosts[as required by MRTG]
> > > > I used iptraf on my linux box, but it only measures the bandwidth on
> > interface basis only....
> > > > I tried installing traffic-vis, its not working properly and there is
> > know documentation of how to get it running.....
> > > > I also tried ntop, it installs, but dosent work.....
> > > > I have been scratching my head for the past one week....
> > > >
> > > > So my problem: I am in search of a tool that measures bandwidth
> > consumed by each host on my LAN without requiring SNMP to run on the hosts...
> > > >
> > > > Now, is there any tool....
> > > > Any input regarding the matter is a welcome.....
> > > > Infinite Thanx in Advance.....
> > > > Regards
> > > > KartheeK
> > > >
> > > > Yahoo! India Matrimony: Find your life partneronline.
> > >
> > > I have written some scripts just for me -- I'll be glad if you find it
> > > useful in any sense.
> > >
> > > http://www2.ldc.net/~dor/py-htbstat/
> > >
> > > But probably that's not right what you need.
> >
> >Maybe not what he needed, but this is excellent.
> 
> Indeed! Looks very good, I will definately be looking at using that for
> helping to analyze the performance of HTB.
> 
> However one comment - reading byte counters from TC (assuming thats what it
> does - I havn't studied it or installed it yet) for the purposes of billing
> customer usage is not recommended, as the HTB docs specifically say that
> they are not completely accurate due to rounding. (And we have also found
> they are a bit inaccurate)
> 
> What we do is set up firewall rules based on customer IP address(es) and
> then monitor the byte counters. This can be read from MRTG without any
> SNMP. So for example: (ip's changed to protect the innocent ;)
> 
> /sbin/ipchains -A input -i eth0 -s 192.168.1.10
> /sbin/ipchains -A output -i eth0 -d 192.168.1.10
> 
> The above rules will match for byte counting purposes but still allow
> following rules to be processed for firewalling purposes. Something similar
> should be possible with iptables.
> 
> Then in a shell script:
> 
>          ipchains -xvnL output | grep -w "eth0" | grep -w "192.168.1.10" |
> awk '{print $2}'
>          ipchains -xvnL input | grep -w "eth0" | grep -w "192.168.1.10" |
> awk '{print $2}'
>          echo ""
>          echo "Customer Name"
> 
> Then in mrtg.cfg:
> 
> Target[CustomerName]: `/root/mrtg/bin/get-radiolink-use`
> 
> This is a simplified example that doesn't take into account more than one
> customer. To scale up you would want the various scripts to be
> automatically generated...
> 
> We find byte counting using ipchains/iptables to be very accurate, and no
> SNMP is needed provided the byte counting is done on the same machine as
> mrtg is run...
> 
> Regards,
> Simon
> 
> 


-- 

Kenneth Kalmer
kenneth.kalmer@xxxxxxxxx
http://opensourcery.blogspot.com
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux