Changeset 42534 for trunk/tools/eam/rebalance/launch.insert.sh
- Timestamp:
- Aug 29, 2023, 9:11:20 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/tools/eam/rebalance/launch.insert.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rebalance/launch.insert.sh
r42485 r42534 1 1 #!/bin/csh 2 2 3 set srclist = (ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139) 4 set tgtlist = (ipp153 ipp153 ipp154 ipp154 ipp155 ipp155 ipp156 ipp156 ipp157 ipp157 ipp153 ipp154 ipp155 ipp156 ipp157 ipp154 ipp155 ipp157) 3 set program = `basename $0` 5 4 6 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922 5 set run = v0 6 set version = 20230802 7 7 8 # manually set these values: 9 set run = v0 10 set version = 20220922 8 # set to 'insert' first, then run with 'insert.check' 9 # set mode = insert 11 10 set mode = insert.check 12 11 13 if ($#argv < 1) then 14 echo "USAGE: launch.insert.sh launch" 15 echo "USAGE: launch.insert.sh (src) (tgt)" 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 18 19 if ($#argv == 0) then 20 echo "USAGE: $program launch" 21 echo "USAGE: $program run (Nentry)" 22 echo " eg: $program run 1" 16 23 exit 2 17 24 endif 18 25 19 if ($#argv == 1) then 20 if ("$1" != "launch") then 21 echo "USAGE: launch.insert.sh launch" 22 echo "USAGE: launch.insert.sh (src) (tgt)" 23 exit 2 24 endif 26 if ("$1" == "launch") then 27 28 # NOTE: the insert jobs run on the target machines, not source machines 25 29 26 30 set i = 1 27 while ($i <= $#srclist) 28 set src = $srclist[$i] 29 set tgt = $tgtlist[$i] 30 echo ssh -f $tgt "cd $mydir && ./launch.insert.sh $src $tgt" 31 ssh -f $tgt "cd $mydir && ./launch.insert.sh $src $tgt" 31 while ($i <= $#tgthost) 32 echo ssh -f $tgthost[$i] "cd $mydir && ./$program run $i" 33 ssh -f $tgthost[$i] "cd $mydir && ./$program run $i" 32 34 @ i++ 33 35 end … … 35 37 endif 36 38 37 if ($#argv != 2) then 38 echo "USAGE: launch.insert.sh launch" 39 echo "USAGE: launch.insert.sh (src) (tgt)" 40 exit 2 39 if ("$1" == "run") then 40 if ($#argv != 2) then 41 echo "USAGE: $program run (Nentry)" 42 echo " eg: $program run 1" 43 exit 2 44 endif 45 46 set N = $2 47 48 set hn = $srchost[$N] 49 set hv = $srcvol[$N] 50 set tn = $tgthost[$N] 51 set tv = $tgtvol[$N] 52 53 set myhost = `hostname` 54 if ($tn != $myhost) then 55 echo "ERROR: need to run $mode on the source host ($tn vs $myhost)" 56 exit 3 57 endif 58 59 echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version" 60 mkdir -p $hn.$hv 61 echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &" 62 ./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run & 63 exit 0 41 64 endif 42 65 43 set src = $144 set tgt = $245 46 set v = 0 ; set h = $src; set t = $tgt; ./rebalance.mana $mode $h $v $t $v $version > & $h.$v/log.$mode.$version.$run &47 set v = 1 ; set h = $src; set t = $tgt; ./rebalance.mana $mode $h $v $t $v $version > & $h.$v/log.$mode.$version.$run &48 49 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.rsync.sh"50 51 # echo ssh $f ps ux52 # ssh $f ps ux53 # ssh $f killall mana54 # ssh $f killall find
Note:
See TracChangeset
for help on using the changeset viewer.
