I am trying to limit the percentage of the cpu usage by a process, ruing on a specific pid. To get the pid I use:
pid=
sudo netstat -tulpen | grep 25660 | awk '{print $9}' | grep -Eo "[0-9]{1,8}"
To limit the CPU:
cpulimit --pid=$pid --background --limit=30
The limit takes action after the process is completely ruing. If I look into the screen and the cpulimit takes action it says: Child has been stopped, restarting.
After that, the process is extremely slow, definitely not the 30% of my in total 1600%.
