home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / sgi / 16552 < prev    next >
Encoding:
Text File  |  1992-11-17  |  4.5 KB  |  106 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!think.com!ames!pioneer.arc.nasa.gov!lamaster
  3. From: lamaster@pioneer.arc.nasa.gov (Hugh LaMaster)
  4. Subject: Re: what should an arch command return on an indigo?
  5. Message-ID: <1992Nov17.203014.23845@news.arc.nasa.gov>
  6. Sender: usenet@news.arc.nasa.gov
  7. Organization: NASA Ames Research Center, Moffett Field, CA
  8. References: <grl.721642136@groucho> <1992Nov16.200138.24748@cc.ic.ac.uk> <1992Nov16.215158.12838@news.arc.nasa.gov> <8290@lhdsy1.lahabra.chevron.com>
  9. Date: Tue, 17 Nov 1992 20:30:14 GMT
  10. Lines: 94
  11.  
  12. In article <8290@lhdsy1.lahabra.chevron.com>, shc@lhdsy1.lahabra.chevron.com (S.H. Couturie) writes:
  13. |> In article <1992Nov16.215158.12838@news.arc.nasa.gov> lamaster@pioneer.arc.nasa.gov (Hugh LaMaster) writes:
  14. |> >In article <1992Nov16.200138.24748@cc.ic.ac.uk>, vulture@imperial.ac.uk (Thomas Sippel - Dau) writes:
  15. :
  16. :
  17.  
  18. |> 
  19. |> **** We have, up until now, standardized on the HOSTTYPE names "tcsh" uses;
  20. |>      why reinvent the wheel?
  21.  
  22. "tcsh" is hardly a standard everywhere.  Also, I don't like some of its name
  23. choices (why don't THEY resemble the output of "arch" and/or "uname"?):
  24.  
  25. On an SGI 4D/30, this is what I get (hmm):
  26. HOSTTYPE=iris4d
  27. On a DECsystem 5500, this is what I get (ugh):
  28. HOSTTYPE=decstation
  29. On a Sun-4, this is what I get (hurray!):
  30. HOSTTYPE=sun4
  31.  
  32.  
  33. |> **** There is a (more-or-less) standard command:  /bin/uname!
  34.  
  35. Good point.  I have not looked at it for a while.  I rejected in the past.
  36. Let's see what it gives from uname -s/uname -m:
  37. On a 4D/30:
  38. IRIX
  39. IP12
  40. On a DECsystem 5500:
  41. ULTRIX
  42. RISC
  43. On a Sun-4/690:
  44. SunOS
  45. sun4m
  46.  
  47. These are not bad.  They are very inconsistent from vendor to vendor.
  48. DEC is very general ("RISC" - isn't Alpha a "RISC" also?), Sun is
  49. middle of the road (sun4m is too specific for user binaries, but it
  50. can be fixed), while SGI is very specific (IP12 is too specific-
  51. most user binaries will work on most, and at least a large subset,
  52. of 4D systems).  They can't be used directly to construct a
  53. reasonable architecture name ("IP12", for example, is both ugly
  54. and too specific).  A long list of possibilities will have to be
  55. maintained for some vendors (SGI).  However, "uname" may be the only
  56. workable solution.  It was not available on all systems in the past,
  57. or at least it didn't work well enough...
  58.  
  59. |> 
  60. |> Since IRIX 4.0, uname -s returns IRIX.  uname -m returns CPU type, which is
  61. |> easy to parse into the appropriate bin if you want to separate R4K from R3K
  62. |> binaries.  For now, we detect on uname -s, and, if IRIX is returned, 
  63. |> set the enviromental variable HOSTTYPE to "iris4d".  I can see the coming
  64. |> need for "iris4d-r4k" or something like that, distinguished from 
  65. |> "iris4d-r3k".  (I know that backward compatibility is a curse, so I 
  66. |> won't belabor the point, but it's too bad that some of those nice
  67. |> R4000 features can't be emulated somehow on the R3000's .....)
  68.  
  69. Another problem is what to do about different graphics consoles, and the
  70. different binaries they sometimes need (at least, to be efficient).
  71.  
  72. |> 
  73. |> But, in general, it seems that uname -a returns all that is needed.  It 
  74. |> would be nice if SGI packaged up a "arch" and "arch -k" like replacement
  75. |> for IRIX, and nailed down the necessary distinguishing names for all time.
  76. |> But, there is no chance of getting DEC and IBM and HP and ... to all 
  77. |> agree to do that, so you have to use uname anyway!  
  78.  
  79. Probably you are right.  Sigh.  However, I still maintain that this DOES
  80. need to be done, and we have a definite requirement for it.
  81.  
  82. Anything that doesn't work so that the user's login shell can detect,
  83. via .cshrc or whatever, the architecture, and respond appropriately, will
  84. not work.  It has to work with a common home directory exported from a 
  85. fileserver to all the commonly used/available architectures, including,
  86. but not limited to all architectures from: Sun, DEC, SGI, IBM, HP, Convex, 
  87. Cray, Amdahl UTS, ...(unameit)
  88.  
  89. |> Of course, there is also /bin/4d and friends, but that is clumsy and silly.
  90.  
  91. Agreed.  This isn't a general solution.
  92.  
  93. |> 
  94. |> Steve
  95. |> --
  96. |> Steve Couturie                      Voice:     (310) 694-9332    
  97. |> Chevron Information Technology Co.  FAX:       (310) 694-7709
  98. |> P.O. Box  446                       Internet:  shc@chevron.com
  99. |> La Habra, CA  90633-0446            UUCP:      ...!uunet!lhdsy1!shc
  100.  
  101. -- 
  102.   Hugh LaMaster, M/S 233-9,     UUCP:      ames!lamaster
  103.   NASA Ames Research Center     Internet:  lamaster@ames.arc.nasa.gov
  104.   Moffett Field, CA 94035-1000  Or:        lamaster@george.arc.nasa.gov 
  105.   Phone:  415/604-1056                     #include <usenet/std_disclaimer.h> 
  106.