IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 3, 2023, 3:00:48 PM (3 years ago)
Author:
eugene
Message:

updating rebalacne scripts

Location:
branches/eam_branches/ipp-20230313/tools/eam/rebalance
Files:
10 edited
2 copied

Legend:

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

    r42314 r42562  
    11#!/bin/csh
    22
    3 set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
     3set program = `basename $0`
    44
    5 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
     5set run = v0
     6set version = 20230802
     7set mode = insert
    68
    7 if ($#argv == 1) then
    8   if ("$1" != "launch") then
    9     echo "USAGE: launch.insert.check.errors.sh launch"
    10     exit 2
    11   endif
    12   foreach f ($list)
    13     echo ssh -f $f "cd $mydir && ./launch.insert.check.errors.sh"
    14          ssh -f $f "cd $mydir && ./launch.insert.check.errors.sh"
     9set srchost = (ipp100 ipp108 ipp112 ipp114)
     10set srcvol  = (     0      0      1      0)
     11set tgthost = (ipp161 ipp161 ipp162 ipp162)
     12set tgtvol  = (     0      1      0      1)
     13
     14set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     15
     16if ($#argv == 0) then
     17  echo "USAGE: $program launch"
     18  echo "USAGE: $program run (Nentry)"
     19  echo "   eg: $program run 1"
     20  exit 2
     21endif
     22
     23if ("$1" == "launch") then
     24
     25  # NOTE: the insert jobs run on the target machines, not source machines
     26
     27  set i = 1
     28  while ($i <= $#srchost)
     29    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     30         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     31    @ i++
    1532  end
    1633  exit 0
    1734endif
    1835
    19 set run = v0
    20 set version = 20220922
     36if ("$1" == "run") then
     37  if ($#argv != 2) then
     38    echo "USAGE: $program run (Nentry)"
     39    echo "   eg: $program run 1"
     40    exit 2
     41  endif
    2142
    22 set myhost = `hostname`
    23 set Nhost = `hostname | sed s/ipp//`
     43  set N = $2
    2444
    25 # ipp100 - ipp117 (10 total) need to have  ~7TB moved
    26 # ipp123 - ipp126 ( 4 total) need to have  ~9TB moved
    27 # ipp134 - ipp139 ( 4 total) need to have ~12TB moved
     45  set hn = $srchost[$N]
     46  set hv = $srcvol[$N]
     47  set tn = $tgthost[$N]
     48  set tv = $tgtvol[$N]
    2849
    29 set target = NONE
    30 switch ($myhost)
    31   # total of 23TB
    32   case ipp100
    33   case ipp101
    34   case ipp123
    35   set target = ipp153
    36   breaksw;
     50  set myhost = `hostname`
     51  if ($hn != $myhost) then
     52    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
     53    exit 3
     54  endif
    3755
    38   # total of 35TB
    39   case ipp102
    40   case ipp104
    41   case ipp124
    42   case ipp136
    43   set target = ipp154
    44   breaksw;
     56  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     57  mkdir -p $hn.$hv
    4558
    46   # total of 35TB
    47   case ipp105
    48   case ipp108
    49   case ipp125
    50   case ipp137
    51   set target = ipp155
    52   breaksw;
     59  grep ERROR /data/$hn.$hv/nebulous/??/rebalance/movefiles.$version.chk >& $hn.$hv/errors.insert.check.$version.$run &
    5360
    54   # total of 23TB
    55   case ipp112
    56   case ipp114
    57   case ipp126
    58   set target = ipp156
    59   breaksw;
    60 
    61   # total of 38TB
    62   case ipp115
    63   case ipp117
    64   case ipp134
    65   case ipp139
    66   set target = ipp157
    67   breaksw;
    68 endsw
    69 
    70 if ("$target" == "NONE") then
    71   echo "need target"
    72   exit 2
     61  exit 0
    7362endif
    74 
    75 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 &
    76 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 &
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.insert.errors.sh

    r42314 r42562  
    11#!/bin/csh
    22
    3 # src machines:
    4 set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
     3set program = `basename $0`
    54
    6 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
     5set run = v0
     6set version = 20230802
     7set mode = insert
    78
    8 if ($#argv == 1) then
    9   if ("$1" != "launch") then
    10     echo "USAGE: launch.insert.errors.sh launch"
    11     exit 2
    12   endif
    13   foreach f ($list)
    14     echo ssh -f $f "cd $mydir && ./launch.insert.errors.sh"
    15          ssh -f $f "cd $mydir && ./launch.insert.errors.sh"
     9set srchost = (ipp100 ipp108 ipp112 ipp114)
     10set srcvol  = (     0      0      1      0)
     11set tgthost = (ipp161 ipp161 ipp162 ipp162)
     12set tgtvol  = (     0      1      0      1)
     13
     14set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     15
     16if ($#argv == 0) then
     17  echo "USAGE: $program launch"
     18  echo "USAGE: $program run (Nentry)"
     19  echo "   eg: $program run 1"
     20  exit 2
     21endif
     22
     23if ("$1" == "launch") then
     24
     25  # NOTE: the insert jobs run on the target machines, not source machines
     26
     27  set i = 1
     28  while ($i <= $#srchost)
     29    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     30         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     31    @ i++
    1632  end
    1733  exit 0
    1834endif
    1935
    20 set run = v0
    21 set version = 20220922
     36if ("$1" == "run") then
     37  if ($#argv != 2) then
     38    echo "USAGE: $program run (Nentry)"
     39    echo "   eg: $program run 1"
     40    exit 2
     41  endif
    2242
    23 set myhost = `hostname`
    24 set Nhost = `hostname | sed s/ipp//`
     43  set N = $2
    2544
    26 # ipp100 - ipp117 (10 total) need to have  ~7TB moved
    27 # ipp123 - ipp126 ( 4 total) need to have  ~9TB moved
    28 # ipp134 - ipp139 ( 4 total) need to have ~12TB moved
     45  set hn = $srchost[$N]
     46  set hv = $srcvol[$N]
     47  set tn = $tgthost[$N]
     48  set tv = $tgtvol[$N]
    2949
    30 set target = NONE
    31 switch ($myhost)
    32   # total of 23TB
    33   case ipp100
    34   case ipp101
    35   case ipp123
    36   set target = ipp153
    37   breaksw;
     50  set myhost = `hostname`
     51  if ($hn != $myhost) then
     52    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
     53    exit 3
     54  endif
    3855
    39   # total of 35TB
    40   case ipp102
    41   case ipp104
    42   case ipp124
    43   case ipp136
    44   set target = ipp154
    45   breaksw;
     56  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     57  mkdir -p $hn.$hv
    4658
    47   # total of 35TB
    48   case ipp105
    49   case ipp108
    50   case ipp125
    51   case ipp137
    52   set target = ipp155
    53   breaksw;
    54 
    55   # total of 23TB
    56   case ipp112
    57   case ipp114
    58   case ipp126
    59   set target = ipp156
    60   breaksw;
    61 
    62   # total of 38TB
    63   case ipp115
    64   case ipp117
    65   case ipp134
    66   case ipp139
    67   set target = ipp157
    68   breaksw;
    69 endsw
    70 
    71 if ("$target" == "NONE") then
    72   echo "need target"
    73   exit 2
     59  grep ERROR /data/$hn.$hv/nebulous/??/rebalance/insert.$version.log >& $hn.$hv/errors.insert.$version.$run &
     60  exit 0
    7461endif
    75 
    76 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 &
    77 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 &
    78 
    79 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.insert.errors.sh"
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.insert.sh

    r42531 r42562  
    11#!/bin/csh
    22
    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)
     3set program = `basename $0`
    54
    6 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
     5set run = v0
     6set version = 20230802
    77
    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
    1110set mode = insert.check
    1211
    13 if ($#argv < 1) then
    14   echo "USAGE: launch.insert.sh launch"
    15   echo "USAGE: launch.insert.sh (src) (tgt)"
     12set srchost = (ipp100 ipp108 ipp112 ipp114)
     13set srcvol  = (     0      0      1      0)
     14set tgthost = (ipp161 ipp161 ipp162 ipp162)
     15set tgtvol  = (     0      1      0      1)
     16
     17set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     18
     19if ($#argv == 0) then
     20  echo "USAGE: $program launch"
     21  echo "USAGE: $program run (Nentry)"
     22  echo "   eg: $program run 1"
    1623  exit 2
    1724endif
    1825
    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
     26if ("$1" == "launch") then
     27
     28  # NOTE: the insert jobs run on the target machines, not source machines
    2529
    2630  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"
    3234    @ i++
    3335  end
     
    3537endif
    3638
    37 if ($#argv != 2) then
    38   echo "USAGE: launch.insert.sh launch"
    39   echo "USAGE: launch.insert.sh (src) (tgt)"
    40   exit 2
     39if ("$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
    4164endif
    4265
    43 set src = $1
    44 set tgt = $2
    45 
    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 ux
    52 #          ssh $f ps ux
    53 #      ssh $f killall mana
    54 #      ssh $f killall find
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.rsync.check.logs.sh

    r42314 r42562  
    11#!/bin/csh
    22
    3   set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
    4 # set list = "ipp105 ipp108 ipp112 ipp114 ipp115 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
    5 # set list = "ipp100 ipp101 ipp102 ipp104 ipp117"
     3set program = `basename $0`
    64
    7 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
     5set run = v0
     6set version = 20230802
     7set stage = rsync.check.logs
    88
    9 if ($#argv == 1) then
    10   if ("$1" != "launch") then
    11     echo "USAGE: launch.rsync.check.logs.sh launch"
    12     exit 2
    13   endif
    14   foreach f ($list)
    15     echo ssh -f $f "cd $mydir && ./launch.rsync.check.logs.sh"
    16          ssh -f $f "cd $mydir && ./launch.rsync.check.logs.sh"
     9set srchost = (ipp100 ipp108 ipp112 ipp114)
     10set srcvol  = (     0      0      1      0)
     11set tgthost = (ipp161 ipp161 ipp162 ipp162)
     12set tgtvol  = (     0      1      0      1)
     13
     14set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     15
     16if ($#argv == 0) then
     17  echo "USAGE: $program launch (mode)"
     18  echo "USAGE: $program run (mode) (Nentry)"
     19  echo "   eg: $program run show 1"
     20  exit 2
     21endif
     22
     23if ("$1" == "launch") then
     24
     25  set i = 1
     26  while ($i <= $#srchost)
     27    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $2 $i"
     28         ssh -f $srchost[$i] "cd $mydir && ./$program run $2 $i"
     29    @ i++
    1730  end
    1831  exit 0
    1932endif
    2033
    21 ## set the run value in rsync.check.logs.sh
    22 ## set run = v2
    23 set version = 20220922
     34if ("$1" == "run") then
     35  if ($#argv != 3) then
     36    echo "USAGE: $program run (mode) (Nentry)"
     37    echo "   eg: $program run show 1"
     38    exit 2
     39  endif
    2440
    25 set myhost = `hostname`
    26 set Nhost = `hostname | sed s/ipp//`
     41  set mode = $2
     42  set N = $3
    2743
    28 set target = NONE
    29 switch ($myhost)
    30   # total of 23TB
    31   case ipp100
    32   case ipp101
    33   case ipp123
    34   set target = ipp153
    35   breaksw;
     44  set hn = $srchost[$N]
     45  set hv = $srcvol[$N]
     46  set tn = $tgthost[$N]
     47  set tv = $tgtvol[$N]
    3648
    37   # total of 35TB
    38   case ipp102
    39   case ipp104
    40   case ipp124
    41   case ipp136
    42   set target = ipp154
    43   breaksw;
     49  set myhost = `hostname`
     50  if ($hn != $myhost) then
     51    echo "ERROR: need to run $stage on the source host ($hn vs $myhost)"
     52    exit 3
     53  endif
    4454
    45   # total of 35TB
    46   case ipp105
    47   case ipp108
    48   case ipp125
    49   case ipp137
    50   set target = ipp155
    51   breaksw;
    52 
    53   # total of 23TB
    54   case ipp112
    55   case ipp114
    56   case ipp126
    57   set target = ipp156
    58   breaksw;
    59 
    60   # total of 38TB
    61   case ipp115
    62   case ipp117
    63   case ipp134
    64   case ipp139
    65   set target = ipp157
    66   breaksw;
    67 endsw
    68 
    69 if ("$target" == "NONE") then
    70   echo "need target"
    71   exit 2
     55  echo "running on $myhost for source $hn.$hv to target $tn.$tv for stage $stage, version $version"
     56  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 &
     59  exit 0
    7260endif
    73 
    74 set h = `hostname`; ./rsync.check.logs.sh > & $h.rsync.check.logs
    75 
    76 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.rsync.check.sh"
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.rsync.check.sh

    r42314 r42562  
    11#!/bin/csh
    22
    3   set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
    4 # set list = "ipp105 ipp108 ipp112 ipp114 ipp115 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
    5 # set list = "ipp100 ipp101 ipp102 ipp104 ipp117"
     3set program = `basename $0`
    64
    7 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
     5set run = v0
     6set version = 20230802
     7set mode = rsync.check
    88
    9 if ($#argv == 1) then
    10   if ("$1" != "launch") then
    11     echo "USAGE: launch.rsync.check.sh launch"
    12     exit 2
    13   endif
    14   foreach f ($list)
    15     echo ssh -f $f "cd $mydir && ./launch.rsync.check.sh"
    16          ssh -f $f "cd $mydir && ./launch.rsync.check.sh"
     9set srchost = (ipp100 ipp108 ipp112 ipp114)
     10set srcvol  = (     0      0      1      0)
     11set tgthost = (ipp161 ipp161 ipp162 ipp162)
     12set tgtvol  = (     0      1      0      1)
     13
     14set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     15
     16if ($#argv == 0) then
     17  echo "USAGE: $program launch"
     18  echo "USAGE: $program run (Nentry)"
     19  echo "   eg: $program run 1"
     20  exit 2
     21endif
     22
     23if ("$1" == "launch") then
     24
     25  set i = 1
     26  while ($i <= $#srchost)
     27    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     28         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     29    @ i++
    1730  end
    1831  exit 0
    1932endif
    2033
    21 set run = v2
    22 set version = 20220922
     34if ("$1" == "run") then
     35  if ($#argv != 2) then
     36    echo "USAGE: $program run (Nentry)"
     37    echo "   eg: $program run 1"
     38    exit 2
     39  endif
    2340
    24 set myhost = `hostname`
    25 set Nhost = `hostname | sed s/ipp//`
     41  set N = $2
    2642
    27 set target = NONE
    28 switch ($myhost)
    29   # total of 23TB
    30   case ipp100
    31   case ipp101
    32   case ipp123
    33   set target = ipp153
    34   breaksw;
     43  set hn = $srchost[$N]
     44  set hv = $srcvol[$N]
     45  set tn = $tgthost[$N]
     46  set tv = $tgtvol[$N]
    3547
    36   # total of 35TB
    37   case ipp102
    38   case ipp104
    39   case ipp124
    40   case ipp136
    41   set target = ipp154
    42   breaksw;
     48  set myhost = `hostname`
     49  if ($hn != $myhost) then
     50    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
     51    exit 3
     52  endif
    4353
    44   # total of 35TB
    45   case ipp105
    46   case ipp108
    47   case ipp125
    48   case ipp137
    49   set target = ipp155
    50   breaksw;
    51 
    52   # total of 23TB
    53   case ipp112
    54   case ipp114
    55   case ipp126
    56   set target = ipp156
    57   breaksw;
    58 
    59   # total of 38TB
    60   case ipp115
    61   case ipp117
    62   case ipp134
    63   case ipp139
    64   set target = ipp157
    65   breaksw;
    66 endsw
    67 
    68 if ("$target" == "NONE") then
    69   echo "need target"
    70   exit 2
     54  echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     55  mkdir -p $hn.$hv
     56  echo "./rebalance.mana $mode $hn $hv $tn $tv $version $version.$run.chk > & $hn.$hv/log.$mode.$version.$run &"
     57        ./rebalance.mana $mode $hn $hv $tn $tv $version $version.$run.chk > & $hn.$hv/log.$mode.$version.$run &
     58  exit 0
    7159endif
    72 
    73 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 &
    74 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 &
    75 
    76 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.rsync.check.sh"
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.trash.check.sh

    r42314 r42562  
    11#!/bin/csh
    22
    3 set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
    4 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
     3set program = `basename $0`
    54
    6 if ($#argv == 1) then
    7   if ("$1" != "launch") then
    8     echo "USAGE: launch.trash.check.sh launch"
    9     exit 2
    10   endif
    11   foreach f ($list)
    12     echo ssh -f $f "cd $mydir && ./launch.trash.check.sh"
    13          ssh -f $f "cd $mydir && ./launch.trash.check.sh"
     5set run = v0
     6set version = 20230802
     7set mode = trash.check
     8
     9set srchost = (ipp100 ipp108 ipp112 ipp114)
     10set srcvol  = (     0      0      1      0)
     11set tgthost = (ipp161 ipp161 ipp162 ipp162)
     12set tgtvol  = (     0      1      0      1)
     13
     14set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     15
     16if ($#argv == 0) then
     17  echo "USAGE: $program launch"
     18  echo "USAGE: $program run (Nentry)"
     19  echo "   eg: $program run 1"
     20  exit 2
     21endif
     22
     23if ("$1" == "launch") then
     24
     25  set i = 1
     26  while ($i <= $#srchost)
     27    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     28         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     29    @ i++
    1430  end
    1531  exit 0
    1632endif
    1733
    18 set run = v0
    19 set version = 20220922
     34if ("$1" == "run") then
     35  if ($#argv != 2) then
     36    echo "USAGE: $program run (Nentry)"
     37    echo "   eg: $program run 1"
     38    exit 2
     39  endif
    2040
    21 set myhost = `hostname`
    22 set Nhost = `hostname | sed s/ipp//`
     41  set N = $2
    2342
    24 set target = NONE
    25 switch ($myhost)
    26   # total of 23TB
    27   case ipp100
    28   case ipp101
    29   case ipp123
    30   set target = ipp153
    31   breaksw;
     43  set hn = $srchost[$N]
     44  set hv = $srcvol[$N]
     45  set tn = $tgthost[$N]
     46  set tv = $tgtvol[$N]
    3247
    33   # total of 35TB
    34   case ipp102
    35   case ipp104
    36   case ipp124
    37   case ipp136
    38   set target = ipp154
    39   breaksw;
     48  set myhost = `hostname`
     49  if ($hn != $myhost) then
     50    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
     51    exit 3
     52  endif
    4053
    41   # total of 35TB
    42   case ipp105
    43   case ipp108
    44   case ipp125
    45   case ipp137
    46   set target = ipp155
    47   breaksw;
     54  echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     55  mkdir -p $hn.$hv
     56  echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &"
     57        ./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &
    4858
    49   # total of 23TB
    50   case ipp112
    51   case ipp114
    52   case ipp126
    53   set target = ipp156
    54   breaksw;
    55 
    56   # total of 38TB
    57   case ipp115
    58   case ipp117
    59   case ipp134
    60   case ipp139
    61   set target = ipp157
    62   breaksw;
    63 endsw
    64 
    65 if ("$target" == "NONE") then
    66   echo "need target"
    67   exit 2
     59  exit 0
    6860endif
    69 
    70 set v = 0 ; set h = `hostname` ; set t = $target; ./rebalance.mana trash.check $h $v $t $v $version > & $h.$v/log.trash.check.$version.$run &
    71 set v = 1 ; set h = `hostname` ; set t = $target; ./rebalance.mana trash.check $h $v $t $v $version > & $h.$v/log.trash.check.$version.$run &
    72 
    73 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.trash.check.sh"
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.trash.empty.sh

    r42314 r42562  
    11#!/bin/csh
    22
    3 set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
    4 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
     3set program = `basename $0`
    54
    6 if ($#argv == 1) then
    7   if ("$1" != "launch") then
    8     echo "USAGE: launch.trash.empty.sh launch"
    9     exit 2
    10   endif
    11   foreach f ($list)
    12     echo ssh -f $f "cd $mydir && ./launch.trash.empty.sh"
    13          ssh -f $f "cd $mydir && ./launch.trash.empty.sh"
     5set run = v0
     6set version = 20230802
     7set mode = empty.trash
     8
     9set srchost = (ipp100 ipp108 ipp112 ipp114)
     10set srcvol  = (     0      0      1      0)
     11set tgthost = (ipp161 ipp161 ipp162 ipp162)
     12set tgtvol  = (     0      1      0      1)
     13
     14set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     15
     16if ($#argv == 0) then
     17  echo "USAGE: $program launch"
     18  echo "USAGE: $program run (Nentry)"
     19  echo "   eg: $program run 1"
     20  exit 2
     21endif
     22
     23if ("$1" == "launch") then
     24
     25  set i = 1
     26  while ($i <= $#srchost)
     27    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     28         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     29    @ i++
    1430  end
    1531  exit 0
    1632endif
    1733
    18 set run = v0
    19 set version = 20220922
     34if ("$1" == "run") then
     35  if ($#argv != 2) then
     36    echo "USAGE: $program run (Nentry)"
     37    echo "   eg: $program run 1"
     38    exit 2
     39  endif
    2040
    21 set myhost = `hostname`
    22 set Nhost = `hostname | sed s/ipp//`
     41  set N = $2
    2342
    24 set target = NONE
    25 switch ($myhost)
    26   # total of 23TB
    27   case ipp100
    28   case ipp101
    29   case ipp123
    30   set target = ipp153
    31   breaksw;
     43  set hn = $srchost[$N]
     44  set hv = $srcvol[$N]
     45  set tn = $tgthost[$N]
     46  set tv = $tgtvol[$N]
    3247
    33   # total of 35TB
    34   case ipp102
    35   case ipp104
    36   case ipp124
    37   case ipp136
    38   set target = ipp154
    39   breaksw;
     48  set myhost = `hostname`
     49  if ($hn != $myhost) then
     50    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
     51    exit 3
     52  endif
    4053
    41   # total of 35TB
    42   case ipp105
    43   case ipp108
    44   case ipp125
    45   case ipp137
    46   set target = ipp155
    47   breaksw;
     54  echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     55  mkdir -p $hn.$hv
     56  echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &"
     57        ./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &
    4858
    49   # total of 23TB
    50   case ipp112
    51   case ipp114
    52   case ipp126
    53   set target = ipp156
    54   breaksw;
    55 
    56   # total of 38TB
    57   case ipp115
    58   case ipp117
    59   case ipp134
    60   case ipp139
    61   set target = ipp157
    62   breaksw;
    63 endsw
    64 
    65 if ("$target" == "NONE") then
    66   echo "need target"
    67   exit 2
     59  exit 0
    6860endif
    69 
    70 set v = 0 ; set h = `hostname` ; set t = $target; ./rebalance.mana empty.trash $h $v $t $v $version > & $h.$v/log.empty.trash.$version.$run &
    71 set v = 1 ; set h = `hostname` ; set t = $target; ./rebalance.mana empty.trash $h $v $t $v $version > & $h.$v/log.empty.trash.$version.$run &
    72 
    73 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.trash.empty.sh"
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.trash.errors.sh

    r42314 r42562  
    11#!/bin/csh
    22
    3 set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
    4 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
     3set program = `basename $0`
    54
    6 if ($#argv == 1) then
    7   if ("$1" != "launch") then
    8     echo "USAGE: launch.trash.errors.sh launch"
    9     exit 2
    10   endif
    11   foreach f ($list)
    12     echo ssh -f $f "cd $mydir && ./launch.trash.errors.sh"
    13          ssh -f $f "cd $mydir && ./launch.trash.errors.sh"
     5set run = v0
     6set version = 20230802
     7set mode = trash.errors
     8
     9set srchost = (ipp100 ipp108 ipp112 ipp114)
     10set srcvol  = (     0      0      1      0)
     11set tgthost = (ipp161 ipp161 ipp162 ipp162)
     12set tgtvol  = (     0      1      0      1)
     13
     14set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     15
     16if ($#argv == 0) then
     17  echo "USAGE: $program launch"
     18  echo "USAGE: $program run (Nentry)"
     19  echo "   eg: $program run 1"
     20  exit 2
     21endif
     22
     23if ("$1" == "launch") then
     24
     25  # NOTE: the insert jobs run on the target machines, not source machines
     26
     27  set i = 1
     28  while ($i <= $#srchost)
     29    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     30         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     31    @ i++
    1432  end
    1533  exit 0
    1634endif
    1735
    18 set run = v0
    19 set version = 20220922
     36if ("$1" == "run") then
     37  if ($#argv != 2) then
     38    echo "USAGE: $program run (Nentry)"
     39    echo "   eg: $program run 1"
     40    exit 2
     41  endif
    2042
    21 set myhost = `hostname`
    22 set Nhost = `hostname | sed s/ipp//`
     43  set N = $2
    2344
    24 set target = NONE
    25 switch ($myhost)
    26   # total of 23TB
    27   case ipp100
    28   case ipp101
    29   case ipp123
    30   set target = ipp153
    31   breaksw;
     45  set hn = $srchost[$N]
     46  set hv = $srcvol[$N]
     47  set tn = $tgthost[$N]
     48  set tv = $tgtvol[$N]
    3249
    33   # total of 35TB
    34   case ipp102
    35   case ipp104
    36   case ipp124
    37   case ipp136
    38   set target = ipp154
    39   breaksw;
     50  set myhost = `hostname`
     51  if ($hn != $myhost) then
     52    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
     53    exit 3
     54  endif
    4055
    41   # total of 35TB
    42   case ipp105
    43   case ipp108
    44   case ipp125
    45   case ipp137
    46   set target = ipp155
    47   breaksw;
     56  echo "running $program on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     57  mkdir -p $hn.$hv
    4858
    49   # total of 23TB
    50   case ipp112
    51   case ipp114
    52   case ipp126
    53   set target = ipp156
    54   breaksw;
     59  grep ERROR /data/$hn.$hv/nebulous/??/rebalance/check.trash.$version.log >& $hn.$hv/errors.trash.$version.$run &
    5560
    56   # total of 38TB
    57   case ipp115
    58   case ipp117
    59   case ipp134
    60   case ipp139
    61   set target = ipp157
    62   breaksw;
    63 endsw
    64 
    65 if ("$target" == "NONE") then
    66   echo "need target"
    67   exit 2
     61  exit 0
    6862endif
    69 
    70 set v = 0 ; set h = `hostname` ; set t = $target; grep ERROR /data/$h.$v/nebulous/??/rebalance/check.trash.$version.log >& $h.$v/errors.trash.$version.$run &
    71 set v = 1 ; set h = `hostname` ; set t = $target; grep ERROR /data/$h.$v/nebulous/??/rebalance/check.trash.$version.log >& $h.$v/errors.trash.$version.$run &
    72 
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/launch.trash.sh

    r42314 r42562  
    11#!/bin/csh
    22
    3 set list = "ipp100 ipp101 ipp102 ipp104 ipp105 ipp108 ipp112 ipp114 ipp115 ipp117 ipp123 ipp124 ipp125 ipp126 ipp134 ipp136 ipp137 ipp139"
    4 set mydir = /data/ipphome1.0/home/eugene/rebalance.20220922
     3set program = `basename $0`
    54
    6 if ($#argv == 1) then
    7   if ("$1" != "launch") then
    8     echo "USAGE: launch.trash.sh launch"
    9     exit 2
    10   endif
    11   foreach f ($list)
    12     echo ssh -f $f "cd $mydir && ./launch.trash.sh"
    13          ssh -f $f "cd $mydir && ./launch.trash.sh"
     5set run = v0
     6set version = 20230802
     7set mode = trash
     8
     9set srchost = (ipp100 ipp108 ipp112 ipp114)
     10set srcvol  = (     0      0      1      0)
     11set tgthost = (ipp161 ipp161 ipp162 ipp162)
     12set tgtvol  = (     0      1      0      1)
     13
     14set mydir = /data/ipphome1.0/home/eugene/rebalance.20230802
     15
     16if ($#argv == 0) then
     17  echo "USAGE: $program launch"
     18  echo "USAGE: $program run (Nentry)"
     19  echo "   eg: $program run 1"
     20  exit 2
     21endif
     22
     23if ("$1" == "launch") then
     24
     25  set i = 1
     26  while ($i <= $#srchost)
     27    echo ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     28         ssh -f $srchost[$i] "cd $mydir && ./$program run $i"
     29    @ i++
    1430  end
    1531  exit 0
    1632endif
    1733
    18 set run = v0
    19 set version = 20220922
     34if ("$1" == "run") then
     35  if ($#argv != 2) then
     36    echo "USAGE: $program run (Nentry)"
     37    echo "   eg: $program run 1"
     38    exit 2
     39  endif
    2040
    21 set myhost = `hostname`
    22 set Nhost = `hostname | sed s/ipp//`
     41  set N = $2
    2342
    24 set target = NONE
    25 switch ($myhost)
    26   # total of 23TB
    27   case ipp100
    28   case ipp101
    29   case ipp123
    30   set target = ipp153
    31   breaksw;
     43  set hn = $srchost[$N]
     44  set hv = $srcvol[$N]
     45  set tn = $tgthost[$N]
     46  set tv = $tgtvol[$N]
    3247
    33   # total of 35TB
    34   case ipp102
    35   case ipp104
    36   case ipp124
    37   case ipp136
    38   set target = ipp154
    39   breaksw;
     48  set myhost = `hostname`
     49  if ($hn != $myhost) then
     50    echo "ERROR: need to run $mode on the source host ($hn vs $myhost)"
     51    exit 3
     52  endif
    4053
    41   # total of 35TB
    42   case ipp105
    43   case ipp108
    44   case ipp125
    45   case ipp137
    46   set target = ipp155
    47   breaksw;
    48 
    49   # total of 23TB
    50   case ipp112
    51   case ipp114
    52   case ipp126
    53   set target = ipp156
    54   breaksw;
    55 
    56   # total of 38TB
    57   case ipp115
    58   case ipp117
    59   case ipp134
    60   case ipp139
    61   set target = ipp157
    62   breaksw;
    63 endsw
    64 
    65 if ("$target" == "NONE") then
    66   echo "need target"
    67   exit 2
     54  echo "running on $myhost for source $hn.$hv to target $tn.$tv in mode $mode, version $version"
     55  mkdir -p $hn.$hv
     56  echo "./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &"
     57        ./rebalance.mana $mode $hn $hv $tn $tv $version > & $hn.$hv/log.$mode.$version.$run &
     58  exit 0
    6859endif
    69 
    70 set v = 0 ; set h = `hostname` ; set t = $target; ./rebalance.mana trash $h $v $t $v $version > & $h.$v/log.trash.$version.$run &
    71 set v = 1 ; set h = `hostname` ; set t = $target; ./rebalance.mana trash $h $v $t $v $version > & $h.$v/log.trash.$version.$run &
    72 
    73 # e.g.: ssh -f ipp127 "cd `pwd` && ./launch.trash.sh"
  • branches/eam_branches/ipp-20230313/tools/eam/rebalance/rsync.check.logs.sh

    r42314 r42562  
    11#!/bin/csh
    22
    3 set run = v2
    4 set version = 20220922
    5 
    6 set showlist = 0
    7 
    8 if ($#argv >  1) then
    9   echo "USAGE: rsync.check.logs.sh [list]"
     3if ($#argv != 5) then
     4  echo "USAGE: rsync.check.logs.sh [mode] (host) (volume) (version) (run)"
     5  echo "mode = show or count"
    106  exit 2
    117endif
    128
    13 if ($#argv ==  1) then
    14   if ("$1" != "list") then
    15     echo "USAGE: rsync.check.logs.sh [list]"
    16     exit 2
    17   endif
    18   set showlist = 1
     9set mode    = $1
     10set myhost  = $2
     11set myvol   = $3
     12set version = $4
     13set run     = $5
     14
     15if (($mode != "show") && ($mode != "count")) then
     16  echo "USAGE: rsync.check.logs.sh [mode] (host) (volume) (version) (run)"
     17  echo "mode = show or count"
     18  exit 2
    1919endif
    2020
    21 set myhost = `hostname`
    22 
    23 echo "--- volume 0 ---"
    24 if ($showlist) then
    25   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 '^$'
    26   cat /data/$myhost.0/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory"
     21if ($mode == "show") then
     22  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 '^$'
     23  cat /data/$myhost.$myvol/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory"
    2724else
    28   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
    29   cat /data/$myhost.0/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" | wc -l
     25  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
     26  cat /data/$myhost.$myvol/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" | wc -l
    3027endif
    3128
    32 echo "--- volume 1 ---"
    33 if ($showlist) then
    34   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 '^$'
    35   cat /data/$myhost.1/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory"
    36 else
    37   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
    38   cat /data/$myhost.1/nebulous/??/rebalance/movefiles.$version.$run.chk.log | grep "No such file or directory" | wc -l
    39 endif
    40 
Note: See TracChangeset for help on using the changeset viewer.