How do I measure separate CPU core usage for a process?

前端 未结 8 1630
故里飘歌
故里飘歌 2021-01-29 18:45

Is there any way to measure a specific process CPU usage by cores?

I know top is good for measuring the whole system\'s CPU usage by cores and taskset can provide inform

8条回答
  •  南方客
    南方客 (楼主)
    2021-01-29 19:05

    dstat -C 0,1,2,3 
    

    Will also give you the CPU usage of first 4 cores. Of course, if you have 32 cores then this command gets a little bit longer but useful if you only interested in few cores.

    For example, if you only interested in core 3 and 7 then you could do

    dstat -C 3,7
    

提交回复
热议问题