Changeset 32 for trunk/gridctl.php


Ignore:
Timestamp:
Dec 16, 2017, 5:50:01 PM (6 years ago)
Author:
gegorbet
Message:

gridctl updates, mostly for jetstream and 4.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gridctl.php

    r31 r32  
    839839   $is_jetstr = preg_match( "/jetstream/", $cluster );
    840840   if ( $is_jetstr )
    841       $cmd    = "squeue -a $gfacID 2>&1|tail -n 1";
     841      $cmd    = "squeue -j $gfacID 2>&1|tail -n 1";
    842842   else
    843843      $cmd    = "/usr/bin/qstat -a $gfacID 2>&1|tail -n 1";
     
    871871   }
    872872///////////////////////////////////////////////////////////////////
    873    if ( $result == ""  ||
    874         preg_match( "/^qstat: Unknown/", $result )  ||
     873//   if ( $result == ""  ||
     874//        preg_match( "/^qstat: Unknown/", $result )  ||
     875//        preg_match( "/ssh_exchange_id/", $result ) )
     876   if ( preg_match( "/^qstat: Unknown/", $result )  ||
    875877        preg_match( "/ssh_exchange_id/", $result ) )
    876878   {
     
    881883
    882884   $values = preg_split( "/\s+/", $result );
    883    $jstat   = ( $is_jetstr == 0 ) ? $values[ 9 ] : $values[ 4 ];
     885   $jstat   = ( $is_jetstr == 0 ) ? $values[ 9 ] : $values[ 5 ];
    884886//write_log( "$self: get_local_status: job status = /$jstat/");
    885887   switch ( $jstat )
     
    888890      case "E" :                      // Job is exiting after having run
    889891      case "R" :                      // Still running
     892      case "CG" :                     // Job is completing
    890893        $status = 'ACTIVE';
    891894        break;
    892895
    893896      case "C" :                      // Job has completed
     897      case "ST" :                     // Job has disappeared
     898      case "CD" :                     // Job has completed
    894899        $status = 'COMPLETED';
    895900        break;
     
    899904      case "Q" :                      // Queued
    900905      case "PD" :                     // Queued
     906      case "CF" :                     // Queued
    901907        $status = 'SUBMITTED';
     908        break;
     909
     910      case "CA" :                     // Job has been canceled
     911        $status = 'CANCELED';
     912        break;
     913
     914      case "F"  :                     // Job has failed
     915      case "BF" :                     // Job has failed
     916      case "NF" :                     // Job has failed
     917      case "TO" :                     // Job has timed out
     918      case ""   :                     // Job has disappeared
     919        $status = 'FAILED';
    902920        break;
    903921
Note: See TracChangeset for help on using the changeset viewer.