Changeset 9091 for trunk/MagicSoft


Ignore:
Timestamp:
08/05/08 12:31:49 (16 years ago)
Author:
snruegam
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9090 r9091  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2008/08/05 Stefan Ruegamer
     22
     23   * datacenter/scripts/movingrawfiles:
     24     - added checks for owner of the file
     25     - adapted the script to the different pathes
     26       
     27   * datacenter/scripts/zipscript:
     28     - added telno and fileno so it works with the new files
     29     - added the telno to the calzip-lock file
     30
     31   * datacenter/scripts/runcallisto:
     32     - added the telno to the calzip-lock file
     33
     34
    2035
    2136 2008/08/05 Thomas Bretz
  • trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles

    r9081 r9091  
    5151ssh tape@dc07 chmod -R g+w /magic/datacenter/fromtape/rawdata/* >> $scriptlog 2>&1
    5252
    53 printprocesslog "INFO moving directories from muxdata to rawdata"
    54 # find directories which have to be copied
    55 days=`find /magic/datacenter/fromtape/muxdata/* -type d`
    56 if [ ! "$days" == "" ]
    57 then
    58    # move directories to the tapedirectory
    59    mv -v $days /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1
    60 fi
    61 
    62 # find rawfiles
    63 rawfiles=`find /magic/{datacenter,data/rawfiles}/fromtape/*data/ -regextype posix-egrep -regex '.*/20[01][0-9]{5}_(M[12]_)?[0-9]{8}(\.[0-9]{3})?_.*.raw' -type f`
     53# find rawfiles belonging to tape (don't move files not yet md5-sum checked)
     54rawfiles=`find /magic/{datacenter,data/rawfiles}/fromtape/???data/ -regextype posix-egrep -regex '.*/20[01][0-9]{5}_(M[12]_)?[0-9]{8}(\.[0-9]{3})?_.*.raw' -type f -user tape`
    6455
    6556if [ "$rawfiles" == "" ]
     
    6960fi
    7061
     62# move rawfiles
    7163printprocesslog "INFO moving rawfiles to $datapath/rawfiles"
    7264for rawfile in $rawfiles
     
    7769   if [ "$path" == "datacenter" ]
    7870   then
    79       newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'`
     71      subpath=`dirname $rawfile | cut -d/ -f5`
     72      newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/'${subpath}'/\/rawfiles/g' -e 's/_/\//1' -e 's/_/\//1'`
    8073   elif [ "$path" == "data" ]
    8174   then
     
    9386done
    9487
    95 rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/*data/* >> $scriptlog 2>&1
     88rmdir -v /magic/{datacenter,data/rawfiles}/fromtape/???data/* >> $scriptlog 2>&1
    9689
    9790printprocesslog "INFO launching filesondisk"
  • trunk/MagicSoft/Mars/datacenter/scripts/runcallisto

    r9054 r9091  
    9595
    9696# lock sequ for zipping
    97 lockfile=$lockpath/calzip$sequence.txt
     97lockfile=$lockpath/calzip${sequence}-${telnum}.txt
    9898# if lockfile is already existing, 1 is returned
    9999if ! checklock return 1 >> $scriptlog 2>&1
  • trunk/MagicSoft/Mars/datacenter/scripts/zipscript

    r9049 r9091  
    3232# to give the possibility to run several zipscripts at the same time,
    3333# $1 is added
    34 program=zipscript$1
     34program=zipscript2
    3535
    3636set -C
     
    5757   echo "processing file $file..." >> $scriptlog 2>&1
    5858   runno=`basename $file | sed -e 's/.*20[01][0-9]\{5\}_\(M[12]_\)\?.*\([0-9]\{8\}\).\([0-9]\{3\}\)\?.*/\2/'`
    59    query="SELECT fSequenceFirst FROM RunData WHERE fRunNumber="$runno
     59   fileno=`basename $file | sed -e 's/.*20[01][0-9]\{5\}_\(M[12]_\)\?.*\([0-9]\{8\}\).\([0-9]\{3\}\)\?.*/\3/'`
     60   telno=`basename $file | sed -e 's/.*20[01][0-9]\{5\}_\(M[12]_\)\?.*\([0-9]\{8\}\).\([0-9]\{3\}\)\?.*/\1/' | cut -c2`
     61   # old runs have a fileno of 0
     62   if [ "$fileno" == "" ]
     63   then
     64      fileno=0
     65   fi
     66   # old runs have a telno of 1
     67   if [ "$telno" == "" ]
     68   then
     69      telno=1
     70   fi
     71   query="SELECT fSequenceFirst FROM RunData WHERE fRunNumber="$runno" AND fFileNumber="$fileno" AND fTelescopeNumber="$telno
    6072   echo " sending query: $query" >> $scriptlog 2>&1
    6173   if ! seq=`sendquery`
    6274   then
    63       echo "querying seq for run $runno from the db did not work -> continue" >> $scriptlog 2>&1
    64       printprocesslog "WARN query $seq for run $runno from the db did not work"
     75      echo "querying seq for run M_${telno}${runno}.${fileno} from the db did not work -> continue" >> $scriptlog 2>&1
     76      printprocesslog "WARN query $seq for run M_${telno}${runno}.${fileno} from the db did not work"
    6577      continue
    6678   fi
    6779   if [ "$seq" == "" ]
    6880   then
    69       echo "no seq found for run $runno -> locking only run..." >> $scriptlog 2>&1
     81      echo "no seq found for run M_${telno}${runno}.${fileno} -> locking only run..." >> $scriptlog 2>&1
    7082      seq=$runno
    7183   fi
    7284   echo "locking sequence $seq..."  >> $scriptlog 2>&1
    73    lockfile=$lockpath/calzip$seq.txt
     85   lockfile=$lockpath/calzip${seq}-${telno}.txt
    7486   checklock continue >> $scriptlog 2>&1
    7587   query="UPDATE SequenceProcessStatus set fNotZipping=NULL WHERE fSequenceFirst=$seq"
Note: See TracChangeset for help on using the changeset viewer.