[lug] request for data: cpuinfo on non-x86 cpus

Zan Lynx zlynx at acm.org
Thu Jul 17 17:01:04 MDT 2008


Michael J. Hammel wrote:

> You'd think there be some kind of standard, at least within the linux
> kernel, for the output from this.  But apparently not.  *Ugh*
> 
> Thanks for the data Scott.

There are standard ways to get this information, believe it or not.  You
might want to use "uname -m".

>From the OSX man page:
"The uname utility conforms to IEEE Std 1003.2-1992 (``POSIX.2'')."
Example:
$ uname -m
x86_64
$ uname -m
armv41

There is also the C function "sysconf" and the shell function "getconf".
 These are POSIX too.
Example:
$ getconf _NPROCESSORS_ONLN
2



More information about the LUG mailing list