Index: trunk/cleanup.php
===================================================================
--- trunk/cleanup.php	(revision 38)
+++ trunk/cleanup.php	(revision 39)
@@ -73,5 +73,5 @@
    list( $personID ) = mysqli_fetch_array( $result );
 
-   $query  = "SELECT clusterName, submitTime, queueStatus, method "              .
+   $query  = "SELECT clusterName, submitTime, queueStatus, analType "              .
              "FROM HPCAnalysisRequest h, HPCAnalysisResult r "                   .
              "WHERE h.HPCAnalysisRequestID=$requestID "                          .
Index: trunk/cluster_status.php
===================================================================
--- trunk/cluster_status.php	(revision 38)
+++ trunk/cluster_status.php	(revision 39)
@@ -178,5 +178,5 @@
          $clusters = array( "us3iab-devel", "alamo-local", "taito-local" );
       else
-         $clusters = array( "us3iab-node0", "taito-local");
+         $clusters = array( "us3iab-node0", "taito-local" );
    }
    else
@@ -241,5 +241,5 @@
          {
             $host   = "us3@stampede2.tacc.utexas.edu";
-            $qstat  = `ssh $host '/usr/local/bin/showq 2>/dev/null|grep "Total Jobs"'`;
+            $qstat  = `ssh $host '~us3/scripts/clusstat skx-normal 2>/dev/null'`;
             $sparts = preg_split( '/\s+/', $qstat );
             $tot    = $sparts[ 2 ];
@@ -254,5 +254,5 @@
          {
             $host   = "us3@ls5.tacc.utexas.edu";
-            $qstat  = `ssh $host '/usr/local/bin/showq 2>/dev/null|grep "Total Jobs"'`;
+            $qstat  = `ssh $host '/opt/apps/tacc/bin/showq 2>/dev/null|grep "Total Jobs"'`;
             $sparts = preg_split( '/\s+/', $qstat );
             $tot    = $sparts[ 2 ];
@@ -272,9 +272,9 @@
             break;
          }
-         case 'taito-local':
-         {
-            $host   = "rb_2001068_taito01@taito.csc.fi";
+         case 'comet':
+         {
+            $host   = "us3@comet.sdsc.edu";
             //$qstat  = `ssh $host '/usr/bin/sinfo -s -p compute -o "%a %F" |tail -1'`;
-            $qstat  = `ssh -i /home/us3/.ssh/id_rsa_taito_robot $host '/homeappl/home/rb_2001068_taito01/scripts/cstat 2>&1'`;
+            $qstat  = `ssh $host '/home/us3/scripts/cstat 2>&1'`;
             $sparts = preg_split( '/\s+/', $qstat );
             $tot    = $sparts[ 1 ];
@@ -290,25 +290,8 @@
                $run    = $sparts[ 3 ];
                $que    = $sparts[ 5 ];
-            }
-            break;
-         }
-         case 'comet':
-         {
-            $host   = "us3@comet.sdsc.edu";
-            //$qstat  = `ssh $host '/usr/bin/sinfo -s -p compute -o "%a %F" |tail -1'`;
-            $qstat  = `ssh $host '/home/us3/scripts/cstat 2>&1'`;
-            $sparts = preg_split( '/\s+/', $qstat );
-            $tot    = $sparts[ 1 ];
-            $run    = '0';
-            $que    = '0';
-            $sta    = "up";
-            if ( $tot == ''  ||  $tot == '0' )
-            {
-               $sta    = "down";
-            }
-            else
-            {
-               $run    = $sparts[ 3 ];
-               $que    = $sparts[ 5 ];
+               if ( $run == '0'  &&  $que == '0' )
+               {
+                  $sta    = "down";
+               }
             }
             break;
@@ -341,4 +324,25 @@
             break;
          }
+         case 'taito-local':
+         {
+            $host   = "rb_2001068_taito01@taito.csc.fi";
+            $qstat  = `ssh -i /home/us3/.ssh/id_rsa_taito_robot $host '/homeappl/home/rb_2001068_taito01/scripts/cstat 2>&1'`;
+            $sparts = preg_split( '/\s+/', $qstat );
+            $tot    = $sparts[ 1 ];
+            $run    = '0';
+            $que    = '0';
+            $sta    = "up";
+            if ( $tot == ''  ||  $tot == '0' )
+            {
+               $sta    = "down";
+            }
+            else
+            {
+               $run    = $sparts[ 3 ];
+               $que    = $sparts[ 5 ];
+            }
+            break;
+         }
+
       }
 
Index: trunk/gridctl.php
===================================================================
--- trunk/gridctl.php	(revision 38)
+++ trunk/gridctl.php	(revision 39)
@@ -24,7 +24,10 @@
 if ( ! $gLink )
 {
-   write_log( "$self: Could not select DB $gDB - " . mysqli_error() );
-   mail_to_admin( "fail", "Internal Error: Could not select DB $gDB" );
-   sleep(300);
+   write_log( "$self: Could not select DB $gDB - " . mysqli_error($gLink) );
+   //mail_to_admin( "fail", "Internal Error: Could not select DB $gDB" );
+   mail_to_admin( "fail",
+      "Internal Error: Could not select DB $gDB $dbhost $guser " );
+   //sleep(300);
+   sleep(3);
    exit();
 }
@@ -1007,5 +1010,5 @@
    UltraScan job error notification from gridctl.php:
 
-   Update Time    :  $updateTime
+   Update Time    :  $updateTime  [ now=$now ]
    GFAC Status    :  $status
    Cluster        :  $cluster
@@ -1050,6 +1053,6 @@
          break;
 
-         $status      = 'DATA';
-         break;
+//         $status      = 'DATA';
+//         break;
 
       case 'COMPLETED' :
