Cpu Time
Situation¶
It is all started with two confusing situation.
- I found out using
ps aux | grep -v process_name
, the process is inSl+
state. But the cpu usage is not zero. watch "ps aux |grep 3496617"
always show the same cpu usage percentage, which is very confusing beacausehtop
always show up-down value. andpidstat -p 3516617
show cpu% less than 100%.
Task¶
- figure out how
htop
calculate the cpu usage percentage of a process. - why
ps
andpidstat
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,没有进行正确性的交叉校验。
无