我想使用cmd windows命令显示每个进程的所有进程和cpu百分比。 有没有给我这个结果的命令? 你能帮我吗? 谢谢
答案 0 :(得分:3)
答案 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