bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug concerning <uname> and AMD cpu's


From: Bob Proulx
Subject: Re: bug concerning <uname> and AMD cpu's
Date: Mon, 30 May 2005 23:45:19 -0600
User-agent: Mutt/1.5.9i

Randy Forston wrote:
> A fellow Ubuntu user on one of our lists ran <uname -m> on his AMD
> motherboard/cpu combo and it returned i686.
> 
> Obviously, this is a k7 cpu.

Thanks for the report.  But you are confusing the machine architecture
type with the cpu type.  They are two different things.  You are
getting the right answer for your k7 cpu.  The value that 'uname -m'
reports is not the cpu type.  The value is the "machine hardware
name".

Here is what POSIX says about it:

  -m
      Write the name of the hardware type on which the system is running
      to standard output.

The coreutils info page gives a little more information:

  `-m'
  `--machine'
       Print the machine hardware name (sometimes called the hardware
       class or hardware type).

Because you are running an i686 architecture kernel that is the value
reported by the kernel from the uname(2) kernel system call.  It means
that your system will execute i686 compatible machine code.  The k7
cpu is also a i386 compatible cpu.  It would be possible to run an
i386 architecture kernel and userland on it and in that case the value
reported by uname -m would be i386.  I hope this explanation helps.

In any case, the uname(1) command line command just reports
information provided by the kernel by the uname(2) kernel system
call.

  man 2 uname

> Any chance the <uname> utility might be upgraded to appropriately label AMD
> as well as Intel cpu's??

If you are wanting the cpu information you would be better to look for
it from the /proc interface.

  cat /proc/cpuinfo

Note however that information there is not standard and not portable.
It is not even the same from one architecture to the other on
otherwise identical software distributions.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]