LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is there a way to limit a process's CPU usage... (https://www.linuxquestions.org/questions/linux-newbie-8/is-there-a-way-to-limit-a-processs-cpu-usage-817433/)

trist007 07-01-2010 11:04 AM

Is there a way to limit a process's CPU usage...
 
I have a process that takes 100% Cpu usage. My computer seems to start overheating after running that process for more than a few days. Is there a way to limit the process to only say 50% of cpu usage?

The nice option will not work since I have no other processes that take much cpu usage running at the time.

Neither will ulimit work because it doesn't mention cpu usage %.

trist007 07-01-2010 11:23 AM

Found cpulimit.

Dogs 07-01-2010 11:24 AM

Check this thread, seems to describe what you're trying to do..

Offers a script and a daemon to run that will allow you to limit either all processes to a certain maximum, or any individual process to any individual limit.

http://ubuntuforums.org/showthread.php?t=992706

b0n40 08-06-2010 08:18 AM

Quote:

Originally Posted by Dogs (Post 4020719)
Check this thread, seems to describe what you're trying to do..

Offers a script and a daemon to run that will allow you to limit either all processes to a certain maximum, or any individual process to any individual limit.

http://ubuntuforums.org/showthread.php?t=992706

I tried cpulimit for httpd but in max 30min im getting:
cpulimit[6262]: segfault at 20 ip 08048ff0 sp bf8df3c0 error 4 in cpulimit[8048000+4000]

i tried to use the scripts from this post but as far as i remember, i had this error for missing lsb/init-functions, in google i found out slackware doesnt support lsb/init-functions

if im wrong please help me to fix this :)


All times are GMT -5. The time now is 12:51 PM.