How to find all process running on a core

Viewed 33

I am using Linux system which is having 8 core. I am seeing from top command that core 0 is 100% used .

Please suggest how can I see real time usage of core 0 and all process running on core 0

1 Answers

ps can show a list of processes. Pass --sort=-pcpu, to sort by cpu percent. psr shows processor that process is currently assigned to. watch allows to see how the list changes over time:

watch -- ps -o psr,pcpu,uid,user,pid,tid,args --sort=-pcpu

Related