--- mitgcm.org/scripts/check_outp 2014/10/12 17:40:26 1.42 +++ mitgcm.org/scripts/check_outp 2016/11/28 20:31:34 1.49 @@ -1,6 +1,6 @@ #! /usr/bin/env bash -# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/check_outp,v 1.42 2014/10/12 17:40:26 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/check_outp,v 1.49 2016/11/28 20:31:34 jmc Exp $ # # The purpose of this script is to compare # the latest output with the previous one (from the same platform with @@ -224,6 +224,7 @@ OUTPFIL=`basename $0`'.log' NBLDIFF=5 ADDRESS='none' +MAILCMD="mail" dBug=f t4update=0 sTime=`date` @@ -336,9 +337,14 @@ if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi echo " t4update: run "`basename $0`" ( $PRC_MAILS newer than $OUTPSUM )" | tee $OUTPFIL fi + elif test -f $OUTPSUM -a $FIRSTDAY = $CURR_DAY ; then + echo ' '$CMDLINE | tee -a $OUTPSUM + echo " t4update: skip "`basename $0`" ( $PRC_MAILS missing )" | tee -a $OUTPSUM + echo " End time: "`date` | tee -a $OUTPSUM + exit 0 else if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi - echo " t4update ignored (not current day or $PRC_MAILS or $OUTPSUM missing)" | tee $OUTPFIL + echo " t4update ignored (not current day or $OUTPSUM missing)" | tee $OUTPFIL fi elif test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' @@ -386,8 +392,8 @@ ( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > $TMP.dir_all if test "x$MACHINES" = "x_All_" ; then - MACHINES="aces- acesgrid baudelaire dickens danton pleiades" - MACHINES="$MACHINES iblade sx8 uv100 stomp octopus svante saramago" + MACHINES="aces- acesgrid baudelaire engaging svante glacier uv100 ollie stan1" + MACHINES="$MACHINES pleiades archer stomp octopus saramago" MALL=`cat $TMP.dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq` for madd in $MALL ; do @@ -457,7 +463,8 @@ echo " discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL cmis=`expr $cmis + 1` elif test $num = '0' ; then - echo "no previous test for:" $key | tee -a $OUTPFIL + echo " dir='$sdir', type='$type', of='$optf':" | tee -a $OUTPFIL + echo " --> no previous test matching key='$key'" | tee -a $OUTPFIL cmis=`expr $cmis + 1` else pline=`grep "^$key " $TMP.plist | head -1` @@ -560,8 +567,13 @@ rm -f $TMP.dir_all $TMP.slist $TMP.plist if test $OUTPFIL = "TTT.$$" ; then rm -f $OUTPFIL ; fi if test "x$ADDRESS" != 'xnone' ; then - echo ".. send $OUTPSUM to $ADDRESS" - mail -s $OUTPSUM $ADDRESS < $OUTPSUM + #- change default sender address ("From:") using "mail -r" option + # since, by default, baudelaire uses USER@localhost.localdomain + #fullNam=`hostname -A | awk '{print $1}'` + #MAILCMD="$MAILCMD -r ${USER}@${fullNam}" + #--- + echo ".. send $OUTPSUM to '$ADDRESS' using '$MAILCMD'" + $MAILCMD -s 'check_outp summary' $ADDRESS < $OUTPSUM fi echo ".. cat $OUTPSUM" cat $OUTPSUM