I use top -H -p 1256 to show process 1256, and then press "f" then press "j" to display it is running on which core, is there a better mothed, I want to be automated to get this
If your system supports /proc, then it's very likely that you can simply read the information there. man proc
.
Regards,
Alister