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

Michael J. Hammel mjhammel at graphics-muse.org
Wed Jul 23 10:15:18 MDT 2008


On Thu, 2008-07-17 at 17:01 -0600, Zan Lynx wrote:
> 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*
> 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

Interesting, but not necessarily accurate, depending on what you're
looking for.  My Xeon show "i686", not x86-64 even though the cpuinfo
flags show "lm".  Probably because I'm running a 32bit kernel on a 64bit
system.

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

Lots of info there.  Interesting how many of the values are set to
200112 (including the POSIX and POSIX2 versions).  But it's unclear to
(without deeper digging of the standards) the meaning of many of the
variables and their values.  

But in looking at these two I realized I probably have a 32bit kernel
running on a 64 bit system.  Never needed to run with 64bit so ignored
the hassle of trying.  The question is:  does /proc/cpuinfo or uname -m
report the hardware or the kernel or both?  And I wonder if that's
sufficient to know if the kernel will work with 64bit applications?
What's worse, I need to figure that out for non-Linux systems eventually
(though I'm in no hurry to open that can of worms).  So whatever tools I
use I have to identify both the hardware and the supporting kernel.

Hmmm.  Generalized remote system identification for a grid is going to
be a royal pain the buttocks.  I see that now....

-- 
Michael J. Hammel                                    Principal Software Engineer
mjhammel at graphics-muse.org                           http://graphics-muse.org
------------------------------------------------------------------------------
Ignoranus: A person who's both stupid and an asshole.




More information about the LUG mailing list