Hi All Is there any output that counts the number of dropped bytes (not packets) just as in "Sent" in "tc -s class" output? I have an HTB arrangement here I can see "dropped" in father/mother 1:0 qdisc but NOT in each class (they are all zeroes). These dropped are packets or bytes? Why these "drops" do not show thenselves in its own class(es) under its qdisc? Any patch perhaps?? Regards -- Ethy H. Brito /"\ InterNexo Ltda. \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML +55 (12) 3797-6860 X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL S.J.Campos - Brasil / \
Hi,>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) ^^^^^^^^^^>I have an HTB arrangement here I can see "dropped" in father/mother 1:0qdisc>but NOT in each class (they are all zeroes). >These dropped are packets or bytes?Number of packets.>Why these "drops" do not show thenselves in its own class(es) under its >qdisc? > >Any patch perhaps?? >RegardsRegards /Christian [http://benve.info]
On Sun, 20 May 2007 22:56:23 +0200 Christian Benvenuti <christian.benvenuti@libero.it> wrote:> Hi, > > >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
Ethy H. Brito wrote:> On Sun, 20 May 2007 22:56:23 +0200 > Christian Benvenuti <christian.benvenuti@libero.it> wrote: > >> Hi, >> >>> 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?Not always if it''s got a really long queue tcp windows can be absorbed. You can choose queue length.> I just need to measure this amount of dropped bytes (not packets).I don''t think you can. With> 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.