- for i in $(seq `grep -c ^proc /proc/cpuinfo`); do (yes > /dev/null &); done
- killall yes
- for i in $(seq `sysctl -n hw.ncpu`); do (yes > /dev/null &); done
- killall yes
參考文獻:
- CPU壓力測試
- Loop background job
- How to obtain the number of CPUs/cores in Linux from the command line?
- How to discover number of *logical* cores on Mac OS X?
沒有留言:
張貼留言