- Timestamp:
- Nov 8, 2011, 2:44:12 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110906
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tools/diskspace/nebulous_data.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110906
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20110906/tools/diskspace/nebulous_data.pl
r32265 r32630 61 61 my $neb_dir = "/data/${neb}/nebulous/"; 62 62 63 my $total_volume = 0; 64 my $used_volume = 0; 65 open(DF,"df -B 1 /export/${neb}/ |") || die "Cannot run df\n"; 66 while(<DF>) { 67 chomp; 68 if ($_ =~ /${neb}/) { 69 $used_volume = (split /\s+/, $_)[2]; 70 } 71 } 72 close(DF); 73 63 74 open(FIND,"find $neb_dir -type f -printf \"%f %s\n\" |") || die "Cannot run find.\n"; 75 76 64 77 while (<FIND>) { 65 78 chomp; … … 88 101 $count{$stage}{$product} += 1; 89 102 $volume{$stage}{$product} += $size; 103 $total_volume += $size; 90 104 } 91 105 close(FIND); 106 92 107 93 108 … … 98 113 } 99 114 } 100 115 if ($used_volume > 0) { 116 my $external_volume = $used_volume - $total_volume; 117 print $out_fh "EXTERNAL UNKNOWN 1 $external_volume\n"; 118 } 101 119 close($out_fh); 102 120
Note:
See TracChangeset
for help on using the changeset viewer.
