Re: medir trafico

Linux Advanced Routing and Traffic Control

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

 



Tuesday, April 6, 2004, 9:59:55 PM, you wrote:

TL> hola  listeros!

I do not understand that (Spanish?) language, but I guess you want
a tool which would output traffic statistics?

I have created for the ISP i work for, pretty simple tool.
If some people wanted, I could share it under GPL.

+-[ traffic for: 2004-04-11 , traffic in KiloBytes ]------------+---------------+
| IP Address       | Latvia IN    | Latvia OUT   | Foreign IN   | Foreign OUT   |
+------------------+--------------+--------------+--------------+---------------+
| 10.1.1.100       | 759          | 9613         | 320          | 2265          |
| 10.1.1.12        | 1663         | 1296         | 145          | 17            |
| 10.1.1.194       | 243074       | 1868167      | 62063        | 2094          |
| 10.1.1.21        | 596          | 1225         | 119          | 26            |
| 10.1.1.26        | 2            | 2            | 5            | 4             |
(lots more more)
| 10.5.9.2         | 0            | 0            | 2271         | 419           |
+------------------+--------------+--------------+--------------+---------------+
| total: ---   IPs | XXXXXXXXX    | XXXXXXXXX    | XXXXXXXXX    | XXXXXXXXX     |
+------------------+--------------+--------------+--------------+---------------+
| total:           | Latvia: XXXXXXXXX           | Foreign: XXXXXXXXX           |
+------------------+--------------+--------------+--------------+---------------+


The accounting is done via Netfilter, runs only on Linux.
For each IP a single rule is created. Perl script walks through (takes
output of `iptables') these rules, reads counters and zeros the tables.
Other Perl scripts output data to text files, generates the ascii
table seen above, puts data into database and the last script
mails the ascii table.


P.Krumins

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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