[ACCEPTED]-How to know the CPU and memory usage of a process with WMI?-wmi

Accepted answer
Score: 11

I'm pretty sure you want the WMI perf classes Win32_PerfFormattedData_PerfProc_Process or Win32_PerfRawData_PerfProc_Process

E.g. their 4 properties PercentProcessorTime and WorkingSet

Note that the Perf classes 3 take a bit effort to understand.

But those 2 WMI classes should give you all the info 1 you're looking for.

Score: 1

Win32_Process also has UserModeTime and 2 KernelModeTime which can be used to calculate 1 CPU usage

Also look at http://technet.microsoft.com/en-us/library/ee176718.aspx

More Related questions