Package: wondershaper Version: 1.1a-4 Severity: wishlist *** Please type your report below this line *** Hi,
I added some echos to wondershaper allowing to see it progressing through the setup of the linux TC tables. I also commented out the NOPRIO* lines in wshaper and wshaper.htb because they prevent the script from accepting a list of non prioritized hosts or ports. The appended patch also contains the neccessary changes to the documentation of wondershaper. Best regards, Onno Kortmann -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (990, 'testing'), (300, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.8-2-686 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages wondershaper depends on: ii iproute 20041019-3 Professional tools to control the -- no debconf information
diff -Nudr wondershaper-1.1a.orig/debian/README.Debian wondershaper-1.1a/debian/README.Debian --- wondershaper-1.1a.orig/debian/README.Debian 2005-05-07 18:45:52.554899708 +0200 +++ wondershaper-1.1a/debian/README.Debian 2005-05-07 19:01:31.586174918 +0200 @@ -9,8 +9,9 @@ STEP 4 Post-test STEP 5 Controling the wondershaper STEP 6 Permanent setup -STEP 7 Monitoring the wondershaper -STEP 8 Send email to [EMAIL PROTECTED] +STEP 7 Further configuration +STEP 8 Monitoring the wondershaper +STEP 9 Send email to [EMAIL PROTECTED] STEP 0 Read this entire document before continuing @@ -161,12 +162,26 @@ system, remember that you will need to delete the lines you added to the interfaces file, either manually or by using the backup file you made. -STEP 7 Monitoring the wondershaper +STEP 7 Further configuration + +There are several environment variables which make it possible to +fine-tune the wonder shaper. For example, you could run +wondershaper this way: + +$ NOPRIOPORTSRC=873 wondershaper <iface> <down> <up> + +This would help if you have a site that provides data via rsync +but you do not want to slow down your other traffic by this. +There is also the variable NOPRIOPORTDST for destination ports and +the variables NOPRIOHOSTSRC/-DST for certain hosts you want to +"downgrade". + +STEP 8 Monitoring the wondershaper Assuming your ISP is connected to eth0, you can examine your traffic shaping stats by running "wondershaper eth0" as root. -STEP 8 Send email to [EMAIL PROTECTED] +STEP 9 Send email to [EMAIL PROTECTED] The last step is optional. Please send an email to [EMAIL PROTECTED], including your before and diff -Nudr wondershaper-1.1a.orig/wshaper wondershaper-1.1a/wshaper --- wondershaper-1.1a.orig/wshaper 2005-05-07 18:45:52.553899899 +0200 +++ wondershaper-1.1a/wshaper 2005-05-07 18:47:35.245372336 +0200 @@ -11,6 +11,7 @@ fi if [ $# == 1 ]; then + echo "Status of traffic shaping:" tc -s qdisc ls dev $1 tc -s class ls dev $1 exit @@ -29,6 +30,8 @@ exit fi +echo "Installing wondershaper..." + # please read the README before filling out these values # # Set the following values to somewhat less than your actual download @@ -39,16 +42,16 @@ # low priority OUTGOING traffic - you can leave this blank if you want # low priority source netmasks -NOPRIOHOSTSRC= +#NOPRIOHOSTSRC= # low priority destination netmasks -NOPRIOHOSTDST= +#NOPRIOHOSTDST= # low priority source ports -NOPRIOPORTSRC= +#NOPRIOPORTSRC= # low priority destination ports -NOPRIOPORTDST= +#NOPRIOPORTDST= # Now remove the following two lines :-) @@ -138,24 +141,28 @@ # some traffic however suffers a worse fate for a in $NOPRIOPORTDST do + echo Setting :$a as a non-prioritized destination port. tc filter add dev $DEV parent 1: protocol ip prio 14 u32 \ match ip dport $a 0xffff flowid 1:30 done for a in $NOPRIOPORTSRC do + echo Setting :$a as a non-prioritized source port. tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \ match ip sport $a 0xffff flowid 1:30 done for a in $NOPRIOHOSTSRC do + echo Setting $a as a non-prioritized source host. tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \ match ip src $a flowid 1:30 done for a in $NOPRIOHOSTDST do + echo Setting $a as a non-prioritized destination host. tc filter add dev $DEV parent 1: protocol ip prio 17 u32 \ match ip dst $a flowid 1:30 done diff -Nudr wondershaper-1.1a.orig/wshaper.htb wondershaper-1.1a/wshaper.htb --- wondershaper-1.1a.orig/wshaper.htb 2002-04-16 16:26:51.000000000 +0200 +++ wondershaper-1.1a/wshaper.htb 2005-05-07 18:48:03.311034638 +0200 @@ -11,16 +11,17 @@ # low priority OUTGOING traffic - you can leave this blank if you want # low priority source netmasks -NOPRIOHOSTSRC= + echo "Status of traffic shaping:" +#NOPRIOHOSTSRC= # low priority destination netmasks -NOPRIOHOSTDST= +#NOPRIOHOSTDST= # low priority source ports -NOPRIOPORTSRC= +#NOPRIOPORTSRC= # low priority destination ports -NOPRIOPORTDST= +#NOPRIOPORTDST= # Now remove the following two lines :-) @@ -29,6 +30,8 @@ exit if [ "$1" = "status" ] +echo "Installing wondershaper..." + then tc -s qdisc ls dev $DEV tc -s class ls dev $DEV @@ -138,10 +141,14 @@ tc qdisc add dev $DEV handle ffff: ingress + echo Setting :$a as a non-prioritized destination port. # filter *everything* to it (0.0.0.0/0), drop everything that's # coming in too fast: tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1 + echo Setting :$a as a non-prioritized source port. + echo Setting $a as a non-prioritized source host. + echo Setting $a as a non-prioritized destination host.