84dd9ecdfbef1fbbc389bbb3cb1ba570517055e8
kuhn
  Wed Mar 20 11:34:05 2013 -0700
added genome-euro to updateTimes.csh.  added verbose mode that prints machine names instead of a dot
diff --git src/utils/qa/updateTimes.csh src/utils/qa/updateTimes.csh
index 622eca3..d1f69ae 100755
--- src/utils/qa/updateTimes.csh
+++ src/utils/qa/updateTimes.csh
@@ -1,93 +1,115 @@
 #!/bin/tcsh
 source `which qaConfig.csh`
 
 ################################
 #  
 #  04-08-04
 #  Robert Kuhn
 #
-#  gets update times from any two machines for tables in list
+#  gets update times from all machine levels for tables in list
 #
 ################################
 
 set tablelist=""
 set db=""
+set verbosity=0
+set dot=( '.' '.' '.' '.' '.')
 set first=""
 set second=""
 set third=""
 set fourth=""
+set fifth=""  # euro
 
-if ( $#argv != 2 ) then
+if ( $#argv < 2 || $#argv > 3 ) then
   echo
   echo "  gets update times for three machines for tables in list." 
   echo "  if table is trackDb, trackDb_public will also be checked."
   echo "  warning:  not in real time for RR.  uses overnight dump." 
   echo
-  echo "    usage:  database tablelist "
+  echo "    usage:  database tablelist [verbose]"
   echo
-  echo "            reports on dev, beta and RR"
+  echo "            reports on dev, beta, RR and euronode"
   echo "            tablelist will accept single table"
+  echo "            verbose mode will print machines names"
   echo
   exit
 else
   set db=$argv[1]
   set tablelist=$argv[2]
 endif
 # cat $tablelist
 
 if ( "$HOST" != "hgwdev" ) then
  echo "\n error: you must run this script on dev!\n"
  exit 1
 endif
 
+if ( $#argv == 3 ) then
+  if ( $argv[3] == "verbose" ) then
+    set verbosity=1
+    set dot=( 'dev  ' 'beta ' 'pub  ' 'rr   ' 'euro ' )
+  else
+    echo
+    echo 'sorry. third argument must be "verbose"'
+    $0
+    exit
+  endif
+endif
 
 # check if it is a file or a tablename
 file $tablelist | egrep -q "ASCII text"
 if (! $status) then
   set tables=`cat $tablelist`
 else
   set tables=$tablelist
 endif
 
 foreach table ($tables)
   echo
   echo $table
   echo "============="
 
   set first=`hgsql -N -e 'SHOW TABLE STATUS LIKE "'$table'"' $db \
     | awk '{print $14, $15}'`
   if ( $status ) then
-    echo "."
+    echo "$dot[1]"
     continue
   endif
 
   set second=`hgsql -h $sqlbeta -N -e 'SHOW TABLE STATUS LIKE "'$table'"' $db \
     | awk '{print $14, $15}'`
   if ( $status ) then
-    echo "."
+    echo "$dot[2]"
     continue
   endif
 
   if ( "$table" == "trackDb" ) then
     set third=`hgsql -h $sqlbeta -N -e 'SHOW TABLE STATUS LIKE "'trackDb_public'"' $db \
       | awk '{print $14, $15}'`
     if ( $status ) then
-      echo "."
+      echo "$dot[3]"
       continue
     endif
   endif
 
   set fourth=`getRRtableStatus.csh $db $table Update_time`
   if ( $status ) then
     set fourth=""
   endif
 
-  echo "."$first
-  echo "."$second
+  set fifth=`getTableStatus.csh $db genome-euro | sed '1,2d' \
+      | grep -w ^$table | awk '{print $14, $15}'`
+  if ( $status ) then
+    set fifth="."
+  endif
+
+  echo "$dot[1]"$first
+  echo "$dot[2]"$second
   if ( "$table" == "trackDb" ) then
-    echo "."$third "(trackDb_public)"
+    echo "$dot[3]"$third "(trackDb_public)"
   endif
   echo
-  echo "."$fourth
+  echo "$dot[4]"$fourth
+  echo "$dot[5]"$fifth
 end
 echo