I have this working ksh, and it returns like below:
LOGICAL VOLUME: prod_2048_005 VOLUME GROUP: prod1vg
TYPE: raw WRITE VERIFY: off
PHYSICAL VOLUME: hdisk108 VOLUME GROUP: prod1vg
TOTAL PPs: 1023 (130944 megabytes) VG DESCRIPTORS: 1
USED PPs: 904 (115712 megabytes) MAX REQUEST: 1 megabyte USED DISTRIBUTION: 192..205..204..204..99
FREE PPs: 119 (15232 megabytes) HOT SPARE: no FREE DISTRIBUTION: 13..00..00..00..106
I like to have a horizontal format with additional PP Size info with the header names like below:
i.e.
LV TYPE PV TOTAL USED FREE PP
prod_2048_005 raw hdisk101 1023 904 119 32
for i in `cat temp.txt`
do
for n in `lslv -l $i|cut -d" " -f1|egrep -v "PV|:"`
do
echo `lslv $i|egrep "LOGICAL VOLUME"`
echo `lslv $i|egrep "TYPE"`
echo `lspv $n|egrep "PHYSICAL VOLUME"`
echo `lspv $n|egrep "TOTAL"`
echo `lspv $n|egrep "USED"`
echo `lspv $n|egrep "FREE"`
echo
done
done
Please advise.
thx mucg
LOGICAL VOLUME: prod_2048_005 VOLUME GROUP: prod1vg
TYPE: raw WRITE VERIFY: off
PHYSICAL VOLUME: hdisk108 VOLUME GROUP: prod1vg
TOTAL PPs: 1023 (130944 megabytes) VG DESCRIPTORS: 1
USED PPs: 904 (115712 megabytes) MAX REQUEST: 1 megabyte USED DISTRIBUTION: 192..205..204..204..99
FREE PPs: 119 (15232 megabytes) HOT SPARE: no FREE DISTRIBUTION: 13..00..00..00..106
I like to have a horizontal format with additional PP Size info with the header names like below:
i.e.
LV TYPE PV TOTAL USED FREE PP
prod_2048_005 raw hdisk101 1023 904 119 32
for i in `cat temp.txt`
do
for n in `lslv -l $i|cut -d" " -f1|egrep -v "PV|:"`
do
echo `lslv $i|egrep "LOGICAL VOLUME"`
echo `lslv $i|egrep "TYPE"`
echo `lspv $n|egrep "PHYSICAL VOLUME"`
echo `lspv $n|egrep "TOTAL"`
echo `lspv $n|egrep "USED"`
echo `lspv $n|egrep "FREE"`
echo
done
done
Please advise.
thx mucg