Changeset 32 for trunk/gridctl.php
- Timestamp:
- Dec 16, 2017, 5:50:01 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gridctl.php
r31 r32 839 839 $is_jetstr = preg_match( "/jetstream/", $cluster ); 840 840 if ( $is_jetstr ) 841 $cmd = "squeue - a$gfacID 2>&1|tail -n 1";841 $cmd = "squeue -j $gfacID 2>&1|tail -n 1"; 842 842 else 843 843 $cmd = "/usr/bin/qstat -a $gfacID 2>&1|tail -n 1"; … … 871 871 } 872 872 /////////////////////////////////////////////////////////////////// 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 ) || 875 877 preg_match( "/ssh_exchange_id/", $result ) ) 876 878 { … … 881 883 882 884 $values = preg_split( "/\s+/", $result ); 883 $jstat = ( $is_jetstr == 0 ) ? $values[ 9 ] : $values[ 4];885 $jstat = ( $is_jetstr == 0 ) ? $values[ 9 ] : $values[ 5 ]; 884 886 //write_log( "$self: get_local_status: job status = /$jstat/"); 885 887 switch ( $jstat ) … … 888 890 case "E" : // Job is exiting after having run 889 891 case "R" : // Still running 892 case "CG" : // Job is completing 890 893 $status = 'ACTIVE'; 891 894 break; 892 895 893 896 case "C" : // Job has completed 897 case "ST" : // Job has disappeared 898 case "CD" : // Job has completed 894 899 $status = 'COMPLETED'; 895 900 break; … … 899 904 case "Q" : // Queued 900 905 case "PD" : // Queued 906 case "CF" : // Queued 901 907 $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'; 902 920 break; 903 921
Note:
See TracChangeset
for help on using the changeset viewer.