什么是“熟值"?在 Powershell 的 get-counters cmdlet 中返回? [英] What is "cooked value" returning in Powershell's get-counters cmdlet?

查看:66
本文介绍了什么是“熟值"?在 Powershell 的 get-counters cmdlet 中返回?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Powershell 返回某些性能计数器的值,并且在显示信息时我看到它指的是Cookedvalues".我正在寻找要单独报告的每个计数器命中,因此我可以进行分析,例如查看第 90 个百分位值或最大值/最小值,因此我需要知道它是如何到达熟值的.这是我目前正在使用的代码:

I'm using Powershell to return values for certain performance counters, and I'm seeing that it is referring to "Cookedvalues" when presenting the information. I'm looking for each counter hit to be reported on it's own, so I can do analysis like seeing the 90th percentile values or max/min, so I need to know how it is arriving at Cooked Value. Here is the code I am currently working with:

$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 

推荐答案

根据 https://blogs.technet.com/b/nexthop/archive/2011/06/02/gpsperfcounters.aspx,一个CookedValue"是:

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

性能计数器通常具有原始值、第二个值和熟值.原始值和第二个值是性能计数器使用的原始成分,熟化值"是将这些成分烹饪"成供人类食用的结果.

performance counters typically have raw values, second values, and cooked values. The raw values and second values are the raw ingredients used by the performance counter, and the "cooked value" is the result of "cooking" those ingredients into something for human consumption.

显然,CookedValue 是组合计数器的原始数据以获得您可以理解和使用的可用值的结果.

So apparently the CookedValue is the result of combining the counter's raw data to get a usable value that you can understand and work with.

这篇关于什么是“熟值"?在 Powershell 的 get-counters cmdlet 中返回?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆