I don't know how to print pid and nice value of previous and next processes when context switching occurs in linux kernel.
For example, I want to print as below when I enter "dmesg | grep "DAVID" | head -n 50"
[ 77.241213] [DAVID] PREV: CPU 7 pid 286 nice 120
[ 77.241214] [DAVID] NEXT: CPU 7 pid 0 nice 120
[ 77.245020] [DAVID] PREV: CPU 4 pid 0 nice 120
[ 77.245022] [DAVID] NEXT: CPU 4 pid 969 nice 120
.
.
... and so on.
Please help me.
