IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28825


Ignore:
Timestamp:
Aug 2, 2010, 11:06:32 AM (16 years ago)
Author:
rhenders
Message:

czartool.pl now using Pantasks method to get server status

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czartool.pl

    r28704 r28825  
    6565        if ($key eq "s") {checkServers();}
    6666        elsif ($key eq "l") {checkAllLabels("new");}
    67         elsif ($key eq "u") {serverStatus("stdscience");}
     67        elsif ($key eq "u") {$pantasks->getServerCurrentStatus("stdscience");}
    6868        elsif ($key =~ m/[0-9]/) {my $key2=getc; checkOneLabel($stdscienceLabels[($key.$key2)-1]);}
    6969        printInstructions();
     
    9999
    100100    return \@diff;
    101 }
    102 
    103 ###########################################################################
    104 #
    105 # Prints the status of a given pantasks server
    106 #
    107 ###########################################################################
    108 sub serverStatus {
    109     my ($server) = @_;
    110 
    111     my @cmdOut = `echo "status;quit" | pantasks_client -c ~ipp/$server/ptolemy.rc 2>&1`;
    112     my $line;
    113     foreach $line (@cmdOut) {
    114 
    115         chomp($line);
    116 
    117         print "$line\n";
    118     }
    119101}
    120102
  • trunk/tools/czartool/Pantasks.pm

    r28785 r28825  
    113113        if ($line =~ m/Scheduler is running/) {${$running} = 1; ${$alive}=1;last;}
    114114        if ($line =~ m/Task Status/) {last;}
    115 
    116115    }
    117116}
     
    125124    my ($self, $server) = @_;
    126125
    127 
    128126    my @cmdOut = `echo "status;quit" | pantasks_client -c ~ipp/$server/ptolemy.rc 2>&1`;
    129127    my $line;
    130128    my $passedHeader=0;
     129    print "\n";
    131130    foreach $line (@cmdOut) {
    132131
    133         chomp($line);
    134132        if ($line =~ m/.*Task Status.*/) {$passedHeader=1;next;}
    135         if ($passedHeader){print "$line<br>";}
     133        if ($passedHeader){print "$line";}
    136134    }
    137135}
Note: See TracChangeset for help on using the changeset viewer.