IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27191


Ignore:
Timestamp:
Mar 4, 2010, 2:37:57 PM (16 years ago)
Author:
Paul Price
Message:

Adding support for warp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/errors.pl

    r27154 r27191  
    5050} elsif ($stage eq "stack") {
    5151    $sql = "SELECT stack_id, 'stack', hostname, path_base FROM stackRun JOIN stackSumSkyfile USING(stack_id) WHERE fault != 0";
    52 } else {
     52} elsif ($stage eq "warp") {
     53    $sql = "SELECT warp_id, skycell_id, hostname, path_base FROM warpRun JOIN warpSkyfile USING(warp_id) WHERE fault != 0";
     54}else {
    5355    die "Unsupported stage: $stage\n";
    5456}
     
    7072my %unable_access;
    7173my %statistics_file;
     74my %transparencies;
     75my %couldnt_open_file;
     76my %failed_read;
    7277my %unknown;
    7378my %bad;
     
    9398    }
    9499
    95     my $file;
     100    my $file;                   # Log file
    96101    open $file, $log;
    97     my $found = 0;              # Found something interesting
    98     while (<$file>) {
    99         if (/Assertion .* failed/ or /Assertion failed in/) {
     102    my @log = <$file>;          # Contents of log file
     103    close $file;
     104    my $line;                   # Line from file
     105    my $found;                  # Found something?
     106    while (($line = pop @log)) {
     107        if ($line =~ /Assertion .* failed/ or $line =~ /Assertion failed in/) {
    100108            $assertion{$name} = $log;
    101109            $found = 1;
    102110            last;
    103111        }
    104         if (/Cannot find file (\S+)/) {
     112        if ($line =~ /Cannot find file (\S+)/) {
    105113            $cannot_find_file{$name} = $1;
    106114            $found = 1;
    107115            last;
    108116        }
    109         if (/Unable to access file (\S+)/) {
     117        if ($line =~ /Unable to access file (\S+)/) {
    110118            $unable_access{$name} = $1;
    111119            $found = 1;
    112120            last;
    113121        }
    114         if (/failed to determine real name from template for (\S+)/) {
     122        if ($line =~ /failed to determine real name from template for (\S+)/) {
    115123            $failed_real_name{$name} = $1;
    116124            $found = 1;
    117125            last;
    118126        }
    119         if (/failed to close (\S+)/) {
     127        if ($line =~ /failed to close (\S+)/) {
    120128            $failed_close{$name} = $1;
    121129            $found = 1;
    122130            last;
    123131        }
    124         if (/Unable to open statistics file/) {
     132        if ($line =~ /Unable to open statistics file/) {
    125133            $statistics_file{$name} = $log;
    126134            $found = 1;
    127135            last;
    128136        }
    129     }
    130     close $file;
     137        if ($line =~ /Unable to perform statistics on transparencies./) {
     138            $transparencies{$name} = $log;
     139            $found = 1;
     140            last;
     141        }
     142        if ($line =~ /Could not open file,(\S+)/) {
     143            $couldnt_open_file{$name} = $1;
     144            $found = 1;
     145            last;
     146        }
     147        if ($line =~ /failed to read (\S+)/) {
     148            $failed_read{$name} = $1;
     149            $found = 1;
     150            last;
     151        }
     152    }
    131153    $unknown{$name} = $log unless $found;
    132154}
     
    136158print "\n";
    137159
    138 print "Assertion failures: " . ( scalar keys %assertion ) . "\n";
    139 foreach my $name (keys %assertion) {
    140     print "$name: $assertion{$name}\n";
    141 }
    142 print "\n";
    143 
    144 print "'Cannot find file' errors: " . ( scalar keys %cannot_find_file ) . "\n";
    145 foreach my $name (keys %cannot_find_file) {
    146     print "$name: $cannot_find_file{$name}\n";
    147 }
    148 print "\n";
    149 
    150 print "'Unable to access file' errors: " . ( scalar keys %unable_access ) . "\n";
    151 foreach my $name (keys %unable_access) {
    152     print "$name: $unable_access{$name}\n";
    153 }
    154 print "\n";
    155 
    156 print "'Failed to determine real name' errors: " . ( scalar keys %failed_real_name ) . "\n";
    157 foreach my $name (keys %failed_real_name) {
    158     print "$name: $failed_real_name{$name}\n";
    159 }
    160 print "\n";
    161 
    162 print "'Failed to close' errors: " . ( scalar keys %failed_close ) . "\n";
    163 foreach my $name (keys %failed_close) {
    164     print "$name: $failed_close{$name}\n";
    165 }
    166 print "\n";
    167 
    168 print "Unknown errors: " . ( scalar keys %unknown ) . "\n";
    169 foreach my $name (keys %unknown) {
    170     print "$name: $unknown{$name}\n";
    171 }
    172 print "\n";
    173 
    174 print "Bad logs: " . ( scalar keys %bad ) . "\n";
    175 foreach my $name (keys %bad) {
    176     print "$name: $bad{$name}\n";
    177 }
    178 print "\n";
     160if (scalar keys %assertion) {
     161    print "Assertion failures: " . ( scalar keys %assertion ) . "\n";
     162    foreach my $name (keys %assertion) {
     163        print "$name: $assertion{$name}\n";
     164    }
     165    print "\n";
     166}
     167
     168if (scalar keys %cannot_find_file) {
     169    print "'Cannot find file' errors: " . ( scalar keys %cannot_find_file ) . "\n";
     170    foreach my $name (keys %cannot_find_file) {
     171        print "$name: $cannot_find_file{$name}\n";
     172    }
     173    print "\n";
     174}
     175
     176if (scalar keys %unable_access) {
     177    print "'Unable to access file' errors: " . ( scalar keys %unable_access ) . "\n";
     178    foreach my $name (keys %unable_access) {
     179        print "$name: $unable_access{$name}\n";
     180    }
     181    print "\n";
     182}
     183
     184if (scalar keys %failed_real_name) {
     185    print "'Failed to determine real name' errors: " . ( scalar keys %failed_real_name ) . "\n";
     186    foreach my $name (keys %failed_real_name) {
     187        print "$name: $failed_real_name{$name}\n";
     188    }
     189    print "\n";
     190}
     191
     192if (scalar keys %failed_close) {
     193    print "'Failed to close' errors: " . ( scalar keys %failed_close ) . "\n";
     194    foreach my $name (keys %failed_close) {
     195        print "$name: $failed_close{$name}\n";
     196    }
     197    print "\n";
     198}
     199
     200if (scalar keys %transparencies) {
     201    print "'Unable to perform statistics on transparencies' errors: " . ( scalar keys %transparencies ) . "\n";
     202    foreach my $name (keys %transparencies) {
     203        print "$name: $transparencies{$name}\n";
     204    }
     205    print "\n";
     206}
     207
     208if (scalar keys %couldnt_open_file) {
     209    print "'Could not open file' errors: " . ( scalar keys %couldnt_open_file ) . "\n";
     210    foreach my $name (keys %couldnt_open_file) {
     211        print "$name: $couldnt_open_file{$name}\n";
     212    }
     213    print "\n";
     214}
     215
     216if (scalar keys %failed_read) {
     217    print "'failed to read' errors: " . ( scalar keys %failed_read ) . "\n";
     218    foreach my $name (keys %failed_read) {
     219        print "$name: $failed_read{$name}\n";
     220    }
     221    print "\n";
     222}
     223
     224if (scalar keys %unknown) {
     225    print "Unknown errors: " . ( scalar keys %unknown ) . "\n";
     226    foreach my $name (keys %unknown) {
     227        print "$name: $unknown{$name}\n";
     228    }
     229    print "\n";
     230}
     231
     232if (scalar keys %bad) {
     233    print "Bad logs: " . ( scalar keys %bad ) . "\n";
     234    foreach my $name (keys %bad) {
     235        print "$name: $bad{$name}\n";
     236    }
     237    print "\n";
     238}
Note: See TracChangeset for help on using the changeset viewer.