[collectd] netlink with hfsc

Markus Kübler markus_kubler at yahoo.com
Sat Feb 19 21:08:56 CET 2011


Hallo,

I am using a traffic shaping/prioritizing solution with tc and hfsc.
Using the possibilities of tc, I get following _output_:

# tc -s -d qdisc show

qdisc hfsc 1: dev pppoe-dsl root refcnt 2
 Sent 4694390 bytes 70972 pkt (dropped 973, overlimits 10914 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0


# tc -s -d class show dev pppoe-dsl

class hfsc 1: root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 0 level 3

class hfsc 1:1 parent 1: sc m1 0bit d 0us m2 720000bit ul m1 0bit d 0us
m2 720000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 69277 work 4701457 bytes level 2

class hfsc 1:10 parent 1:1 ls m1 0bit d 0us m2 180000bit ul m1 0bit d
0us m2 720000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 69241 work 4699273 bytes level 1

class hfsc 1:101 parent 1:10 rt m1 180000bit d 100.0ms m2 72000bit ls m1
180000bit d 50.0ms m2 126000bit ul m1 0bit d 0us m2 720000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 0 level 0

class hfsc 1:102 parent 1:10 sc m1 0bit d 100.0ms m2 72000bit ul m1 0bit
d 0us m2 720000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 0 level 0

class hfsc 1:103 parent 1:10 sc m1 0bit d 2.0s m2 36000bit ul m1 0bit d
0us m2 720000bit
 Sent 4699273 bytes 71019 pkt (dropped 977, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 period 69241 work 4699273 bytes rtwork 2544656 bytes level 0


The three values I am mainly interested in are bytes, packets and
dropped. Because I would like to ultimately obtain a pie chart, with, in
this case 6 circular sectors. 101 transmitted, 101 dropped, ... at least
for the packets, this is possible, right?

I hope I understand tc right, that the classes drop the packages,
because classes actually cannot contain packages or filter or anything.
Their only purpose it, I think, to let you configure the distribution of
bandwidth or do the prioritization. However the statistics show droped
packets, so let's hope these are the ones that are over the limit.

# ip -s link list

73: pppoe-dsl: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc
hfsc state UNKNOWN qlen 3
    link/ppp
    RX: bytes  packets  errors  dropped overrun mcast
    135520036  131984   0       0       0       0
    TX: bytes  packets  errors  dropped carrier collsns
    4708136    71141    0       0       0       0


1. Where do tc/ip get their data from? Is it proc or sys? I do not find
anything.
2. How does collectd-mod-netlink get this data?

regards,
markus



More information about the collectd mailing list