IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

merge changes from trunk : updates to rebalance

File:
1 edited

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
Note: See TracChangeset for help on using the changeset viewer.