Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have one program running in the background (so I can use a remote controller with my PC) but every now and then the program crashes and begins using 100% CPU (I have quad-core, so it's 25% CPU usage). When that happens, the program needs to be killed and restarted.

Is there a program for Windows, which can be used to detect automatically that a specific application hogs all the CPU, and would then automatically kill and restart that application?

share|improve this question
    
Don't you want it to only kill it when it's stuck? –  Ivo Flipse Aug 1 '09 at 14:30
    
When it uses 100% CPU, it is stuck. But since the application stays in the system tray, I usually will not notice it until I try to watch a movie and use my remote controller - the controller will do nothing. The other way that I notice it is when I shut down the computer - Windows will report that the program is unresponsive and asks to kill it. Since I have a quad core processor, it does not slow down the computer at all, because the other 3 CPU cores are unaffected, so it will go unnoticed for a long time. –  Esko Luontola Aug 1 '09 at 16:37
add comment

3 Answers

If 100% CPU load means that it's stuck/unresponsive than the guys from Technospot have a solution for you. Note: it doesn't restart it directly :-(

Steps to set auto kill not responding programs:

  • Backup your registry first.
  • Go to Run and enter “Regedit“.
  • Browse to HKEY_CURRENT_USER\Control Panel\Desktop
  • Here you will find a string called as “Auto End Task“, set its value to “1” by double clicking it. This means any hung program will be killed instantaneously.
  • Now suppose if you want to give some time, as some programs come back to normal in few minutes, Find a key called as “WaitToKillAppTimeout“, change the value to the value you want. You have to enter value in milliseconds though.

See the image for a clear view of what you are going to do

enter image description here

Technize has two other inventive ways to kill apps (no restart though)

Kill

Kill is a little app written with AutoHotkeys which does the work as its name suggests. It can kill any process or application with only one click. If the application stops responding, just double click the Kill app and then click on the window that you want to terminate.

xKill

xKill is a similar app to Kill but it’s more advanced in the sense that it can run in the system tray and has a shortcut to activate kill mode. So if an application is not responding, just press Ctrl – Alt – BackSpace. This will activate the kill mode and clicking on any window will terminate that process. To deactivate the kill mode without killing any app, just press Esc.

share|improve this answer
1  
The danger here is that some software will use 100% CPU if it's doing certain tasks, but Windows may report it as not responding. In these cases, it's not hung, but just busy. So I'd proceed with caution. –  Ben Richards Aug 11 '11 at 19:17
    
does xKill work on fullscreen apps? I sometimes have a problem with games freezing and not being able to kill them –  Nate Koppenhaver May 8 '12 at 23:24
add comment

Check out Process Tamer.

share|improve this answer
    
It looks like this only changes the priority, it doesn't seem to restart the process. –  chills42 Aug 1 '09 at 13:36
    
Why would you want a restart if it doesn't hang? Seems perfectly fine –  Ivo Flipse Aug 1 '09 at 14:35
    
@chills42: It can also kill a process hogging the CPU, instead of just adjusting its priority. –  arathorn Aug 1 '09 at 15:28
add comment

If the program genuinely enters the "not responding" state in Windows terms, ie. stops responding to Windows messages, then you could try PTFB Pro. It has an option to detect when a program stops responding, kill it, and restart it automatically.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.