---------- X-Sun-Data-Type: text X-Sun-Data-Description: text X-Sun-Data-Name: text X-Sun-Charset: us-ascii X-Sun-Content-Lines: 17 Hi, Thankyou once again for our kind help.... Thanks to Jens Fischer Jim Harmon Matthew Reynolds brion@dia.state.ma.us howie@warlok.ds.boeing.com Virginia.Coffindaffer@wang.com chopin@sgh.waw.pl All the scripts are working perfectly for SOlaris. For Sunos, some of you had suggested to use "/usr/diag/sundiag/pmem v" But If there is a script which uses /usr/etc/devinfo -pv. It will be good. Thanks once again. ---------- X-Sun-Data-Type: default-app X-Sun-Data-Description: default X-Sun-Data-Name: get_mem_conf X-Sun-Charset: us-ascii X-Sun-Content-Lines: 48 #!/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 #rm /tmp/prtconf.tmp