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 <ian@ians.net> Ric Anderson <ric@opus1.com> Ming Hou <ming@ddtechcg.com> Michael T Pins <mtpins@nndev.org> John Sellin <jwsellin@mpccorp.com> Corey Hart <Corey.Hart@synopsys.com> Thad MacMillan <thadm@oregonian.com> Johan Hartzenberg <jhartzen@csc.com> Sandwich Maker <adh@an.bradford.ma.us> Andrew Hall <halla3@corp.earthlink.net> Martin Wheatley <Martin.Wheatley@jet.uk> "Paul, Pratyush" <pratyush.paul@cingular.com> Richard Skelton <Richard.Skelton@infineon.com> "Lineberger, Aaron" <alineberger@ncdoc.navy.mil> +-----------------------------------------------------------------------+ | 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/sunmanagersReceived 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