IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41456


Ignore:
Timestamp:
Dec 15, 2020, 9:26:14 AM (6 years ago)
Author:
eugene
Message:

adding triple search tools and general scanning scripts

Location:
trunk/tools/eam
Files:
37 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rebalance/rebalance.mana

    r41407 r41456  
    4040  # generate the full paths:
    4141  $source = /data/$srchost.$srcvol/nebulous
    42   $target = /data/$tgthost.$tgtvol/rebalance/$srchost.$srcvol/nebulous
     42  # $target = /data/$tgthost.$tgtvol/rebalance/$srchost.$srcvol/nebulous
    4343
    4444  ## make sure target exists
    45   mkdir $target
     45  # mkdir $target
    4646
    4747  ## this script must be run on the same machine as the source
     
    106106
    107107  ## make sure target exists
    108   mkdir $target
     108  # mkdir $target
    109109
    110110  ## this script must be run on the same machine as the source
     
    159159    sprintf movelog  %s/rebalance/movefiles.%s.log $srcdir $VERSION
    160160    sprintf subdirset "%s/??" $srcdir
     161
     162    local isFound
     163    file $movelist isFound
     164    if ($isFound) continue
     165
    161166    exec find $subdirset -size +$BIGSIZE > $filelist
    162167
     
    216221  $target = /data/$tgthost.$tgtvol/rebalance/$srchost.$srcvol/nebulous
    217222
     223  ## make sure target exists
     224  mkdir $target
     225
     226  $TIMEFORMAT = mjd
     227  $TIMEREF = 2000/01/01,00:00:00; # this is not used but required to exist for ctimes
     228 
     229  # give the start of the night in HST hours:
     230  $HSTNightStart = 18.5
     231  $HSTNightEnd   =  7.5
     232
     233  $UTNightStart = ($HSTNightStart + 10) / 24; $UTNightStart = $UTNightStart - int($UTNightStart)
     234  $UTNightEnd   = ($HSTNightEnd   + 10) / 24; $UTNightEnd   = $UTNightEnd   - int($UTNightEnd)
     235
    218236  for i 0 $NSUBDIR
    219237    sprintf srcdir "%s/%02x" $source $i
     
    226244
    227245    echo "rsyncing $srcdir/ to $tgtdir/ : $movelog"
     246    break -auto off
    228247    exec rsync -auv --files-from=$movelist $srcdir/ $tgtdir/ >& $movelog
     248    break -auto on
     249
     250    # check the time: is it night time (sleep and restart later)
     251    $isNight = 1
     252    while ($isNight)
     253      ctimes -abs now -var tnow
     254      $tfrac = $tnow - int($tnow)
     255      $isNight = (($tfrac > $UTNightStart) && ($tfrac < $UTNightEnd))
     256      if ($isNight)
     257        echo "it is night time, sleeping until the morning"
     258        sleep 600
     259      end
     260    end
    229261  end
    230262end
Note: See TracChangeset for help on using the changeset viewer.