Difference between revisions of "Get-counter"

From UVOO Tech Wiki
Jump to navigation Jump to search
(Created page with "``` get-counter '\Process(*)\IO Read Bytes/sec' | Format-List Get-Counter '\Processor(_Total)\% Processor Time' Get-Counter '\Memory\Available MBytes' (Get-Counter '\Pro...")
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
```
 +
Get-Counter -Counter "\LogicalDisk(*)\Avg. Disk sec/Transfer" -Continuous
 +
```
 +
 
```
 
```
 
  get-counter '\Process(*)\IO Read Bytes/sec' | Format-List
 
  get-counter '\Process(*)\IO Read Bytes/sec' | Format-List
Line 14: Line 18:
  
 
```
 
```
 +
 +
https://stackoverflow.com/questions/16223648/what-is-cooked-value-returning-in-powershells-get-counters-cmdlet
  
 
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-process?view=powershell-7.2
 
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-process?view=powershell-7.2
 +
 +
 +
https://adamtheautomator.com/powershell-get-process/
 +
 +
 +
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tasklist
 +
 +
```
 +
Get-Counter '\Process(*)\% Processor Time' | Select-Object -ExpandProperty countersamples| Select-Object -Property instancename, cookedvalue| ? {$_.instanceName -notmatch "^(idle|_total|system)$"} | Sort-Object -Property cookedvalue -Descending| Select-Object -First 25| ft InstanceName,@{L='CPU';E={($_.Cookedvalue/100/$env:NUMBER_OF_PROCESSORS).toString('P')}} -AutoSize
 +
```
 +
 +
 +
```
 +
Get-Process | Sort-Object -Property 'CPU' -Descending | Select-Object -First 10
 +
```
 +
 +
https://stackoverflow.com/questions/51745651/powershell-script-list-process-with-cpu-memory-disk-usage
 +
 +
```
 +
Get-CimInstance -ClassName Win32_Process | Format-List -Property *
 +
 +
```

Latest revision as of 14:13, 2 May 2024

Get-Counter -Counter "\LogicalDisk(*)\Avg. Disk sec/Transfer" -Continuous
 get-counter '\Process(*)\IO Read Bytes/sec' | Format-List


Get-Counter '\Processor(_Total)\% Processor Time'


Get-Counter '\Memory\Available MBytes'

(Get-Counter '\Process(*)\% Processor Time').CounterSamples | Where-Object {$_.CookedValue -gt 5}

Get-Process winword, explorer | Format-List *


https://stackoverflow.com/questions/16223648/what-is-cooked-value-returning-in-powershells-get-counters-cmdlet

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-process?view=powershell-7.2

https://adamtheautomator.com/powershell-get-process/

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tasklist

Get-Counter '\Process(*)\% Processor Time' | Select-Object -ExpandProperty countersamples| Select-Object -Property instancename, cookedvalue| ? {$_.instanceName -notmatch "^(idle|_total|system)$"} | Sort-Object -Property cookedvalue -Descending| Select-Object -First 25| ft InstanceName,@{L='CPU';E={($_.Cookedvalue/100/$env:NUMBER_OF_PROCESSORS).toString('P')}} -AutoSize
Get-Process | Sort-Object -Property 'CPU' -Descending | Select-Object -First 10

https://stackoverflow.com/questions/51745651/powershell-script-list-process-with-cpu-memory-disk-usage

Get-CimInstance -ClassName Win32_Process | Format-List -Property *