2013-04-25 14 views
6

Sto usando Powershell per restituire i valori per determinati contatori delle prestazioni, e sto vedendo che si riferisce a "Cookedvalues" quando si presentano le informazioni. Sto cercando ogni contatore da riportare su di esso, quindi posso fare analisi come vedere i valori del 90 ° percentile o max/min, quindi ho bisogno di sapere come sta arrivando al valore cotto. Ecco il codice Attualmente sto lavorando con:Che cosa viene restituito "valore cotto" nel cmdlet di get-counters di Powershell?

$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 

risposta

6

Secondo https://blogs.technet.com/b/nexthop/archive/2011/06/02/gpsperfcounters.aspx, un "CookedValue" è:

contatori delle prestazioni in genere hanno valori grezzi, il secondo valore e valori cotti. I valori grezzi e i secondi valori sono gli ingredienti grezzi utilizzati dal contatore delle prestazioni, e il "valore cotto" è il risultato di "cucinare" quegli ingredienti in qualcosa per il consumo umano.

Quindi apparentemente il valore CookedValue è il risultato della combinazione dei dati grezzi del contatore per ottenere un valore utilizzabile che è possibile comprendere e utilizzare.

+0

Questo ha senso. Guardando di nuovo i valori su un sistema non stressato, sembrano avere senso nel contesto del contatore che rappresentano. Continuo a desiderare di sapere che cosa stiano facendo matematica per arrivare al valore, ma questo mi rende ciò di cui ho bisogno per ora. Grazie! –