Created
June 7, 2012 06:27
-
-
Save EvilFaeton/2886922 to your computer and use it in GitHub Desktop.
Simulate heavy load CPU and IO on Linux
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
# CPU | |
for cpu in 1 2 ; do | |
( while true; do true; done ) & | |
done | |
# IO | |
for cpu in 1 2 ; do | |
( while true; do find / -type f -exec cp {} /dev/null \; ; done ) & | |
done | |
# use 1 2 3 4 for quad core, etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
do find ./ -type f ..
The ./ instead of / was what got the code to run for me. But thank you for this!