How to get CPU usage on Mac OS X (don't use top command)

I need to collect to use the CPU often, and the top command costs a lot of time (top -F -R-1). I am also trying to use "sysctl" and "sysctlbyname", but below functions cannot get CPU usage. So, if there is any API or command line

+4
source share

All Articles