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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.