Ignore:
Timestamp:
02/19/07 14:28:52 (18 years ago)
Author:
snruegam
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter/scripts
Files:
2 edited

Legend:

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

    r8234 r8331  
    5353if [ ! "$dirs" == "" ]
    5454then
    55    for dir in $dirs
    56    do
    57       # get number of *.raw files from directory
    58       numfiles=`find $dir -type f -name "*.raw" | wc -l`
    59      
    60       # skip empty directories
    61       if [ "$numfiles" == "0" ]
    62       then
    63          continue
    64       fi
    65 
    66       # get date from directory name
    67       curdate=`echo $dir | cut -d/ -f6- | sed -e 's/_/-/g'`
    68      
    69       getdbsetup
    70       # get number of runs on this date from db
    71       query="select COUNT(*) from RunData where ADDDATE(fRunStart, Interval 12 hour) like '$curdate %'"
    72 
    73       if ! numruns=`mysql -s -u $us --password=$pw --host=hercules $db -e "$query" | tail -1`
    74       then
    75          echo "ERROR could not query number of runs from rundb -> continue" >> $scriptlog 2>&1
    76          printprocesslog "ERROR could not query number of runs for $curdate from rundb"
    77          continue
    78       fi
    79 
    80       # Check if number of runs matches. If not, skip this directory
    81       if ! [ $numfiles -eq $numruns ]
    82       then
    83          echo "WARNING" >> $scriptlog 2>&1
    84          echo "Expecting $numruns raw-files for $curdate but found only $numfiles" >> $scriptlog 2>&1
    85          continue
    86       fi
    87 
    88       # check for non-raw-files
    89       nonraw=`find $dir -type f ! -name "*.raw"`
    90       if [ ! "$nonraw" == "" ]
    91       then
    92          echo "non-raw-files found in $dir" >> $scriptlog 2>&1
    93          printprocesslog "WARNING non-raw-files found in $dir"
    94       fi
    95 
    96       # change permission for this directory
    97       ssh lapalma@apollo chmod -R g+w $dir >> $scriptlog 2>&1
    98       # move directories to the tapedirectory
    99       mv -v $dir /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1
    100 
    101    done
     55   # change permission for this dirctories
     56   ssh lapalma@apollo chmod -R g+w $dirs >> $scriptlog 2>&1
     57   # move directories to the tapedirectory
     58   mv -v $dirs /magic/datacenter/fromtape/rawdata/ >> $scriptlog 2>&1
    10259fi
    10360
  • trunk/MagicSoft/Mars/datacenter/scripts/zipscript

    r7970 r8331  
    5454do
    5555   echo "zipping $file ..." >> $scriptlog 2>&1
    56    if ssh pegasus nice -n 19 gzip -1f $file >> $scriptlog 2>&1
     56#   if ssh pegasus nice -n 19 gzip -1f $file >> $scriptlog 2>&1
     57   if ssh phoenix nice -n 19 gzip -1f $file >> $scriptlog 2>&1
     58
    5759   then
    5860      chmod a-w $file >> $scriptlog 2>&1
Note: See TracChangeset for help on using the changeset viewer.