๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun.hardware
Article #2345

Re: Host ID

#2345
From: Per.Borjeson
Date: Tue, 12 Jan 1993 15:10
146 lines
4811 bytes
In article 20462@porthos.cc.bellcore.com, bmaggio@wort.dcs.bellcore.com (Bill Maggio) writes:
> does anyone know how to translate the host id info 
> into the the Sun system hardware type (eg 670,490,etc)?
> 
> thanx,
> 
> bill maggio
> 
> 
> -------------------------------------------------------------------------------
> William J. Maggio                       Email     : bmaggio@bellcore.com
> Bellcore                                SnailMail : bellcore!bmaggio
> 6 Corporate Place, PYA-1J257            VoiceMail : 908-699-6864
> Piscataway, NJ 08855-1320               Fax       : 908-336-2237


Hello Bill!

Here is a small script that will test this:

#!/bin/csh -f
########################################################################
# Detta script anvands for att ta reda p} maskintyp och minne  AKF/SHE #
# Rev: 1.0     901010            Created        #
# Rev: 1.1     901212            added ss2      #
# Rev: 1.2     910416            Only 4.1.1     #
# Rev: 1.3     910603            added IPC      #
# Rev: 1.4     920727            added IPX      #
# Rev: 1.5     920813            added 690      #
########################################################################


set prog=$0;set prog=$prog:t
set hosts=($argv)

if ( $#hosts == 0) then
   set hosts=`hostname`
endif

set hosts=(`show_hosts $hosts`)

foreach h ( $hosts)
   nawk 'BEGIN{printf("%-9s ==>>",h)}' h=$h
        /usr/etc/ping $h 3 >&/dev/null
        if ( $status ) then
               echo ": NOT RESPONDING"
      continue
   endif
   ### we want 5 arguments
   ### 11002ff6 mem = 8192K (0x800000)
   ###    1      2  3   4        5
   set result=(`rsh $h 'hostid;/etc/dmesg | grep "^mem =" | tail -1'`)
   set num memsize hostid
   if ( $#result >0 )then
      set hostid=$result[1]
      set num=`nawk 'BEGIN{print substr(h,1,2)}' h=$hostid`
   endif
   if ( $#result >4 )then
      set memsize=`nawk 'BEGIN{l=length(m);m=substr(m,1,l-1);m=m/1024;printf("%3dMb\n",m)}' m=$result[4]`
   endif
switch ( $num )

   case 01:
      set mtype="Sun 2 Multibus"
   breaksw
   case 02:
      set mtype="Sun 2 VME                  "
   breaksw
   case 04:
      set mtype="SolBourne S4000DX          "
   breaksw
   case 11:
      set mtype="Sun 3/180                  "
   breaksw
   case 12:
      set mtype="Sun 3/50                   "
   breaksw
   case 13:
      set mtype="Sun 3/280                  "
   breaksw
   case 14:
      set mtype="Sun 3/110                  "
   breaksw
   case 17:
      set mtype="Sun 3/60                   "
   breaksw
   case 20:
      set mtype="Personal Mainframe 5000    "
   breaksw
   case 21:
      set mtype="Sun 4/200 Series           "
   breaksw
   case 22:
      set mtype="Sun 4/110                  "
   breaksw
   case 23:
      set mtype="Sun 4/390                  "
   breaksw
   case 24:
      set mtype="Sun 4/470 or 4/490         "
   breaksw
   case 31:
      set mtype="Sun 386i                   "
   breaksw
   case 40:
      set mtype="Solbourne M500-series      "
   breaksw
   case 51:
      set mtype="Sun 4/60 ( Sparcstation1  )"
   breaksw
   case 52:
      set mtype="Sun 4/40 ( IPC            )"
   breaksw
   case 53:
      set mtype="Sun 4/65 ( Sparcstation1+ )"
   breaksw
   case 54:
      set mtype="Sparcstation SLC           "
   breaksw
   case 55:
      set mtype="Sun 4/75 ( Sparcstation2  )"
   breaksw
   case 56:
      set mtype="Sun 4/50 ( IPX            )"
   breaksw
   case 71:
      set mtype="Sun 4/600( GALAXY         )"
   breaksw
   default:
      set mtype="Machine type not defined   "
   breaksw
endsw
echo "Type=$mtype MEM : $memsize"

end


+-------------------------------------------------------+
!    Per Bรถrjeson                                       !
+-------------------------------------------------------+
!    Ellemtel Telecommunications Systems Laboratories   !
!    S-125 25 STOCKHOLM Sweden                          !
!    Phone   : +46 8 727 3507  Fax  : +46 8 47 82 76    !
+-------------------------------------------------------+
!    E-mail  : Per.Borjeson@eua.ericsson.se             !
+-------------------------------------------------------+
Technical Details
Message-ID: <1993Jan12.151056.6778@eua.ericsson.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!sics.se!eua.ericsson.se!euas41c05!euapbn
References: <1993Jan11.172408.20462@porthos.cc.bellcore.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.sun.hardware
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!sics.se!eua.ericsson.se!euas41c05!euapbn
From: euapbn@eua.ericsson.se (Per.Borjeson)
Subject: Re: Host ID
Message-ID: <1993Jan12.151056.6778@eua.ericsson.se>
Sender: news@eua.ericsson.se
Nntp-Posting-Host: euas41c05.eua.ericsson.se
Reply-To: euapbn@eua.ericsson.se
Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden
References: <1993Jan11.172408.20462@porthos.cc.bellcore.com>
Date: Tue, 12 Jan 1993 15:10:56 GMT
Lines: 147