• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

Setting a cap on CPU usage (in percent) for a specified process.

I was wondering if anyone knew of a way to set a limit on the CPU usage for a specified process.  I would be doing this in an NT DOS shell.

Does anyone know of a utility I could use?  I'm thinking of something like 'setcpulimit.exe <pid> <limit>' but I'm probably dreaming here.

Any advice would be appreciatied.

Thanks.
0
piragis
Asked:
piragis
  • 2
1 Solution
 
JohnBPriceCommented:
If you are trying to prevent an app from running roughshod over your machine, in general you don't cap the CPU usage, but reduce the priority of your task so it doesn't eclipse other apps.  You can set priority with Task Manager, via the API with SetPriorityClass, by using "Start" from teh windows resource kit, with psExec from sysinternals.com or with a utility you find in google.

If you are simply trying to slow down your machine for testing purposes, you can try CPUKiller from CPUKiller.com, but it affects every app, not just one.
0
 
JohnBPriceCommented:
Here's a priority utility I found on google. http://gilchrist.ca/jeff/SetPriority/index.html
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now