This is now an actual repo:
This file contains 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 | |
# | |
# Get "allocated" memory for a process (not including shmem!) | |
pmap $1 | egrep ' anon|stack ' | awk '{s += $2} END {printf "%1.1fM\n", s / 1024.}' |
This file contains 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/sh | |
# | |
# Use ipfw to throttle bandwidth. | |
# usage: | |
# ./throttle.sh # Throttle at default (60KB/s) | |
# ./throttle.sh 5 # Throttle at custom speed (5KB/s) | |
# ./throttle.sh off # Turn throttling off | |
# flush rules | |
ipfw del pipe 1 |