IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32622


Ignore:
Timestamp:
Nov 7, 2011, 12:35:22 PM (15 years ago)
Author:
watersc1
Message:

Adding volume/entry calculations based on the counts of objects found on disk to allow a 'better' estimate.

Location:
trunk/tools/diskspace
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/diskspace/merge_counts_and_sizes.pl

    r32602 r32622  
    2929    chomp;
    3030    unless ($_ =~ /^#/) {
    31         ($stage_product,$size_in_gb) = split /\s+/;
     31        ($stage_product,$size_in_gb,$count) = split /\s+/;
    3232        ($stage,$product) = split /_/, $stage_product;
    3333
    3434        $size{$stage}{$product} = $size_in_gb;
     35        $diskcount{$stage}{$product} = $count;
    3536        $total += $size_in_gb;
    3637    }
    3738}
    3839close(S);
     40
     41$diskcount{"EXTERNAL"}{"UNKNOWN"} = 1;
    3942
    4043my $count_file = "neb:///ipp_diskspace/${datestring}/run_im_counts.dat";
     
    9295            if ($N{$stage}{$product} > 0) {
    9396                $VpN{$stage}{$state} += $map{$stage}{$product}{$state} * $size{$stage}{$product} / $N{$stage}{$product};
     97                $DVpN{$stage}{$state} += $map{$stage}{$product}{$state} * $size{$stage}{$product} / $diskcount{$stage}{$product};
    9498            }
    9599#           print STDERR ">>$stage $product $state $map{$stage}{$product}{$state} $N{$stage}{$product} $count{$stage}{$state} $size{$stage}{$product} $VpN{$stage}{$state}\n";     
     
    156160        }
    157161        $labels{$label} += $V;
    158         printf("%-8s %-18s %-10s %14.4f %12.6f %9d\n",
    159                 $stage,$state,$label,$V,$VpN{$stage}{$state},$count{$stage}{$state});
     162        $alt_labels{$label} += $DVpN{$stage}{$state} * $count{$stage}{$state};
     163        printf("%-8s %-18s %-10s\t%14.4f %12.6f\t%14.6f %12.6f\t%9d\n",
     164                $stage,$state,$label,$V,$VpN{$stage}{$state},$DVpN{$stage}{$state} * $count{$stage}{$state},$DVpN{$stage}{$state},$count{$stage}{$state});
    160165        if (exists($opt{N})) {
    161             printf($out_fh "%-8s %-18s %-10s %14.4f %12.6f %9d\n",
    162                    $stage,$state,$label,$V,$VpN{$stage}{$state},$count{$stage}{$state});
     166            printf($out_fh "%-8s %-18s %-10s\t%14.4f %12.6f\t%14.6f %12.6f\t%9d\n",
     167                   $stage,$state,$label,$V,$VpN{$stage}{$state},$DVpN{$stage}{$state} * $count{$stage}{$state},$DVpN{$stage}{$state},$count{$stage}{$state});
    163168        }
    164169    }
     
    167172foreach $l (keys %labels) {
    168173    $sum += $labels{$l};
    169     print STDERR "\t$l  \t$labels{$l}\n";
     174    $alt_sum += $alt_labels{$l};
     175    print STDERR "\t$l  \t$labels{$l}\t$alt_labels{$l}\n";
    170176    if (exists($opt{N})) {
    171         print $out_fh "\t$l  \t$labels{$l}\n";
     177        print $out_fh "\t$l  \t$labels{$l}\t$alt_labels{$l}\n";
    172178    }
    173179}
    174 print STDERR "\tTOTAL    \t$sum\n";
     180print STDERR "\tTOTAL    \t$sum\t$alt_sum\n";
    175181print STDERR "\tEXP_TOT  \t$total\n";
    176182
    177183if (exists($opt{N})) {
    178     print $out_fh "\tTOTAL    \t$sum\n";
     184    print $out_fh "\tTOTAL    \t$sum\t$alt_sum\n";
    179185    print $out_fh "\tEXP_TOT  \t$total\n";
    180186    close($out_fh);
  • trunk/tools/diskspace/nebulous_wiki.pl

    r32265 r32622  
    3232        $sum{$volume} += $size;
    3333        $sizes{$what}   += $size;
     34        $counts{$what}  += $count;
    3435    }
    3536    close(F);
     
    8889    foreach $w (sort (keys %sizes)) {
    8990        $val = $sizes{$w} / 1024 / 1024 / 1024;
    90         print $out_fh "$w $val\n";
     91        $v2  = $counts{$w};
     92        print $out_fh "$w $val $v2\n";
    9193    }
    9294    close($out_fh);
Note: See TracChangeset for help on using the changeset viewer.