跳转至

Cpu Time

Situation

It is all started with two confusing situation.

  • I found out using ps aux | grep -v process_name, the process is in Sl+ state. But the cpu usage is not zero.
  • watch "ps aux |grep 3496617" always show the same cpu usage percentage, which is very confusing beacause htop always show up-down value. and pidstat -p 3516617 show cpu% less than 100%.

Task

  1. figure out how htop calculate the cpu usage percentage of a process.
  2. why ps and pidstat choose different calculate ways.

Action

https://unix.stackexchange.com/questions/141586/what-does-utilization-mean-in-htop-if-only-1-process-can-execute-at-a-time

Result & Explanation

需要进一步的研究学习

暂无

遇到的问题

暂无

开题缘由、总结、反思、吐槽~~

参考文献

上面回答部分来自ChatGPT-3.5,没有进行正确性的交叉校验。