Ignore:
Timestamp:
01/30/06 17:13:07 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7460 r7465  
    4141
    4242user=`whoami`
     43program=datacheck
    4344source /home/$user/Mars/datacenter/scripts/sourcefile
    4445
     
    5455
    5556todofile=$listpath/ToDo-$table-$column
    56 getstatuslogpath=$logpath/getstatus/dodatacheck/$year
    57 getstatuslog=$getstatuslogpath/getstatus-dodatacheck-$datetime.log
    58 
    59 scriptlogpath=$logpath/run/dodatacheck/`date +%Y/%m`
     57getstatuslogpath=$logpath/getstatus/$program/$year
     58getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     59
     60scriptlogpath=$logpath/run/$program/`date +%Y/%m`
    6061makedir $scriptlogpath
    61 scriptlog=$scriptlogpath/dodatacheck-$datetime.log
     62scriptlog=$scriptlogpath/$program-$datetime.log
    6263
    6364date >> $scriptlog 2>&1
     
    7071then
    7172   echo "other file(s) on disk " >> $scriptlog 2>&1
    72    echo " -> choose one file and start datacheck " >> $scriptlog 2>&1
     73   echo " -> choose one file and start $program " >> $scriptlog 2>&1
    7374else
    74    date > $lockpath/lock-getting-dodatacheck-list.txt >> $scriptlog 2>&1
     75   date > $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    7576   checklock0=$?
    7677   case $checklock0 in
    7778       0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    7879       1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    79             echo "-> getting list for dodatacheck is running -> exit" >> $scriptlog 2>&1
     80            echo "-> getting list for $program is running -> exit" >> $scriptlog 2>&1
    8081            date  >> $scriptlog 2>&1
    8182            exit;;
     
    8788
    8889   case $check0 in
    89       1)   echo "check0=$check0 -> everything ok -> do datacheck" >> $scriptlog 2>&1;;
     90      1)   echo "check0=$check0 -> everything ok -> do $program" >> $scriptlog 2>&1;;
    9091      *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
    9192   esac
    92    rm -v $lockpath/lock-getting-dodatacheck-list.txt >> $scriptlog 2>&1
     93   rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9394fi
    9495
     
    143144do
    144145   date
    145    echo "do datacheck for run "$run >> $scriptlog 2>&1
     146   echo "do $program for run "$run >> $scriptlog 2>&1
    146147   no=`printf %08d $run | cut -c 0-2`
    147148   no2=`printf %08d $run`
     
    163164
    164165   case $check1 in
    165        1)   echo "check1=$check1 -> everything ok -> go on with datacheck..." >> $scriptlog 2>&1
     166       1)   echo "check1=$check1 -> everything ok -> go on with $program..." >> $scriptlog 2>&1
    166167            ;;
    167168       *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
     
    185186     
    186187      case $check2 in
    187           0)   echo "check2=$check2 -> everything ok -> go on with datacheck..." >> $scriptlog 2>&1
     188          0)   echo "check2=$check2 -> everything ok -> go on with $program..." >> $scriptlog 2>&1
    188189               ;;
    189190          *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
     
    225226
    226227   # set status
    227    echo "inserting the status for the datacheck for run $run into the db" >> $scriptlog 2>&1
    228    setstatuslogpath=$logpath/setstatus/datacheck/$date
    229    echo "setstatuslogpath: $setstatuslogpath" >> $scriptlog 2>&1
    230    makedir $setstatuslogpath >> $scriptlog 2>&1
    231    setstatuslog=$setstatuslogpath/setstatus-datacheck-$no2.log
    232    echo "setstatuslogfile: $setstatuslog" >> $scriptlog 2>&1
    233 
    234    check4=`root -q -b $macrospath/setstatus.C+\("\"$run\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    235    case $check4 in
    236       1)   echo "check4=$check4 -> everything ok, status has been set" >> $scriptlog 2>&1
    237            ;;
    238       *)   echo "check4=$check4 -> ERROR -> step could not be set" >> $scriptlog 2>&1
    239            ;;
    240    esac
     228   echo "inserting the status for the $program for run $run into the db" >> $scriptlog 2>&1
     229   statustime="Now()"
     230   failed="NULL"
     231   starttime="NULL"
     232   failedtime="NULL"
     233   var1=$date
     234   var2=$no2
     235   setstatus
    241236done
    242237
Note: See TracChangeset for help on using the changeset viewer.