Changeset 3432 in MondoRescue for branches/3.2/mindi
- Timestamp:
- Aug 28, 2015, 2:34:47 AM (9 years ago)
- Location:
- branches/3.2/mindi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi/analyze-my-lvm
r3312 r3432 82 82 local device stripes stripesize device fname allocation output readahead 83 83 fname=$MINDI_TMP/PLF.$$.txt 84 fname2=$MINDI_TMP/PLF2.$$.txt 84 85 device=$1 85 86 output="" … … 89 90 [ "$stripesize" = "m" ] && stripesize=`GetValueFromField $fname "Stripe size (KByte)"`k 90 91 [ "$stripesize" = "k" ] && stripesize="" 91 allocation=`GetValueFromField $fname "LV Size"` 92 [ ! "`echo "$allocation" | grep "[k,m,g,t]"`" ] && allocation="$allocation"m 93 if echo "$allocation" | grep -E '^.*g$' > /dev/null 2> /dev/null ; then 94 val=`echo "$allocation" | sed s/g//` 95 allocation=`echo "$val" | awk '{c=$1; printf "%d", c*1024;}'`m 96 fi 92 currentLE=`GetValueFromField $fname "Current LE"` 93 vgname=`GetValueFromField $fname "VG Name"` 94 $LVMCMD vgdisplay $vgname | cat > $fname2 95 totalLE=`GetValueFromField $fname2 "Total PE"` 96 allocation=`perl -e '$per='$currentLE'*100/'$totalLE' ; print int($per+0.5)."%VG";'` 97 97 readahead=`GetValueFromField $fname "Read ahead sectors"` 98 rm -f $fname 98 rm -f $fname $fname2 99 99 [ "$stripes" ] && output="$output -i $stripes" 100 100 [ "$stripesize" ] && output="$output -I $stripesize" 101 [ "$allocation" ] && output="$output - L$allocation"101 [ "$allocation" ] && output="$output -l $allocation" 102 102 [ "$readahead" ] && output="$output -r $readahead" 103 103 echo "$output" -
branches/3.2/mindi/mindi
r3430 r3432 144 144 if [ _"$2" != _"" ]; then 145 145 grep -Ev "tar: Removing [a-z ]*\`/\'" "$2" >> $LOGFILE 146 fi147 rm -f "$2"146 rm -f "$2" 147 fi 148 148 } 149 149
Note:
See TracChangeset
for help on using the changeset viewer.