cpulimit — Set the limit to CPU Usage of a process
This program will limit the CPU of a process by sending SIGSTOP and SIGCONT Signals.
$ watch --interval 0.1 cat /proc/interrupts -- Example target. $ cpulimit -p 105 -l 6 -- Limit the CPU usage of PID 105 to 6%. $ cpulimit -v -p 105 -l 6 -- Same as above and with detailed output. $ cpulimit -P /usr/bin/watch -l 6 -- same as above. But with complete path. $ cpulimit -e watch -l 6 -- Limit the CPU usage of the commandto 6%. If the command is not running, then the limit will applied after it get started. $ cpulimit -z -p 105 -l 6 -- If there is no suitable target, exit immediately.
Read: man cpulimit