Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am converting (using ImageMagick) a directory of image files (using a bash for loop in shell).

I notice that "convert" is taking up a large amount of CPU use (88% and up). However, If I try to limit it using cpulimit

cpulimit -l 10 -e convert

it responds

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

even though it is visible in ps and top

share|improve this question

cpulimit looks for the process by looking at /proc/pppp/exe (where pppp is the pid), which is a link to the executable, for some processes this does not contain the name you are expecting

I had the same problem with firefox-bin, ps gives:

dave     4117  3595  4 04:49 ?        00:11:54 /usr/lib/iceweasel/firefox-bin


ls -l /proc/4117/exe 
lrwxrwxrwx 1 dave dave 0 Jan  9 13:50 /proc/4117/exe -> /usr/lib/xulrunner-10.0/xulrunner-stub

On my system, convert is /usr/bin/convert.im6 so:

cpulimit -l 10 -e convert.im6

works for me.

share|improve this answer
It finds the process, but then kills ImageMagick into Interruptable Sleep (ps -aux). – user104823 Jan 11 '13 at 1:37
That's how cpulimit works, to suspends the process intermittently. I would just just run convert with nice, it will still use a lot of cpu, but give way to higher priority processes. – parkydr Jan 11 '13 at 6:52

You must log in to answer this question.