(uname -a; lslpp -l bos.mp) | 
  awk '/^AIX/   {os=$1;hn=$2;id=$5;next}
       /bos.mp/ {vn=$2;next}
       END {printf("Host Name: %-8s\n",hn)
            printf("Operating System: %-4s %6s\n",os,vn)
            printf("Machine ID: %-12s\n",id)
            print(" ")}
      '
echo "Logical   Physical  Card  Card  Sequence  Serial    Size  Volume"
echo "Drive     Drive     Name  Port  number    Number    (K)   Group"
echo "--------  --------  ----  ----  --------  --------  ----  --------"

adapters=$(lsdev -Ccadapter -tssa | awk '{ print $1 }')
for adapter in $adapters
do
  disks=$(ssadisk -a $adapter -L)
  for disk in $disks
  do
    pdisk=$(ssaxlate -l $disk)
    (ssaxlate -l $disk; ssaxlate -l $pdisk; lsattr -l $disk -E; lspv $disk 2>nul; ssaconn -l $pdisk -a $adapter) | 
    awk '/^hdisk/           {hd=$1}
         /^connwhere_shad/  {sn=substr($2,5,8);next}
         /^size_in_mb/      {sz=$2;next}
         /^PHYSICAL VOLUME/ {vg=$6;next}
         /^pdisk/           {pd=$1;ad=$2;
                             {if ($3 != "-") {po="A1";sl=$3}};
                             {if ($5 != "-") {po="B1";sl=$5}};
                             sl++;next}
         END {printf("%-8s  %-8s  %-4s  %-4s %4d       %-8s  %4d  %-8s\n",hd,pd,ad,po,sl,sn,sz,vg)}
        '
  done
done
echo
vgroups=$(lsvg)
for vgroup in $vgroups
do
  (lsvg -l $vgroup)|awk '{if ($0 ~/:/)           {printf("%-12s",$1);next}}
                         {if (($0 !~/:/) && ($0 !~/MOUNT POINT/) && ($7 != "N/A")) 
                             {system("get_info.sh " $1 $7);next}}
                        '
done

