Ignore:
Timestamp:
02/19/09 21:22:19 (16 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail

    r9054 r9355  
    4242set -C
    4343
    44 scriptlog=$runlogpath/$program-$datetime.log
    45 date >> $scriptlog 2>&1
    46 
    4744# check if script is already running
    4845lockfile=$lockpath/lock-$program.txt
    49 checklock  >> $scriptlog 2>&1
     46checklock
    5047
    5148# get todo list
    52 gettodo  >> $scriptlog 2>&1
     49gettodo
    5350
    5451cd $mars
     
    5855   sequence=${primaries[$s+$s]}
    5956   telnum=${primaries[$s+$s+1]}
    60    echo "checking files for sequence $sequence..." >> $scriptlog 2>&1
    6157   printprocesslog "INFO checking files for sequence $sequence"
    6258   no=`printf %08d $sequence | cut -c 0-4`
    6359   no2=`printf %08d $sequence`
    6460   checkfileavailpath=$logpath/$program/$no
    65    makedir $checkfileavailpath  >> $scriptlog 2>&1
     61   makedir $checkfileavailpath
    6662   checkfileavaillog=$checkfileavailpath/$program-$no2.log
    6763
    68    setstatus "start" >> $scriptlog 2>&1
     64   setstatus "start"
    6965
    7066   check1=`root -q -b $macrospath/checkfileavail.C+\($sequence,$telnum\) | tee $checkfileavaillog | intgrep`
    7167
    7268   case $check1 in
    73       1)   echo " check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1
    74            printprocesslog "INFO files available for sequence $sequence"
     69      1)   printprocesslog "INFO files available for sequence $sequence (check1=$check1)"
    7570           ;;
    76       2)   echo " check1=$check1 -> files not yet available -> continue..." >> $scriptlog 2>&1
    77            printprocesslog "INFO files not yet available for sequence $sequence"
     71      2)   printprocesslog "INFO files not yet available for sequence $sequence (check1=$check1)"
    7872           check="no"
    7973           ;;
    80       0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1
    81            printprocesslog "WARN connection to DB failed"
     74      0)   printprocesslog "WARN connection to DB failed (check1=$check1)"
    8275           check="no"
    8376           ;;
    84       *)   echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    85            printprocesslog "ERROR $program.C failed for sequence $sequence"
     77      *)   printprocesslog "ERROR $program.C failed for sequence $sequence (check1=$check1)"
    8678           com=$Ffilesavail
    8779           check=$check1
     
    8981   esac
    9082
    91    setstatus "stop" >> $scriptlog 2>&1
     83   setstatus "stop"
    9284done
    9385
    94 finish >> $scriptlog 2>&1
     86finish
    9587
Note: See TracChangeset for help on using the changeset viewer.