IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41726 for trunk/ippMonitor


Ignore:
Timestamp:
Jul 23, 2021, 10:53:45 AM (5 years ago)
Author:
eugene
Message:

updates to server status for gpc1 vs gpc2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/scripts/czartool_getServerStatus.pl

    r28708 r41726  
    66
    77my $server = undef;
    8 GetOptions ("server|s=s" => \$server);
     8my $proj = undef;
     9my $user = undef;
    910
    10 my @cmdOut = `echo "status;quit" | pantasks_client -c ~ipp/$server/ptolemy.rc 2>&1`;
     11GetOptions (
     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
     20if ($proj eq 'gpc1') {
     21  $user = 'ippitc';
     22} else {
     23  $user = 'ippps2';
     24}
     25
     26my @cmdOut = `echo "status;quit" | pantasks_client -c ~$user/$server/ptolemy.rc 2>&1`;
    1127my $line;
    1228my $passedHeader=0;
    1329foreach $line (@cmdOut) {
    14 
    1530    chomp($line);
    1631    if ($line =~ m/.*Task Status.*/) {$passedHeader=1;next;}
    17     if ($passedHeader){print "$line<br>";}
     32    if ($passedHeader){print "$line \n";}
    1833}
     34
     35my @cmdOut2 = `echo "control status -nohost;quit" | pantasks_client -c ~$user/$server/ptolemy.rc 2>&1`;
     36my $line2;
     37my $nline=0;
     38foreach $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.