[buug] How to get the CPU frequency
Abhay Kumar Srivastava
abhay_srivastava at infosys.com
Mon Feb 10 00:27:22 PST 2003
I am using FreeBSD. I cannot find /proc/cpuinfo (it sure is present in
LINUX).
Moreover, I want to do it programmatically.
Regards,
Abhay
-----Original Message-----
From: Nick Sophinos [mailto:nickmdf at tsoft.com]
Sent: Saturday, February 08, 2003 10:25 PM
To: buug at weak.org
Subject: RE: [buug] How to get the CPU frequency
One way is to `cat /proc/cpuinfo` and then parse the value out of
that. I suspect there is a better way, though.
- nick
-----Original Message-----
From: buug-admin at weak.org [mailto:buug-admin at weak.org]On Behalf Of Abhay
Kumar Srivastava
Sent: Saturday, February 08, 2003 3:15 AM
To: buug at weak.org
Subject: [buug] How to get the CPU frequency
Hi,
I need to get the CPU frequency programmatically, how do I do that?
printf("%d\n",sysconf(_SC_CLK_TCK));
printf("%d\n", CLOCKS_PER_SEC);
does not help, they show the same value (128) on different machines
with different CPU speed.
Regards,
Abhay
_______________________________________________
Buug mailing list
Buug at weak.org
http://www.weak.org/mailman/listinfo/buug
_______________________________________________
Buug mailing list
Buug at weak.org
http://www.weak.org/mailman/listinfo/buug
More information about the buug
mailing list