Re: cpu frequencies
Re: cpu frequencies
- Subject: Re: cpu frequencies
- From: Steve Checkoway <email@hidden>
- Date: Fri, 20 Jun 2008 01:31:03 -0700
On Jun 20, 2008, at 12:56 AM, Jean-luc Chasseriau wrote:
I'm please to be a new member of darwin-dev so here is the first
question :)
Welcome.
I would like to retrieve the current cpu frequency of each cpu/core
installed (this frequency can change depending on the use -thanks to
the
intel speedstep technology-).
Does anyone know which system call should be use to do so?
sysctl maybe?
$ sysctl -a|grep frequency
kern.exec: unknown type returned
hw.busfrequency = 1000000000
hw.cpufrequency = 2000000000
hw.tbfrequency = 33332472
hw.tbfrequency: 33332472
hw.cpufrequency_max: 2000000000
hw.cpufrequency_min: 2000000000
hw.cpufrequency: 2000000000
hw.busfrequency_max: 1000000000
hw.busfrequency_min: 1000000000
hw.busfrequency: 1000000000
Perhaps:
uint32_t freq;
size_t size = sizeof(freq);
sysctlbyname( "hw.cpufrequency", &freq, &size, NULL, NULL );
--
Steve Checkoway
"Anyone who says that the solution is to educate the users
hasn't ever met an actual user." -- Bruce Schneier
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden