Re: Get CPU usage of a single process in Windows

2006-09-12 Thread Gerrit Muller
Tim Golden wrote: ...snip... This should be possible as Taskmanager tracks CPU usage for every process... Anyone know how this can be done? WMI can probably do the trick. If you can find something on Google for wmi cpu usage (or something similar) then translation to Python's usually quite

RE: Get CPU usage of a single process in Windows

2006-09-12 Thread Tim Golden
[Gerrit Muller] | | Tim Golden wrote: | WMI can probably do the trick. I'm fairly sure I've got an example | somewhere, but I can't lay my hands on it at the mo. | If you have a working example of CPU usage could you post the | result? I | would be interested. I haven't time to revisit it

RE: Get CPU usage of a single process in Windows

2006-09-12 Thread Tim Golden
[Gerrit Muller] | If you have a working example of CPU usage could you post the | result? I would be interested. OK. Here's a workingish example, cut down from the link I posted earlier. This one was designed to work with Win2K which I was using at the time. For WinXP and later, there's a new

Re: Get CPU usage of a single process in Windows

2006-09-12 Thread Gerrit Muller
[Tim Golden] nice answer snipped now I only have to find some time to play around... thanks, Gerrit -- Gaudi systems architecting: http://www.gaudisite.nl/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Get CPU usage of a single process in Windows

2006-09-09 Thread Tim Roberts
Tor Erik [EMAIL PROTECTED] wrote: This should be possible as Taskmanager tracks CPU usage for every process... Anyone know how this can be done? I answered this in the python-win32 mailing list. Task manager and perfmon do this by using the performance counter APIs. Python-Win32 includes an

Re: Get CPU usage of a single process in Windows

2006-09-08 Thread Tim Golden
Tor Erik wrote: Hi, This should be possible as Taskmanager tracks CPU usage for every process... Anyone know how this can be done? WMI can probably do the trick. If you can find something on Google for wmi cpu usage (or something similar) then translation to Python's usually quite easy. I'm