views:

638

answers:

2

How can you programmatically measure per-process (or better, per-thread) CPU usage under windows 95, windows 98 and windows ME?

If it requires the DDK, where can you obtain that?

Please note the Win9x requirement. It's easy on NT.

EDIT: I tried installing the Win95/98 version of WMI, but Win32_Process.KernelModeTime and Win32_Process.UserModeTime return Null (as do most Win32_Process properties under win9x).

+1  A: 

It seems Performance Data Helper should be possible to install on Win9x architecture. Using this you should be able to get the times spent. Link which hopefully will help you or at least give you some starting point:

[python-win32] Monitoring CPU Usage

Suma
Thanks but if you read that post you linked to, it says "pdh.dll is not available for Windows 98", and anyway performance counters give you total CPU not per-process on win9x.
Hugh Allen
+1  A: 

Take a look at Writing a performance monitor and if you need it the Win98 DDK is available here.

jeffm
If you read that article you linked to, it's about displaying total CPU usage, not per-process unfortunately.
Hugh Allen