最後更新: 2019-10-23
介紹
kworker(Kernel Worker)
"kworker" is a placeholder process for kernel worker threads,
which perform most of the actual processing for the kernel,
especially in cases where there are interrupts, timers, I/O, etc.
Test on Cenots 7
nproc
2
ps aux|grep [k]worker
root 3 0.0 0.0 0 0 ? S 16:24 0:00 [kworker/0:0] root 4 0.0 0.0 0 0 ? S< 16:24 0:00 [kworker/0:0H] root 5 0.0 0.0 0 0 ? S 16:24 0:00 [kworker/u4:0] root 15 0.0 0.0 0 0 ? S 16:24 0:00 [kworker/1:0] root 16 0.0 0.0 0 0 ? S< 16:24 0:00 [kworker/1:0H] root 30 0.0 0.0 0 0 ? S 16:24 0:00 [kworker/0:1] root 31 0.0 0.0 0 0 ? S 16:24 0:00 [kworker/1:1] root 44 0.0 0.0 0 0 ? S 16:24 0:00 [kworker/u4:1] root 48 0.0 0.0 0 0 ? S 16:24 0:00 [kworker/0:2] root 265 0.0 0.0 0 0 ? S 16:24 0:00 [kworker/0:3] root 269 0.0 0.0 0 0 ? S 16:24 0:00 [kworker/u4:2] root 288 0.0 0.0 0 0 ? S 16:24 0:00 [kworker/u4:3] root 292 0.0 0.0 0 0 ? S< 16:24 0:00 [kworker/0:1H] root 326 0.0 0.0 0 0 ? S 16:24 0:00 [kworker/1:2] root 405 0.0 0.0 0 0 ? S< 16:24 0:00 [kworker/1:1H]
Syntax
kworker/%u:%d%s (cpu, id, priority)
"0" worker sit on cpu core 0
"0" worker 的 ID (worker 在此 CPU Core 上的 ID)
"H" 如果該 worker 的 nice 小於 0 (負數), 說明它的優先級很高
"u" 是unbound的縮寫, 代表沒有綁定特定的CPU, 不帶u的就是綁定特定cpu的worker