SUMMARY:A script to show memory install on server

From: wsfsdfsd fewrfrefer <wdeafcds_at_usa.com>
Date: Thu Jan 09 2003 - 13:58:01 EST
Thanks to:
Sid Wilroy
Tom Schmidt
Alex Ranchoux
Zaigui Wang
McMurtrey, Thomas M
Bertrand_Hutin

Over whelming respoonse was to use memconf which is a perl script. Sid Wilroy also suggested
using prtdiag -v and the following script to get the DIMM sizes and banks..
#!/usr/bin/ksh
/usr/sbin/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

-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Meet Singles
http://corp.mail.com/lavalife
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Jan 9 14:02:28 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:01 EST