2013-04-25 83 views
6

我使用Powershell爲某些性能計數器返回值,並且我看到它在提供信息時指的是「Cookedvalues」。我正在尋找每個計數器點擊以自行報告,因此我可以進行分析,如查看第90百分位值或最大/最小值,所以我需要知道它是如何到達「煮熟值」的。這裏是我目前正與代碼:在PowerShell的get-counters cmdlet中返回什麼是「cooked value」?

$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 

回答

相關問題