CPU利用率%,持续特定服务的Windows命令 [英] Windows command for CPU utilization % for particular service
问题描述
你好请问有什么办法来获取特定的服务运行Windows的CPU利用率。我希望WMIC CPU得到的LoadPercentage会给CPU UTIL为整个系统,但有可能得到像WINWORD.EXE特定服务
Hi Is there any way to get CPU utilization for particular service running windows. I hope wmic cpu get LoadPercentage will give cpu util for entire system but is it possible to get for a particular service like winword.exe
推荐答案
这WMIC命令打印的CPU使用情况的所有进程。然后,你可以把它管道到 FINDSTR
来为特定的处理过滤器(使用标记 / C:<方法名称>
)。
This wmic command prints the CPU usage for all processes. Then you can pipe it to findstr
to filter for a particular process (using the flag /c:<process name>
).
wmic path Win32_PerfFormattedData_PerfProc_Process get Name,PercentProcessorTime
不要帮助FINDSTR
和帮助找到
在命令行中看到可以过滤列表的方式。
Do help findstr
and help find
from the command line to see more ways you can filter the list.
例如:
C:\> wmic path Win32_PerfFormattedData_PerfProc_Process
get Name,PercentProcessorTime | findstr /i /c:chrome
chrome 24
chrome#1 0
chrome#2 0
chrome#3 0
这篇关于CPU利用率%,持续特定服务的Windows命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!