- Timestamp:
- Apr 11, 2016, 12:45:32 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi/analyze-my-lvm
r3499 r3559 94 94 $LVMCMD vgdisplay $vgname | cat > $fname2 95 95 totalLE=`GetValueFromField $fname2 "Total PE"` 96 allocation=`perl -e '$per='$currentLE'*100/'$totalLE' ; print int($per+0.5)."%VG";'` 96 ratio=`perl -e '$per='$currentLE'*100/'$totalLE' ; print int($per)'` 97 if [ $ratio -eq 0 ]; then 98 # In that case, restoration will fail with 0% so use value 99 output="$output -l $currentLE" 100 else 101 allocation=`perl -e 'print int('$ratio')."%VG"'` 102 output="$output -l $allocation" 103 fi 97 104 readahead=`GetValueFromField $fname "Read ahead sectors"` 98 105 rm -f $fname $fname2 99 106 [ "$stripes" ] && output="$output -i $stripes" 100 107 [ "$stripesize" ] && output="$output -I $stripesize" 101 [ "$allocation" ] && output="$output -l $allocation"102 108 [ "$readahead" ] && output="$output -r $readahead" 103 109 echo "$output"
Note:
See TracChangeset
for help on using the changeset viewer.