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

Re: Traffic Accounting

On Sun, Jul 20, 2003 at 02:02:12PM -0400, George Georgalis wrote:
>On Sun, Jul 20, 2003 at 08:02:07PM +0300, kgb wrote:
>>Yes, you're right but my question is, is there have other way to do accounting
>>some bash, shell script to fetch traffic with "tc" command from cbq shaper ?
>I don't really know that stuff... If you just want to log tcp/udp/icmp
>ip use iptables:
>iptables -N watchit
>iptables -I watchit -s -p tcp -m state --state NEW -j LOG --log-prefix '##_NEW_## '
>and periodically do something like
>tablestats () {
>iptables -vnL >>${LOG}/iptablestats-${now}
>iptables -t nat -vnL >>${LOG}/iptablestats-${now}
>or you may need qdisc routing and logging, I don't know much about
>that. My favorite setup is an ebtables bridging router/fw (has no ip
>address), patched to send packets through the netfilter tables. :)
>That and iptable stats should probably cover your needs.

Don't forget to use a good logging program like socklog!
also this is good doc:

On Fri, Jan 31, 2003 at 12:01:31AM -0600, Martin A. Brown wrote:
>Yes, ip-cref.{ps,pdf}, and ip-tunnel.{ps,pdf} are immensely helpful.
>This is Alexey Kuznetsov's documentation.  He's one of the main
>kernel developers for the IP network stack (as nearly as I can

// George

GEORGE GEORGALIS, System Admin/Architect    cell: 646-331-2027    <IXOYE><
Security Services, Web, Mail,            mailto:george@galis.org 
Multimedia, DB, DNS and Metrics.       http://www.galis.org/george 

Reply to: