From: bmaggio@wort.dcs.bellcore.com (Bill Maggio)
Subject: SUMMARY: Host ID
Organization: Bellcore, Livingston, NJ
Date: Tue, 12 Jan 93 21:25:56 GMT
Keywords: SUMMARY Host ID


Recently, I wrote:

>does anyone know how to translate the host id info
>into the Sun system hardware type (eg 670,490,etc)?

Many thanks to all who responded:  

uug@cpsc.ucalgary.ca
kevan@cis.prime.com
janw@fwi.uva.nl
beaulieu@bose.com
euapbn@eua.ericsson.se 


Here is a posting of the responses I received:


=========================================================================

From: uug@cpsc.ucalgary.ca (William Graham):

Compare the high byte against the #defines in /usr/include/mon/idprom.h.

=========================================================================

From: kevan@cis.prime.com:

Here is a small program I have got for showing the type of Sun I am using.

#---------------------- Cut Here ----------------------------------------
#! /bin/csh -f

set host_id = `hostid`

if ( ${host_id} =~ 12* ) then
	set machine_type =  "3/50"
else if ( ${host_id} =~ 17* ) then
	set machine_type =  "3/60"
else if ( ${host_id} =~ 42* ) then
	set machine_type =  "3/80"
else if ( ${host_id} =~ 11* ) then
	set machine_type =  "3/XXX"
else if ( ${host_id} =~ 13* ) then
	set machine_type =  "3/XXX"
else if ( ${host_id} =~ 14* ) then
	set machine_type =  "3/XXX"
else if ( ${host_id} =~ 41* ) then
	set machine_type =  "3/XXX"
else if ( ${host_id} =~ 21* ) then
	set machine_type =  "4/XXX"
else if ( ${host_id} =~ 22* ) then 
	set machine_type =  "4/110"
else if ( ${host_id} =~ 23* ) then
	set machine_type =  "4/XXX"
else if ( ${host_id} =~ 24* ) then
	set machine_type =  "4/XXX"
else if ( ${host_id} =~ 51* ) then
	set machine_type =  "SparcStation 1"
else if ( ${host_id} =~ 52* ) then
	set machine_type =  "SparcStation IPC"
else if ( ${host_id} =~ 53* ) then
	set machine_type =  "SparcStation 1+"
else if ( ${host_id} =~ 54* ) then
	set machine_type =  "SparcStation SLC"
else if ( ${host_id} =~ 55* ) then
	set machine_type =  "SparcStation 2"
else if ( ${host_id} =~ 56* ) then
	set machine_type =  "SparcStation ELC"
else if ( ${host_id} =~ 57* ) then
	set machine_type =  "SparcStation IPX"
else if ( ${host_id} =~ 72* ) then
	set machine_type =  "SparcStation 10/30"
else if ( ${host_id} =~ 80* ) then
	set machine_type =  "SparcClassic"
else
	set machine_type =  "Unknown"
endif

echo "Machine : $machine_type"

#---------------------- Cut Here ----------------------------------------


=========================================================================

From: janw@fwi.uva.nl (Jan Wortelboer):

Take the first 2 digits of the hostid and compare them with the following list:


0x11, "3/160",
0x12, "3/50",
0x13, "3/260",
0x14, "3/110",
0x17, "3/60",
0x18, "3/E",
0x41, "3/470",
0x42, "3/80",
0x21, "4/260",   /**/
0x22, "4/110",   /**/
0x23, "4/330",   /**/
0x24, "4/470",   /**/
0x51, "4c/60",   /*SPARCstation 1*/
0x52, "4c/40",   /*SPARCstation IPC*/
0x53, "4c/65",   /*SPARCstation 1+*/
0x54, "4c/20",   /*SPARCstation SLC*/
0x55, "4c/75",   /*SPARCstation 2*/
0x56, "4c/25",   /*SPARCstation ELC*/
0x57, "4c/50",   /*SPARCstation IPX*/
0x58, "4c/70",   /**/
0x59, "4c/80",   /**/
0x5a, "4c/10",   /**/
0x5b, "4c/45",   /**/
0x5c, "4c/05",   /**/
0x5d, "4c/85",   /**/
0x5e, "4c/32",   /**/
0x5f, "4/HIKE",
0x60, "4/120",  /*Sun 4e /120??*/
0x61, "4e/120",
0x71, "4m/60",  /*Sun 4m /60 690/670??*/
0x72, "4m/50",  /*Sun 4m /50 SS10/20 ??*/
0x73, "4m/40",  /*Sun 4m /40 ??*/
0x80, "4m/??",  /*Sun 4/15?30 (Classic?LX) */
0x81, "4d/",    /*sun4d */

=========================================================================

From: beaulieu@bose.com (Larry Beaulieu):

	The 1st 2 characters of the hostid identify the CPU type.
	This does not distinguish between systems of the same
	CPU type, e.g. 4/470 and 4/490, however it does distinguish
	between 3/50, 3/60, 3/80, SS1, SS1+, SS2, IPC, ELC, SLC, IPX,
	4/300, 4/400, etc.

	This info was documented by Sun in one of their monthly
	software bulletins about a year ago, unfortunately I no
	longer have the manual.

=============================================================================

euapbn@eua.ericsson.se (Per.Borjeson):
|> 
|> 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
|> 
|> 




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