how to display the CPU percentage usage by each pr

2020-04-30 07:34发布

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

2条回答
Rolldiameter
2楼-- · 2020-04-30 08:15

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.

查看更多
走好不送
3楼-- · 2020-04-30 08:26

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

查看更多
登录 后发表回答