Mac: If your Mac is having intermittent problems when it’s under a heavy load, you can perform a simple stress test in the terminal to try and reproduce the problem.
All you need to do is run the “yes” command, which will push the CPU until its limit:
yes > /dev/null &
If you have a CPU with multiple cores (which most modern Macs do), you’ll have to run it as many times as you have cores. For example, if your CPU has four cores, you’d run:
yes > /dev/null & yes > /dev/null & yes > /dev/null & yes > /dev/null &
The fans will often kick in so you can see how loud they are, and see if indeed your Mac is crashing under a heavy load. Putting this much of a load will also help discharge the battery. Just remember to kill the process when done or you’ll wonder why your Mac is running so slowly.
Stress Test a Mac by Maxing Out CPU [OS X Daily]
Comments
One response to “Stress Test Your Mac With The ‘Yes’ Command”
Remember a core i7 has 4 cores, but each core is multithreaded, so you have to run EIGHT yes processes to use 100% cpu. To kill all yeses at once you can use the following command:
Also if you want to stress test you CPU for the purposes of seeing how hot it can get this probably won’t do it for you. Proper stress test programs stress different parts of the CPU such as the FPU