1234567891011121314151617181920 |
- #!/bin/bash
- # cd into the directory containing this script (from the bash faq 028)
- if [[ $BASH_SOURCE = */* ]]; then
- cd -- "${BASH_SOURCE%/*}/" || exit
- fi
- latency=30ms
- bw=100mbit
- if [ "$1" != "" ]; then
- latency="$1"
- fi
- if [ "$2" != "" ]; then
- bw="$2"
- fi
- ./unset-networking
- docker exec --privileged ramen_p0 tc qdisc add dev eth0 root netem delay $latency rate $bw
- docker exec --privileged ramen_p1 tc qdisc add dev eth0 root netem delay $latency rate $bw
- docker exec --privileged ramen_p2 tc qdisc add dev eth0 root netem delay $latency rate $bw
|