IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30650


Ignore:
Timestamp:
Feb 16, 2011, 11:57:53 AM (15 years ago)
Author:
watersc1
Message:

Added logfile tracking option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/regpeek.pl

    r30646 r30650  
    22
    33use DBI;
     4use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
     5
     6my $dbname = 'gpc1';
     7
     8GetOptions(
     9    'logs|L'      => \$logs,
     10    'dbname=s'    => \$dbname,
     11    );
    412
    513my $date = shift(@ARGV);
     
    1927print "CheckStatus: $bad_exp\n";
    2028$bad_exp = (split /\s+/, $bad_exp)[0];
    21 print "Exposure: $bad_exp is the current problem\n";
     29print "Exposure: $bad_exp is the current pending exposure.\n";
    2230
    23 my $dbname = 'gpc1';
     31
    2432my $db = init_gpc_db();
    2533
    26 my $query = "select exp_name,class_id,burntool_state,data_state FROM rawImfile where exp_name = '$bad_exp'";
     34my $query = "select exp_name,class_id,burntool_state,data_state,uri,exp_id FROM rawImfile where exp_name = '$bad_exp'";
    2735
    2836my $data  = $db->selectall_arrayref( $query );
    29 print "#exp_name   class_id   bt_state   data_state\n";
     37print "#exp_name   class_id   bt_state   data_state uri\n";
    3038foreach my $row (@{ $data }) {
    31     my ($exp_name,$class_id,$bt_state,$data_state) = @{ $row };
    32     print "$exp_name  $class_id $bt_state $data_state\n";
     39    my ($exp_name,$class_id,$bt_state,$data_state,$uri,$exp_id) = @{ $row };
     40    print "$exp_name  $class_id $bt_state $data_state $uri\n";
     41    if ($logs) {
     42        $reg_log = $uri;
     43        $reg_log =~ s/$exp_name/${exp_name}.${exp_id}/g;
     44        $reg_log =~ s/ota/reg.ota/;
     45        $reg_log =~ s/fits/log/;
     46        $burn_log = $uri;
     47        $burn_log =~ s/fits/burn.log/;
     48       
     49        print "           REG_LOG: $reg_log\n";
     50        print "          BURN_LOG: $burn_log\n";
     51    }
    3352}
    3453
Note: See TracChangeset for help on using the changeset viewer.