How to convert a tasklist's CPU time to CPU % usage?

后端 未结 3 499
栀梦
栀梦 2020-12-09 21:11

I\'m trying to use tasklist to find out which process is consuming more than X percent of my CPU (to later kill it with taskkill.)

How do

3条回答
  •  情歌与酒
    2020-12-09 21:53

    Tasklist's CPUTime is a measure of how much CPU time (cycles) have been used since the start of the process, so to convert that to a percent, it would be

     (TotalProcessRuntime / CpuTime) / 100
    

    At least, thats what I gather :)

提交回复
热议问题