How do you find out which CPU core a process is running on Linux?

Phạm Quyết

New member
How do you find out which CPU core a process is running on Linux?
Answer
To get the information you want, look in
/proc/<pid>/task/<tid>/status. The third field will be an ‘R’ if the thread is running. The sixth from the last field will be the core the thread is currently running on, or the core it last ran on (or was migrated to) if it’s not currently running.
 

Tìm kiếm

Back
Top