Changeset 14
- Timestamp:
- Jun 29, 2015, 1:39:50 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cluster_status.php
r12 r14 172 172 { 173 173 $a = Array(); 174 /**175 if ( $clname == "alamo" )176 {177 $qstat = `ssh $clname '/usr/bin/qstat -B 2>&1|tail -1'`;178 179 $sparts = preg_split( '/\s+/', $qstat );180 $que = $sparts[ 3 ];181 $run = $sparts[ 4 ];182 $sta = $sparts[ 10 ];183 }184 else185 {186 $qstat = `ssh $clname '/opt/torque/bin/qstat -B 2>&1|tail -1'`;187 188 $sparts = preg_split( '/\s+/', $qstat );189 $que = $sparts[ 3 ];190 $run = $sparts[ 4 ];191 $sta = $sparts[ 9 ];192 }193 194 //echo "$self: cln que run sta $clname $que $run $sta \n";195 196 if ( $sta == "Active" )197 {198 $sta = "up";199 }200 else201 {202 $sta = "down";203 $que = "0";204 $run = "0";205 }206 *a*/207 174 switch( $clname ) 208 175 { … … 298 265 case 'jureca': 299 266 { 300 $host = "swus1@jureca.fz-juelich.de"; 267 //$host = "swus1@jureca.fz-juelich.de"; 268 $host = "swus1@juropatest2.fz-juelich.de"; 301 269 $qstat = `ssh $host '/usr/bin/sinfo -s -p batch -o "%a %F" 2>&1|tail -1'`; 302 270 $sparts = preg_split( '/\s+/', $qstat ); -
trunk/gridctl.php
r12 r14 40 40 } 41 41 42 $me_devel = preg_match( "/class_devel/", $class_dir ); 43 42 44 while ( list( $gfacID, $us3_db, $cluster, $status, $queue_msg, $time, $updateTime ) 43 45 = mysql_fetch_array( $result ) ) 44 46 { 47 // If this entry does not match class/class_devel, skip processing 48 49 if ( preg_match( "/US3-A/i", $gfacID ) ) 50 { // For thrift, job and gridctl must match 51 $job_devel = preg_match( "/US3-ADEV/i", $gfacID ); 52 if ( ( $me_devel && !$job_devel ) || 53 ( !$me_devel && $job_devel ) ) 54 { // If job not from appropriate Airavata server, skip processing 55 continue; 56 } 57 } 58 else if ( $me_devel ) 59 { // For non-thrift and development, skip 60 continue; 61 } 62 45 63 // Checking we need to do for each entry 46 64 echo "us3db=$us3_db gfid=$gfacID\n"; … … 63 81 $gfacLabl = $awork[0] . "-" . $awork[1] . "-" . $awork[2]; 64 82 $loghdr = $self . ":" . $gfacLabl . "...:"; 83 $status_in = $status; 84 $status_gw = $status; 65 85 66 86 // If entry is for Airvata/Thrift, get the true current status … … 182 202 if ( ! in_array( $job_status, array( 'SUBMITTED', 'INITIALIZED', 'PENDING' ) ) ) 183 203 { 184 write_log( "$loghdr submitted:job_status=$job_status" );204 //write_log( "$loghdr submitted:job_status=$job_status" ); 185 205 update_job_status( $job_status, $gfacID ); 186 206 } … … 217 237 if ( ! in_array( $job_status, array( 'SUBMITTED', 'INITIALIZED', 'PENDING' ) ) ) 218 238 { 239 //write_log( "$loghdr submit_timeout:job_status=$job_status" ); 219 240 update_job_status( $job_status, $gfacID ); 220 241 return; … … 260 281 261 282 if ( ! in_array( $job_status, array( 'ACTIVE', 'RUNNING', 'STARTED' ) ) ) 283 { 284 //write_log( "$loghdr running:job_status=$job_status" ); 262 285 update_job_status( $job_status, $gfacID ); 286 } 263 287 264 288 return; … … 293 317 if ( ! in_array( $job_status, array( 'ACTIVE', 'RUNNING', 'STARTED' ) ) ) 294 318 { 319 //write_log( "$loghdr run_timeout:job_status=$job_status" ); 295 320 update_job_status( $job_status, $gfacID ); 296 321 return; … … 335 360 if ( $job_status != 'DATA' ) 336 361 { 362 //write_log( "$loghdr wait_data:job_status=$job_status" ); 337 363 update_job_status( $job_status, $gfacID ); 338 364 return; … … 379 405 if ( $job_status != 'DATA' ) 380 406 { 407 //write_log( "$loghdr data_timeout:job_status=$job_status" ); 381 408 update_job_status( $job_status, $gfacID ); 382 409 return; … … 455 482 if ( $requestID == 0 ) return; 456 483 484 $me_devel = preg_match( "/class_devel/", $class_dir ); 485 457 486 if ( preg_match( "/US3-A/i", $gfacID ) ) 458 487 { 459 $me_devel = preg_match( "/class_devel/", $class_dir );460 488 $job_devel = preg_match( "/US3-ADEV/i", $gfacID ); 461 489 if ( ( !$me_devel && !$job_devel ) || … … 467 495 //write_log( "$loghdr RTN FR aira_cleanup()" ); 468 496 } 469 else 470 { 497 498 else if ( ! $me_devel ) 499 { // If this is gridctl_pro and gfac (jureca), do GFAC cleanup 471 500 //write_log( "$loghdr CALLING gfac_cleanup()" ); 472 501 gfac_cleanup( $us3_db, $requestID, $gLink ); … … 487 516 case 'SUBMITED' : 488 517 case 'INITIALIZED' : 489 case 'UPDATING' :490 case 'PENDING' :491 518 $query = "UPDATE analysis SET status='SUBMITTED' WHERE gfacID='$gfacID'"; 492 $message = "Job status request reports job is SUBMITTED"; 519 $message = "Job status request reports job is " . $job_status; 520 //write_log( "$loghdr update_job_status(SUBM) job_status=$job_status" ); 493 521 break; 494 522 … … 536 564 $query = "UPDATE analysis SET status='ERROR' WHERE gfacID='$gfacID'"; 537 565 $message = "Job status request reports job is not in the queue"; 566 break; 567 568 case 'UPDATING' : 569 case 'PENDING' : 570 $message = "Job status request reports job is " . $job_status; 538 571 break; 539 572 … … 627 660 628 661 if ( preg_match( "/US3-A/i", $gfacID ) && 629 ! preg_match( "/jur opa/i", $cluster ) )662 ! preg_match( "/jur/i", $cluster ) ) 630 663 { 631 664 // Then it's an Airavata/Thrift job … … 648 681 $status_ex = getExperimentStatus( $gfacID ); 649 682 $gfac_status = standard_status( $status_ex ); 683 write_log( "$loghdr get_gfac_status: status_ex=$status_ex gfac_status=$gfac_status" ); 650 684 return $gfac_status; 651 685 } … … 953 987 break; 954 988 955 $status = 'DATA';956 break;957 958 989 case 'COMPLETED' : 959 990 case 'completed' : … … 1056 1087 } 1057 1088 1058 if(preg_match("/US3-ADEV/i",$gfacID)) 1089 //if(preg_match("/US3-ADEV/i",$gfacID)) 1090 if(preg_match("/US3-A/i",$gfacID)) 1059 1091 write_log( "$loghdr status/_in/_gw/_ex=$status/$status_in/$status_gw/$status_ex" ); 1060 1092 //write_log( "$loghdr status/_in/_gw/_ex=$status/$status_in/$status_gw/$status_ex" );
Note:
See TracChangeset
for help on using the changeset viewer.