uname -m and uname -p

n a boredandblogging at gmail.com
Mon Feb 26 15:51:29 UTC 2007


Looking at uname.c (which is part of the GNU coreutils) where it handles the
-p, here is some code:

-----
char const *element = unknown;
#if HAVE_SYSINFO && defined SI_ARCHITECTURE
{
  static char processor[257];
  if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
    element = processor;
}
#endif
------

The problem is that HAVE_SYSINFO and SI_ARCHITECTURE are never defined
anywhere, at least not in my standard Edgy kernel. Doing a google search,
this looks like it has been broken for some time. There have been many
patches proposed, but none have actually been applied. Gentoo seems to have
their own patch for it though.

nick


On 2/26/07, Benjamin E. Zeller <zeller at ibh-wor.de> wrote:
>
> On Monday 26 February 2007 14:28, Matthew Flaschen wrote:
> > Kaushal Shriyan wrote:
> > > Hi
> > >
> > > when i do the below command, I get the below information
> > >
> > > $ uname -m
> > > x86_64
> > > $ uname -p
> > > unknown
> > > $
> > >
> > > whats the difference between the two command and i have referred to
> man
> > > uname which says
> > >
> > >        -m, --machine
> > >               print the machine hardware name
> > >
> > >        -p, --processor
> > >               print the processor type or "unknown"
> >
> > -p should be the actual model of processor, but it doesn't seem to work
> > on my machine either.
>
>
> Doesn't work here either. Tried it on Debian-Box, didn't work, SuSE-Box
> gives "i686"
> >
> > Matthew Flaschen
>
> --
> Benjamin Zeller
> Ing.-Büro Hohmann
> Bahnhofstr. 34
> D-82515 Wolfratshausen
>
> Tel.:  +49 (0)8171 347 88 12
> Mobil: +49 (0)160 99 11 55 23
> Fax:   +49 (0)8171 910 778
> mailto: zeller at ibh-wor.de
>
> www.ibh-wor.de
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070226/629b16a5/attachment.html>


More information about the ubuntu-users mailing list