Changeset 30650
- Timestamp:
- Feb 16, 2011, 11:57:53 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/tools/regpeek.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/regpeek.pl
r30646 r30650 2 2 3 3 use DBI; 4 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 5 6 my $dbname = 'gpc1'; 7 8 GetOptions( 9 'logs|L' => \$logs, 10 'dbname=s' => \$dbname, 11 ); 4 12 5 13 my $date = shift(@ARGV); … … 19 27 print "CheckStatus: $bad_exp\n"; 20 28 $bad_exp = (split /\s+/, $bad_exp)[0]; 21 print "Exposure: $bad_exp is the current p roblem\n";29 print "Exposure: $bad_exp is the current pending exposure.\n"; 22 30 23 my $dbname = 'gpc1'; 31 24 32 my $db = init_gpc_db(); 25 33 26 my $query = "select exp_name,class_id,burntool_state,data_state FROM rawImfile where exp_name = '$bad_exp'";34 my $query = "select exp_name,class_id,burntool_state,data_state,uri,exp_id FROM rawImfile where exp_name = '$bad_exp'"; 27 35 28 36 my $data = $db->selectall_arrayref( $query ); 29 print "#exp_name class_id bt_state data_state \n";37 print "#exp_name class_id bt_state data_state uri\n"; 30 38 foreach 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 } 33 52 } 34 53
Note:
See TracChangeset
for help on using the changeset viewer.
