tc class statistics rates are all zero, is this a new bug?

Asked by Visual Echo

After upgrading an Ubuntu server from Lucid -> Precise -> Trusty the command:
tc -s class show dev eth0
no longer shows rates for my classification bands. This worked in Lucid, but not sure if something changed, or if I need to set some system configuration to make it work again. My current non-working version is:

$ dpkg -s iproute2
Package: iproute2
Status: install ok installed
Priority: important
Section: net
Installed-Size: 1147
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Multi-Arch: foreign
Version: 3.12.0-2
Replaces: iproute
Provides: arpd
Depends: libc6 (>= 2.14), libdb5.3
Recommends: libatm1 (>= 2.4.1-17~), libxtables10
Suggests: iproute2-doc
Conflicts: arpd, iproute (<< 20130000-1)
Conffiles:
 /etc/iproute2/group 3aea2c0e0dd75e13a5f8f48f2936915f
 /etc/iproute2/ematch_map b91e7f9b26918449bade9573f8871d61
 /etc/iproute2/rt_realms 7137bdf40e8d58c87ac7e3bba503767f
 /etc/iproute2/rt_tables a1313318d6778fe6b8c680248ef5a463
 /etc/iproute2/rt_dsfield 4264d5c7c8298300185aa04e1a736934
 /etc/iproute2/rt_protos 95ce0b4b5b79f5a8a45941fb418a904c
 /etc/iproute2/rt_scopes 6298b8df09e9bda23ea7da49021ca457
Description: networking and traffic control tools
 The iproute2 suite is a collection of utilities for networking and
 traffic control.
 .
 These tools communicate with the Linux kernel via the (rt)netlink
 interface, providing advanced features not available through the
 legacy net-tools commands 'ifconfig' and 'route'.
Original-Maintainer: Debian iproute2 Maintainers <email address hidden>
Homepage: http://www.linux-foundation.org/en/Net:Iproute2

Here is the current output of the command, note that 'rate 0bit 0pps' is common to all classes, in Lucid this would produce non-zero values for active traffic:

$ tc -s class show dev eth0
class htb 2:1 root rate 4000Kbit ceil 10000Kbit burst 1600b cburst 1600b
 Sent 140162776 bytes 377793 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 23022 borrowed: 0 giants: 0
 tokens: 46812 ctokens: 18725

class htb 2:2 parent 2:1 leaf 3: prio 0 rate 1000Kbit ceil 4000Kbit burst 1600b cburst 1600b
 Sent 2021584 bytes 6949 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 6505 borrowed: 189 giants: 0
 tokens: 187250 ctokens: 46812

class htb 2:3 parent 2:1 leaf 4: prio 1 rate 2000Kbit ceil 4000Kbit burst 1600b cburst 1600b
 Sent 16695548 bytes 216855 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 216846 borrowed: 9 giants: 0
 tokens: 94375 ctokens: 47187

class htb 2:4 parent 2:1 leaf 5: prio 2 rate 1000Kbit ceil 4000Kbit burst 1600b cburst 1600b
 Sent 2963040 bytes 46619 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 46619 borrowed: 0 giants: 0
 tokens: 193250 ctokens: 48312

class htb 2:5 parent 2:1 leaf 6: prio 3 rate 1000Kbit ceil 4000Kbit burst 1600b cburst 1600b
 Sent 99996 bytes 745 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 745 borrowed: 0 giants: 0
 tokens: 183000 ctokens: 45750

class htb 2:6 parent 2:1 leaf 7: prio 4 rate 1000Kbit ceil 4000Kbit burst 1600b cburst 1600b
 Sent 80608262 bytes 79347 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 50544 borrowed: 13902 giants: 0
 tokens: 190750 ctokens: 47687

class htb 2:7 parent 2:1 leaf 8: prio 5 rate 1000Kbit ceil 4000Kbit burst 1600b cburst 1600b
 Sent 37606539 bytes 26129 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 5617 borrowed: 8922 giants: 0
 tokens: -178485 ctokens: 24056

class htb 2:8 parent 2:1 leaf 9: prio 6 rate 512000bit ceil 1000Kbit burst 1600b cburst 1600b
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 390625 ctokens: 200000

class htb 2:9 parent 2:1 leaf a: prio 7 rate 1000Kbit ceil 1000Kbit burst 1600b cburst 1600b
 Sent 167807 bytes 1149 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 1149 borrowed: 0 giants: 0
 tokens: 189875 ctokens: 189875

Did something change upstream to make the rates unavailable? Do I need to set some config to enable collection? Running the command as root does not make a difference. Also not sure if this is a problem just with Ubuntu/Debian package or if the tc source is indicated, so forgive me if this is the wrong place to ask, and thanks for not discounting this immediately and blaming the other guy. My kernel is:

Linux srvr1 3.13.0-46-generic #75-Ubuntu SMP Tue Feb 10 15:24:04 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Thank you!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu iproute2 Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

I suggest you report a bug

Revision history for this message
Visual Echo (mr-crankypants) said :
#2

Thanks actionparsnip, that solved my question.