In the last blog I spoke of CPU counters. Now,
I'll talk of Memory counters.
MEMORY Counters (CIM_PhysicalMemory class, Win32_PerfFormattedData_PerfOS_Memory class,
Memory Performance Information ...): Note: I
introduced the notion of samples and how to fetch them using
NextValue() so I will occasionally omit $var.NextValue() going
forward.
Let me note here that if you thought previously described
performance classes were complicated, you are now entering the
realm of black magic ;-) There is a good …
So far, I talked of WMI, CIM, WQL,
System.Diagnostics.PerformanceCounterCategory, perf-counter data
organization and flavour. Now it's time to look at some
performance counters I deem important for my use-case more
closely.
Note: List of available Counters for Get-Counter command
Get-Counter -ListSet * | Sort-Object CounterSetName |
Format-Table CounterSetName
Basic concepts:I will introduce basic concepts of Processor, Core
and CPU now to help you follow the text. Let us use this
convention:
- "Processor" is a piece of hardware you connect to a slot on the motherboard.
- "Physical Core" is a physical computing unit built into the "Processor".
- "Virtual Core" is a virtual computing unit built on top of "Physical Core" (i.e. HT is ON).
- "CPU" is a computing unit inside the "Processor", either physical or virtual.
…
How to interpret Raw data from Windows performance
counters.
Tip: An alias for Get-CimInstance is GCim and
alias for Get-WmiObject is GWmi.
In the first blog post, I covered what WMI/CIM is and
how to get info from there. Last I talked about was RawData
counters:
Get-CimInstance -Class
Win32_PerfRawData_PerfOS_Processor
Name : _Total
...
PercentIdleTime : 78061457390
Understanding RawData:By itself, a RawData value is a sample but
important thing is to determine what concrete sample value
actually is and how to convert it to a form we understand. In
this example, MSDN tells us PercentIdleTime is a counter of
type 542180608:
…