[python-win32] Reading Task Manager-Performance tab values

Tim Golden mail at timgolden.me.uk
Tue Jan 13 10:56:23 CET 2009


Tony Cappellini wrote:
> Is there an API for reading the values on the Performance Tab in Task
> Manager on XP?


Without being 100% sure, I would imagine that WMI could pull them
out for you. However, there isn't -- afaik -- a "Task Manager API"
where you could be guaranteed of getting the selfsame figures which
are showing in the Performance tab: you'd simply have to work out
what those numbers / graphs represent and find the equivalent WMI
classes.

The functions in the win32pdh module are, I think, what the WMI
Win32_Perf... classes use under the covers, so you could go that
way if you wanted to.

This chaps' been blogging on what seems to be a related
subject recently; maybe that helps:

http://coreygoldberg.blogspot.com/2008/12/python-windows-remote-metrics-script.html

TJG


More information about the python-win32 mailing list