I used taskset to pin a process to a particular core but there are other processes as well which share that core. Is it possible to know which processes share which cores explicitly? For example to get an information like "core 0 has processes 1, 202, 4043, etc.. running on it" .
Asked
Active
Viewed 3,456 times
1 Answers
5
ps has a way to display processor associated with every number. You must use the custom output option '-o' and give it the psr format that will display core id.
For instance
ps -A -o pid,psr,args
displays process pid, core and args of all running processes.
There are many options available to -o. See ps man page for details.
AFAIK, there is no option to get information on process running on a specific core, but you can use something like
ps -A -o psr,pid,args | grep '^ *3'
to get the list of processes running on core #3.

Alain Merigot
- 10,667
- 3
- 18
- 31
-
Thank you very much for this information. Getting these details are sufficient for judging the core and it's engagements. – Sabster Feb 27 '19 at 11:36