How to find what task is running on a particular cpu core ?
I am using Kernel 220.127.116.11 on an Intel Core2Duo based system.
1) I have to find on which core a particular task is running on .
2) I have to just log whenever my task is scheduled on any of the cores with the cpu core number & timestamp info.
I am ready to modify the kernel to do printk or some logging .
I guess there used to be 2 fields called 'processor' and 'last_processor' in task_struct in older kernels which probably had this information .
So what do I do to find out on which core a particular task is running on ?
Are there any utilities that are simple-to-use and can display the tasks that are running on each of the cores , including the cpu core info ? top , mpstat etc do not tell you on which cpu core a task is running on .