Skip to content

Instantly share code, notes, and snippets.

@quirkey quirkey/throttle
Created Oct 2, 2013

Embed
What would you like to do?
#!/bin/bash
# Bandwidth throttling for OSX,
# http://www.macosxhints.com/article.php?story=20080119112509736
case "$1" in
'start')
KB=$2
echo Throttling at $KB Kbytes/s
sudo ipfw pipe 1 config bw "$KB"KByte/s
sudo ipfw add 1 pipe 1 src-port 80
;;
'stop')
sudo ipfw delete 1
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.