Update create-sbu-report so that it works with CLFS
and that it prints the last "Installed file size"
This commit is contained in:
parent
8ea21f8684
commit
125e05ec13
2 changed files with 16 additions and 3 deletions
|
@ -51,7 +51,8 @@ free >> "$REPORT"
|
||||||
BUILDLOGS="`grep -l "^Totalseconds:" ${LOGSDIR}/*`"
|
BUILDLOGS="`grep -l "^Totalseconds:" ${LOGSDIR}/*`"
|
||||||
|
|
||||||
# Match the first timed log to extract the SBU unit value from it
|
# Match the first timed log to extract the SBU unit value from it
|
||||||
BASELOG=`grep -l "^Totalseconds:" $LOGSDIR/* | head -n1`
|
FIRSTLOG=`grep -l "^Totalseconds:" $LOGSDIR/* | head -n1`
|
||||||
|
BASELOG=`grep -l "^Totalseconds:" $LOGSDIR/???-binutils* | head -n1`
|
||||||
echo -e "\nUsing ${BASELOG#*[[:digit:]]-} to obtain the SBU unit value."
|
echo -e "\nUsing ${BASELOG#*[[:digit:]]-} to obtain the SBU unit value."
|
||||||
SBU_UNIT=`sed -n 's/^Totalseconds:\s\([[:digit:]]*\)$/\1/p' $BASELOG`
|
SBU_UNIT=`sed -n 's/^Totalseconds:\s\([[:digit:]]*\)$/\1/p' $BASELOG`
|
||||||
echo -e "\nThe SBU unit value is equal to $SBU_UNIT seconds.\n"
|
echo -e "\nThe SBU unit value is equal to $SBU_UNIT seconds.\n"
|
||||||
|
@ -91,7 +92,7 @@ for log in $BUILDLOGS ; do
|
||||||
|
|
||||||
# Append installed files disk usage to the previous entry,
|
# Append installed files disk usage to the previous entry,
|
||||||
# except for the first parsed log
|
# except for the first parsed log
|
||||||
if [ "$log" != "$BASELOG" ] ; then
|
if [ "$log" != "$FIRSTLOG" ] ; then
|
||||||
INSTALL=`perl -e 'print ('$DU1' - '$DU1PREV')';`
|
INSTALL=`perl -e 'print ('$DU1' - '$DU1PREV')';`
|
||||||
INSTALLMB=`perl -e 'printf "%.3f" , ('$DU1MB' - '$DU1MBPREV')';`
|
INSTALLMB=`perl -e 'printf "%.3f" , ('$DU1MB' - '$DU1MBPREV')';`
|
||||||
echo -e "Installed files disk usage:\t\t\t\t$INSTALL KB or $INSTALLMB MB\n" >> $REPORT
|
echo -e "Installed files disk usage:\t\t\t\t$INSTALL KB or $INSTALLMB MB\n" >> $REPORT
|
||||||
|
@ -115,6 +116,18 @@ for log in $BUILDLOGS ; do
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# For printing the last 'Installed files disk usage', we need to 'du' the
|
||||||
|
# root dir, excluding the jhalfs directory (and lost+found). We assume
|
||||||
|
# that the rootdir is $LOGSDIR/../..
|
||||||
|
DU1=`du -skx --exclude=jhalfs --exclude=lost+found $LOGSDIR/../.. | cut -f1`
|
||||||
|
DU1MB=`perl -e 'printf "%.3f" , ('$DU1' / '1024')';`
|
||||||
|
INSTALL=`perl -e 'print ('$DU1' - '$DU1PREV')';`
|
||||||
|
INSTALLMB=`perl -e 'printf "%.3f" , ('$DU1MB' - '$DU1MBPREV')';`
|
||||||
|
echo -e "Installed files disk usage:\t\t\t\t$INSTALL KB or $INSTALLMB MB\n" >> $REPORT
|
||||||
|
# Append install values for grand total
|
||||||
|
INSTALL2=`perl -e 'printf "%.3f" , ('$INSTALL2' + '$INSTALL')';`
|
||||||
|
INSTALLMB2=`perl -e 'printf "%.3f" , ('$INSTALLMB2' + '$INSTALLMB')';`
|
||||||
|
|
||||||
# Dump grand totals
|
# Dump grand totals
|
||||||
echo -e "\n$LINE\n\nTotal time required to build the systen:\t\t$SBU2 SBU" >> $REPORT
|
echo -e "\n$LINE\n\nTotal time required to build the systen:\t\t$SBU2 SBU" >> $REPORT
|
||||||
# Total disk usage: including /tools but not /sources.
|
# Total disk usage: including /tools but not /sources.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# $Id:$
|
# $Id$
|
||||||
# NASM (Netwide Assembler) is an 80x86 assembler designed
|
# NASM (Netwide Assembler) is an 80x86 assembler designed
|
||||||
# for portability and modularity. It includes a
|
# for portability and modularity. It includes a
|
||||||
# disassembler as well.
|
# disassembler as well.
|
||||||
|
|
Reference in a new issue