mldonkey-users
[Top][All Lists]
Advanced

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

Re: [Mldonkey-users] exact traffic measuring


From: Goswin Brederlow
Subject: Re: [Mldonkey-users] exact traffic measuring
Date: 08 Jan 2003 21:49:43 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Military Intelligence)

"Roland Arendes" <address@hidden> writes:

> Hi
> 
> > A nice feature for mldonkey would be a exact traffic measuring. Every
> > byte that goes out and in should be counted. Even server connection
> > traffic etc. It would be nice for traffic limited users.
> 
> I would use iptables for this. I hope your mldonkey is running with its
> own userid (perhaps mldonkey). With iptables you can check all traffic
> created by this user:
> 
> iptables -N mldonkey_count
> iptables -A mldonkey_count -i ppp0 -m owner --uid-owner 524 -j RETURN
> iptables -A mldonkey_count -o ppp0 -m owner --uid-owner 524 -j RETURN
> 
> iptables -I INPUT -j mldonkey_count
> iptables -I OUTPUT -j mldonkey_count
> 
> You get a new chain with 2 rules in it. The first one counts incoming
> bytes, the second one outgoing.
> This is pure theory and written from scratch for this mail and I don't
> know if -m owner works with incoming packets.
> You need to change the uid (524) and the interface (ppp0) to the one you use.

Incoming _connections_ don't have an owner. Not sure if they will
get one once they are connected properly. Anyway there is a patch for
the linux kernel that makes incoming connections have an owner.

> But, I agree, it would be nice. But it won't be precise, because you
> forgot the overhead (tcp-header, and perhaps pppoe-header too) which is
> not created by mldonkey itself.

Doesn't the traffic in iptables cound the headers too? At least the IP
header should be included and the ethernet header or ppp header
usually isn't that much.

An advantage of iptables would be that is counts ACK frames too.

MfG
        Goswin

PS: Someone could write an feedback loop that queries an snmp server
(as used in many switches/router)

PPS: If you use iptables use QoS too and schedule mldonkey traffic to a lower 
priority and to within hard limits. My mldonkey is limited to 1 K/s with an 
option of 8KB/s if there is free bandwith.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]