Question

What is the query used to view the topmost process which is having maximum usage of CPU using WMI?

Was it helpful?

Solution

Use Win32_PerfFormattedData_PerfProc_Process class.

Select IDProcess, Name, PercentProcessorTime from Win32_PerfFormattedData_PerfProc_Process

Once you have those informations you can sort by PercentProcessorTime. It should work fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top