Skip to contentSkip to conversation

dropped bytes in "tc -s class" output

LARTC Christian Benvenuti 3 participants 3 messages May 20, 2007 – May 30, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

Quoted 4 lines

Hi All

Is there any output that counts the number of dropped bytes (not packets) just as in "Sent" in "tc -s class" output?

No.
A simple workaround (for simple configurations) consists of redirecting all the traffic you want to drop to a dedicated class and attach a blackhole qdisc (i.e., drop everything) to it.

Supposing you redirect to class 1:12 all the traffic that is to be dropped, all you need is:

tc qdisc add dev eth1 parent 1:12 handle 12: blackhole

The counters of class 1:12 are what you are looking for:

class htb 1:12 parent 1:1 leaf 12: prio 0 quantum 1600 rate 128000bit ceil 128000bit burst 1664b/8 mpu 0b overhead 0b cburst 1664b/8 mpu 0b overhead 0b level 0
Sent 2352 bytes 24 pkt (dropped 0, overlimits 0 requeues 0) ^^^^^^^^^^^^^^^^^^^^^^

qdisc blackhole 12: dev eth1 parent 1:12
Sent 0 bytes 0 pkt (dropped 24, overlimits 0 requeues 0)

                     ^^^^^^^^^^
Quoted 1 line

I have an HTB arrangement here I can see "dropped" in father/mother 1:0

qdisc

Quoted 2 lines

but NOT in each class (they are all zeroes).
These dropped are packets or bytes?

Number of packets.

Quoted 5 lines

Why these "drops" do not show thenselves in its own class(es) under its qdisc?

Any patch perhaps??
Regards

Regards
/Christian
[http://benve.info]

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#1 lore raw
Quoted 11 lines · On Sun, 20 May 2007 22:56:23 +0200 Christian Benvenuti…

Hi,

Quoted 4 lines

Hi All

Is there any output that counts the number of dropped bytes (not packets) just as in "Sent" in "tc -s class" output?

No.
A simple workaround (for simple configurations) consists of redirecting all the traffic you want to drop to a dedicated class and attach a blackhole qdisc (i.e., drop everything) to it.

Hmmm. I am pretty sure I did not tell what I meant.

I assume that at some point an HTB class will drop some packets that are beyond its speed regulation, right?
I just need to measure this amount of dropped bytes (not packets). With this measure I can MRTG it and give the clients some felling that they really need more bandwidth.

How can I do this?

Ethy
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#2 lore raw
In reply to Christian Benvenuti
Quoted 14 lines · Ethy H. Brito
Quoted 10 lines · On Sun, 20 May 2007 22:56:23 +0200 Christian Benvenuti…

Hi,

Quoted 4 lines

Hi All

Is there any output that counts the number of dropped bytes (not packets) just as in "Sent" in "tc -s class" output?

No.
A simple workaround (for simple configurations) consists of redirecting all the traffic you want to drop to a dedicated class and attach a blackhole qdisc (i.e., drop everything) to it.

Quoted 4 lines

Hmmm. I am pretty sure I did not tell what I meant.

I assume that at some point an HTB class will drop some packets that are beyond its speed regulation, right?

Not always if it's got a really long queue tcp windows can be absorbed. You can choose queue length.

Quoted 1 line

I just need to measure this amount of dropped bytes (not packets).

I don't think you can.

With

Quoted 2 lines

this measure I can MRTG it and give the clients some felling that they really need more bandwidth.

That would be a bit deceitful - TCP relies to some extent on dropped packets, how many you get depends on buffer lengths and number of connections. You could double the rate with a smaller buffer and see more dropped packets than a slower link with a bigger buffer.

Andy.

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc