What is the cooked value returned in the get-counters Powershell cmdlet?

I use Powershell to return values ​​for specific performance counters, and I see that when reporting information, it refers to "Cookedvalues". I am looking for each counter to fall on it, so I can do an analysis, for example, see the 90th percentile values ​​or max / min, so I need to know how it arrives at Cooked Value. Here is the code I'm working with now:

$computer = $ENV:Computername $instance = "_total" @("\\$Computer\PhysicalDisk(*)\Current Disk Queue Length", "\\$Computer\PhysicalDisk(*)\% Disk Time", "\\$Computer\PhysicalDisk(*)\Avg. Disk Queue Length", "\\$Computer\PhysicalDisk(*)\Avg. Disk Read Queue Length", "\\$Computer\PhysicalDisk(*)\Avg. Disk Write Queue Length", "\\$Computer\PhysicalDisk(*)\Avg. Disk sec/Transfer" "\\$Computer\PhysicalDisk(*)\Avg. Disk sec/Read", "\\$Computer\PhysicalDisk(*)\Avg. Disk sec/Write") |% { (Get-Counter $_.replace("*",$instance)).CounterSamples } | Select-Object Path,CookedValue | Format-Table -AutoSize # Retrieve the current Processor performance counter information. $computer = $ENV:Computername $instance = "_total" @("\\$Computer\Processor(*)\% Processor Time", "\\$Computer\Processor(*)\% User Time", "\\$Computer\Processor(*)\% Privileged Time", "\\$Computer\Processor(*)\Interrupts/sec", "\\$Computer\Processor(*)\% DPC Time", "\\$Computer\Processor(*)\DPCs Queued/sec" "\\$Computer\Processor(*)\% Idle Time", "\\$Computer\Processor(*)\% Interrupt Time") |% { (Get-Counter $_.replace("*",$instance)).CounterSamples } | Select-Object Path,CookedValue | Format-Table -AutoSize # Retreive the current Memory counter information $computer = $ENV:Computername $instance = "_total" @("\\$Computer\Memory\Page Faults/sec", "\\$Computer\Memory\Available Bytes", "\\$Computer\Memory\Committed Bytes", "\\$Computer\Memory\Commit Limit", "\\$Computer\Memory\Pages/sec", "\\$Computer\Memory\Free System Page Table Entries" "\\$Computer\Memory\Pool Paged Resident Bytes", "\\$Computer\Memory\Available MBytes") |% { (Get-Counter $_.replace("*",$instance)).CounterSamples } | Select-Object Path,CookedValue | Format-Table -AutoSize 
+6
source share
1 answer

According to https://blogs.technet.com/b/nexthop/archive/2011/06/02/gpsperfcounters.aspx , "CookedValue":

Performance counters typically have initial values, second value values, and default values. The raw values ​​and the second value are the raw ingredients used by the performance counter, and the “cooked value” is the result of “cooking” these ingredients into something for human consumption.

Thus, it is obvious that CookedValue is the result of combining the original counter data to get useful value that you can understand and work with.

+6
source

Source: https://habr.com/ru/post/943655/


All Articles