Developer404
Developer404

Reputation: 5972

Select query of wmi used to view the process which has max usage of cpu

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

Upvotes: 3

Views: 711

Answers (1)

raz3r
raz3r

Reputation: 3131

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.

Upvotes: 2

Related Questions