For WMI, the following query is used for availability polling:
select Caption, CommandLine, ProcessId, ExecutablePath from Win32_Process
The process performance statistics are exposed in the table Win32_PerfRawData_PerfProc_Process for WMI. The following additional query will be run on this table for determining process performance statistics.
select IDProcess, PercentProcessorTime, Timestamp_Sys100NS,WorkingSet from Win32_PerfRawData_PerfProc_Process
If IsProcessorGroupUtilizationHigh is TRUE, the following attributes are queried:
-
IDProcess — Unique identifier of this process. (uint32)
-
PercentProcessorTime — Returns elapsed time that all of the threads of this process used the processor to execute instructions in 100 nanoseconds ticks. An instruction is the basic unit of execution in a computer, a thread is the object that executes instructions, and a process is the object created when a program is run. Code executed to handle some hardware interrupts and trap conditions is included in this count. (uint64)
-
Timestamp_Sys100NS — Timestamp value in 100 nanosecond units. (uint64)
If IsMemoryGroupUtilizationHigh is TRUE, the following attributes are queried:
-
IDProcess - Unique identifier of this process. (uint32).
-
WorkingSet — Maximum number of bytes in the working set of this process at any point in time. The working set is the set of memory pages touched recently by the threads in the process. If free memory in the computer is above a threshold, pages are left in the working set of a process even if they are not in use. When free memory falls below a threshold, pages are trimmed from working sets. If they are needed, they are then soft-faulted back into the working set before they leave the main memory. (uint64).