linux get cpu usage of process code example
Example 1: linux check cpu usage
lscpu
# Or
cat /proc/cpuinfo
Example 2: how to set cpu usage to 100% linux
$ sudo cpulimit --pid 17918 --limit 50
Process 17918 detected
lscpu
# Or
cat /proc/cpuinfo
$ sudo cpulimit --pid 17918 --limit 50
Process 17918 detected