Skip to content

Instantly share code, notes, and snippets.

@alexras
Created April 21, 2013 05:44
Show Gist options
  • Select an option

  • Save alexras/5428621 to your computer and use it in GitHub Desktop.

Select an option

Save alexras/5428621 to your computer and use it in GitHub Desktop.
Turn Stochastic Fairness Queueing on or off for a given interface
#!/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