I need information specific to CPU core. Is there any api exposed for mac

Suppose we have one CPU with 2 core , then I need information about

no.of.Processes , IO time,IDLE Time, System Time, Name of core for

specific core Level and not to CPU Level etc.

So I would you like to know is there any api expose for mac.

Mac mini 2018 or later

Posted on Dec 4, 2019 10:48 PM

Reply
Question marked as ⚠️ Top-ranking reply

Posted on Dec 5, 2019 12:47 PM

You want the kernel proc APIs.


These are the include files:

#import <libproc.h>

#import <sys/proc_info.h>

#import <sys/types.h>


The functions you need are “host_processor_info” , “host_statistics”, and “proc_pidinfo”. This may not be exactly what you are looking for, but it’s all there is.


1 reply
Sort By: 
Question marked as ⚠️ Top-ranking reply

Dec 5, 2019 12:47 PM in response to chandrakant208

You want the kernel proc APIs.


These are the include files:

#import <libproc.h>

#import <sys/proc_info.h>

#import <sys/types.h>


The functions you need are “host_processor_info” , “host_statistics”, and “proc_pidinfo”. This may not be exactly what you are looking for, but it’s all there is.


Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I need information specific to CPU core. Is there any api exposed for mac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.