Changeset 32622
- Timestamp:
- Nov 7, 2011, 12:35:22 PM (15 years ago)
- Location:
- trunk/tools/diskspace
- Files:
-
- 2 edited
-
merge_counts_and_sizes.pl (modified) (4 diffs)
-
nebulous_wiki.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/diskspace/merge_counts_and_sizes.pl
r32602 r32622 29 29 chomp; 30 30 unless ($_ =~ /^#/) { 31 ($stage_product,$size_in_gb ) = split /\s+/;31 ($stage_product,$size_in_gb,$count) = split /\s+/; 32 32 ($stage,$product) = split /_/, $stage_product; 33 33 34 34 $size{$stage}{$product} = $size_in_gb; 35 $diskcount{$stage}{$product} = $count; 35 36 $total += $size_in_gb; 36 37 } 37 38 } 38 39 close(S); 40 41 $diskcount{"EXTERNAL"}{"UNKNOWN"} = 1; 39 42 40 43 my $count_file = "neb:///ipp_diskspace/${datestring}/run_im_counts.dat"; … … 92 95 if ($N{$stage}{$product} > 0) { 93 96 $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}; 94 98 } 95 99 # print STDERR ">>$stage $product $state $map{$stage}{$product}{$state} $N{$stage}{$product} $count{$stage}{$state} $size{$stage}{$product} $VpN{$stage}{$state}\n"; … … 156 160 } 157 161 $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}); 160 165 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}); 163 168 } 164 169 } … … 167 172 foreach $l (keys %labels) { 168 173 $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"; 170 176 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"; 172 178 } 173 179 } 174 print STDERR "\tTOTAL \t$sum\ n";180 print STDERR "\tTOTAL \t$sum\t$alt_sum\n"; 175 181 print STDERR "\tEXP_TOT \t$total\n"; 176 182 177 183 if (exists($opt{N})) { 178 print $out_fh "\tTOTAL \t$sum\ n";184 print $out_fh "\tTOTAL \t$sum\t$alt_sum\n"; 179 185 print $out_fh "\tEXP_TOT \t$total\n"; 180 186 close($out_fh); -
trunk/tools/diskspace/nebulous_wiki.pl
r32265 r32622 32 32 $sum{$volume} += $size; 33 33 $sizes{$what} += $size; 34 $counts{$what} += $count; 34 35 } 35 36 close(F); … … 88 89 foreach $w (sort (keys %sizes)) { 89 90 $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"; 91 93 } 92 94 close($out_fh);
Note:
See TracChangeset
for help on using the changeset viewer.
