Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save technovangelist/e60825c77fcbb082ae491a9723fd58b6 to your computer and use it in GitHub Desktop.
Save technovangelist/e60825c77fcbb082ae491a9723fd58b6 to your computer and use it in GitHub Desktop.
use the stress command to stress the cpu, io, disk, and memory a random amount every x seconds where x is a random number up to 20.
while sleep `shuf -i 0-10 -n 1`; do sudo stress -c `shuf -i 1-4 -n 1` -m `shuf -i 1-2 -n 1` -d `shuf -i 1-5 -n 1` -i `shuf -i 0-4 -n 1` -t `shuf -i 0-20 -n 1`s; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment