OpenWrt Forum Archive

Topic: tc statistics truncated

The content of this topic has been archived on 27 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi...

tc -s qdisc show dev ppp0

says

"statistics truncated" ...

output:
statistics truncated
qdisc sfq 30: quantum 1492b perturb 10sec
statistics truncated
qdisc sfq 20: quantum 1492b perturb 10sec
statistics truncated
qdisc sfq 10: quantum 1492b perturb 10sec
statistics truncated
qdisc htb 1: r2q 10 default 20 direct_packets_stat 0
statistics truncated

Any suggestions ?

I made a change per http://mailman.ds9a.nl/pipermail/lartc/ … 06682.html
(I guess tc_stats size on mips is different)

here is the patch (I'm sure there is a nicer way to fix it than just hard coding a number)

 diff -Nurb tc_qdisc.c  ./buildroot/build_mipsel/iproute2/tc/tc_qdisc.c
--- tc_qdisc.c  2004-10-17 00:09:22.462706781 -0400
+++ ./buildroot/build_mipsel/iproute2/tc/tc_qdisc.c     2004-10-17 00:10:08.703830693 -0400
@@ -238,7 +238,7 @@
        fprintf(fp, "n");
        if (show_stats) {
                if (tb[TCA_STATS]) {
-                       if (RTA_PAYLOAD(tb[TCA_STATS]) < sizeof(struct tc_stats))
+                       if (RTA_PAYLOAD(tb[TCA_STATS]) < 36)
                                fprintf(fp, "statistics truncated");
                        else {
                                struct tc_stats st;

seems to work fine :-):

# tc -s -d qdisc show dev ppp0
qdisc sfq 40: quantum 1492b limit 128p flows 128/1024 perturb 10sec 
 Sent 16196643 bytes 18347 pkts (dropped 0, overlimits 0) 
 backlog 91p 

 qdisc sfq 30: quantum 1492b limit 128p flows 128/1024 perturb 10sec 
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 

 qdisc sfq 20: quantum 1492b limit 128p flows 128/1024 perturb 10sec 
 Sent 227892 bytes 1845 pkts (dropped 0, overlimits 0) 

 qdisc sfq 10: quantum 1492b limit 128p flows 128/1024 perturb 10sec 
 Sent 48650 bytes 857 pkts (dropped 0, overlimits 0) 

 qdisc htb 1: r2q 10 default 40 direct_packets_stat 9 ver 3.16
 Sent 16478702 bytes 21062 pkts (dropped 0, overlimits 38530) 
 backlog 91p 

The discussion might have continued from here.