Changeset 9147 for trunk/MagicSoft/Mars/datacenter
- Timestamp:
- 11/11/08 10:38:56 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/budb
r9136 r9147 64 64 65 65 # complete databases 66 if ! mysqldump --host= vela--all-databases -u dump | bzip2 -9 -c >| $zipfile 2>> $logfile66 if ! mysqldump --host=$ho --all-databases -u dump | bzip2 -9 -c >| $zipfile 2>> $logfile 67 67 then 68 68 printprocesslog "ERROR mysqldump failed " … … 71 71 echo "writing create commands to $command..." >> $logfile 2>&1 72 72 # commands to create MyMagic 73 if ! mysqldump --host= vela--database $dbname -u dump --no-data >| $command 2>> $logfile73 if ! mysqldump --host=$ho --database $dbname -u dump --no-data >| $command 2>> $logfile 74 74 then 75 75 printprocesslog "ERROR mysqldump failed " -
trunk/MagicSoft/Mars/datacenter/scripts/fillcamera
r9144 r9147 124 124 pquery=" select fRunNumber from MCRunProcessStatus where fFileName=\"$pedfile\" " 125 125 126 crun=`mysql -ss -u $user --password=$pw --host= vela$db -e " $cquery "`127 prun=`mysql -ss -u $user --password=$pw --host= vela$db -e " $pquery "`126 crun=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $cquery "` 127 prun=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $pquery "` 128 128 cnum=`printf %08d $crun` 129 129 pnum=`printf %08d $prun` … … 150 150 echo "P run already there, do mysql update" >> $scriptlog 2>&1 151 151 # continue 152 mysql -ss -u $user --password=$pw --host= vela$db -e " $pupdate "152 mysql -ss -u $user --password=$pw --host=$ho $db -e " $pupdate " 153 153 else 154 154 echo "linking P run for epoch $epo" >> $scriptlog 2>&1 155 155 ln -sv $pedfile $newpedfile >> $scriptlog 2>&1 156 mysql -ss -u $user --password=$pw --host= vela$db -e " $pupdate "156 mysql -ss -u $user --password=$pw --host=$ho $db -e " $pupdate " 157 157 fi 158 158 … … 161 161 echo "C run already there, do mysql update" >> $scriptlog 2>&1 162 162 # continue 163 mysql -ss -u $user --password=$pw --host= vela$db -e " $cupdate "163 mysql -ss -u $user --password=$pw --host=$ho $db -e " $cupdate " 164 164 else 165 165 echo "linking C run for epoch $epo" >> $scriptlog 2>&1 166 166 ln -sv $calfile $newcalfile >> $scriptlog 2>&1 167 mysql -ss -u $user --password=$pw --host= vela$db -e " $cupdate "167 mysql -ss -u $user --password=$pw --host=$ho $db -e " $cupdate " 168 168 fi 169 169 -
trunk/MagicSoft/Mars/datacenter/scripts/mcsequences
r8967 r9147 19 19 # 20 20 # Author(s): Daniela Dorner 12/2005 <mailto:dorner@astro.uni-wuerzburg.de> 21 # Author(s): Daniel a Dorner06/2008 <mailto:hoehne@astro.uni-wuerzburg.de>21 # Author(s): Daniel Hoehne 06/2008 <mailto:hoehne@astro.uni-wuerzburg.de> 22 22 # 23 23 # Copyright: MAGIC Software Development, 2000-2008 … … 103 103 do 104 104 trainupdate=" update MCRunData set fSequenceFirst=\"$firstruntrain\" where fRunNumber=\"$trainrun\" " 105 mysql -ss -u $user --password=$pw --host= vela$db -e " $trainupdate "105 mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainupdate " 106 106 done 107 107 108 108 trainquery1=" select fSpectrumKEY, fPSFKEY, fAmplFadcKEY, fAtmosphericModelKEY, fObservationModeKEY, fMCParticleKEY, fReflectorVersionKEY, fCorsikaVersionKEY, fCameraVersionKEY, fViewConeAngleOKEY, fAddSpotSizeKEY from MCRunData where fRunNumber=\"$firstruntrain\" " 109 109 trainquery2=" select sum(fNumEvents), sum(fNumtriggers) from MCRunData where fRunNumber in ($trainruns2) " 110 trainvalues=`mysql -ss -u $user --password=$pw --host= vela$db -e " $trainquery1 "`111 trainvalues2=`mysql -ss -u $user --password=$pw --host= vela$db -e " $trainquery2 "`110 trainvalues=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainquery1 "` 111 trainvalues2=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainquery2 "` 112 112 trainspec=`echo $trainvalues | cut -d" " -f1` 113 113 trainpsf=`echo $trainvalues | cut -d" " -f2` … … 125 125 trainquery3=" select fSequenceFirst from MCSequenceProcessStatus where fSequenceFirst=\"$firstruntrain\" " 126 126 trainquery4=" select fSequenceFirst from MCSequences where fSequenceFirst=\"$firstruntrain\" " 127 traincheck3=`mysql -ss -u $user --password=$pw --host= vela$db -e " $trainquery3 "`128 traincheck4=`mysql -ss -u $user --password=$pw --host= vela$db -e " $trainquery4 "`127 traincheck3=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainquery3 "` 128 traincheck4=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainquery4 "` 129 129 traininsert1=" insert MCSequenceProcessStatus set fSequenceFirst=\"$firstruntrain\", fSequenceFileWritten=Now() " 130 130 traininsert2=" insert MCSequences set fSequenceFirst=\"$firstruntrain\", fRunStart=\"$date\", fNumEvents=\"$trainevents\", fNumTriggers=\"$traintriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$trainspec\", fPSFKEY=\"$trainpsf\", fAddSpotSizeKEY=\"$trainass\", fAmplFadcKEY=\"$trainamplfadc\", fAtmosphericModelKEY=\"$trainatmo\", fObservationModeKEY=\"$trainobs\", fMCParticleKEY=\"$trainpart\", fReflectorVersionKEY=\"$trainrefl\", fCorsikaVersionKEY=\"$traincors\", fCameraVersionKEY=\"$traincam\", fViewConeAngleOKEY=\"$trainview\", fTestTrainKEY=2 " … … 132 132 if [ "$traincheck3" == "" ] 133 133 then 134 mysql -ss -u $user --password=$pw --host= vela$db -e " $traininsert1 "134 mysql -ss -u $user --password=$pw --host=$ho $db -e " $traininsert1 " 135 135 fi 136 136 if [ "$traincheck4" == "" ] 137 137 then 138 mysql -ss -u $user --password=$pw --host= vela$db -e " $traininsert2 "138 mysql -ss -u $user --password=$pw --host=$ho $db -e " $traininsert2 " 139 139 else 140 mysql -ss -u $user --password=$pw --host= vela$db -e " $trainupdate2 "140 mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainupdate2 " 141 141 fi 142 142 … … 166 166 do 167 167 testupdate=" update MCRunData set fSequenceFirst=\"$firstruntest\" where fRunNumber=\"$testrun\" " 168 mysql -ss -u $user --password=$pw --host= vela$db -e " $testupdate "168 mysql -ss -u $user --password=$pw --host=$ho $db -e " $testupdate " 169 169 done 170 170 171 171 testquery1=" select fSpectrumKEY, fPSFKEY, fAmplFadcKEY, fAtmosphericModelKEY, fObservationModeKEY, fMCParticleKEY, fReflectorVersionKEY, fCorsikaVersionKEY, fCameraVersionKEY, fViewConeAngleOKEY, fAddSpotSizeKEY from MCRunData where fRunNumber=\"$firstruntest\" " 172 172 testquery2=" select sum(fNumEvents), sum(fNumtriggers) from MCRunData where fRunNumber in ($testruns2) " 173 testvalues=`mysql -ss -u $user --password=$pw --host= vela$db -e " $testquery1 "`174 testvalues2=`mysql -ss -u $user --password=$pw --host= vela$db -e " $testquery2 "`173 testvalues=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $testquery1 "` 174 testvalues2=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $testquery2 "` 175 175 testspec=`echo $testvalues | cut -d" " -f1` 176 176 testpsf=`echo $testvalues | cut -d" " -f2` … … 188 188 testquery3=" select fSequenceFirst from MCSequenceProcessStatus where fSequenceFirst=\"$firstruntest\" " 189 189 testquery4=" select fSequenceFirst from MCSequences where fSequenceFirst=\"$firstruntest\" " 190 testcheck3=`mysql -ss -u $user --password=$pw --host= vela$db -e " $testquery3 "`191 testcheck4=`mysql -ss -u $user --password=$pw --host= vela$db -e " $testquery4 "`190 testcheck3=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $testquery3 "` 191 testcheck4=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $testquery4 "` 192 192 testinsert1=" insert MCSequenceProcessStatus set fSequenceFirst=\"$firstruntest\", fSequenceFileWritten=Now() " 193 193 testinsert2=" insert MCSequences set fSequenceFirst=\"$firstruntest\", fRunStart=\"$date\", fNumEvents=\"$testevents\", fNumTriggers=\"$testtriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$testspec\", fPSFKEY=\"$testpsf\", fAddSpotSizeKEY=\"$testass\", fAmplFadcKEY=\"$testamplfadc\", fAtmosphericModelKEY=\"$testatmo\", fObservationModeKEY=\"$testobs\", fMCParticleKEY=\"$testpart\", fReflectorVersionKEY=\"$testrefl\", fCorsikaVersionKEY=\"$testcors\", fCameraVersionKEY=\"$testcam\", fViewConeAngleOKEY=\"$testview\", fTestTrainKEY=3 " … … 195 195 if [ "$testcheck3" == "" ] 196 196 then 197 mysql -ss -u $user --password=$pw --host= vela$db -e " $testinsert1 "197 mysql -ss -u $user --password=$pw --host=$ho $db -e " $testinsert1 " 198 198 fi 199 199 if [ "$testcheck4" == "" ] 200 200 then 201 mysql -ss -u $user --password=$pw --host= vela$db -e " $testinsert2 "201 mysql -ss -u $user --password=$pw --host=$ho $db -e " $testinsert2 " 202 202 else 203 mysql -ss -u $user --password=$pw --host= vela$db -e " $testupdate2 "203 mysql -ss -u $user --password=$pw --host=$ho $db -e " $testupdate2 " 204 204 fi 205 205
Note:
See TracChangeset
for help on using the changeset viewer.