LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-01-2010, 12:04 PM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Rep: Reputation: 69
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 %.

Last edited by trist007; 07-01-2010 at 12:13 PM.
 
Old 07-01-2010, 12:23 PM   #2
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Original Poster
Rep: Reputation: 69
Found cpulimit.
 
Old 07-01-2010, 12:24 PM   #3
Dogs
Member
 
Registered: Aug 2009
Location: Houston
Distribution: Slackware 13.37 x64
Posts: 105

Rep: Reputation: 25
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
 
0 members found this post helpful.
Old 08-06-2010, 09:18 AM   #4
b0n40
LQ Newbie
 
Registered: Jan 2008
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by Dogs View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A way to limit CPU usage for some process? WhisperiN Linux - General 6 09-24-2009 08:17 AM
how to limit the users CPU usage ? maginotjr Linux - Server 3 02-04-2008 09:00 PM
Limit CPU usage slantoflight Linux - General 5 02-23-2006 04:37 AM
limit cpu usage by mysql eduac Linux - Software 3 06-08-2004 06:08 PM
How can I limit the CPU usage of a PID? ideasman Linux - Software 1 04-01-2004 08:15 AM


All times are GMT -5. The time now is 05:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration