I should get the number of active processes and active threads running in my server or computer using command-line.. I don't want to list all the processes or threads running, I need them in numbers.
Asked
Active
Viewed 2.9k times
2 Answers
9
Using PowerShell, the following two commands will get that information:
Number of processes running:
(Get-Process).Count
Number of threads running:
(Get-Process|Select-Object -ExpandProperty Threads).Count
harrymc
- 498,455
3
You could use PowerShell for this.
To get a list of all active processes on the local computer, use this command.
Get-Process | Measure
You can also filter these results. For example, see the below code.
Get-Process winword, explorer | Measure
To get no of threads, run this command.
Get-Process | Select-Object -ExpandProperty Threads | Measure
To use these command in Command prompt, simply do this.
PowerShell -Command "Get-Process | Measure"
PowerShell -Command "Get-Process | Select-Object -ExpandProperty Threads | Measure"
PowerShell -Command "Get-Process | Select-Object -ExpandProperty Threads | Measure"
Resources
- Get-Process
- Measure-Object
- Select-Object
DxTx
- 1,276


