Hi Akeelm,
Excuse me, please, i attach infdsk.
#!/usr/bin/ksh
tabs -4
arch=/tmp/tmp$$
echo "## Dbspaces por Discos - `date +%d/%m/%Y` - Server: '`uname -n`' ##"
raya="--------------------------------------------------------------------------
-----"
#raya="-------------------------------------------------------------------------
--------------------------------------------------------------------------------
---------------------------------------------------"
echo $raya
IFS="
"
total=0
echo "Dbspace \tLink Simbolico\t\t\tDevice\t\t\t\t\tDisk \t\tMb."
echo $raya
for i in `onstat -d|grep informix|grep -vE "[MP]O"|awk '{if($7!="T"&&$7!="B")
pr
int $2,$8; else print $2,$9 }'`
do
dbs=`echo $i|awk '{print $1}'`
name=`echo $i|awk '{print $2}'`
[ ! "$nameant" ] && nameant=$name
for j in `onstat -d|grep -E "[PM]O"|awk -v d=$dbs '{if($3==d) print $7,$8}'`
do
mir=`echo $j|awk '{print $1}'`
nom=`echo $j|awk '{print $2}'`
alias=`ls -l $nom|awk -F "->" '{print $2}'|sed -e 's/\/r/\//' -e 's/ //'`
i=0
tot=0
for gg in `/etc/lvdisplay -v $alias|grep -v current|grep -E "dsk|LV Size"|sed
's/\/dev\/dsk\///'|awk '{print $0}'`
do
if [ `echo $gg|grep -c LV` -eq 1 ]; then
tdsk=`echo $gg|awk '{printf "%-d\n",$4}'`
continue
fi
disk=`echo $gg|awk '{print $1}'`
let total=total+tdsk
let i=i+1
[ "$nameant" != $name ] && echo $raya && nameant=$name
if [ $i -eq 1 ] ; then
if [ "$mir" = "MO-" ] ; then
echo $name $nom $alias $disk $tdsk|awk '{printf "%-10s %-23s %-28s %-1c %
-10s %-4d\n",$1,$2,$3,"M",$4,$5}'
else
echo $name $nom $alias $disk $tdsk|awk '{printf "%-10s %-23s %-20s %-10s
%-5d\n",$1,$2,$3,$4,$5}'
fi
else
echo $disk $tdsk|awk '{printf "\t\t\t\t\t\t\t\t\tdisk mirroring\t\t\t% -10s %
-4d\n",$1,$2}'
fi
rm -f $arch
done
[ "$nameant" != $name ] && echo $raya && nameant=$name && tot=0
done
done
echo $raya
echo $total|awk '{printf "Total\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t%7d\n",$ 1/2}'
echo $raya
Gustavo.