Changeset 9136 for trunk/MagicSoft/Mars/datacenter/scripts
- Timestamp:
- 09/16/08 11:20:26 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/budb
r9063 r9136 32 32 olday=`date +%F --date="-30day"` 33 33 34 source `dirname $0`/sourcefile 35 printprocesslog "INFO starting $0" 36 34 37 set -C 35 38 … … 59 62 60 63 echo "writing all databases to $zipfile..." >> $logfile 2>&1 61 set +C 64 62 65 # complete databases 63 mysqldump --host=vela --all-databases -u dump | bzip2 -9 -c > $zipfile 2>> $logfile 66 if ! mysqldump --host=vela --all-databases -u dump | bzip2 -9 -c >| $zipfile 2>> $logfile 67 then 68 printprocesslog "ERROR mysqldump failed " 69 echo "ERROR mysqldump failed " >> $logfile 2>&1 70 fi 64 71 echo "writing create commands to $command..." >> $logfile 2>&1 65 72 # commands to create MyMagic 66 mysqldump --host=vela --database $dbname -u dump --no-data > $command 2>> $logfile 73 if ! mysqldump --host=vela --database $dbname -u dump --no-data >| $command 2>> $logfile 74 then 75 printprocesslog "ERROR mysqldump failed " 76 echo "ERROR mysqldump failed " >> $logfile 2>&1 77 fi 67 78 79 finish >> $logfile 2>&1 68 80 -
trunk/MagicSoft/Mars/datacenter/scripts/checkmd5sum
r9114 r9136 30 30 # transferred together with the logfile. 31 31 # 32 # The script will be automised by being executed after reading tapes with33 # the not-yet finished script readlapalmatapes. At the moment it is being34 # executed by hand.35 #36 32 37 echo "Please specify the tape number (e.g. 3MG005)." 38 read no 39 echo "Thank you. Your query is being processed. This may take some time." 33 no=$@ 34 if [ "$no" == "" ] 35 then 36 echo "no tape specified -> aborting" 37 exit 38 fi 40 39 41 40 checkpath=/home/lapalma/tapecont/cont/muxdata/checksums … … 43 42 L=`echo $file | cut -c49` 44 43 id=${no}L${L} 44 logfile=${checkpath}/tape_${id}.log 45 45 46 46 if [ ! -f $file ] 47 47 then 48 echo "tape $file not found -> aborting" 48 echo "tape $file not found -> aborting" >> $logfile 2>&1 49 49 exit 50 50 fi … … 52 52 if [ -f ${checkpath}/tape_${id}.md5.lapalma ] || [ -f ${checkpath}/tape_${id}.md5.wue ] 53 53 then 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 54 echo "Output files already existing -> aborting" >> $logfile 2>&1 55 exit 56 # echo "Output files already existing. Are you sure you wish to continue (yes/no)?" 57 # read cont 58 # if [ ! $cont == "yes" ] 59 # then 60 # echo "Aborting." 61 # exit 62 # fi 63 fi 64 65 if [ "`cat $file`" == "" ] 66 then 67 echo "$file is empty, the checksums are missing -> aborting" >> $logfile 2>&1 68 exit 61 69 fi 62 70 … … 77 85 if [ ! -f /magic/datacenter/fromtape/${sum[0]} ] && [ ! -f /data/fromtape/${sum[0]} ] 78 86 then 79 echo "File ${sum[0]} does not exist." 87 echo "File ${sum[0]} does not exist." >> $logfile 2>&1 80 88 continue 81 89 fi … … 86 94 if [ ! -f /magic/datacenter/fromtape/${sum[0]} ] 87 95 then 88 ssh -nx phoenixnice -n 19 /opt/csw/bin/gmd5sum /data/fromtape/${sum[0]} | sed -e 's/\/data\/fromtape\///' >> ${checkpath}/tape_${id}.md5.wue96 nice -n 19 /opt/csw/bin/gmd5sum /data/fromtape/${sum[0]} | sed -e 's/\/data\/fromtape\///' >> ${checkpath}/tape_${id}.md5.wue 89 97 else 90 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 91 #md5sum /magic/datacenter/fromtape/${sum[0]} | sed -e 's/\/magic\/datacenter\/fromtape\///' >> ${checkpath}/tape_${id}.md5.wue 98 nice -n 19 /opt/csw/bin/gmd5sum /magic/datacenter/fromtape/${sum[0]} | sed -e 's/\/magic\/datacenter\/fromtape\///' >> ${checkpath}/tape_${id}.md5.wue 92 99 fi 93 100 fi … … 98 105 if [ ! -f ${checkpath}/tape_${id}.md5.lapalma ] || [ ! -f ${checkpath}/tape_${id}.md5.wue ] 99 106 then 100 echo "No output files written! Something went wrong... -> aborting" 107 echo "No output files written! Something went wrong... -> aborting" >> $logfile 2>&1 101 108 exit 102 109 fi 103 110 104 echo "Wrote checksums to ${checkpath}/tape_${id}.md5.lapalma and ${checkpath}/tape_${id}.md5.wue. Comparing now." 111 echo "Wrote checksums to ${checkpath}/tape_${id}.md5.lapalma and ${checkpath}/tape_${id}.md5.wue. Comparing now." >> $logfile 2>&1 105 112 106 113 # check for differences in the checksums … … 109 116 if [ "$output" = "" ] 110 117 then 111 echo "All checksums are identical !"118 echo "All checksums are identical." >> $logfile 2>&1 112 119 muxschk=`grep muxdata/20[01][0-9].*/20[01][0-9].*.raw ${checkpath}/tape_${id}.md5.wue | wc -l` 113 120 if [ $muxslog == $muxschk ] 114 121 then 115 echo "Number of checked files matches. Launching movingrawfiles now. (to be included)" | tee -a ${checkpath}/tape_${id}.md5.lapalma | tee -a ${checkpath}/tape_${id}.md5.wue122 echo "Number of checked files matches. Files are ready." >> $logfile 2>&1 116 123 else 117 echo "Number of checked files doesn't match number of extracted files. Something went wrong..." | tee -a ${checkpath}/tape_${id}.md5.lapalma | tee -a ${checkpath}/tape_${id}.md5.wue124 echo "Number of checked files doesn't match number of extracted files. Something went wrong..." >> $logfile 2>&1 118 125 fi 119 126 else 120 echo -e "The files are not identical! diff found the following differences:\n$output" 127 echo -e "The files are not identical! diff found the following differences:\n$output" >> $logfile 2>&1 121 128 fi 122 129 123 echo " program terminated."130 echo "Program terminated." >> $logfile 2>&1 -
trunk/MagicSoft/Mars/datacenter/scripts/runstar
r9086 r9136 75 75 76 76 echo "staging files..." >> $scriptlog 2>&1 77 ssh -nx phoenix /opt/SUNWsamfs/bin/stage -V $inpath/20 *_0*${run}_Y_*_E.root >> $scriptlog 2>&177 ssh -nx phoenix /opt/SUNWsamfs/bin/stage -V $inpath/20[01][0-9]*_0*${run}_Y_*.root >> $scriptlog 2>&1 78 78 79 echo "./star -b -q -v4 -f --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --ind=$inpath --out=$outpath $sequfile 2>> $scriptlog> /dev/null" >> $scriptlog 2>&1 80 ./star -b -q -v4 -f --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --ind=$inpath --out=$outpath $sequfile 2>> $scriptlog> /dev/null 79 80 # define star.rc files 81 starrcnew=$setuppath/$program/star.rc 82 starrcmux=$setuppath/$program/star_mux.rc 83 # link star.rc file 84 echo "linking the star.rc file to $outpath" >> $scriptlog 2>&1 85 if [ $sequence -gt 200000 ] 86 then 87 ln -vsf $starrcmux $outpath/star.rc >> $scriptlog 2>&1 88 else 89 ln -vsf $starrcnew $outpath/star.rc >> $scriptlog 2>&1 90 fi 91 starrcseq=$outpath/star.rc 92 93 echo "./star -b -q -v4 -f --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --ind=$inpath --out=$outpath $sequfile --config=$starrcseq 2>> $scriptlog> /dev/null" >> $scriptlog 2>&1 94 ./star -b -q -v4 -f --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --ind=$inpath --out=$outpath $sequfile --config=$starrcseq 2>> $scriptlog> /dev/null 81 95 check1=$? 82 96
Note:
See TracChangeset
for help on using the changeset viewer.