Results 1 to 4 of 4
hi,
i have RHL9 running as root. another user is running a shell script that gets into infinite loop and consumes almost 100% of the CPU usage. So i want ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-10-2005 #1Just Joined!
- Join Date
- May 2005
- Posts
- 14
How to restrict CPU usage??
hi,
i have RHL9 running as root. another user is running a shell script that gets into infinite loop and consumes almost 100% of the CPU usage. So i want to restrict the user to run such program?? If such resctrictions cannot be placed, then can i restrict the CPU usage to say 30% or 40%?
Thanks
Jyoti
- 05-11-2005 #2Linux Engineer
- Join Date
- Aug 2004
- Posts
- 826
This sounds very much like a homework question, but I could be wrong. Just to be safe, I'm not going to directly answer the question, but instead point you in the right direction. Here are a couple places to start:
man nice
man limits.conf
/etc/security/limits.conf
If that doesn't help, Google those terms above and/or something of the like. Those references should be enough to answer your questions though. Hope this helps.
- 05-11-2005 #3Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
AFAIK you can't restrict based on CPU usage but you can limit the time a process can run for - ulimit(1) is the facility, part of the shell's environment. man bash for details.
- 05-11-2005 #4Linux Engineer
- Join Date
- Aug 2004
- Posts
- 826
Ah, I forgot about ulimit.
Originally Posted by scm


Reply With Quote
