有 Ubuntu 14.04.1 LTS。tc filter show 命令的输出中没有规则命中统计信息:
tc -s -d 过滤器显示 dev eth0
filter parent 1: protocol all pref 1 u32
filter parent 1: protocol all pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol all pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:11
match 0afc0200/ffffff00 at 16
filter parent 1: protocol all pref 1 u32 fh 800::801 order 2049 key ht 800 bkt 0 flowid 1:11
match 0afcc900/ffffff00 at 16
filter parent 1: protocol all pref 2 u32
filter parent 1: protocol all pref 2 u32 fh 801: ht divisor 1
filter parent 1: protocol all pref 2 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:12
match 00000000/00000000 at 16
filter parent 1: protocol all pref 2 u32 fh 801::801 order 2049 key ht 801 bkt 0 flowid 1:12
Debian 上的相同命令输出:
filter parent 1: protocol all pref 1 u32
filter parent 1: protocol all pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol all pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:11 (rule hit 62382829 success 24954907)
match 0afc0200/ffffff00 at 16 (success 24954907 )
filter parent 1: protocol all pref 1 u32 fh 800::801 order 2049 key ht 800 bkt 0 flowid 1:11 (rule hit 37427922 success 2200029)
match 0afcc900/ffffff00 at 16 (success 2200029 )
filter parent 1: protocol all pref 2 u32
filter parent 1: protocol all pref 2 u32 fh 801: ht divisor 1
filter parent 1: protocol all pref 2 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:12 (rule hit 35227893 success 35227893)
match 00000000/00000000 at 16 (success 35227893 )
filter parent 1: protocol all pref 2 u32 fh 801::801 order 2049 key ht 801 bkt 0 flowid 1:12 (rule hit 0 success 0)
我如何才能启用此类统计数据?
答案1
echo 1 > /sys/module/sch_htb/parameters/htb_rate_est