Changeset 1562


Ignore:
Timestamp:
08/05/09 08:36:58 (16 years ago)
Author:
Mathieu Morlighem
Message:

some improvments

Location:
issm/trunk/cron
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/cron/configs/linux64_morlighem

    r1535 r1562  
    22REPOSITORY="http://s383-rhat/issm/svn/issm/trunk"
    33
    4 #email adress to send Cron report
    5 EMAIL_ADRESS="mathieu.morlighem@jpl.nasa.gov"
     4#email adress from which the html report will be sent
     5EMAIL_ADRESS=mathieu.morlighem@jpl.nasa.gov
    66
    77
  • issm/trunk/cron/configs/macosx32_morlighem

    r1559 r1562  
    22REPOSITORY="http://s383-rhat/issm/svn/issm/trunk"
    33
    4 #email adress to send Cron report
    5 EMAIL_ADRESS="helene.seroussi@jpl.nasa.gov"
     4#email adress from which the html report will be sent
     5EMAIL_ADRESS=helene.seroussi@jpl.nasa.gov
    66
    77#ISSM directory
  • issm/trunk/cron/configs/macosx32_seroussi

    r1559 r1562  
    22REPOSITORY="http://s383-rhat/issm/svn/issm/trunk"
    33
    4 #email adress to send Cron report
    5 EMAIL_ADRESS="helene.seroussi@jpl.nasa.gov"
     4#email adress from which the html report will be sent
     5EMAIL_ADRESS=helene.seroussi@jpl.nasa.gov
    66
    77#ISSM directory
  • issm/trunk/cron/configs/win32xp_larour

    r1552 r1562  
    22REPOSITORY="http://s383-rhat/issm/svn/issm/trunk"
    33
    4 #email adress to send Cron report
    5 EMAIL_ADRESS="eric.larour@jpl.nasa.gov"
     4#email adress from which the html report will be sent
     5EMAIL_ADRESS=eric.larour@jpl.nasa.gov
    66
    77#ISSM directory
  • issm/trunk/cron/nightlyrun.sh

    r1557 r1562  
    66if [ $# -ne 1 ];
    77then
     8        #no config file specified: exit
    89        echo "no config file specified. Exiting..."
    910        exit 1
    1011else
     12        #launch nightly run (get start time)
    1113        source $1;
     14        START=$(timer)
    1215fi
    1316
     17#some functions
     18function timer()
     19{
     20        if [[ $# -eq 0 ]]; then
     21                echo $(date '+%s')
     22        else
     23                local  stime=$1
     24                etime=$(date '+%s')
     25
     26                if [[ -z "$stime" ]]; then stime=$etime; fi
     27
     28                dt=$((etime - stime))
     29                ds=$((dt % 60))
     30                dm=$(((dt / 60) % 60))
     31                dh=$((dt / 3600))
     32                printf '%d:%02d:%02d' $dh $dm $ds
     33        fi
     34}
     35function todaydate()
     36{
     37        export today=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'`;
     38        suffix=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'`                     
     39        echo $suffix;                   
     40}
     41
    1442#create nightly run variables
    15 export TODAY=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'`;
     43export TODAY=$(todaydate);
    1644export HOST_NAME=`hostname`;
    17 if [[ "$OS" == "winxp32" ]]
    18 then
    19         export HOST_NAME_SHORT=`hostname`;
    20 else
    21         export HOST_NAME_SHORT=`hostname -s`;
    22 fi
    2345export ISSM_RELEASE="issm"
    2446
     
    4365cat << END > cluster.rc
    4466begin
    45 cluster_name=$HOST_NAME_SHORT
     67cluster_name=$HOST_NAME
    4668cluster_codepath=$ISSM_DIR/bin
    4769cluster_executionpath=$EXECUTION_PATH
     
    83105
    84106#Build html report
     107export ELAPSEDTIME=$(timer $START)
    85108./cron/report.sh
    86109               
     
    91114if [[ "$OS" == "winxp32" ]]
    92115then
    93         email -html -f "ISSM Nightly run $EMAIL_ADRESS" -s "Nightly runs of $ISSM_RELEASE on: $HOST_NAME. Date:$TODAY. " $i < report.html
     116        email -html -f "ISSM Nightly run $EMAIL_ADRESS" -s "Nightly runs of $ISSM_RELEASE OS: $OS. " $i < report.html
    94117else
    95118        cat - report.html <<HERE | /usr/lib/sendmail  -oi -t
    96 From: "ISSM Nightly run" $EMAIL_ADRESS
     119From: "ISSM Nightly run" <$EMAIL_ADRESS>
    97120To: $i
    98 Subject: Nightly runs of $ISSM_RELEASE on: $HOST_NAME_SHORT. Date:$TODAY.
     121Subject: Nightly runs of $ISSM_RELEASE OS: $OS.
    99122Mime-Version: 1.0
    100123Content-Type: text/html
  • issm/trunk/cron/report.sh

    r1551 r1562  
    8383platform: $ISSM_ARCH<br>
    8484release: $ISSM_RELEASE<br>
     85elapsed time: $ELAPSEDTIME<br>
    8586<br>
    8687status: $(if [ `wc -l check.log | awk '{printf("%s",$1);}'`  = "0" ];
Note: See TracChangeset for help on using the changeset viewer.