Ignore:
Timestamp:
01/10/06 22:12:58 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7456 r7460  
    2020#   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
    2121#
    22 #   Copyright: MAGIC Software Development, 2000-2004
     22#   Copyright: MAGIC Software Development, 2000-2006
    2323#
    2424#
     
    2727#
    2828# This script handles the subsystem logfiles, which are copied every
    29 # day automatically from pc15 in La Palma to /data/MAGIC/transfer/ in
    30 # Wuerzburg
     29# day automatically from /local/ on pc15 in La Palma to
     30# /home/lapalma/transfer/ on coma in the datacenter in Wuerzburg
    3131# The structure in this directory is: subsystem/date/logfile.*
    3232# The logfiles are from CC (*.rep, CC*.dbg, CC*.rbk, CC*.rep, CC*.run,
    33 # CC*.run.html) and Cosy (cosy*.log, cosy*.rep, tpoint*.txt/starg*.txt)
    34 # AMC (AMC*.log, AMC*.info, AMC*.lut) and CaCo (dc*.txt) are not copied
    35 # every day automatically
     33# CC*.run.html), Cosy (cosy*.log, cosy*.rep, tpoint*.txt/starg*.txt)
     34# AMC (AMC*.log, AMC*.info, AMC*.lut) and CaCo (dc*.txt)
    3635#
    3736# the script performs the following steps:
     
    4039# using the macros filldotrbk.C and filldotrun.C
    4140# - copying all logfiles to the correct directory:
    42 # /Period*/subsystem/date/file.*
    43 # (the period for each date is obtained by the macro getperiod.C)
    44 # - filling the sequences for the standard analysis into the database
    45 # (for each day of which a file was copied)
    46 #
     41# /subsystemdata/subsystem/YYYY/MM/DD/file.*
     42# - building the sequences for the standard analysis in the database
     43#   (for each day of which a file was copied)
     44# - if a new catalogfile has been copied, it is installed as standard in the
     45#   setup directory /magic/datacenter/setup and the new lines are sent to
     46#   the adresses specified in the script
    4747#
    4848# -- to make sure that no file is copied twice there's a textfile
     
    6666transdir=/home/lapalma/transfer
    6767char=28
    68 #extern=MAGIC@virgo:/data/MAGIC/transfer
    6968datetime=`date +%F-%H-%M-%S`
    7069
     
    7675date >> $scriptlog 2>&1
    7776
     77# check if the script is already running
    7878date > $lockpath/lock-copyscript.txt >> $scriptlog 2>&1
    7979checklock0=$?
     
    8787esac
    8888
    89 # rsync new dc with virgo
    90 #rsync -av $extern/ $transdir  >> $scriptlog 2>&1
    91 
    9289cd $transdir
    9390
    9491#check the checksums, write output into file
    9592md5sum -c .checksums | tee $transdir/.check  >> $scriptlog 2>&1
    96 #md5sum -c $transdir/checksums-test >| $transdir/.check
     93
    9794if ! test -e $transdir/.check
    9895then
     
    113110#dates=`ls $transdir/*/ -1 | grep --regexp=20[0-9][0-9]_*[0-1][0-9]_*[0-3][0-9] | grep -v '.tgz'`
    114111dates=`ls $transdir/*/ -1 | grep --regexp=20[0-9][0-9]_[0-1][0-9]_[0-3][0-9] | grep -v '.tgz'` >> $scriptlog 2>&1
    115 
    116112if [ "$dates" = "" ]
    117113then
     
    123119
    124120echo "dates found: "$dates  >> $scriptlog 2>&1
    125 
    126121#loop over dates
    127122for date in ${dates[@]}
     
    138133   
    139134   date2=`echo $date | sed -e 's/_/\//g'`
    140 #   echo "date2=$date2"
    141135   copylogpath=$logpath/copyscript/$date2
    142136   echo "copylogpath: "$copylogpath >> $scriptlog 2>&1
     
    148142      echo "file: "$file  >> $scriptlog 2>&1
    149143      filename=`basename $file`
    150 #      echo "filename: "$filename
    151144                       
    152145      #check for each file whether it has to be processed
     
    179172               1) echo "checkfillrun=$checkfillrun -> everything ok " >> $scriptlog 2>&1
    180173                  echo "-> insert date in SequenceBuildStatus for $date" >> $scriptlog 2>&1
    181 #                  date3=`echo $date | sed -e 's/_/-/g'`
    182 #                  echo "date3=$date3"
     174
    183175                  checkinsertdate=`root -q -b $macrospath/insertdate.C+\("\"$date\""\) | tee $copylogpath/insertdate-$date-log.txt   | grep int | sed -e 's/(int)//'`
    184176                  case $checkinsertdate in
     
    224216
    225217rm -v $transdir/.check >> $scriptlog 2>&1
    226 
    227 #rsync -av $transdir/ $extern >> $scriptlog 2>&1
    228 #rsync -av --delete $transdir/ $extern >> $scriptlog 2>&1
    229218
    230219
Note: See TracChangeset for help on using the changeset viewer.