i want to a cmd windows command to display the all the processes and the cpu percentage for each process. is there a command which give me this result? can you help me please? thank you
Asked
Active
Viewed 1.5k times
4
-
Possible duplicate of [How to convert a tasklist's CPU time to CPU % usage?](https://stackoverflow.com/questions/206805/how-to-convert-a-tasklists-cpu-time-to-cpu-usage) – TylerH Oct 03 '18 at 16:05
2 Answers
4
Try pslist from the SysInternals-powered pstools.
You will need to download them from that link and put the tools in your cmd directory (or chdir to wherever they are).
Use -s
to see the CPU usage of each process.
-
1Hi, you can run "pslist -s 1" it will run for a second and exit, without updating. – AlexDev Aug 21 '13 at 11:28
-
-
let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/35912/discussion-between-alexdev-and-ofloflofl) – AlexDev Aug 21 '13 at 11:45
-
Very nice! However my server is virtually seized, I have like 100 CPU cycles to work with, literally! `tasklist` takes ages to run. So downloading and installing is not an option ATM. I will remember to do so after I resolve this CPU hog problem, if I ever do. Thank you. – Rolf Nov 09 '17 at 13:22
1
Perfmon
can use a wildcard to get the CPU usage for each running process. It also has the text interface typeperf
which spits the results out to the console.
This command will produce a one-line CSV output of the current running process CPU usage:
typeperf "\process(*)\% processor time" -sc 1
The PID is missing from this report. If you need, you can add the PID for each of the processes as a separate counter to log, then match up the names:
typeperf "\process(*)\% processor time" "\process(*)\id process" -sc 1

Matthew Lundberg
- 42,009
- 6
- 90
- 112