Find out if a process takes 100% CPU?

delphi package - easy access to kernel objects etc.
Post Reply
mimar
Posts: 13
Joined: Sat Jul 16, 2005 2:57 pm

Find out if a process takes 100% CPU?

Post by mimar »

Hi

Is there a way I can use madKernel to find out if there are processes which are stuck/hung? Easiest way to do this would be to find out if there is anything that is taking 100% CPU, I think, which is what I want to do?

Sinan
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

In the NT family you can use IProcess.GetTimes to calculate the CPU usage of a specific process. This doesn't work in win9x, though.

I don't think it's a good idea to judge on CPU usage only, though. I mean there may be legit applications consuming 100% CPU for longer periods. E.g. a renderer, or a some kind of batch process, or a long print job, or movie playing.
Post Reply