Created
April 21, 2013 05:44
-
-
Save alexras/5428621 to your computer and use it in GitHub Desktop.
Turn Stochastic Fairness Queueing on or off for a given interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ $# -ne 2 ] | |
| then | |
| echo "Usage: sfq.sh <enable|disable> <device>" | |
| exit 1 | |
| fi | |
| COMMAND=$1 | |
| DEVICE=$2 | |
| if [ "$COMMAND" = "enable" ] | |
| then | |
| tc qdisc add dev ${DEVICE} root sfq perturb 10 | |
| elif [ "$COMMAND" = "disable" ] | |
| then | |
| tc qdisc del dev ${DEVICE} root | |
| else | |
| echo "Unknown command" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment