Generate 100% CPU Load from Bash

The following command will generate 100% CPU load on the number of cores specified by 1 2 3 4. This is bash save and works also with older versions of bash.

for i in 1 2 3 4; do while : ; do : M done & done

A new C-style loop may be used in newer versions of bash:

for i in {1..4};  do while : ; do : ; done & done

Source: https://superuser.com/questions/443406/how-can-i-produce-high-cpu-load-on-a-linux-server