Top
如何按百分比獲取 CPU 負載?
我想知道每個核心的 CPU 負載百分比。我執行
top
然後按1
輸出是這樣的:%Cpu0 : 0.0 us, 0.3 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu1 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu2 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
- 每列是什麼意思?
- % 列在哪裡?
- 我可以添加它嗎?
您可以添加除
id
(idle)、wa
(io wait) 和st
(stolen) 之外的所有列以獲取 CPU 負載。您會在
top
手冊頁中找到大多數列的含義:us, user : time running un-niced user processes sy, system : time running kernel processes ni, nice : time running niced user processes wa, IO-wait : time waiting for I/O completion hi : time spent servicing hardware interrupts si : time spent servicing software interrupts st : time stolen from this vm by the hypervisor