1

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).

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
Hugh Allen
  • 6,509
  • 1
  • 34
  • 44
  • out of curiosity, why are you needing such a beast? Win95, 98, ME, NT4, and 2k are all past EOL. – warren Nov 26 '08 at 17:43
  • I started writing a taskmanager-like program, and it seems incomplete while some features don't work on win9x. – Hugh Allen Nov 29 '08 at 06:25

2 Answers2

1

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
  • 33,181
  • 16
  • 123
  • 191
  • 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 Oct 03 '08 at 14:03
1

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

jeffm
  • 3,120
  • 1
  • 34
  • 57
  • If you read that article you linked to, it's about displaying total CPU usage, not per-process unfortunately. – Hugh Allen Oct 08 '08 at 23:44