Barinder Grewal
Barinder Grewal

Reputation: 59

Thread affinity in linux

I have made an application in c which creates 4 threads. How can I check which thread is running on which core through terminal and through code.

Upvotes: 0

Views: 835

Answers (1)

Barinder Grewal
Barinder Grewal

Reputation: 59

I found the answer about how to check it using terminal.
/home# for i in $(pgrep applicationName); do ps -mo pid,tid,fname,user,psr -p $i;done

Upvotes: 1

Related Questions