- Timestamp:
- Apr 6, 2023, 6:00:06 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl
r42441 r42444 13 13 use Getopt::Long qw( GetOptions :config auto_help auto_version ); 14 14 15 # USAGE: check_chip_locations.pl --dateobs (night) --chiplist (file) --stage ( v0,v1,etc)16 # USAGE: check_chip_locations.pl --dateobs 2010/05/01 --chiplist gpc1.chips.txt --stage v015 # USAGE: check_chip_locations.pl --dateobs (night) --chiplist (file) --stage (0,1,etc) 16 # USAGE: check_chip_locations.pl --dateobs 2010/05/01 --chiplist gpc1.chips.txt --stage 0 17 17 18 18 my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts; … … 31 31 # output files: 32 32 # instance lists by host: YYYYMMDD/HOSTNAME.inst.STAGE.txt 33 # chip states by chip: YYYYMMDD/CHIPNAME.uris. txt33 # chip states by chip: YYYYMMDD/CHIPNAME.uris.STAGE.txt 34 34 35 35 foreach my $chip_id (@chip_ids) { 36 36 37 37 my $outfh; 38 open ($outfh, ">$topdir/$dateword/$chip_id.uris. txt");38 open ($outfh, ">$topdir/$dateword/$chip_id.uris.$stage.txt"); 39 39 40 40 # get the list of chip neb paths for one chip … … 182 182 my $sql_chip_instances = "SELECT uri, host, available, xattr, cab_id from instance join storage_object using (so_id) join volume using (vol_id) where ext_id = '$ext_id'"; 183 183 my $rowref = $neb_dbh->selectall_arrayref( $sql_chip_instances ); 184 184 185 185 return ($rowref, $ext_id); 186 186 } … … 338 338 pod2usage( -msg => "Specify the top-level output directory with --topdir", -exitval => 2) unless defined $topdir; 339 339 340 # check that stage is an integer 341 unless (&is_integer ($stage)) { die "stage must be a non-negative integer\n"; } 342 unless ($stage >= 0) { die "stage must be a non-negative integer\n"; } 343 340 344 # check the date format (require YYYY/MM/DD and use that from 00:00:00 to 23:59:59 or take start and end?) 341 345 … … 405 409 } 406 410 407 411 sub is_integer { 412 defined $_[0] && $_[0] =~ /^[+-]?\d+$/; 413 } 414 408 415 # example of using the return value of arrayref: 409 416
Note:
See TracChangeset
for help on using the changeset viewer.
