Ignore:
Timestamp:
08/20/07 13:03:00 (17 years ago)
Author:
snruegam
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter/scripts
Files:
1 added
3 edited

Legend:

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

    r8517 r8682  
    1 #!/bin/bash
    2 echo "Please specify the tape number (e.g. 3MG005L3)."
     1#!/bin/sh
     2#
     3# ========================================================================
     4#
     5# *
     6# * This file is part of MARS, the MAGIC Analysis and Reconstruction
     7# * Software. It is distributed to you in the hope that it can be a useful
     8# * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
     9# * It is distributed WITHOUT ANY WARRANTY.
     10# *
     11# * Permission to use, copy, modify and distribute this software and its
     12# * documentation for any purpose is hereby granted without fee,
     13# * provided that the above copyright notice appear in all copies and
     14# * that both that copyright notice and this permission notice appear
     15# * in supporting documentation. It is provided "as is" without express
     16# * or implied warranty.
     17# *
     18#
     19#
     20#   Author(s): Stefan Ruegamer 05/2007 <mailto:snruegam@astro.uni-wuerzburg.de>
     21#
     22#   Copyright: MAGIC Software Development, 2000-2007
     23#
     24#
     25# ========================================================================
     26#
     27# This script is checking the md5 sums of files read from tape. It
     28# computes the checksums for the extracted files and compares them with
     29# the checksums from La Palma, read out from the md5 sum file which is
     30# transferred together with the logfile.
     31#
     32# The script will be automised by being executed after reading tapes with
     33# the not-yet finished script readlapalmatapes. At the moment it is being
     34# executed by hand.
     35#
     36
     37echo "Please specify the tape number (e.g. 3MG005)."
    338read no
    439echo "Thank you. Your query is being processed. This may take some time."
    540
    641checkpath=/home/lapalma/tapecont/cont/muxdata/checksums
    7 file=/home/lapalma/tapecont/cont/muxdata/tape_${no}.md5
     42file=/home/lapalma/tapecont/cont/muxdata/tape_${no}L*.md5
     43L=`echo $file | cut -c49`
     44id=${no}L${L}
     45
    846if [ ! -f $file ]
    947then
    10         echo "tape $file not found."
     48        echo "tape $file not found -> aborting"
    1149        exit
    1250fi
    1351
    14 date | tee ${checkpath}/tape_${no}.md5.lapalma | tee ${checkpath}/tape_${no}.md5.wue
     52if [ ${checkpath}/tape_${id}.md5.lapalma ] || [ -f ${checkpath}/tape_${id}.md5.wue ]
     53then
     54        echo "Output files already existing. Are you sure you wish to continue (yes/no)?"
     55        read cont
     56        if [ ! $cont == "yes" ]
     57        then
     58                echo "Aborting."
     59                exit
     60        fi
     61fi
     62       
     63date | tee ${checkpath}/tape_${id}.md5.lapalma | tee ${checkpath}/tape_${id}.md5.wue
    1564
    1665# read the tapecont file line by line
     
    2372                sum=($line)
    2473                # reformat the files and checksums correctly and compare them
    25                 echo "${sum[1]}  ${sum[0]}" >> ${checkpath}/tape_${no}.md5.lapalma
     74                echo "${sum[1]}  ${sum[0]}" >> ${checkpath}/tape_${id}.md5.lapalma
    2675               
    27                 ssh -nx phoenix nice -n 19 /opt/csw/bin/gmd5sum /magic/datacenter/fromtape/${sum[0]} | sed -e 's/\/magic\/datacenter\/fromtape\///' >> ${checkpath}/tape_${no}.md5.wue
    28                 #md5sum /magic/datacenter/fromtape/${sum[0]} | sed -e 's/\/magic\/datacenter\/fromtape\///' >> ${checkpath}/tape_${no}.md5.wue
     76                ssh -nx phoenix nice -n 19 /opt/csw/bin/gmd5sum /magic/datacenter/fromtape/${sum[0]} | sed -e 's/\/magic\/datacenter\/fromtape\///' >> ${checkpath}/tape_${id}.md5.wue
     77                #md5sum /magic/datacenter/fromtape/${sum[0]} | sed -e 's/\/magic\/datacenter\/fromtape\///' >> ${checkpath}/tape_${id}.md5.wue
    2978        fi
    3079done < $file
    3180
    32 date | tee -a ${checkpath}/tape_${no}.md5.lapalma | tee -a ${checkpath}/tape_${no}.md5.wue
     81date | tee -a ${checkpath}/tape_${id}.md5.lapalma | tee -a ${checkpath}/tape_${id}.md5.wue
    3382
    34 if [ ! -f ${checkpath}/tape_${no}.md5.lapalma ] || [ ! -f ${checkpath}/tape_${no}.md5.wue ]
     83if [ ! -f ${checkpath}/tape_${id}.md5.lapalma ] || [ ! -f ${checkpath}/tape_${id}.md5.wue ]
    3584then
    36         echo "No output files written! Something went wrong..."
     85        echo "No output files written! Something went wrong... -> aborting"
    3786        exit
    3887fi
    3988
    40 echo "Wrote checksums to ${checkpath}/tape_${no}.md5.lapalma and ${checkpath}/tape_${no}.md5.wue. Comparing now."
     89echo "Wrote checksums to ${checkpath}/tape_${id}.md5.lapalma and ${checkpath}/tape_${id}.md5.wue. Comparing now."
    4190
    4291
    4392# check for differences in the checksums
    44 output=`diff ${checkpath}/tape_${no}.md5.lapalma ${checkpath}/tape_${no}.md5.wue`
     93output=`diff ${checkpath}/tape_${id}.md5.lapalma ${checkpath}/tape_${id}.md5.wue`
    4594
    4695if [ "$output" = "" ]
  • trunk/MagicSoft/Mars/datacenter/scripts/movingrawfiles

    r8410 r8682  
    1919#
    2020#   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
     21#   Author(s): Stefan Ruegamer 02/2007 <mailto:snruegam@astro.uni-wuerzburg.de>
    2122#
    2223#   Copyright: MAGIC Software Development, 2000-2007
     
    2829# /magic/datacenter/fromtape/rawdata to the structure
    2930# /magic/data/rawfiles/YYYY/MM/DD
     31#
     32# As the data transfer is at the moment not working via .finished files,
     33# you have to use the script movingrawfiles_OK for moving these data
    3034#
    3135
     
    4852# output for chmod with -v or -c (only changes)
    4953
    50 printprocesslog "INFO moving directories from fromlapalma to fromtape"
     54# outdated, .finished files are no longer used
     55#printprocesslog "INFO moving directories from fromlapalma to fromtape"
    5156# find directories which have to be copied
    52 dirs=`ls /magic/datacenter/fromlapalma/RAWchk/*/*.finished | sed -e 's/RAWchk/RAW/g' | cut -d/ -f1-6`
    53 if [ ! "$dirs" == "" ]
    54 then
     57#dirs=`ls /magic/datacenter/fromlapalma/RAWchk/*/*.finished | sed -e 's/RAWchk/RAW/g' | cut -d/ -f1-6`
     58#if [ ! "$dirs" == "" ]
     59#then
    5560   # change permission for this directories
    56    ssh lapalma@apollo chmod -R g+w $dirs >> $scriptlog 2>&1
     61   #ssh lapalma@dc09 chmod -R g+w $dirs >> $scriptlog 2>&1
    5762   # move directories to the tapedirectory
    58    mv -v $dirs /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1
    59 fi
     63   #mv -v $dirs /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1
     64#fi
    6065
    6166printprocesslog "INFO moving directories from muxdata to rawdata"
     
    8085printprocesslog "INFO moving rawfiles to $datapath/rawfiles"
    8186for rawfile in $rawfiles
    82 do 
     87do
    8388# workaround for rawfiles with wrong timing
    8489#   newrawfile=`echo $rawfile | sed -e 's/center\/fromtape\/rawdata/\/rawfiles-wrong-timing/g' -e 's/_/\//1' -e 's/_/\//1'`
     
    8691   newdir=`dirname $newrawfile`
    8792   makedir $newdir >> $scriptlog 2>&1
    88 
     93   
    8994   mv -v $rawfile $newrawfile >> $scriptlog 2>&1
    9095done
  • trunk/MagicSoft/Mars/datacenter/scripts/setup

    r8527 r8682  
    6868max=18 #maximum number of processes
    6969
    70 #scripts=( "runcallisto" "runstar" "runganymed" "dodatacheck" ) 
    71 #scriptscolname=( "fCallisto" "fStar" "fGanymed" "fDataCheckDone" ) 
    72 datascripts=( "runcallisto" "runstar" "runganymed" ) 
    73 datascriptscolname=( "fCallisto" "fStar" "fGanymed" ) 
     70#scripts=( "runcallisto" "runstar" "runganymed" "dodatacheck" )
     71#scriptscolname=( "fCallisto" "fStar" "fGanymed" "fDataCheckDone" )
     72datascripts=( "runcallisto" "runstar" "runganymed" )
     73datascriptscolname=( "fCallisto" "fStar" "fGanymed" )
    7474
    7575#hour:            0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
    76 pnototal=(       25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 )
    77 pnototalwe=(     25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 )
     76pnototal=(       26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26)
     77pnototalwe=(     26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26 26)
    7878
    79 pnocallisto=(    12 12 12 12 12 12 12 10  9  8  7  7  7  7  7  7  7  7  7  8  9 10 12 12 )
     79pnocallisto=(    12 12 12 12 12 10 10  9  9  8  8  8  8  8  8  8  8  8  8  9  9 10 10 12 )
    8080pnostar=(         8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8 )
    8181pnoganymed=(      4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4 )
     
    9393
    9494# values for mc production
    95 mcscripts=( "runcorsika" "runreflector" "runcamera" ) 
    96 mcscriptscolname=( "fCorsikaFileAvail" "fReflectorFileAvail" "fCameraFileAvail" ) 
     95mcscripts=( "runcorsika" "runreflector" "runcamera" )
     96mcscriptscolname=( "fCorsikaFileAvail" "fReflectorFileAvail" "fCameraFileAvail" )
    9797
    9898#hour:            0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Note: See TracChangeset for help on using the changeset viewer.