Index: trunk/tools/eam/rebalance/rsync.check.logs.sh
===================================================================
--- trunk/tools/eam/rebalance/rsync.check.logs.sh	(revision 42314)
+++ 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
-
