LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-26-2008, 03:00 PM   #1
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 489

Rep: Reputation: 31
Question preventing a program from using 100% of CPU?


I have a script which I have start when the computer has been idle from 15 minutes. On the laptops it can run for bursts at 100% for a few minutes. This really heats up the laptop.

Is there a way to limit a single process from using the full 100% cpu?

(Besides introducing sleep commands in the program)
 
Old 03-26-2008, 03:03 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
man cpulimit
 
Old 03-26-2008, 03:04 PM   #3
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
http://cpulimit.sourceforge.net/
 
Old 03-26-2008, 03:15 PM   #4
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 489

Original Poster
Rep: Reputation: 31
Perfect!

Thanks.
 
Old 04-27-2009, 08:00 AM   #5
3ttt
LQ Newbie
 
Registered: May 2007
Posts: 18

Rep: Reputation: 0
I have intel core 2 duo, are there anybody have the idea and hints to modify the program for 200% cpu utilization?
 
Old 04-27-2009, 10:35 AM   #6
3ttt
LQ Newbie
 
Registered: May 2007
Posts: 18

Rep: Reputation: 0
Quote:
Originally Posted by 3ttt View Post
I have intel core 2 duo, are there anybody have the idea and hints to modify the program for 200% cpu utilization?
Now I got it, just only changed input of "limit" condition from 1 to 2.
 
Old 04-27-2009, 10:43 AM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
What's wrong with the sleep command ? I would think that would be the best solution in most cases.
 
  


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
100% cpu use 100% of the time serafean Linux - Newbie 4 05-04-2006 03:36 PM
X using nearly 100% CPU Jiawen Linux - Software 2 01-08-2006 06:35 PM
100 % Cpu Volcano Linux - Newbie 27 10-05-2005 10:58 PM
X Using 100% CPU windisch Linux - Software 2 09-29-2005 11:35 AM
cpu nearly always at 100% xround Linux - Hardware 6 09-17-2004 05:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:08 AM.

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
Open Source Consulting | Domain Registration