Timeline for Linux "Top" command for Windows Powershell?
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 27 at 21:24 | comment | added | asgs |
This solution has a nice refresh rate simulating closer to top's behaviour. For some reason, adding a sleep before cls makes it lag no matter what amount of sleep is provided
|
|
Apr 19, 2022 at 21:32 | comment | added | Joachim Otahal |
Best answer! The international version which works on German/French etc installations is while(1) { $p = Get-Counter -Counter '\230(*)\6' ; clear ; $p.CounterSamples | Sort-Object -Descending CookedValue | Select-Object -First 25} - See HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\<number>\Counter for which number represents what.
|
|
Jun 2, 2020 at 13:41 | history | edited | Bob | CC BY-SA 4.0 |
Remove stray backtick
|
Jun 2, 2020 at 13:16 | history | edited | JW0914 | CC BY-SA 4.0 |
Added correct markdown for monospaced code ; Applied syntax highlighting ; Grammatical corrections
|
Jan 9, 2020 at 1:25 | comment | added | Ian Link |
I ran into issues with errors causing the command to stop before reporting all running processes. This can be avoided with: $p = get-counter '\Process(*)\% Processor Time' -ErrorAction SilentlyContinue As you can imagine, this will report as many processes as possible.
|
|
Sep 22, 2017 at 18:53 | comment | added | pjhsea |
This is the best answer: Get-Counter gives you the "instantaneous" CPU, rather than the cumulative CPU time from ps . Better formatting: 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
|
|
Aug 8, 2017 at 17:58 | review | Late answers | |||
Aug 8, 2017 at 19:04 | |||||
Aug 8, 2017 at 17:43 | review | First posts | |||
Aug 8, 2017 at 17:54 | |||||
Aug 8, 2017 at 17:42 | history | answered | fireforge124 | CC BY-SA 3.0 |