Complement htop when tracking placement or pinning.
Section: Inspection tools
Inspect CPU affinity from the shell
bash
bash
taskset -pc 12345Explanation
Shows which CPU cores a process may run on.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Inspection tools
Trace system calls with strace
Attach strace to the selected process if installed.
List open files with lsof
Inspect file descriptors for the selected process.
Attach strace manually
Use the PID from htop with a direct shell command.