$ perl -e 'while(1) {}'
これも id:sh2 さんに教えていただきました。ありがとうございました。
yoheia: CPU、メモリの使用率の監視のテストのため、使用率を上げたいんだけど、スマートなやり方ないかな?誰か教えて。
posted at 12:45:28
Windows なら CPUGRAB.exe というのがあるらしいです。id:beakmark さんありがとうございます。
追記(2010/01/12):
実行例
# プロセス起動 $ for i in {1..4} do perl -e 'while(1){}' & done #プロセス終了 $ ps -ef|perl -lane '/perl -e while\(1\)\{\}/ and print $F[1]'|xargs kill