Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cpulimit not working correctly

I'm using Debian Wheezy and cpulimit 1.7 I want to limit the cpu usage time of a process using cpulimit.

When I execute for example cpulimit -p 1000 -l 40, the message Process 1000 detected shows up. After that, nothing happens and I have to press Strg+C to stop it.

Anybody also encountered this problem or has a solution to that hang-up?

like image 879
Nikno Avatar asked Jan 19 '14 19:01

Nikno


1 Answers

That's what it always looks like when you start cpulimit.

cpulimit works by continuously sending SIGSTOP and SIGCONT to the target process to limit it's cpu time. So the program in this case doesn't hang, it's doing it's job.

You can use the -b flag to start cpulimit in background mode if you don't want it to block the terminal.

like image 189
mata Avatar answered Nov 20 '22 14:11

mata