SUMMARY: installed memory config

sburch@derwent.co.uk
Thu, 15 May 1997 14:50:08 +0100

My original question was :-

Is is possible to display the exact sim configuration in a system without
physically removing the lid.

The answer is yes, the following is a summary of the replies I recieved :-

1) /usr/kvm/ptrdiag, though this only seems to be available pre Solaris
2.5. Post 2.5 it seems to have disappeared as a result of OS changes.

2) use the prom diagnostics as follows :-

- shut down to PROM level

- setenv diag-switch? true

- reset

The system will take some time to reset, but when the video comes on there
will be a list of what is in each memory slot. You can STOP-A and reset
diag-switch? back to false, after that.

Obviously this requires system down time which I was trying to avoid
however for those people with a screwdriver...

3) Several scripts were supplied, the one which seemed to provide the most
consistent and correct results was as follows (courtesy of
fischjns@kat.ina.de)

#!/bin/sh
prtconf -pv | grep -v translations > /tmp/prtconf.tmp type=`grep
banner-name /tmp/prtconf.tmp |
sed -e 's/.*'\''\(.*\)'\''/\1/'`

ss20=false
case "$type" in
"Sun Ultra"*)
groups=4
;;
"SPARCstation 20"*)
groups=3
ss20=true
;;
"SPARCstation LX"*)
groups=3
;;
"SPARCstation 5"*)
groups=3
;;
"") # IPX shows no banner name, don't no about other sun4c machines
groups=3
;;
default)
echo "unknown machine type $banner-name for $var" ;;
esac

# for debugging:
# echo "$type $groups"
# echo $reg

banks=`awk '
BEGIN { groups='$groups' }
/reg:/ {reg=$2}
/name:.*'\''memory'\''/ {
nreg=split(reg,regar,".")
for(i=groups;i<=nreg;i+=groups) print substr(regar[i],1,3)
}' /tmp/prtconf.tmp | (echo 'ibase=16';cat) | bc`

if [ $ss20 = true ]
then
echo $banks | awk '{for(i=1;i<=NF;i++) printf("%5s",$i)} END {print}' |
sed -e 's/16 16/32/g'
else
echo $banks | awk '{for(i=1;i<=NF;i++) printf("%5s",$i)} END {print}'
fi

Jens made the following follow up comments:-

I forgot to mention in my mail that the output of my script shows the
amount of memory in each bank, so you need to know how much SIMMs belong to
each bank if you realy want to know the size of each single SIMM.

E.g. if the output is 64 64 on an Ultra 1 this means that there are two
banks with 64 MB, each of them consist of 2 SIMMs with 32 MB each as the
SIMMs in an Ultra 1 are installed in pairs.

Kind Regards - Jens Fischer

Basically when I ran the script on my system it reported 3x32MB sim banks
which basically means (2x16MB)x3 (Ultras take simms in pairs). This meant
given the 8 total simm slots I had two to play with or a further pair
(2x16=32,2x32=64,2x128=256).

A second script, memconf, was supplied (from a previous summary) but this
seemed to produce incorrect results for one of my Ultras.

Some of this information came from a previous summary which can be found by
search the sun manager archives (for simm) at :-

http://www.dataman.nl/cgi-bin/sunmanagers

or

http://www.latech.edu/sunman.html

Again many thanks to those people who replied.

**************************************************************************
* *
* Stuart Burch Derwent Information Publishing *
* (System Administrator/Developer) 14 Great Queens Street *
* London *
* Group Business Development WC2B 5DF. *
* *
* Email: sburch@derwent.co.uk Tel: 0171-344 2800 x 3001 *
* *
**************************************************************************