process.cpu_percent is what I am looking for ... thanks.
With psutil.Process() you can get the PID. I would think the process is run on a single core, but I don't see a way in psutil to identify the core.
I wrote some code to query /proc/stat that shows utilization by core. Interestingly, this shows total utilization and utilization by core to be approximately 40% each when my app is running. However, process.cpu_percent shows 80% which is obviously about twice that of any given core.
My understanding is that process.cpu_percent can be greater than 100% for multi threaded apps. If my app was multi threaded, then I could understand the 80% figure, but unless some of the libraries I'm using are multi threaded, I'm a bit puzzled it is so much higher than the core numbers.
I did compare the 80% utilization to the Task Manager and the Task Manager figure was always 1/4th what process.cpu_percent reported. Looks like TM is showing total system utilization (with four cores) as opposed to core utilization.