2

For Monitoring windows 2012/2008 performance,

I need to capture CPU utilization along with top 3 process names consuming CPU at the most, on Windows 2012/2008 Servers over command line.

I've tried the following, but none of them matches as with the TaskManger output.

Get-Counter -Counter "\Processor Information(_Total)\% Processor Time"
Get-WmiObject -class Win32_PerfRawData_PerfOS_Processor
typeperf "\Processor(_Total)\% Processor Time"

Is there any way to Capture CPU utilization which will match the TaskManager output...?

1 Answer 1

1

Here is the Powershell Code get get the processor utilization information.

Get-Counter '\Processor(_Total)\% Processor Time

Here is an explanation of the data returned

You can also run Get-Counter to get memory, disk and network counters.

Here is the code to get the top 3 processes by CPU utilization:

Get-Process | Sort CPU -descending | Select -first 3 -Property ID,ProcessName,CPU | format-table
1
  • Get-Process -> CPU(s) is it the CPU utilization of a process in second since its start..? Feb 23, 2019 at 7:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .