Skip to content

Instantly share code, notes, and snippets.

@sechiro
Created February 16, 2013 09:45
Show Gist options
  • Save sechiro/4966275 to your computer and use it in GitHub Desktop.
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.
# 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