Changeset 41726 for trunk/ippMonitor
- Timestamp:
- Jul 23, 2021, 10:53:45 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/scripts/czartool_getServerStatus.pl
r28708 r41726 6 6 7 7 my $server = undef; 8 GetOptions ("server|s=s" => \$server); 8 my $proj = undef; 9 my $user = undef; 9 10 10 my @cmdOut = `echo "status;quit" | pantasks_client -c ~ipp/$server/ptolemy.rc 2>&1`; 11 GetOptions ( 12 "server|d=s" => \$server, 13 "proj|p=s" => \$proj, 14 ); 15 16 $server = 'stdscience' unless defined $server; 17 $proj = 'gpc1' unless defined $proj; 18 19 20 if ($proj eq 'gpc1') { 21 $user = 'ippitc'; 22 } else { 23 $user = 'ippps2'; 24 } 25 26 my @cmdOut = `echo "status;quit" | pantasks_client -c ~$user/$server/ptolemy.rc 2>&1`; 11 27 my $line; 12 28 my $passedHeader=0; 13 29 foreach $line (@cmdOut) { 14 15 30 chomp($line); 16 31 if ($line =~ m/.*Task Status.*/) {$passedHeader=1;next;} 17 if ($passedHeader){print "$line <br>";}32 if ($passedHeader){print "$line \n";} 18 33 } 34 35 my @cmdOut2 = `echo "control status -nohost;quit" | pantasks_client -c ~$user/$server/ptolemy.rc 2>&1`; 36 my $line2; 37 my $nline=0; 38 foreach $line2 (@cmdOut2) { 39 chomp($line2); 40 my @fields = split /\s+/, $line2; 41 42 # run job example 43 # field0 1 2 3 4 5 6 7 8 44 # 0 ippc98 BUSY 0.27 0.0.0.b05 0 summit_copy.pl --uri http://ipp113.ifa.hawaii.edu/ds-gpc1/o9299g0050d/o9299g0050d13.fits --filename neb://ipp142.1.0/gpc1/20210326/o9299g0050d/o9299g0050d.ota13.fits --summit_id 1752711 --exp_name o9299g0050d --inst gpc1 --telescope ps1 --class chip --class_id ota13 --bytes 49432320 --md5 b282ba2fe613ff7bc5db3d511d26626d --dbname gpc1 --timeout 600 --verbose --copies 2 --compress --nebulous 45 # 222 ippc102 RESP 0.01 0.0.1.712d 0 warp_skycell.pl --threads @MAX_THREADS@ --warp_id 2358360 --warp_skyfile_id 177364032 --skycell_id skycell.1982.099 --tess_dir RINGS.V3 --camera GPC1 --outroot neb://ipp133.0/gpc1/BrightTwi.nt/2021/03/26//o9299g0680o.1757641/o9299g0680o.1757641.wrp.2358360.skycell.1982.099 --redirect-output --run-state new --reduction EUCLID_DEFAULT --dbname gpc1 --verbose 46 47 # print "$nline: $fields[0], $fields[1], $fields[2], $fields[3], $fields[4] | $line<br>"; 48 49 if ($nline >= 8 && $fields[3] =~ m/.*BUSY.*/ && $fields[4] > 900){print "<font color=red>ind:$fields[1] state:$fields[3] stage:$fields[7] host:$fields[2] time:$fields[4]sec \n";} 50 $nline = $nline + 1; 51 }
Note:
See TracChangeset
for help on using the changeset viewer.
