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. _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
U can configure MRTG to measure traffic counted by iptables FORWARD chain. This way u will measure how much each host is taking without installing snmp. On 5/12/05, KartheeK <kartheekpn@yahoo.co.in> 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*<http://in.rd.yahoo.com/specials/mailtg/*http://yahoo.shaadi.com/india-matrimony/>: > Find your life partner online<http://in.rd.yahoo.com/specials/mailtg2/*http://yahoo.shaadi.com/india-matrimony/> > . > > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc > > >-- MiĆego Dnia Krystian Antoni _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
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. -- _,-=._ /|_/| `-.} `=._,.-=-._., @ @._, `._ _,-. ) _,.-'' ` G.m-"^m`m'' Dmytro O. Redchuk
On 5/12/05, Dmytro O. Redchuk <dor@ldc.net> 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. Thank you!> > -- > _,-=._ /|_/| > `-.} `=._,.-=-._., @ @._, > `._ _,-. ) _,.-'' > ` G.m-"^m`m'' Dmytro O. Redchuk > > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc >-- Kenneth Kalmer kenneth.kalmer@gmail.com http://opensourcery.blogspot.com
On Thu, May 12, 2005 at 05:51:28AM +0100, KartheeK wrote:> Hello Everybody,hi> Now i want to measure the bandwidth consumed by each of my hosts....Probably also not exactly what you want, but I have a Linux distribution "Route Hat" which is optimised for this sort of usage (also traffic control). A screenshot of IP accounting can be found here: http://shurdeek.routehat.org/tmp/ipacct.png Installation HOWTO can be found here: http://docs.routehat.org/doku.php?id=rh:howto It''s 100% open source so you can use the scripts without Route Hat as well. It uses ipt_ACCOUNT and rrdtool''s perl libraries for high performance accounting (largest tested LAN has ~1400 machines). Bye, Peter Surda (Shurdeek) <shurdeek@routehat.org>, ICQ 10236103, +436505122023 -- Microsoft does write "free" software. Not free as in "free beer," or "free speech," but "Free Tibet."
At 21:22 12/05/2005, Kenneth Kalmer wrote:>On 5/12/05, Dmytro O. Redchuk <dor@ldc.net> 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
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@igrin.co.nz> wrote:> At 21:22 12/05/2005, Kenneth Kalmer wrote: > > >On 5/12/05, Dmytro O. Redchuk <dor@ldc.net> 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@gmail.com http://opensourcery.blogspot.com
On Mon, May 23, 2005 at 10:31:30AM +1200, Simon Byrnand wrote:> 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)Sure, it''s not for billing. But one can analyze HTB "feeling and behaviour" with these scripts anyway. It''s great if I can tell my customer something like "yes, right you are, you are experiencing delays (up to 10 seconds BTW), and that''s because your bandwidth exhausted; no, no, no drops, just delaying..." :-)> 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...Once more: mrtg can deal with rrd bases, I believe you assume such setup, dont you?-) You can store rrd bases regularly and fetch the data with scripts. ps. I like rrd bases and work with them directly very often, with no mrtg. As you can see :-) That''s why py-htbstat uses py-rrdtool.> > Regards, > Simon-- _,-=._ /|_/| `-.} `=._,.-=-._., @ @._, `._ _,-. ) _,.-'' ` G.m-"^m`m'' Dmytro O. Redchuk