stress command to increase cpu usage in linux code example
Example 1: how to set cpu usage to 100% linux
$ sudo cpulimit --pid 17918 --limit 50
Process 17918 detected
Example 2: how to max cpu usage in linux
cat /proc/cpuinfo
$ sudo cpulimit --pid 17918 --limit 50
Process 17918 detected
cat /proc/cpuinfo