views:

60

answers:

1

I saw in A+ monitor, it can show CPU Idle, CPU usage, CPU System. Which API should be used to get the these information? I have searched and I use the getloadavg function, but it can only return the CPU usage. Also it is not correctly for it will always be more than 90%.

Thanks!

A: 

Most of these can be retrieved using the appropriate sysctl() selectors.

millenomi
sysctl can get the CPU static information like cpu numbers, I haven't seen where can I get the runtime information. Could you please give me more details? Thank you very much!
raul07