Permalink
Browse files

fix rate unit problem: kbps -> kbit

  • Loading branch information...
1 parent 6b718bd commit 8e21bc33b4d210de2f7627583806ce2b7f975b39 Jingjing Duan committed Jul 13, 2012
Showing with 7 additions and 7 deletions.
  1. +4 −4 README.md
  2. +3 −3 bin/set_ts_lo.sh
View
@@ -107,12 +107,12 @@ Action
==================
__e[http error code]__ - Replace the playlist's matching segment url with a url that returns a 404 status code upon invocation ( ex. e404 )
-__net[bandwidth in kbps]loss[% of packets dropped]__ - The net rule action, when applied to a segment, causes the segment to be stream served at
- [bandwidth in kbps] with [% of packets dropped] ( ex. net200loss10 - serve the matched segment at 200kbps
+__net[bandwidth in kbit]loss[% of packets dropped]__ - The net rule action, when applied to a segment, causes the segment to be stream served at
+ [bandwidth in kbit] with [% of packets dropped] ( ex. net200loss10 - serve the matched segment at 200kbit
max with 10% packet loss during transmission)
-__netcache[bandwidth in kbps]loss[% of packets dropped]__ - The netcache rule action, when applied to a segment, causes the segment to be locally cached and then served at
- [bandwidth in kbps] with [% of packets dropped] ( ex. netcache200loss10 - serve the matched segment at 200kbps
+__netcache[bandwidth in kbit]loss[% of packets dropped]__ - The netcache rule action, when applied to a segment, causes the segment to be locally cached and then served at
+ [bandwidth in kbit] with [% of packets dropped] ( ex. netcache200loss10 - serve the matched segment at 200kbit
max with 10% packet loss during transmission)
View
@@ -2,7 +2,7 @@
if [ $# -ne 3 ]
then
- echo "Usage: `basename $0` port <speed-limit-in-kbps] [packet-loss]"
+ echo "Usage: `basename $0` port <speed-limit-in-kbit] [packet-loss]"
exit $E_BADARGS
fi
@@ -11,7 +11,7 @@ netem_loss_handle="$12"
# Add main classes
/sbin/tc qdisc add dev lo root handle 1: htb
-/sbin/tc class add dev lo parent 1: classid 1:1 htb rate 1000000kbps
+/sbin/tc class add dev lo parent 1: classid 1:1 htb rate 1000000kbit
echo "------- Remove any previous rule"
@@ -23,7 +23,7 @@ echo "------- Remove any previous rule"
echo "------- Adding rule"
# Add the new rule
-/sbin/tc class add dev lo parent 1:1 classid 1:$hexport htb rate $2kbps ceil $2kbps prio $1
+/sbin/tc class add dev lo parent 1:1 classid 1:$hexport htb rate $2kbit ceil $2kbit prio $1
/sbin/tc filter add dev lo parent 1:0 prio $1 protocol ip handle $1 fw flowid 1:$hexport
/sbin/tc qdisc add dev lo parent 1:$hexport handle $netem_loss_handle: netem loss $3%
/sbin/iptables -A OUTPUT -t mangle -p tcp --sport $1 -j MARK --set-mark $1

0 comments on commit 8e21bc3

Please sign in to comment.