Changeset b217a30
- Timestamp:
- 06/11/2020 01:59:59 PM (4 years ago)
- Branches:
- ablfs-more, legacy, trunk
- Children:
- b33c6ee
- Parents:
- 22bb166
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/create-sbu_du-report.sh
r22bb166 rb217a30 51 51 52 52 # Parse only that logs that have time data 53 BUILDLOGS="`grep -l "^Totalseconds:" ${LOGSDIR}/*`" 53 pushd ${LOGSDIR} 54 BUILDLOGS="`grep -l "^Totalseconds:" * | sort -n`" 54 55 55 56 # Match the first timed log to extract the SBU unit value from it 56 FIRSTLOG=`grep -l "^Totalseconds:" $LOGSDIR/*| head -n1`57 BASELOG=`grep -l "^Totalseconds:" $LOGSDIR/???-binutils* | head -n1`57 FIRSTLOG=`grep -l "^Totalseconds:" * | sort -n | head -n1` 58 BASELOG=`grep -l "^Totalseconds:" ???-binutils* | head -n1` 58 59 echo -e "\nUsing ${BASELOG#*[[:digit:]]-} to obtain the SBU unit value." 59 60 SBU_UNIT=`sed -n 's/^Totalseconds:\s\([[:digit:]]*\)$/\1/p' $BASELOG` 61 popd 60 62 echo -e "\nThe SBU unit value is equal to $SBU_UNIT seconds.\n" 61 63 echo -e "\n\n$LINE\n\nThe SBU unit value is equal to $SBU_UNIT seconds.\n" >> "$REPORT" … … 74 76 # Start SBU calculation 75 77 # Build time 76 TIME=`sed -n 's/^Totalseconds:\s\([[:digit:]]*\)$/\1/p' $ log`78 TIME=`sed -n 's/^Totalseconds:\s\([[:digit:]]*\)$/\1/p' ${LOGSDIR}/$log` 77 79 SECS=`perl -e 'print ('$TIME' % '60')';` 78 80 MINUTES=`perl -e 'printf "%.0f" , (('$TIME' - '$SECS') / '60')';` … … 84 86 # Start disk usage calculation 85 87 # Disk usage before unpacking the package 86 DU1=`grep "^KB: " $ log | head -n1 | cut -f1 | sed -e 's/KB: //'`88 DU1=`grep "^KB: " ${LOGSDIR}/$log | head -n1 | cut -f1 | sed -e 's/KB: //'` 87 89 DU1MB=`perl -e 'printf "%.3f" , ('$DU1' / '1024')';` 88 90 # Disk usage before deleting the source and build dirs 89 DU2=`grep "^KB: " $ log | tail -n1 | cut -f1 | sed -e 's/KB: //'`91 DU2=`grep "^KB: " ${LOGSDIR}/$log | tail -n1 | cut -f1 | sed -e 's/KB: //'` 90 92 DU2MB=`perl -e 'printf "%.3f" , ('$DU2' / '1024')';` 91 93 # Calculate disk space required to do the build
Note:
See TracChangeset
for help on using the changeset viewer.