Changeset 42446 for trunk/tools
- Timestamp:
- Apr 10, 2023, 11:57:03 AM (3 years ago)
- Location:
- trunk/tools/eam/rawfix.20230221/src
- Files:
-
- 1 added
- 6 edited
-
advance.rawfix.pl (added)
-
check.rawfix.sh (modified) (2 diffs)
-
check_chip_locations.pl (modified) (7 diffs)
-
fix_chip_locations.pl (modified) (4 diffs)
-
rawfix.advance.pt (modified) (1 diff)
-
rawfix.pt (modified) (1 diff)
-
update.rawfix.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/check.rawfix.sh
r42445 r42446 28 28 endif 29 29 30 mysql $DBOPTS -e "select dateobs, state from nights"30 mysql $DBOPTS -e "select dateobs, iter, state from nights" 31 31 exit 0 32 32 endif … … 49 49 50 50 set mynight = $2 51 mysql $DBOPTS -e "select * from nights where (dateobs = '$mynight')"51 mysql -E $DBOPTS -e "select * from nights where (dateobs = '$mynight')" 52 52 exit 0 53 53 endif -
trunk/tools/eam/rawfix.20230221/src/check_chip_locations.pl
r42445 r42446 78 78 79 79 # determine the status of the instances 80 my ($Nmain, $Nback, $N dead) = &check_instance_xattr ($inforows, $ext_id, $data_st, $md5_sum);81 82 &check_instance_state ($outfh, $ext_id, $data_st, $md5_sum, $Nmain, $Nback, $N dead);80 my ($Nmain, $Nback, $Nlost) = &check_instance_xattr ($inforows, $ext_id, $data_st, $md5_sum); 81 82 &check_instance_state ($outfh, $ext_id, $data_st, $md5_sum, $Nmain, $Nback, $Nlost); 83 83 } 84 84 … … 239 239 my $Nmain = 0; 240 240 my $Nback = 0; 241 my $N dead= 0;241 my $Nlost = 0; 242 242 243 243 # xattr = 0 means instance @ ITC (main) … … 260 260 my $xattr = $values[3]; 261 261 262 if ($xattr > 1) { $N dead++; next; } # do not save instances on dead partitions262 if ($xattr > 1) { $Nlost ++; next; } # do not save instances on dead partitions 263 263 if ($xattr == 0) { $Nmain ++; } 264 264 if ($xattr == 1) { $Nback ++; } … … 277 277 } 278 278 279 return ($Nmain, $Nback, $N dead);279 return ($Nmain, $Nback, $Nlost); 280 280 } 281 281 … … 288 288 my $Nmain = $_[4]; 289 289 my $Nback = $_[5]; 290 my $N dead= $_[6];290 my $Nlost = $_[6]; 291 291 292 292 my $outinfo = "$extID $data_st $md5_sum"; … … 333 333 334 334 # DEAD : no more valid instances 335 if (($Nmain == 0) && ($Nback == 0) && $N dead) {335 if (($Nmain == 0) && ($Nback == 0) && $Nlost) { 336 336 print $outfh "DEAD: $outinfo\n"; 337 337 $Ndead ++; … … 339 339 } 340 340 # GONE : no more valid instances 341 if (($Nmain == 0) && ($Nback == 0) && ($N dead== 0)) {341 if (($Nmain == 0) && ($Nback == 0) && ($Nlost == 0)) { 342 342 print $outfh "GONE: $outinfo\n"; 343 343 $Ngone ++; -
trunk/tools/eam/rawfix.20230221/src/fix_chip_locations.pl
r42445 r42446 40 40 my $Ncul2 = 0; 41 41 my $Ncul3 = 0; 42 my $Nfail = 0; 42 43 43 44 # load the lists of good and fail chips … … 146 147 close (OUTFILE); 147 148 } 148 if ($goodMD5) { $Ndups++; } else { $Nfail ++; } 149 ## if we know the MD5 is bad, add to Nfail, otherwise add to Ndups 150 if ($haveMD5 && !$goodMD5) { 151 $Nfail ++; 152 } else { 153 $Ndups++; 154 } 149 155 next; 150 156 } … … 162 168 print OUTFILE "$newfile $datast $md5sum\n"; 163 169 close (OUTFILE); 164 } 165 if ($goodMD5) { $Nxbck++; } else { $Nfail ++; } 170 } 171 ## if we know the MD5 is bad, add to Nfail, otherwise add to Nxbck: 172 if ($haveMD5 && !$goodMD5) { 173 $Nfail ++; 174 } else { 175 $Nxbck++; 176 } 166 177 next; 167 178 } … … 193 204 } 194 205 195 # these are done in stage 3: 196 if ($goodMD5) { 206 ## if we know the MD5 is bad, add to Nfail, otherwise add to NculX 207 if ($haveMD5 && !$goodMD5) { 208 $Nfail ++; 209 } else { 197 210 if ($state eq "CUL1:") { $Ncul1++; next; } 198 211 if ($state eq "CUL2:") { $Ncul2++; next; } 199 212 if ($state eq "CUL3:") { $Ncul3++; next; } 200 } else { $Nfail ++; }213 } 201 214 } 202 215 } -
trunk/tools/eam/rawfix.20230221/src/rawfix.advance.pt
r42441 r42446 17 17 task.exec 18 18 # 19 command advance.rawfix. sh all$MAX_ACTIVE_NIGHTS19 command advance.rawfix.pl --mode all --topdir $mypath --Nmax $MAX_ACTIVE_NIGHTS 20 20 end 21 21 -
trunk/tools/eam/rawfix.20230221/src/rawfix.pt
r42445 r42446 23 23 # order is this file is not determinative, only the 24 24 # change of state from STAGE1.new -> STAGE1.done -> STAGE2.new 25 #input rawfix.advance.pt25 input rawfix.advance.pt 26 26 input rawfix.ckchip.pt 27 27 input rawfix.fixchip.pt -
trunk/tools/eam/rawfix.20230221/src/update.rawfix.sh
r42400 r42446 2 2 3 3 if ($#argv < 1) then 4 echo "USAGE: update.rawfix.sh (night) (state) [ quality]"4 echo "USAGE: update.rawfix.sh (night) (state) [iter]" 5 5 echo " EG: update.rawfix.sh 20100501 new" 6 6 exit 2 … … 9 9 set mynight = $1 10 10 set state = $2 11 12 set iter = "" 13 if ($#argv == 3) then 14 set iter = ", iter = $3" 15 endif 11 16 12 17 # make the rawfix database to track rawfix operations … … 18 23 set DBOPTS = "-B --skip-column-names -h $DBHOST -u $DBUSER -p$DBPASS $DBNAME" 19 24 20 mysql $DBOPTS -e "update nights set state = '$state' where (dateobs = '$mynight')"25 mysql $DBOPTS -e "update nights set state = '$state' $iter where (dateobs = '$mynight')" 21 26 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.
