`uname -p` inconsistent with `isainfo *` and `psrinfo -v` on CPU/ISA information

From: Kok How Teh (k_h_teh@yahoo.com)
Date: Mon May 15 2006 - 22:48:02 EDT


Hi;
     With reference to the post below by Christopher L.Barnard and some of the answers that he received, I found out that `uname -p` on my sparc Solaris 8.0 machine is inconsistent with the results of both `isainfo *` and `psrinfo -v` commands.
   
     `uname -p` tells that my machine is using a 32-bit ISA CPU type:
  [fvsupprt@SON-TDI fvsupprt 16]$ uname -p
sparc

   
      However, `isainfo *` tells that my machine is using a 64-bit CPU running 64-bit operating system:
  [fvsupprt@SON-TDI fvsupprt 11]$ isainfo -bv
64-bit sparcv9 applications
[fvsupprt@SON-TDI fvsupprt 12]$ isainfo -nv
64-bit sparcv9 applications
[fvsupprt@SON-TDI fvsupprt 13]$ isainfo -kv
64-bit sparcv9 kernel modules
[fvsupprt@SON-TDI fvsupprt 14]$ isainfo -v
64-bit sparcv9 applications
32-bit sparc applications
[fvsupprt@SON-TDI fvsupprt 15]$ isainfo
sparcv9 sparc

   
       `psrinfo -v` aggrees with `isainfo` command:
[fvsupprt@SON-TDI fvsupprt 17]$ psrinfo -v
Status of processor 0 as of: 05/16/06 10:42:03
  Processor has been on-line since 04/17/06 11:40:07.
  The sparcv9 processor operates at 400 MHz,
        and has a sparcv9 floating point processor.
Status of processor 1 as of: 05/16/06 10:42:03
  Processor has been on-line since 04/17/06 11:40:09.
  The sparcv9 processor operates at 400 MHz,
        and has a sparcv9 floating point processor.
Status of processor 2 as of: 05/16/06 10:42:03
  Processor has been on-line since 04/17/06 11:40:09.
  The sparcv9 processor operates at 400 MHz,
        and has a sparcv9 floating point processor.
Status of processor 3 as of: 05/16/06 10:42:03
  Processor has been on-line since 04/17/06 11:40:09.
  The sparcv9 processor operates at 400 MHz,
        and has a sparcv9 floating point processor.
[fvsupprt@SON-TDI fvsupprt 18]$
   
       The answer in the post suggests that `uname -p` is the right command to use but it looks otherwise in my case here. Shouldn't `uname -p` return sparcv9 on my machine?
   
      Any insight an enlightenment is appreciated.
   
  Regards,
  TEH
  
"Christopher L. Barnard" <cbar44@tsg.cbot.com> wrote:
  I asked

> I need to have a switch in a shell script determine if a server is sparc
> processor or has an inter processor (opteron). I know of several ways
> of doing this, but I am curious about other ways of checking, which ones
> are more dependable, or which ones have caused problems, that sort of info.
> The ones that immediately come to mind are
>
> "uname -i"
> "arch"
> prtconf | grep Configuration (check end of string)
> test for existence of /usr/bin/i86 directory
> "isainfo -n"
>
> Thanks for the info, and I'll summarize...

Answers.

Don't forget "psrinfo -v" and "uname -p". Also the /usr/bin/sparc and
/usr/bin/i386pc binaries will return 0 on their respective CPU types.
Testing for the /usr/bin/i86 directory is definitely not a good idea
because it can be there on a sparc system as well. arch has been
depreciated and use of it is discouraged.

It looks like "uname -p" is the one to use.

Thanks to

ray.mccaffity@usbank.com
Ian McNish
Ric Anderson
Ming Hou
Michael T Pins
John Sellin
Corey Hart
Thad MacMillan
Johan Hartzenberg
Sandwich Maker
Andrew Hall
Martin Wheatley
"Paul, Pratyush"

Richard Skelton
"Lineberger, Aaron"

+-----------------------------------------------------------------------+
| Christopher L. Barnard O When I was a boy I was told that |
| cbarnard@tsg.cbot.com / \ anybody could become president. |
| (312) 347-4901 O---O Now I'm beginning to believe it. |
| http://www.cs.uchicago.edu/~cbarnard --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers

                
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2"/min or less.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:39:52 EDT