http://underpop.online.fr/n/nielshorn/2008/09/traffic-shaping-with-cbq/ Random thoughts, tips & tricks about Slackware-Linux, Lego and Star Wars Tue, 16 Apr 2013 23:35:17 -0300 http://wordpress.org/?v=2.8.4 hourly 1 http://underpop.online.fr/n/nielshorn/2008/09/traffic-shaping-with-cbq/comment-page-1/#comment-279 Niels Horn Mon, 12 Apr 2010 23:08:09 +0000 http://underpop.online.fr/n/nielshorn/blog/?p=6#comment-279 @Stanley: Thanks for the help! Which version of cbq are you using? Mine is 0.7.3 @Stanley: Thanks for the help! Which version of cbq are you using? Mine is 0.7.3

]]> http://underpop.online.fr/n/nielshorn/2008/09/traffic-shaping-with-cbq/comment-page-1/#comment-278 Stanley Mon, 12 Apr 2010 17:11:00 +0000 http://underpop.online.fr/n/nielshorn/blog/?p=6#comment-278 this warning is an error in cbq script. find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. open your /sbin/cbq ,and vi the file, modify it and looks like below: 577 ### Get a list of configured classes 578 CLASSLIST=`find $1 -maxdepth 1 \( -type f -or -type l\ ) -name 'cbq-*' \ 579 -not -name '*~' -printf "%f\n"| sort` 580 [ -z "$CLASSLIST" ] && 581 cbq_failure "no configuration files found in $1!" 582 583 ### Gather all DEVICE fields from $1/cbq-* 584 DEVFIELDS=`find $1 -maxdepth 1 \( -type f -or -type l \) -name 'cbq-*' \ 585 -not -name '*~'| xargs sed -n 's/#.*//; 586 s/[[:space:]]//g; /^DEVICE=[^,]*,[^,]*(,[^,]*)?/ \ 587 { s/.*=//; p; }'| sort -u` this warning is an error in cbq script.

find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

open your /sbin/cbq ,and vi the file, modify it and looks like below:

577 ### Get a list of configured classes
578 CLASSLIST=`find $1 -maxdepth 1 \( -type f -or -type l\ ) -name ‘cbq-*’ \
579 -not -name ‘*~’ -printf “%f\n”| sort`
580 [ -z "$CLASSLIST" ] &&
581 cbq_failure “no configuration files found in $1!”
582
583 ### Gather all DEVICE fields from $1/cbq-*
584 DEVFIELDS=`find $1 -maxdepth 1 \( -type f -or -type l \) -name ‘cbq-*’ \
585 -not -name ‘*~’| xargs sed -n ’s/#.*//;
586 s/[[:space:]]//g; /^DEVICE=[^,]*,[^,]*(,[^,]*)?/ \
587 { s/.*=//; p; }’| sort -u`

]]> http://underpop.online.fr/n/nielshorn/2008/09/traffic-shaping-with-cbq/comment-page-1/#comment-194 Niels Horn Mon, 08 Mar 2010 18:41:10 +0000 http://underpop.online.fr/n/nielshorn/blog/?p=6#comment-194 Hi, Thanks for your positive comment! I have not used Suse for several years, so I don't know if things are very different. Did you get the cbq script from the iproute documentation just like my example in the post? It might be a conflict between versions... Hi,

Thanks for your positive comment!
I have not used Suse for several years, so I don’t know if things are very different.
Did you get the cbq script from the iproute documentation just like my example in the post?
It might be a conflict between versions…

]]> http://underpop.online.fr/n/nielshorn/2008/09/traffic-shaping-with-cbq/comment-page-1/#comment-193 Dmitry Mon, 08 Mar 2010 15:59:24 +0000 http://underpop.online.fr/n/nielshorn/blog/?p=6#comment-193 Hi, very good and interesting article, thank you. I tried to do similar on SUSE 11.0, BUT I have neither of which did not work. Once enter the command cbq compile I get an error: "#:/etc/sysconfig/cbq # cbq compile find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. /usr/sbin/tc qdisc del dev eth1 root /usr/sbin/tc qdisc add dev eth1 root handle 1 cbq bandwidth 100Mbit avpkt 3000 cell 8 /usr/sbin/tc class change dev eth1 root cbq weight 10Mbit allot 1514 /usr/sbin/tc class add dev eth1 parent 1: classid 1:2 cbq bandwidth 100Mbit rate 5Kbit weight 1Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 3000 bounded /usr/sbin/tc qdisc add dev eth1 parent 1:2 handle 2 tbf rate 5Kbit buffer 10Kb/8 limit 15Kb mtu 1500 /usr/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 0.0.0.0 classid 1:2 " Hi,
very good and interesting article, thank you. I tried to do similar on SUSE 11.0, BUT I have neither of which did not work. Once enter the command cbq compile I get an error:

“#:/etc/sysconfig/cbq # cbq compile
find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

/usr/sbin/tc qdisc del dev eth1 root
/usr/sbin/tc qdisc add dev eth1 root handle 1 cbq bandwidth 100Mbit avpkt 3000 cell 8
/usr/sbin/tc class change dev eth1 root cbq weight 10Mbit allot 1514

/usr/sbin/tc class add dev eth1 parent 1: classid 1:2 cbq bandwidth 100Mbit rate 5Kbit weight 1Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 3000 bounded
/usr/sbin/tc qdisc add dev eth1 parent 1:2 handle 2 tbf rate 5Kbit buffer 10Kb/8 limit 15Kb mtu 1500
/usr/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 0.0.0.0 classid 1:2

]]>