Index: /trunk/tools/eam/rebalance/launch.insert.check.errors.sh
===================================================================
--- /trunk/tools/eam/rebalance/launch.insert.check.errors.sh	(revision 42533)
+++ /trunk/tools/eam/rebalance/launch.insert.check.errors.sh	(revision 42534)
@@ -1,76 +1,62 @@
 #!/bin/csh 
 
-set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
+set program = `basename $0`
 
-set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
+set run = v0
+set version = 20230802
+set mode = insert
 
-if ($#argv == 1) then
-  if ("$1" != "launch") then
-    echo "USAGE: launch.insert.check.errors.sh launch"
-    exit 2
-  endif
-  foreach f ($list)
-    echo ssh -f $f "cd $mydir && ./launch.insert.check.errors.sh"
-         ssh -f $f "cd $mydir && ./launch.insert.check.errors.sh"
+set srchost = (ipp100 ipp108 ipp112 ipp114)
+set srcvol  = (     0      0      1      0)
+set tgthost = (ipp161 ipp161 ipp162 ipp162)
+set tgtvol  = (     0      1      0      1)
+
+set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
+
+if ($#argv == 0) then
+  echo "USAGE: $program launch"
+  echo "USAGE: $program run (Nentry)"
+  echo "   eg: $program run 1"
+  exit 2
+endif
+
+if ("$1" == "launch") then
+
+  # NOTE: the insert jobs run on the target machines, not source machines
+
+  set i = 1
+  while ($i <= $#srchost)
+    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
+         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
+    @ i++
   end
   exit 0
 endif
 
-set run = v0
-set version = 20220922
+if ("$1" == "run") then
+  if ($#argv != 2) then
+    echo "USAGE: $program run (Nentry)"
+    echo "   eg: $program run 1"
+    exit 2
+  endif
 
-set myhost = `hostname`
-set Nhost = `hostname | sed s/ipp//`
+  set N = $2
 
-# ipp100 - ipp117 (10 total) need to have  ~7TB moved
-# ipp123 - ipp126 ( 4 total) need to have  ~9TB moved
-# ipp134 - ipp139 ( 4 total) need to have ~12TB moved
+  set hn = $srchost[$N]
+  set hv = $srcvol[$N]
+  set tn = $tgthost[$N]
+  set tv = $tgtvol[$N]
 
-set target = NONE
-switch ($myhost)
-  # total of 23TB
-  case ipp100
-  case ipp101
-  case ipp123
-  set target = ipp153
-  breaksw;
+  set myhost = `hostname`
+  if ($hn != $myhost) then
+    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
+    exit 3
+  endif
 
-  # total of 35TB
-  case ipp102
-  case ipp104
-  case ipp124
-  case ipp136
-  set target = ipp154
-  breaksw;
+  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
+  mkdir -p $hn.$hv
 
-  # total of 35TB
-  case ipp105
-  case ipp108
-  case ipp125
-  case ipp137
-  set target = ipp155
-  breaksw;
+  grep ERROR /data/$hn.$hv/nebulous/??/rebalance/movefiles.$version.chk >& $hn.$hv/errors.insert.check.$version.$run &
 
-  # total of 23TB
-  case ipp112
-  case ipp114
-  case ipp126
-  set target = ipp156
-  breaksw;
-
-  # total of 38TB
-  case ipp115
-  case ipp117
-  case ipp134
-  case ipp139
-  set target = ipp157
-  breaksw;
-endsw
-
-if ("$target" == "NONE") then
-  echo "need target"
-  exit 2
+  exit 0
 endif
-
-set v = 0 ; set h = `hostname` ; set t = $target; grep ERROR /data/$h.$v/nebulous/??/rebalance/movefiles.$version.chk >& $h.$v/errors.insert.check.$version.$run &
-set v = 1 ; set h = `hostname` ; set t = $target; grep ERROR /data/$h.$v/nebulous/??/rebalance/movefiles.$version.chk >& $h.$v/errors.insert.check.$version.$run &
Index: /trunk/tools/eam/rebalance/launch.insert.errors.sh
===================================================================
--- /trunk/tools/eam/rebalance/launch.insert.errors.sh	(revision 42533)
+++ /trunk/tools/eam/rebalance/launch.insert.errors.sh	(revision 42534)
@@ -1,79 +1,61 @@
 #!/bin/csh 
 
-# src machines:
-set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
+set program = `basename $0`
 
-set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
+set run = v0
+set version = 20230802
+set mode = insert
 
-if ($#argv == 1) then
-  if ("$1" != "launch") then
-    echo "USAGE: launch.insert.errors.sh launch"
-    exit 2
-  endif
-  foreach f ($list)
-    echo ssh -f $f "cd $mydir && ./launch.insert.errors.sh"
-         ssh -f $f "cd $mydir && ./launch.insert.errors.sh"
+set srchost = (ipp100 ipp108 ipp112 ipp114)
+set srcvol  = (     0      0      1      0)
+set tgthost = (ipp161 ipp161 ipp162 ipp162)
+set tgtvol  = (     0      1      0      1)
+
+set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
+
+if ($#argv == 0) then
+  echo "USAGE: $program launch"
+  echo "USAGE: $program run (Nentry)"
+  echo "   eg: $program run 1"
+  exit 2
+endif
+
+if ("$1" == "launch") then
+
+  # NOTE: the insert jobs run on the target machines, not source machines
+
+  set i = 1
+  while ($i <= $#srchost)
+    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
+         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
+    @ i++
   end
   exit 0
 endif
 
-set run = v0
-set version = 20220922
+if ("$1" == "run") then
+  if ($#argv != 2) then
+    echo "USAGE: $program run (Nentry)"
+    echo "   eg: $program run 1"
+    exit 2
+  endif
 
-set myhost = `hostname`
-set Nhost = `hostname | sed s/ipp//`
+  set N = $2
 
-# ipp100 - ipp117 (10 total) need to have  ~7TB moved
-# ipp123 - ipp126 ( 4 total) need to have  ~9TB moved
-# ipp134 - ipp139 ( 4 total) need to have ~12TB moved
+  set hn = $srchost[$N]
+  set hv = $srcvol[$N]
+  set tn = $tgthost[$N]
+  set tv = $tgtvol[$N]
 
-set target = NONE
-switch ($myhost)
-  # total of 23TB
-  case ipp100
-  case ipp101
-  case ipp123
-  set target = ipp153
-  breaksw;
+  set myhost = `hostname`
+  if ($hn != $myhost) then
+    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
+    exit 3
+  endif
 
-  # total of 35TB
-  case ipp102
-  case ipp104
-  case ipp124
-  case ipp136
-  set target = ipp154
-  breaksw;
+  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
+  mkdir -p $hn.$hv
 
-  # total of 35TB
-  case ipp105
-  case ipp108
-  case ipp125
-  case ipp137
-  set target = ipp155
-  breaksw;
-
-  # total of 23TB
-  case ipp112
-  case ipp114
-  case ipp126
-  set target = ipp156
-  breaksw;
-
-  # total of 38TB
-  case ipp115
-  case ipp117
-  case ipp134
-  case ipp139
-  set target = ipp157
-  breaksw;
-endsw
-
-if ("$target" == "NONE") then
-  echo "need target"
-  exit 2
+  grep ERROR /data/$hn.$hv/nebulous/??/rebalance/insert.$version.log >& $hn.$hv/errors.insert.$version.$run &
+  exit 0
 endif
-
-set v = 0 ; set h = `hostname` ; set t = $target; grep ERROR /data/$h.$v/nebulous/??/rebalance/insert.$version.log >& $h.$v/errors.insert.$version.$run &
-set v = 1 ; set h = `hostname` ; set t = $target; grep ERROR /data/$h.$v/nebulous/??/rebalance/insert.$version.log >& $h.$v/errors.insert.$version.$run &
-
-# e.g.: ssh -f ipp127 "cd `pwd` && ./launch.insert.errors.sh"
Index: /trunk/tools/eam/rebalance/launch.insert.sh
===================================================================
--- /trunk/tools/eam/rebalance/launch.insert.sh	(revision 42533)
+++ /trunk/tools/eam/rebalance/launch.insert.sh	(revision 42534)
@@ -1,33 +1,35 @@
 #!/bin/csh 
 
-set srclist = (ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139)
-set tgtlist = (ipp153 ipp153 ipp154 ipp154 ipp155 ipp155 ipp156 ipp156 ipp157 ipp157 ipp153 ipp154 ipp155 ipp156 ipp157 ipp154 ipp155 ipp157)
+set program = `basename $0`
 
-set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
+set run = v0
+set version = 20230802
 
-# manually set these values:
-set run = v0
-set version = 20220922
+# set to 'insert' first, then run with 'insert.check'
+# set mode = insert
 set mode = insert.check
 
-if ($#argv < 1) then
-  echo "USAGE: launch.insert.sh launch"
-  echo "USAGE: launch.insert.sh (src) (tgt)"
+set srchost = (ipp100 ipp108 ipp112 ipp114)
+set srcvol  = (     0      0      1      0)
+set tgthost = (ipp161 ipp161 ipp162 ipp162)
+set tgtvol  = (     0      1      0      1)
+
+set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
+
+if ($#argv == 0) then
+  echo "USAGE: $program launch"
+  echo "USAGE: $program run (Nentry)"
+  echo "   eg: $program run 1"
   exit 2
 endif
 
-if ($#argv == 1) then
-  if ("$1" != "launch") then
-    echo "USAGE: launch.insert.sh launch"
-    echo "USAGE: launch.insert.sh (src) (tgt)"
-    exit 2
-  endif
+if ("$1" == "launch") then
+
+  # NOTE: the insert jobs run on the target machines, not source machines
 
   set i = 1
-  while ($i <= $#srclist)
-    set src = $srclist[$i]
-    set tgt = $tgtlist[$i]
-    echo ssh -f $tgt "cd $mydir && ./launch.insert.sh $src $tgt"
-         ssh -f $tgt "cd $mydir && ./launch.insert.sh $src $tgt"
+  while ($i <= $#tgthost)
+    echo ssh -f $tgthost[$i] "cd $mydir && ./$program run $i"
+         ssh -f $tgthost[$i] "cd $mydir && ./$program run $i"
     @ i++
   end
@@ -35,20 +37,29 @@
 endif
 
-if ($#argv != 2) then
-  echo "USAGE: launch.insert.sh launch"
-  echo "USAGE: launch.insert.sh (src) (tgt)"
-  exit 2
+if ("$1" == "run") then
+  if ($#argv != 2) then
+    echo "USAGE: $program run (Nentry)"
+    echo "   eg: $program run 1"
+    exit 2
+  endif
+
+  set N = $2
+
+  set hn = $srchost[$N]
+  set hv = $srcvol[$N]
+  set tn = $tgthost[$N]
+  set tv = $tgtvol[$N]
+
+  set myhost = `hostname`
+  if ($tn != $myhost) then
+    echo "ERROR: need to run $mode on the source host ($tn vs $myhost)"
+    exit 3
+  endif
+
+  echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
+  mkdir -p $hn.$hv
+  echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &"
+        ./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &
+  exit 0
 endif
 
-set src = $1
-set tgt = $2
-
-set v = 0 ; set h = $src; set t = $tgt; ./rebalance.mana $mode $h $v $t $v $version > & $h.$v/log.$mode.$version.$run &
-set v = 1 ; set h = $src; set t = $tgt; ./rebalance.mana $mode $h $v $t $v $version > & $h.$v/log.$mode.$version.$run &
-
-# e.g.: ssh -f ipp127 "cd `pwd` && ./launch.rsync.sh"
-
-#     echo ssh $f ps ux
-#          ssh $f ps ux
-#      ssh $f killall mana
-#      ssh $f killall find
Index: /trunk/tools/eam/rebalance/launch.nebstat.insert.errors.sh
===================================================================
--- /trunk/tools/eam/rebalance/launch.nebstat.insert.errors.sh	(revision 42534)
+++ /trunk/tools/eam/rebalance/launch.nebstat.insert.errors.sh	(revision 42534)
@@ -0,0 +1,67 @@
+#!/bin/csh 
+
+set program = `basename $0`
+
+set run = v0
+set version = 20230802
+set mode = insert
+
+set srchost = (ipp100 ipp108 ipp112 ipp114)
+set srcvol  = (     0      0      1      0)
+set tgthost = (ipp161 ipp161 ipp162 ipp162)
+set tgtvol  = (     0      1      0      1)
+
+set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
+
+if ($#argv == 0) then
+  echo "USAGE: $program launch"
+  echo "USAGE: $program run (Nentry)"
+  echo "   eg: $program run 1"
+  exit 2
+endif
+
+if ("$1" == "launch") then
+
+  # NOTE: the insert jobs run on the target machines, not source machines
+
+  set i = 1
+  while ($i <= $#tgthost)
+    echo ssh -f $tgthost[$i] "cd $mydir && ./$program run $i >& $srchost[$i].$srcvol[$i]/nebstat.errors.insert.$version.$run.log"
+         ssh -f $tgthost[$i] "cd $mydir && ./$program run $i >& $srchost[$i].$srcvol[$i]/nebstat.errors.insert.$version.$run.log"
+    @ i++
+  end
+  exit 0
+endif
+
+if ("$1" == "run") then
+  if ($#argv != 2) then
+    echo "USAGE: $program run (Nentry)"
+    echo "   eg: $program run 1"
+    exit 2
+  endif
+
+  set N = $2
+
+  set hn = $srchost[$N]
+  set hv = $srcvol[$N]
+  set tn = $tgthost[$N]
+  set tv = $tgtvol[$N]
+
+  set myhost = `hostname`
+  if ($tn != $myhost) then
+    echo "ERROR: need to run $mode on the target host ($tn vs $myhost)"
+    exit 3
+  endif
+
+  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
+  mkdir -p $hn.$hv
+
+  rm -f $hn.$hv/nebstat.errors.insert.$version.$run.stats
+
+  foreach f (`prcol 8 < $hn.$hv/errors.insert.$version.$run`)
+    neb-stat `neb-reverse $f` >> $hn.$hv/nebstat.errors.insert.$version.$run.stats
+    echo $f >> $hn.$hv/nebstat.errors.insert.$version.$run.files
+  end
+
+  exit 0
+endif
Index: /trunk/tools/eam/rebalance/launch.rsync.check.logs.sh
===================================================================
--- /trunk/tools/eam/rebalance/launch.rsync.check.logs.sh	(revision 42533)
+++ /trunk/tools/eam/rebalance/launch.rsync.check.logs.sh	(revision 42534)
@@ -1,76 +1,60 @@
 #!/bin/csh 
 
-  set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
-# set list = "ipp105 ipp108 ipp112 ipp114 ipp115 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
-# set list = "ipp100 ipp101 ipp102 ipp104 ipp117"
+set program = `basename $0`
 
-set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
+set run = v0
+set version = 20230802
+set stage = rsync.check.logs
 
-if ($#argv == 1) then
-  if ("$1" != "launch") then
-    echo "USAGE: launch.rsync.check.logs.sh launch"
-    exit 2
-  endif
-  foreach f ($list)
-    echo ssh -f $f "cd $mydir && ./launch.rsync.check.logs.sh"
-         ssh -f $f "cd $mydir && ./launch.rsync.check.logs.sh"
+set srchost = (ipp100 ipp108 ipp112 ipp114)
+set srcvol  = (     0      0      1      0)
+set tgthost = (ipp161 ipp161 ipp162 ipp162)
+set tgtvol  = (     0      1      0      1)
+
+set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
+
+if ($#argv == 0) then
+  echo "USAGE: $program launch (mode)"
+  echo "USAGE: $program run (mode) (Nentry)"
+  echo "   eg: $program run show 1"
+  exit 2
+endif
+
+if ("$1" == "launch") then
+
+  set i = 1
+  while ($i <= $#srchost)
+    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $2 $i"
+         ssh -f $srchost[$i] "cd $mydir && ./$program run $2 $i"
+    @ i++
   end
   exit 0
 endif
 
-## set the run value in rsync.check.logs.sh
-## set run = v2
-set version = 20220922
+if ("$1" == "run") then
+  if ($#argv != 3) then
+    echo "USAGE: $program run (mode) (Nentry)"
+    echo "   eg: $program run show 1"
+    exit 2
+  endif
 
-set myhost = `hostname`
-set Nhost = `hostname | sed s/ipp//`
+  set mode = $2
+  set N = $3
 
-set target = NONE
-switch ($myhost)
-  # total of 23TB
-  case ipp100
-  case ipp101
-  case ipp123
-  set target = ipp153
-  breaksw;
+  set hn = $srchost[$N]
+  set hv = $srcvol[$N]
+  set tn = $tgthost[$N]
+  set tv = $tgtvol[$N]
 
-  # total of 35TB
-  case ipp102
-  case ipp104
-  case ipp124
-  case ipp136
-  set target = ipp154
-  breaksw;
+  set myhost = `hostname`
+  if ($hn != $myhost) then
+    echo "ERROR: need to run $stage on the source host ($hn vs $myhost)"
+    exit 3
+  endif
 
-  # total of 35TB
-  case ipp105
-  case ipp108
-  case ipp125
-  case ipp137
-  set target = ipp155
-  breaksw;
-
-  # total of 23TB
-  case ipp112
-  case ipp114
-  case ipp126
-  set target = ipp156
-  breaksw;
-
-  # total of 38TB
-  case ipp115
-  case ipp117
-  case ipp134
-  case ipp139
-  set target = ipp157
-  breaksw;
-endsw
-
-if ("$target" == "NONE") then
-  echo "need target"
-  exit 2
+  echo "running on $myhost for source $hn.$hv to target $tn.$tv for stage $stage, version $version"
+  mkdir -p $hn.$hv
+  echo "./rsync.check.logs.sh $mode $hn $hv $version $run > & $hn.$hv/log.$stage.$version.$run &"
+        ./rsync.check.logs.sh $mode $hn $hv $version $run > & $hn.$hv/log.$stage.$version.$run &
+  exit 0
 endif
-
-set h = `hostname`; ./rsync.check.logs.sh > & $h.rsync.check.logs
-
-# e.g.: ssh -f ipp127 "cd `pwd` && ./launch.rsync.check.sh"
Index: /trunk/tools/eam/rebalance/launch.rsync.check.sh
===================================================================
--- /trunk/tools/eam/rebalance/launch.rsync.check.sh	(revision 42533)
+++ /trunk/tools/eam/rebalance/launch.rsync.check.sh	(revision 42534)
@@ -1,76 +1,59 @@
 #!/bin/csh 
 
-  set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
-# set list = "ipp105 ipp108 ipp112 ipp114 ipp115 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
-# set list = "ipp100 ipp101 ipp102 ipp104 ipp117"
+set program = `basename $0`
 
-set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
+set run = v0
+set version = 20230802
+set mode = rsync.check
 
-if ($#argv == 1) then
-  if ("$1" != "launch") then
-    echo "USAGE: launch.rsync.check.sh launch"
-    exit 2
-  endif
-  foreach f ($list)
-    echo ssh -f $f "cd $mydir && ./launch.rsync.check.sh"
-         ssh -f $f "cd $mydir && ./launch.rsync.check.sh"
+set srchost = (ipp100 ipp108 ipp112 ipp114)
+set srcvol  = (     0      0      1      0)
+set tgthost = (ipp161 ipp161 ipp162 ipp162)
+set tgtvol  = (     0      1      0      1)
+
+set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
+
+if ($#argv == 0) then
+  echo "USAGE: $program launch"
+  echo "USAGE: $program run (Nentry)"
+  echo "   eg: $program run 1"
+  exit 2
+endif
+
+if ("$1" == "launch") then
+
+  set i = 1
+  while ($i <= $#srchost)
+    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
+         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
+    @ i++
   end
   exit 0
 endif
 
-set run = v2
-set version = 20220922
+if ("$1" == "run") then
+  if ($#argv != 2) then
+    echo "USAGE: $program run (Nentry)"
+    echo "   eg: $program run 1"
+    exit 2
+  endif
 
-set myhost = `hostname`
-set Nhost = `hostname | sed s/ipp//`
+  set N = $2
 
-set target = NONE
-switch ($myhost)
-  # total of 23TB
-  case ipp100
-  case ipp101
-  case ipp123
-  set target = ipp153
-  breaksw;
+  set hn = $srchost[$N]
+  set hv = $srcvol[$N]
+  set tn = $tgthost[$N]
+  set tv = $tgtvol[$N]
 
-  # total of 35TB
-  case ipp102
-  case ipp104
-  case ipp124
-  case ipp136
-  set target = ipp154
-  breaksw;
+  set myhost = `hostname`
+  if ($hn != $myhost) then
+    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
+    exit 3
+  endif
 
-  # total of 35TB
-  case ipp105
-  case ipp108
-  case ipp125
-  case ipp137
-  set target = ipp155
-  breaksw;
-
-  # total of 23TB
-  case ipp112
-  case ipp114
-  case ipp126
-  set target = ipp156
-  breaksw;
-
-  # total of 38TB
-  case ipp115
-  case ipp117
-  case ipp134
-  case ipp139
-  set target = ipp157
-  breaksw;
-endsw
-
-if ("$target" == "NONE") then
-  echo "need target"
-  exit 2
+  echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
+  mkdir -p $hn.$hv
+  echo "./rebalance.mana $mode $hn $hv $tn $tv $version $version.$run.chk > & $hn.$hv/log.$mode.$version.$run &"
+        ./rebalance.mana $mode $hn $hv $tn $tv $version $version.$run.chk > & $hn.$hv/log.$mode.$version.$run &
+  exit 0
 endif
-
-set v = 0 ; set h = `hostname` ; set t = $target; ./rebalance.mana rsync.check $h $v $t $v $version $version.$run.chk > & $h.$v/log.rsync.check.$version.$run &
-set v = 1 ; set h = `hostname` ; set t = $target; ./rebalance.mana rsync.check $h $v $t $v $version $version.$run.chk > & $h.$v/log.rsync.check.$version.$run &
-
-# e.g.: ssh -f ipp127 "cd `pwd` && ./launch.rsync.check.sh"
Index: /trunk/tools/eam/rebalance/launch.trash.sh
===================================================================
--- /trunk/tools/eam/rebalance/launch.trash.sh	(revision 42533)
+++ /trunk/tools/eam/rebalance/launch.trash.sh	(revision 42534)
@@ -1,73 +1,59 @@
 #!/bin/csh 
 
-set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
-set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
+set program = `basename $0`
 
-if ($#argv == 1) then
-  if ("$1" != "launch") then
-    echo "USAGE: launch.trash.sh launch"
-    exit 2
-  endif
-  foreach f ($list)
-    echo ssh -f $f "cd $mydir && ./launch.trash.sh"
-         ssh -f $f "cd $mydir && ./launch.trash.sh"
+set run = v0
+set version = 20230802
+set mode = trash
+
+set srchost = (ipp100 ipp108 ipp112 ipp114)
+set srcvol  = (     0      0      1      0)
+set tgthost = (ipp161 ipp161 ipp162 ipp162)
+set tgtvol  = (     0      1      0      1)
+
+set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
+
+if ($#argv == 0) then
+  echo "USAGE: $program launch"
+  echo "USAGE: $program run (Nentry)"
+  echo "   eg: $program run 1"
+  exit 2
+endif
+
+if ("$1" == "launch") then
+
+  set i = 1
+  while ($i <= $#srchost)
+    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
+         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
+    @ i++
   end
   exit 0
 endif
 
-set run = v0
-set version = 20220922
+if ("$1" == "run") then
+  if ($#argv != 2) then
+    echo "USAGE: $program run (Nentry)"
+    echo "   eg: $program run 1"
+    exit 2
+  endif
 
-set myhost = `hostname`
-set Nhost = `hostname | sed s/ipp//`
+  set N = $2
 
-set target = NONE
-switch ($myhost)
-  # total of 23TB
-  case ipp100
-  case ipp101
-  case ipp123
-  set target = ipp153
-  breaksw;
+  set hn = $srchost[$N]
+  set hv = $srcvol[$N]
+  set tn = $tgthost[$N]
+  set tv = $tgtvol[$N]
 
-  # total of 35TB
-  case ipp102
-  case ipp104
-  case ipp124
-  case ipp136
-  set target = ipp154
-  breaksw;
+  set myhost = `hostname`
+  if ($hn != $myhost) then
+    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
+    exit 3
+  endif
 
-  # total of 35TB
-  case ipp105
-  case ipp108
-  case ipp125
-  case ipp137
-  set target = ipp155
-  breaksw;
-
-  # total of 23TB
-  case ipp112
-  case ipp114
-  case ipp126
-  set target = ipp156
-  breaksw;
-
-  # total of 38TB
-  case ipp115
-  case ipp117
-  case ipp134
-  case ipp139
-  set target = ipp157
-  breaksw;
-endsw
-
-if ("$target" == "NONE") then
-  echo "need target"
-  exit 2
+  echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
+  mkdir -p $hn.$hv
+  echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &"
+        ./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &
+  exit 0
 endif
-
-set v = 0 ; set h = `hostname` ; set t = $target; ./rebalance.mana trash $h $v $t $v $version > & $h.$v/log.trash.$version.$run &
-set v = 1 ; set h = `hostname` ; set t = $target; ./rebalance.mana trash $h $v $t $v $version > & $h.$v/log.trash.$version.$run &
-
-# e.g.: ssh -f ipp127 "cd `pwd` && ./launch.trash.sh"
Index: /trunk/tools/eam/rebalance/rsync.check.logs.sh
===================================================================
--- /trunk/tools/eam/rebalance/rsync.check.logs.sh	(revision 42533)
+++ /trunk/tools/eam/rebalance/rsync.check.logs.sh	(revision 42534)
@@ -1,40 +1,28 @@
 #!/bin/csh
 
-set run = v2
-set version = 20220922
-
-set showlist = 0
-
-if ($#argv >  1) then
-  echo "USAGE: rsync.check.logs.sh [list]"
+if ($#argv != 5) then
+  echo "USAGE: rsync.check.logs.sh [mode] (host) (volume) (version) (run)"
+  echo "mode = show or count"
   exit 2
 endif
 
-if ($#argv ==  1) then
-  if ("$1" != "list") then
-    echo "USAGE: rsync.check.logs.sh [list]"
-    exit 2
-  endif
-  set showlist = 1
+set mode    = $1
+set myhost  = $2
+set myvol   = $3
+set version = $4
+set run     = $5
+
+if (($mode != "show") && ($mode != "count")) then
+  echo "USAGE: rsync.check.logs.sh [mode] (host) (volume) (version) (run)"
+  echo "mode = show or count"
+  exit 2
 endif
 
-set myhost = `hostname`
-
-echo "--- volume 0 ---"
-if ($showlist) then
-  cat /data/$myhost.0/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes  received" | grep -v '^../$' | grep -v '^$'
-  cat /data/$myhost.0/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" 
+if ($mode == "show") then
+  cat /data/$myhost.$myvol/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes  received" | grep -v '^../$' | grep -v '^$'
+  cat /data/$myhost.$myvol/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" 
 else
-  cat /data/$myhost.0/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes  received" | grep -v '^../$' | grep -v '^$' | wc -l
-  cat /data/$myhost.0/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" | wc -l
+  cat /data/$myhost.$myvol/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes  received" | grep -v '^../$' | grep -v '^$' | wc -l
+  cat /data/$myhost.$myvol/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" | wc -l
 endif
 
-echo "--- volume 1 ---"
-if ($showlist) then
-  cat /data/$myhost.1/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes  received" | grep -v '^../$' | grep -v '^$'
-  cat /data/$myhost.1/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" 
-else
-  cat /data/$myhost.1/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep -v "total size" | grep -v "building file list" | grep -v "bytes  received" | grep -v '^../$' | grep -v '^$' | wc -l
-  cat /data/$myhost.1/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" | wc -l
-endif
-
