Created
February 16, 2013 09:45
-
-
Save sechiro/4966275 to your computer and use it in GitHub Desktop.
Sample of xargs -P option.
This one-liner can make all CPU cores 100% used state.
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コア数が16の場合 | |
# 50%にしたい場合はコア数の半分で。HTがある場合はHTのスレッド数 | |
CORE=16; seq 1 $CORE | xargs -P $CORE -n1 yes >/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment