Skip to content

Instantly share code, notes, and snippets.

@rpromyshlennikov
Last active April 25, 2017 09:45
Show Gist options
  • Save rpromyshlennikov/dfaa697bdec8ac623a1afcb50d50c698 to your computer and use it in GitHub Desktop.
Save rpromyshlennikov/dfaa697bdec8ac623a1afcb50d50c698 to your computer and use it in GitHub Desktop.
Make high load of system with provided quantity of processes
#!/usr/bin/env bash
count="${1}"
if [[ -z "${1}" ]]; then
count=20
fi
for ((process=1; process<="${count}"; process++)); do
(bash -c "while [ 1 ] ; do echo $((13**99)) 1>/dev/null 2>&1; done" &);
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment