----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Content-Lines: 7
The direct answer was SS10 model 30.
Along with direct answers I have been given 3 scripts which devine the
answer for the machine it is run on. Since I don't have perl I could
not test the 3rd script but I suspect it would agree with the other 2.
Thanks all.
----------
X-Sun-Data-Type: shell-script
X-Sun-Data-Description: shell-script
X-Sun-Data-Name: sunmodel
X-Sun-Content-Lines: 81
#!/bin/sh
#
# sunmodel
#
# Parse output from devinfo/prtconf
# and display the kind of Sun and its clock
# frequency.
#
# Jan Wortelboer 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
----------
X-Sun-Data-Type: shell-script
X-Sun-Data-Description: shell-script
X-Sun-Data-Name: suns-sunmodel
X-Sun-Content-Lines: 233
#!/bin/sh
#
# Copyright 1992, Sun Microsystems Computer Corp.
# All Rights Reserved
#
#
#
PATH=/etc:/bin:/usr/bin:/usr/etc:/usr/ucb; export PATH
#
#
if [ `uname -m` = "sun4" ]; then
echo "This machine does not support the Open Boot Prom information"
echo "that is extracted by the devinfo or prtconf commands."
exit
fi
if [ -x /etc/prtconf ]; then
PRTCONF=prtconf
else
PRTCONF=devinfo
fi
#
# Find CPU node(s) and their clock frequency, if any
#
$PRTCONF -pv | awk ' \
BEGIN { ncpu = 0 } \
$1 == "Node" { \
if (idprom != "") { \
sysfreq = freq; sysname = name; name = ""; freq = "" \
} \
if (type == "'"'cpu'"'") { ncpu++; cputype = name; cpufreq = freq } \
name = ""; freq = ""; type = "" ; idprom = "" \
} \
$1 != "Node" { \
if ($1 == "name:") { \
name = $2; \
for (i = 3; i <= NF; i++) name = name "-" $i \
} \
if ($1 == "device_type:") { type = $2 } \
if ($1 == "clock-frequency:") { \
for (i = 1; i <= length ($2); i++) { \
c = substr ($2, i, 1); \
if (c == "a") freq = freq "A"; \
else if (c == "b") freq = freq "B"; \
else if (c == "c") freq = freq "C"; \
else if (c == "d") freq = freq "D"; \
else if (c == "e") freq = freq "E"; \
else if (c == "f") freq = freq "F"; \
else freq = freq c; \
} \
} \
if ($1 == "idprom:") { idprom = $2 } \
} \
END { \
if (idprom != "") { sysfreq = freq; sysname = name } \
if (type == "'"'cpu'"'") { ncpu++; cputype = name; cpufreq = freq } \
if (ncpu == 0) { ncpu = 1 } \
print sysfreq, " ", sysname, " ", ncpu, " ", cputype, " " cpufreq \
} ' \
> /tmp/xxxmixxx
#
# Convert clock frequency from Hex Hz to Decimal MHz
#
read SYSFREQ SYSNAME NCPU CPUTYPE CPUFREQ < /tmp/xxxmixxx
echo "16 i 1 k" $SYSFREQ "F4240 / p q" >/tmp/xxxmixxx
dc </tmp/xxxmixxx >/tmp/xxxmiyyy
read SYSFREQN < /tmp/xxxmiyyy
if [ $CPUFREQ ]; then
echo "16 i 1 k" $CPUFREQ "F4240 / p q" >/tmp/xxxmixxx
dc </tmp/xxxmixxx >/tmp/xxxmiyyy
read CPUFREQN < /tmp/xxxmiyyy
if [ $SYSFREQN -gt $CPUFREQN ]; then
echo $CPUFREQN "0 k 1 / 1 k 1.0 * p" >/tmp/xxxmixxx
dc </tmp/xxxmixxx >/tmp/xxxmiyyy
read SYSFREQN < /tmp/xxxmiyyy
SYSFREQ="xxx"
fi
fi
rm /tmp/xxxmixxx
rm /tmp/xxxmiyyy
#
# Implement new naming conventions, with MP suffix
MPCPU=$NCPU
MPCPU0="0"
if [ $NCPU -gt 1 ]; then
MPCPU="1"$NCPU"MP"
MPCPU0="0"$NCPU"MP"
fi
# Based on system name, CPU type, etc., display model
#
case $SYSNAME in
*600"'")
case $CPUTYPE in
"'"TI*)
case $CPUFREQN in
33*)
echo "SPARCsystem 600 Model 2"$MPCPU
;;
36*)
echo "SPARCsystem 600 Model 3"$MPCPU
;;
40*)
echo "SPARCsystem 600 Model 4"$MPCPU
;;
45*)
echo "SPARCsystem 600 Model 5"$NCPU
;;
50*)
echo "SPARCsystem 600 Model 5"$MPCPU
;;
*)
echo "SPARCsystem 600," $NCPU $CPUTYPE \
"processors @" $CPUFREQN "MHz"
;;
esac
;;
"'"Cypress*)
case $NCPU in
2)
echo "SPARCsystem 600MP Model 120"
;;
4)
echo "SPARCsystem 600MP Model 140"
;;
*)
echo "SPARCsystem 600MP," $NCPU $CPUTYPE \
"processors @" $CPUFREQN "MHz"
;;
esac
;;
*)
echo "SPARCsystem 600," $NCPU $CPUTYPE "processors @" \
$CPUFREQN "MHz"
;;
esac
;;
*-10"'")
if [ $CPUFREQ ]; then
case $CPUFREQN in
33*)
echo "SPARCstation 10 Model 2"$MPCPU
;;
36*)
echo "SPARCstation 10 Model 3"$MPCPU
;;
40*)
echo "SPARCstation 10 Model 4"$MPCPU
;;
45*)
echo "SPARCstation 10 Model 5"$NCPU
;;
50*)
echo "SPARCstation 10 Model 5"$MPCPU
;;
*)
echo "SPARCstation 10," $NCPU "processors @" \
$CPUFREQN "MHz with SuperCache"
;;
esac
else
case $SYSFREQN in
33*)
echo "SPARCstation 10 Model 2"$MPCPU0
;;
36*)
echo "SPARCstation 10 Model 3"$MPCPU0
;;
40*)
echo "SPARCstation 10 Model 4"$MPCPU0
;;
*)
echo "SPARCstation 10," $NCPU "processors @" \
$SYSFREQN "MHz without SuperCache"
;;
esac
fi
;;
*-1000"'")
echo "SPARCserver 1000," $NCPU "processors @" $CPUFREQN "MHz"
;;
*-2000"'")
echo "SPARCcenter 2000," $NCPU "processors @" $CPUFREQN "MHz"
;;
*4/20"'")
echo "SPARCstation SLC"
;;
*4/25"'")
echo "SPARCstation ELC"
;;
*4/40"'")
echo "SPARCstation IPC"
;;
*4/50"'")
echo "SPARCstation IPX"
;;
*4/60"'")
echo "SPARCstation 1"
;;
*4/65"'")
echo "SPARCstation 1+"
;;
*4/75"'")
echo "SPARCstation 2"
;;
*-LC"'")
echo "SPARCclassic"
;;
*-LX"'")
echo "SPARCstation LX"
;;
*)
echo $SYSNAME
;;
esac
#
# Display details if desired
#
if [ $1 -a $1 = "-v" ]; then
echo $SYSNAME
if [ $CPUTYPE ]; then
if [ $NCPU -gt 1 ]; then
S="s"
else
S=""
fi
echo $NCPU $CPUTYPE "processor"$S
fi
echo "System clock at" $SYSFREQN "MHz"
if [ $CPUFREQ ]; then
if [ $SYSFREQ != $CPUFREQ ]; then
echo "Module clock"$S "at" $CPUFREQN "MHz"
fi
fi
fi
----------
X-Sun-Data-Type: mail-file
X-Sun-Data-Description: mail-file
X-Sun-Data-Name: sunmodel.perl
X-Sun-Encoding-Info: uuencode
X-Sun-Content-Lines: 66
begin 600 sunmodel.perl
M1G)O;2!M971C86QF0&-A=&9I<V@N3$-3+DU)5"Y%1%4@5&AU($IA;B Q,R P
M.3HQ-SHR-B Q.3DT"D1A=&4Z(%1H=2P@,3,@2F%N(#$Y.30@,#DZ,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UE("X]("(@*$UO9&5L(#4D8W!U<R1C86-H92DB.PH)?2!E;'-E('L*
M"0DD;F%M92 N/2 B("AU;FMN;W=N(%1-4S,Y,%H@;6]D96P@0" D8V9R97$@
M34AZ*2(["@E]"GT*:68@*"1N86UE(&5Q(")3=6X@-"\W-2(I('L*"21N86UE
M("X]("(@*%-005)#<W1A=&EO;B R*2(["GT@96QS:68@*"1N86UE(&5Q(")3
M=6X@-"\T,"(I('L*"21N86UE("X]("(@*%-005)#<W1A=&EO;B!)4$,I(CL*
M?2!E;'-I9B H)&YA;64@97$@(E-U;B T+S8U(BD@>PH))&YA;64@+CT@(B H
M4U!!4D-S=&%T:6]N(#$K*2(["GT*"G!R:6YT("(D;F%M92! ("1B87-E9G)E
5<2!-2'HD>V-P=69R97%]7&XB.PH*
end
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:54 CDT