如何在cmd中显示每个进程的CPU百分比使用情况

时间:2013-08-20 12:36:41

标签: command-line cmd

我想使用cmd windows命令显示每个进程的所有进程和cpu百分比。 有没有给我这个结果的命令? 你能帮我吗? 谢谢

2 个答案:

答案 0 :(得分:3)

从SysInternals驱动的pstools中尝试pslist

您需要从该链接下载它们并将工具放在cmd目录中(或chdir到任何地方)。

使用-s查看每个进程的CPU使用情况。

答案 1 :(得分:0)

jiaotong@ubuntu:~/zsim$ scons -j16 scons: Reading SConscript files ... Building opt zsim at build/opt gcc: error: /usr/include/asm/unistd.h: No such file or directory gcc: fatal error: no input files compilation terminated. Traceback (most recent call last): File "../../misc/list_syscalls.py", line 7, in <module> denseList = ["INVALID"]*(max([num for (num, name) in sysList]) + 1) ValueError: max() arg is an empty sequence scons: done reading SConscript files. scons: Building targets ... printf "#define ZSIM_BUILDDATE \"`date`\"\n#define ZSIM_BUILDVERSION \"`python misc/gitver.py`\"" >>build/opt/version.h g++ -o build/opt/zsim_harness.o -c -march=core2 -g -O3 -funroll-loops -g -std=c++0x -Wall -Wno-unknown-pragmas -fomit-frame-pointer -fno-stack-protector -MMD -DBIGARRAY_MULTIPLIER=1 -DUSING_XED -DTARGET_IA32E -DHOST_IA32E -fPIC -DTARGET_LINUX -Werror -DPIN_PATH="/home/jiaotong/zsim/pin_kit/intel64/bin/pinbin" -DZSIM_PATH="/home/jiaotong/zsim/build/opt/libzsim.so" -Ipin_kit/extras/xed2-intel64/include -Ipin_kit/source/include/pin -Ipin_kit/source/include/pin/gen -Ipin_kit/extras/components/include -Ibuild/opt build/opt/zsim_harness.cpp g++ -o build/opt/zsim --static build/opt/zsim_harness.o build/opt/debug_harness.o build/opt/config.o build/opt/galloc.o build/opt/log.o build/opt/pin_cmd.o -lconfig++ -lpthread scons: done building targets. 可以使用通配符来获取每个正在运行的进程的CPU使用率。它还具有文本界面Perfmon,可将结果吐出到控制台。

此命令将生成当前运行进程CPU使用情况的单行CSV输出:

typeperf

此报告中缺少PID。如果需要,可以将每个进程的PID添加为单独的计数器进行记录,然后匹配名称:

typeperf "\process(*)\% processor time" -sc 1