TIME / TIME+ 顯示的是進程佔用的 CPU 時間總和,而非進程運行的牆鐘時間 (壁鐘時間/實際經過時間)。
| 欄位 | 含義 | 精度 | 顯示格式示例 |
|---|---|---|---|
| TIME | 進程啟動以來佔用的總 CPU 時間 (用戶態 + 內核態) | 秒 | 2:32 = 2 分 32 秒 |
| TIME+ | 同 TIME,但顯示百分之一秒精度 | 0.01 秒 | 2:32.45 = 2 分 32.45 秒 |
S 切換 Cumulative mode,顯示進程及其已結束子進程的 CPU 時間總和。
TIME+ 2:32.45
│ │ └─ 百分之一秒 (45)
│ └──── 秒 (32)
└────── 分 (2)
即 2 分鐘 32 秒 450 毫秒。
| 現象 | 可能原因 | 排查方向 |
|---|---|---|
| 進程運行數天但 TIME 極小 | 進程長期睡眠/空閒 (守護進程、定時任務間隔大) | 正常,無需處理 |
| TIME 快速增長接近 CPU 核心數 × 時間 | 計算密集型任務、死循環、無效自旋鎖 | perf top / gdb 分析熱點函數 |
| 多線程進程 TIME 遠超運行時間 | 多核並行計算 (正常) 或線程過多上下文切換開銷 | 檢查線程池大小、鎖競爭 |
TIME — CPU Time
Total CPU time the task has used since it started. When Cumulative mode is On, each process is listed with the cpu time that it and its dead children has used.
TIME+ — CPU Time, hundredths
The same as TIME, but reflecting more granularity through hundredths of a second.