Changeset 26672
- Timestamp:
- Jan 22, 2010, 12:25:48 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/tools/wiki_nightly_stacks_table.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/wiki_nightly_stacks_table.pl
r26670 r26672 4 4 use Getopt::Std; 5 5 6 getopts('P ',\%opt);6 getopts('PC',\%opt); 7 7 8 8 $dbname = 'gpc1'; … … 281 281 print '||' . "\n"; 282 282 } 283 print '||' . "\n"; 284 # faulted distributed 285 286 $sth = "select * from rcDSFileset join distRun using(dist_id) where rcDSFileset.fault > 0 and date(registered) >= '2010-01-01' AND label LIKE 'M%.nightlystack' order by fs_id asc"; 287 $data_ref = $db->selectall_arrayref( $sth ); 288 289 foreach $rr (@{ $data_ref }) { 290 # ($dist_id,$fs_id,$dest_id,$name,$state,$registered,$fault,$target_id,$stage,$stage_id,$magic_ds_id,$label,$outroot,$outdir,$clean,$no_magic,$state2,$time_stamp,$fault,$data_group,$note) = @{ $rr }; 291 292 $data_group = ${ $rr }[19]; 293 ($dist_group,$date_str) = split /\./, $data_group; 294 $date = sprintf("%d%d%d%d-%d%d-%d%d",(split //,$date_str)); 295 296 unless(defined($fault_diststacks{$date}{$dist_group})) { 297 $fault_diststacks{$date}{$dist_group} = 0; 298 } 299 300 $fault_diststacks{$date}{$dist_group} ++; 301 302 if (exists($opt{C})) { 303 print STDERR "## disttool -dbname gpc1 -revertfileset -fs_id ${ $rr }[1]\n"; 304 } 305 306 } 307 308 print "|| '''Faulted Dists (Nstack_ids):'''\n||\n"; 309 print '|| Date ||'; 310 foreach $t (@targets) { 311 print "$t ||"; 312 } 313 print "\n"; 314 315 foreach $d (sort (keys %diststacks)) { 316 print '||' . $d ; 317 foreach $t (@targets) { 318 print '|| ' ; 319 $i = 0; 320 if (exists($fault_diststacks{$d}{$t})) { 321 print "$fault_diststacks{$d}{$t}"; 322 } 323 } 324 print '||' . "\n"; 325 } 283 326 print "\n\n"; 284
Note:
See TracChangeset
for help on using the changeset viewer.
