[python-win32] Get CPU usage of single process in Windows

Tim Roberts timr at probo.com
Fri Sep 8 19:53:54 CEST 2006


Tor Erik Sønvisen wrote:

>Hi,
>
>This should be possible as Taskmanager tracks CPU usage for every 
>process... Anyone know how it can be done?
>  
>

TaskManager and perfmon get this information from the Win32 performance
counters.  Unfortunately, the performance counter API is a bit verbose. 
Python-Win32 does include a wrapper library, win32pdh, but I admit I've
never used it.

Still, that should give you enough Google search terms to find the
information...

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-win32 mailing list