c - Determining CPU utilization -
is there command or other way current or average cpu utilization (for multi-processor environment) in linux?
i using embedded linux in small system. basically, need determine cpu utilization, if high, can instead divert new process controller in system, rather executing on main processor, busy doing more important process.
this question not merely prioritizing processes, other controller can sufficiently handle new process, when main processor not busy, prefer execution.
you need sample values in /proc/stat
@ 2 times, , calculate average utilisation on time. (instantaneous utilisation doesn't make whole lot of sense - it'll 100% on single core machine, since utilsation-measuring code running whenever looks).
Comments
Post a Comment