Changeset 42411 for trunk/tools
- Timestamp:
- Mar 14, 2023, 3:08:37 PM (3 years ago)
- Location:
- trunk/tools/eam/rawfix.20230221/src
- Files:
-
- 3 added
- 7 edited
-
check.rawfix.sh (modified) (2 diffs)
-
check_md5s_dateobs.pl (modified) (4 diffs)
-
get_md5s_instances.pl (modified) (1 diff)
-
rawfix.ckchip.pt (modified) (2 diffs)
-
rawfix.fixchip.pt (modified) (2 diffs)
-
rawfix.md5chk.pt (added)
-
rawfix.md5sum.pt (modified) (4 diffs)
-
rawfix.pt (modified) (1 diff)
-
rawfix.rsync_s1.pt (added)
-
rawfix.rsync_s2.pt (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh
r42406 r42411 61 61 set mystate = $2 62 62 63 if ($mystate == "new") goto good_state 64 if ($mystate == "rsync") goto good_state 65 if ($mystate == "md5sum.new") goto good_state 66 if ($mystate == "md5sum.done") goto good_state 67 if ($mystate == "md5sum.fail") goto good_state 68 if ($mystate == "ckchip.new") goto good_state 69 if ($mystate == "ckchip.done") goto good_state 70 if ($mystate == "ckchip.fail") goto good_state 71 if ($mystate == "fixchip.new") goto good_state 72 if ($mystate == "fixchip.done") goto good_state 73 if ($mystate == "fixchip.fail") goto good_state 63 if ($mystate == "ckchip.new") goto good_state 64 if ($mystate == "ckchip.done") goto good_state 65 if ($mystate == "ckchip.fail") goto good_state 66 if ($mystate == "fixchip.new") goto good_state 67 if ($mystate == "fixchip.done") goto good_state 68 if ($mystate == "fixchip.fail") goto good_state 69 if ($mystate == "rsync_s1.new") goto good_state 70 if ($mystate == "rsync_s1.done") goto good_state 71 if ($mystate == "rsync_s1.fail") goto good_state 72 if ($mystate == "md5sum.new") goto good_state 73 if ($mystate == "md5sum.done") goto good_state 74 if ($mystate == "md5sum.fail") goto good_state 75 if ($mystate == "rsync_s2.new") goto good_state 76 if ($mystate == "rsync_s2.done") goto good_state 77 if ($mystate == "rsync_s2.fail") goto good_state 78 if ($mystate == "md5chk.new") goto good_state 79 if ($mystate == "md5chk.done") goto good_state 80 if ($mystate == "md5chk.fail") goto good_state 74 81 75 82 echo "ERROR: unknown mode $mystate" … … 77 84 78 85 good_state: 79 mysql $DBOPTS -e "select dateobs from nights where (state = '$mystate')" 86 set t = `date +%T..%N` 87 mysql $DBOPTS -e "select dateobs, curtime() as timestamp from nights where (state = '$mystate')" | awk -v T=$t '(NR == 1){print $0}(NR > 1){print $1, T}' 80 88 exit 0 81 89 endif -
trunk/tools/eam/rawfix.20230221/src/check_md5s_dateobs.pl
r42404 r42411 18 18 my @instlist = glob ("$dateword/*.inst.txt"); 19 19 my @md5slist = glob ("$dateword/*.md5s.txt"); 20 21 my $Nfail = 0; 20 22 21 23 foreach my $instfile (@instlist) { … … 39 41 40 42 if ($md5match eq "NONE") { 41 print STDERR "missing md5sum file for $instfile\n"; 43 print STDOUT "missing md5sum file for $instfile\n"; 44 $Nfail ++; 42 45 next; 43 46 } … … 57 60 my $N2 = @instdata; 58 61 if ($N1 != $N2) { 59 print STDERR "inconsistent number of lines in $md5match : $N1 vs $N2\n"; 62 print STDOUT "inconsistent number of lines in $md5match : $N1 vs $N2\n"; 63 $Nfail ++; 60 64 next; 61 65 } … … 76 80 77 81 if ($md5tru ne $md5obs) { 78 print STDERR "FAIL: $inst $state $md5tru $md5obs\n"; 82 print STDOUT "FAIL: $inst $state $md5tru $md5obs\n"; 83 $Nfail ++; 79 84 } 80 85 } 86 } 87 88 if ($Nfail) { 89 print STDOUT "ERROR: $Nfail errors\n"; 90 exit 1; 91 } else { 92 print STDOUT "SUCCESS: $Nfail errors\n"; 93 exit 0; 81 94 } 82 95 -
trunk/tools/eam/rawfix.20230221/src/get_md5s_instances.pl
r42404 r42411 4 4 my $time = time(); 5 5 6 use DBI;7 6 use Carp; 8 7 use Pod::Usage qw( pod2usage ); -
trunk/tools/eam/rawfix.20230221/src/rawfix.ckchip.pt
r42406 r42411 30 30 end 31 31 32 # need to delete DONE entries here so the book is not repopulated 33 # by already-running load tasks 32 34 task.exit 0 33 35 # convert the stdout 'queue' to entries in a book 34 36 # fields in the table will become words in the page 35 37 queue2book -raw-columns -key dateobs -uniq -setword pantaskState INIT -setword pantasksQuality OK stdout ckchip.book 38 book delpage ckchip.book -key pantaskState DONE 36 39 end 37 40 … … 91 94 # fields in the table will become words in the page 92 95 # use the queuesize (Nhosts) to track how many jobs are done / to be done 96 book setword ckchip.book $options:0 pantaskState DONE 93 97 exec update.rawfix.sh $options:0 ckchip.done 94 book delpage ckchip.book $options:095 98 end 96 99 -
trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt
r42406 r42411 35 35 # fields in the table will become words in the page 36 36 queue2book -raw-columns -key dateobs -uniq -setword pantaskState INIT -setword pantasksQuality OK stdout fixchip.book 37 book delpage fixchip.book -key pantaskState DONE 37 38 end 38 39 … … 91 92 # fields in the table will become words in the page 92 93 # use the queuesize (Nhosts) to track how many jobs are done / to be done 94 book setword fixchip.book $options:0 pantaskState DONE 93 95 exec update.rawfix.sh $options:0 fixchip.done 94 96 book delpage fixchip.book $options:0 -
trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt
r42405 r42411 35 35 # fields in the table will become words in the page 36 36 queue2book -raw-columns -key dateobs -uniq -setword pantaskState INIT -setword pantasksQuality OK stdout md5sum.book 37 book delpage md5sum.book -key pantaskState DONE 37 38 end 38 39 … … 210 211 211 212 # look for completed nights in md5sum.book (pantaskState == DONE) 212 book getpage md5sum.book 0 -var pageName -key pantaskState DONE213 book getpage md5sum.book 0 -var pageName -key pantaskState STOP 213 214 if ("$pageName" == "NULL") break 214 215 … … 232 233 # now that the entry is set to done in the db, remove the pantasks book entry 233 234 echo "cleaning this page: $options:0" 234 book delpage md5sum.book $options:0235 book setword md5sum.book $options:0 pantaskState DONE 235 236 end 236 237 … … 274 275 end 275 276 if ($Ndone == $Nhosts) 276 book setword md5sum.book $options:1 pantaskState DONE277 book setword md5sum.book $options:1 pantaskState STOP 277 278 end 278 279 book delpage md5host.book $options:0 -
trunk/tools/eam/rawfix.20230221/src/rawfix.pt
r42406 r42411 16 16 end 17 17 18 # these are listed in stage order, but the 19 # order is this file is not determinative, only the 20 # change of state from STAGE1.new -> STAGE1.done -> STAGE2.new 18 21 input rawfix.ckchip.pt 19 # input rawfix.md5sum.pt 22 input rawfix.fixchip.pt 23 input rawfix.rsync_s1.pt 24 input rawfix.md5sum.pt 25 input rawfix.rsync_s2.pt 26 input rawfix.md5chk.pt 20 27 21 28 ######################### UTILITIES #################################
Note:
See TracChangeset
for help on using the changeset viewer.
