IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42620


Ignore:
Timestamp:
Feb 8, 2024, 11:37:56 AM (2 years ago)
Author:
eugene
Message:

merge changes from trunk : updates to rebalance

Location:
branches/eam_branches/ipp-20230313/tools/eam/rebalance
Files:
15 edited
4 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.find.sh

    r42531 r42620  
    11#!/bin/csh
    22
    3 set run = v0
    4 set version = 20230802
    5 
    6 # set mode to 'find' or 'find.test'
    73set mode = find
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
    15 set fraction = 0.90
     4set program = `basename $0`
     5source $HOME/.rebalance.sh
    166
    177if ($#argv == 0) then
    18   echo "USAGE: launch.find.sh launch"
    19   echo "USAGE: launch.find.sh find (Nentry)"
    20   echo "   eg: launch.find.sh find 1"
     8  echo "USAGE: $program launch"
     9  echo "USAGE: $program run (Nentry)"
     10  echo "   eg: $program run 1"
    2111  exit 2
    2212endif
     
    2616  set i = 1
    2717  while ($i <= $#srchost)
    28     echo ssh -f $srchost[$i] "cd $mydir && ./launch.find.sh find $i"
    29          ssh -f $srchost[$i] "cd $mydir && ./launch.find.sh find $i"
    30 #   echo ssh $f ps ux
    31 #        ssh $f ps ux
    32 #        ssh $f killall mana
    33 #        ssh $f killall find
    34   @ i++
     18    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     19         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     20    @ i++
    3521  end
    3622  exit 0
    3723endif
    3824
    39 if ("$1" == "find") then
     25if ("$1" == "run") then
    4026  if ($#argv != 2) then
    41     echo "USAGE: launch.find.sh find (Nentry)"
    42     echo "   eg: launch.find.sh find 1"
     27    echo "USAGE: $program run (Nentry)"
     28    echo "   eg: $program run 1"
    4329    exit 2
    4430  endif
     
    5339  set myhost = `hostname`
    5440  if ($hn != $myhost) then
    55     echo "ERROR: need to run find on the source host ($hn vs $myhost)"
     41    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
    5642    exit 3
    5743  endif
    5844
    59   echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     45  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
    6046  mkdir -p $hn.$hv
    6147  echo "./rebalance.mana $mode $hn $hv $tn $tv $version $fraction > & $hn.$hv/log.$mode.$version.$run &"
     
    6450endif
    6551
    66 echo "USAGE: launch.find.sh launch"
    67 echo "USAGE: launch.find.sh find (Nentry)"
    68 echo "   eg: launch.find.sh find 1"
     52echo "USAGE: $program launch"
     53echo "USAGE: $program run (Nentry)"
     54echo "   eg: $program run 1"
    6955exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.insert.check.errors.sh

    r42562 r42620  
    11#!/bin/csh
    22
     3set mode = insert
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 set mode = insert
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    156
    167if ($#argv == 0) then
     
    2213
    2314if ("$1" == "launch") then
    24 
    25   # NOTE: the insert jobs run on the target machines, not source machines
    2615
    2716  set i = 1
     
    6150  exit 0
    6251endif
     52
     53echo "USAGE: $program launch"
     54echo "USAGE: $program run (Nentry)"
     55echo "   eg: $program run 1"
     56exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.insert.errors.sh

    r42562 r42620  
    11#!/bin/csh
    22
     3set mode = insert
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 set mode = insert
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    156
    167if ($#argv == 0) then
     
    2213
    2314if ("$1" == "launch") then
    24 
    25   # NOTE: the insert jobs run on the target machines, not source machines
    2615
    2716  set i = 1
     
    6049  exit 0
    6150endif
     51
     52echo "USAGE: $program launch"
     53echo "USAGE: $program run (Nentry)"
     54echo "   eg: $program run 1"
     55exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.insert.sh

    r42562 r42620  
    11#!/bin/csh
    22
     3set mode = insert
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 
    8 # set to 'insert' first, then run with 'insert.check'
    9 # set mode = insert
    10 set mode = insert.check
    11 
    12 set srchost = (ipp100 ipp108 ipp112 ipp114)
    13 set srcvol  = (     0      0      1      0)
    14 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    15 set tgtvol  = (     0      1      0      1)
    16 
    17 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    186
    197if ($#argv == 0) then
     
    5341  set myhost = `hostname`
    5442  if ($tn != $myhost) then
    55     echo "ERROR: need to run $mode on the source host ($tn vs $myhost)"
     43    echo "ERROR: need to run $mode on the target host ($tn vs $myhost)"
    5644    exit 3
    5745  endif
    5846
    59   echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     47  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
    6048  mkdir -p $hn.$hv
    6149  echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &"
     
    6452endif
    6553
     54echo "USAGE: $program launch"
     55echo "USAGE: $program run (Nentry)"
     56echo "   eg: $program run 1"
     57exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.location.check.sh

    r41683 r42620  
    11#!/bin/csh
     2
     3## XXX update this
     4echo "UPDATE ME"
     5exit 2
     6
     7### XXX this needs to modified in each directory
    28
    39if ($#argv != 1) then
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.nebstat.insert.errors.sh

    r42562 r42620  
    11#!/bin/csh
    22
     3set mode = insert
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 set mode = insert
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    156
    167if ($#argv == 0) then
     
    6657  exit 0
    6758endif
     59
     60echo "USAGE: $program launch"
     61echo "USAGE: $program run (Nentry)"
     62echo "   eg: $program run 1"
     63exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.nebstat.trash.check.errors.sh

    r42562 r42620  
    11#!/bin/csh
    22
     3set mode = trash.check
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 set mode = trash.check
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    156
    167if ($#argv == 0) then
     
    6657  exit 0
    6758endif
     59
     60echo "USAGE: $program launch"
     61echo "USAGE: $program run (Nentry)"
     62echo "   eg: $program run 1"
     63exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.rsync.check.logs.sh

    r42562 r42620  
    11#!/bin/csh
    22
     3set mode = rsync.check.logs
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 set stage = rsync.check.logs
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    156
    167if ($#argv == 0) then
    17   echo "USAGE: $program launch (mode)"
    18   echo "USAGE: $program run (mode) (Nentry)"
     8  echo "USAGE: $program launch (command)"
     9  echo "USAGE: $program run (command) (Nentry)"
     10  echo "   (command) = show or count"
    1911  echo "   eg: $program run show 1"
     12  echo "   eg: $program run count 1"
    2013  exit 2
    2114endif
     
    3427if ("$1" == "run") then
    3528  if ($#argv != 3) then
    36     echo "USAGE: $program run (mode) (Nentry)"
     29    echo "USAGE: $program run (command) (Nentry)"
    3730    echo "   eg: $program run show 1"
    3831    exit 2
    3932  endif
    4033
    41   set mode = $2
     34  set command = $2
    4235  set N = $3
    4336
     
    4942  set myhost = `hostname`
    5043  if ($hn != $myhost) then
    51     echo "ERROR: need to run $stage on the source host ($hn vs $myhost)"
     44    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
    5245    exit 3
    5346  endif
    5447
    55   echo "running on $myhost for source $hn.$hv to target $tn.$tv for stage $stage, version $version"
     48  echo "running on $myhost for source $hn.$hv to target $tn.$tv for mode $mode, version $version"
    5649  mkdir -p $hn.$hv
    57   echo "./rsync.check.logs.sh $mode $hn $hv $version $run > & $hn.$hv/log.$stage.$version.$run &"
    58         ./rsync.check.logs.sh $mode $hn $hv $version $run > & $hn.$hv/log.$stage.$version.$run &
     50  echo "./rsync.check.logs.sh $command $hn $hv $version $run > & $hn.$hv/log.$mode.$version.$run &"
     51        ./rsync.check.logs.sh $command $hn $hv $version $run > & $hn.$hv/log.$mode.$version.$run &
    5952  exit 0
    6053endif
     54
     55echo "USAGE: $program launch (command)"
     56echo "USAGE: $program run (command) (Nentry)"
     57echo "   (command) = show or count"
     58echo "   eg: $program run show 1"
     59echo "   eg: $program run count 1"
     60exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.rsync.check.sh

    r42562 r42620  
    11#!/bin/csh
    22
     3set mode = rsync.check
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 set mode = rsync.check
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    156
    167if ($#argv == 0) then
     
    5243  endif
    5344
    54   echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     45  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
    5546  mkdir -p $hn.$hv
    5647  echo "./rebalance.mana $mode $hn $hv $tn $tv $version $version.$run.chk > & $hn.$hv/log.$mode.$version.$run &"
     
    5849  exit 0
    5950endif
     51
     52echo "USAGE: $program launch"
     53echo "USAGE: $program run (Nentry)"
     54echo "   eg: $program run 1"
     55exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.rsync.sh

    r42531 r42620  
    11#!/bin/csh
    22
     3set mode = rsync
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 set mode = rsync
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    156
    167if ($#argv == 0) then
     
    5243  endif
    5344
    54   echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     45  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
    5546  mkdir -p $hn.$hv
    5647  echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &"
     
    5849  exit 0
    5950endif
     51
     52echo "USAGE: $program launch"
     53echo "USAGE: $program run (Nentry)"
     54echo "   eg: $program run 1"
     55exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.trash.check.sh

    r42562 r42620  
    11#!/bin/csh
    22
     3set mode = trash.check
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 set mode = trash.check
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    156
    167if ($#argv == 0) then
     
    5243  endif
    5344
    54   echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     45  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
    5546  mkdir -p $hn.$hv
    5647  echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &"
     
    5950  exit 0
    6051endif
     52
     53echo "USAGE: $program launch"
     54echo "USAGE: $program run (Nentry)"
     55echo "   eg: $program run 1"
     56exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.trash.empty.sh

    r42562 r42620  
    11#!/bin/csh
    22
     3set mode = empty.trash
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 set mode = empty.trash
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    156
    167if ($#argv == 0) then
     
    5243  endif
    5344
    54   echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     45  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
    5546  mkdir -p $hn.$hv
    5647  echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &"
     
    5950  exit 0
    6051endif
     52
     53echo "USAGE: $program launch"
     54echo "USAGE: $program run (Nentry)"
     55echo "   eg: $program run 1"
     56exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.trash.errors.sh

    r42562 r42620  
    11#!/bin/csh
    22
     3set mode = trash.errors
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 set mode = trash.errors
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    156
    167if ($#argv == 0) then
     
    2213
    2314if ("$1" == "launch") then
    24 
    25   # NOTE: the insert jobs run on the target machines, not source machines
    2615
    2716  set i = 1
     
    6150  exit 0
    6251endif
     52
     53echo "USAGE: $program launch"
     54echo "USAGE: $program run (Nentry)"
     55echo "   eg: $program run 1"
     56exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.trash.sh

    r42562 r42620  
    11#!/bin/csh
    22
     3set mode = trash
    34set program = `basename $0`
    4 
    5 set run = v0
    6 set version = 20230802
    7 set mode = trash
    8 
    9 set srchost = (ipp100 ipp108 ipp112 ipp114)
    10 set srcvol  = (     0      0      1      0)
    11 set tgthost = (ipp161 ipp161 ipp162 ipp162)
    12 set tgtvol  = (     0      1      0      1)
    13 
    14 set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     5source $HOME/.rebalance.sh
    156
    167if ($#argv == 0) then
     
    5243  endif
    5344
    54   echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     45  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
    5546  mkdir -p $hn.$hv
    5647  echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &"
     
    5849  exit 0
    5950endif
     51
     52echo "USAGE: $program launch"
     53echo "USAGE: $program run (Nentry)"
     54echo "   eg: $program run 1"
     55exit 2
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/rebalance.mana

    r42314 r42620  
    163163
    164164#   list files -x "/bin/ls -l `cat $filelist` | sort -k 5nr"
    165     list files -x "./neb_make_movelist.sh $filelist"
     165
     166#   this shell script returned the output of ls -l (filesize = word[4], filename = word[8])
     167#   list files -x "./neb_make_movelist.sh $filelist"
     168
     169#   this perl script returns the filename and size only
     170    list files -x "./neb_make_movelist.pl $filelist"
    166171
    167172    # generate subset list to match goal size
     
    170175    while (($Ntotal < $NremoveSub) && ($j < $files:n))
    171176      list word -split $files:$j
    172       $keep:$j = $word:8
    173       $Ntotal += $word:4
     177#     $keep:$j = $word:8
     178#     $Ntotal += $word:4
     179      $keep:$j = $word:0
     180      $Ntotal += $word:1
     181
    174182      # echo $word:4 $Ntotal : $NremoveSub $keep:$j
    175183      $j ++
Note: See TracChangeset for help on using the changeset viewer.