Is there a command or any other way to get the current or average CPU utilization (for a multi-processor environment) in Linux?
I am using embedded Linux in a small system. Basically, I need to determine the CPU utilization, so that if it is high, I can instead divert a new process to another controller in the system, rather than executing on the main processor, which could be busy doing a more important process.
This question is not about merely prioritizing processes, the other controller can sufficiently handle the new process, just that when the main processor is not busy, I would prefer it to do the execution.