SUMMARY: shell script test for an intel-chip based server

From: Christopher L. Barnard <>
Date: Mon May 15 2006 - 14:21:56 EDT
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...


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
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 |
|         / \    anybody could become president.  |
| (312) 347-4901               O---O   Now I'm beginning to believe it. |
|                --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+
sunmanagers mailing list
Received on Mon May 15 14:23:24 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:58 EST