I am trying to use cpulimit for testing an app I'm developing under low resource conditions, and I need the process to start under the influence of cpulimit. It is not sufficient to start the program and later apply cpulimit. The example on the cpulimit page does not work for me.

The example is this:

cpulimit --limit 40 /etc/rc.d/rc.boinc start

And I'm doing this:

cpulimit --limit 40 a.out start

3 Answers 3


Right before posting this I decided to try an absolute path and it worked! I decided to post the answer for future Googlers and also to inform that the "start" at the end is not required. This makes it possible to pass arguments to the executable. This is what worked:

cpulimit --limit 40 /home/ben/build/a.out -c 5

This is unrelated to cpulimit. Running a.out directly on the command line wouldn't have worked either. When you execute a program without specifying any directory component, the program is looked up in the PATH. The current directory is normally not in the PATH, so you need to give an explicit directory indication.

cpulimit -l 40 -- ./a.out start

It's also generally a good practice to end the options with "--", so cpulimit, or whatever command, won't interpret wrong what comes after that, as an option, when it's part of a file name or an option to a different program.

  • Ah! Just like with GDB. Good insight Jul 31, 2013 at 4:09

You better use BOINC Manager for limiting boinc.

There is exist "Use at most % CPU Time".

Checkbox for "While computer is not in use".

There is memory limit usage.

Disk and Network usage.

And many more.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .