How can I see which CPU core a thread is running in?

The “top” command may help towards this, it does not have CPU-grouped list of threads but rather you can see the list of threads (probably for a single process) and which CPU cores the threads are running on by

top -H -p {PROC_ID}

then pressing f to go into field selection, j to enable the CPU core column, and Enter to display.

Leave a Comment