How to generate max CPU Load (stress test your CPU)

It’s a bit of a random thing you’d think, but recently I had an issue where one of my servers would keep dieing when under abnormal load… So I thought, how can i replicate this in a lab environment… So I wrote a tiny bash script (that you can just paste into a terminal) that will max out each “thread” of the CPU until you kill the processes or reboot… Useful for stress-testing or burning in a CPU…

…