Re: [LARTC] Monitoring traffic

Linux Advanced Routing and Traffic Control

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

 



On Sat, Sep 22, 2001 at 04:41:57PM +0200, RoMaN SoFt / LLFB wrote:
> 
>  Hi.
> 
>  I'm going to setup policy routing and traffic shaping. Before that I
> need to do some kind of study about our traffic to determine the best
> way of distribute our bandwidth. For that reason I'd like some tool
> that could retrieve this information:
> - traffic based on app layer protocol (for instance, http, ftp, pop3;
> or basing on different destination ports: 80, 21, 110).
> - the measurements should be statistics, I mean, I could examine
> traffic from 9h to 14h and that program should give traffic per hour,
> etc.
> - differentiate inbound / outbound traffic

Tricky. For instantaneous measurements, I use iptraf. Then there is ipac,
which you can use for per ip/per port measurements, which can report on time
intervals.

I also use iptables & mrtg together like this:

iptables -N mrtg-from-the-internet > /dev/null 2> /dev/null
iptables -N mrtg-to-the-internet > /dev/null 2> /dev/null

iptables -A INPUT -i eth0 \! -s 213.244.168.192/26 -j mrtg-from-the-internet
iptables -A OUTPUT -o eth0 \! -d 213.244.168.192/26 -j mrtg-to-the-internet

and then:

Target[traffic]: `/var/www/mrtg.ds9a.nl/traffic`

and /var/www/mrtg.ds9a.nl/traffic:

#!/bin/sh
/sbin/iptables -L -n -v -x | grep mrtg- |grep "^ " | awk "{print \$2}"
uptime
uname -a

Regards,

bert

-- 
http://www.PowerDNS.com          Versatile DNS Software & Services
Trilab                                 The Technology People
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet



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