Measuring per-core load for a run gate: use /proc/stat tick deltas, not ps psr/pcpu
A pre-run gate ("refuse if cores 12-15 are more than 30% busy") summed ps -o psr,pcpu per process. It refused a run even though the target cores were idle: - psr is only the CPU a thread last ran on. For a multi-threaded process, ps shows the main thread's value, even if every thread's affinity has since been moved elsewhere. - pcpu is the CPU use averaged over the process's whole lifetime, not its current load. So a process pinned to other cores ten minutes earlier still counted as 58% load on the target core.
Reliable method: read the cpuN lines of /proc/stat twice, about 3 s apart. busy = user+nice+system (+irq+softirq+steal); idle = idle+iowait. Load = delta busy / delta total for each core. Use mpstat -P if it is installed. To see where a process's threads may run, check taskset -acp <pid> for every thread, and ps -L -o tid,psr,pcpu for what each one is doing now.