Re: SUMMARY: How to tell SS10/30 from SS10/41 during bootup?

From: Jan Wortelboer (janw@fwi.uva.nl)
Date: Wed Mar 31 1993 - 06:25:43 CST


guy@Auspex.COM (Guy Harris) writes:

>>Bootup messages.
>>
>>* A model 41 says on boot-up - SuperSPARC/SuperCache PAC Enabled.
>> A model 30 will just say - SuperSPARC PAC enabled.
>> (Presumably a model 20 will pattern like the model 30.)
>>
>>* cpu = SUNW,SPARCstation-10
>> mod0 = TI,TMS390Z55 (mid = 8) => model 41 or 20.
>> mod0 = TI,TMS390Z50 (mid = 8) => model 30.

I yust have a shell script, wich tells me the model ;-)

Jan.

#!/bin/sh
#
# sunmodel
#
# Parse output from devinfo/prtconf
# and display the kind of Sun and its clock
# frequency.
#
# Jan Wortelboer janw@fwi.uva.nl idea from Chris Metcalf, metcalf@lcs.mit.edu
version=`uname -r`
hostje=`uname -n`
name=
bname=
freq=0
export name bname freq
case $version in
5.*)
        # solaris machine
        pr_conf="/usr/sbin/prtconf -vp"
        ;;
4.*)
        # sunos 4 machine
        pr_conf="/usr/etc/devinfo -vp"
        ;;
*)
        echo cant determine sunmodel
        exit 1
;;
esac

$pr_conf | ( egrep 'clock-frequency:|name:' ; echo end ) | while read pr_line
do
        case $pr_line in
        clock-frequency:*)
                if [ "$freq" = 0 ]
                then
                        set $pr_line
                        hex_freq=`echo $2 | tr '[a-z]' '[A-Z]'`
                        freq=` ( echo "ibase=16" ; echo $hex_freq ) | bc`
                        freq=`expr $freq \/ 1000000`
                fi
        ;;
        banner-name:*)
                bname=`echo $pr_line | sed 's/.*banner-name:[ ]*//'`
        ;;
        name:*)
                if [ "$name" = "" ]
                then
                        name=`echo $pr_line | sed 's/.*name:[ ]*//'`
                        if [ "$bname" = "" ]
                        then
                                bname=$name
                        fi
                fi
        ;;
        end)
                if [ `expr "$bname" : "'SPARCstation 10.*'"` != 0 ]
                then
                case $freq in
                        33)
                                bname="$bname '(Model 20)'"
                                ;;
                        36)
                                bname="$bname '(Model 30)'"
                                ;;
                        40)
                                bname="$bname '(Model 41)'"
                                ;;
                        45)
                                smodel=`expr "$bname" : "'SPARCstation 10 (\([1-8]\).*'"`
                                bname="$bname '(Model 5$smodel)'"
                                ;;
                esac
                fi
                echo Machine $hostje: $bname @ $freq MHz
        ;;
        *)
                echo -n
        ;;
        esac
done

-- 
Jan Wortelboer,  University of Amsterdam
                 Computer Science Department  Email: janw@fwi.uva.nl
Unix             Kruislaan 403 Kamer F003     Phone: +31 20 525 7501
systems manager  1098 SJ AMSTERDAM            Fax  : +31 20 525 7490



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:39 CDT