0

Is there way to limit cpu on an executeable whenever it is run?

i am trying to use cpulimit like :

cpulimit -e helm -l 50

but i'm getting this:

Warning: no target process found. Waiting for it...

All the examples i found online are not helping me as they are talking about either a running process or a command about to run. I on the otherhand want to limit cpu to an exe when it is run in the future.

Vinny
  • 1

1 Answers1

0

Call your cpulimited command from a bash script, and use that script in your scripting.

E.g., create $HOME/bin/whelm:

#!/bin/bash
cpulimit -l 20 helm

Be sure to chmod +x $HOME/bin/whelm.

waltinator
  • 37,856