Index: trunk/tools/stsci_disks/p0_large.pl
===================================================================
--- trunk/tools/stsci_disks/p0_large.pl	(revision 38647)
+++ trunk/tools/stsci_disks/p0_large.pl	(revision 38682)
@@ -76,5 +76,5 @@
 
 my $time = time();
-my $logDest = "neb://any/stsci_shuffle/large/${host}.${volume}/${dir}.log.${time}";
+my $logDest = "neb://any/stsci_shuffle/sizes/${host}.${volume}/${dir}.log";
 my $ipprc = PS::IPP::Config->new( "GPC1" ) or die "Could not create config object.\n";
 $ipprc->redirect_output($logDest) or die "Could not redirect output to logfile ${logDest}\n";
@@ -104,4 +104,7 @@
 my $root = "/data/${host}.${volume}/nebulous/${dir}";
 my @subdirectories = <$root/*>;
+my $size = 0;
+my $limit = 10 * 1024 * 1024; # stat returns bytes, so 100 * meg * k 
+my ($size_ota,$size_pv1,$size_pv2,$size_md) = (0,0,0,0);
 foreach my $subdir (@subdirectories) {
     my @files = <${subdir}/*>;
@@ -110,46 +113,60 @@
 	
 	my @stat = stat($f);
-	my $limit = 10 * 1024 * 1024; # stat returns bytes, so 100 * meg * k 
+	$size += $stat[7];
 #	print "$f $stat[7]\n"; die;
-	if ($stat[7] > $limit) {
-	    my $ins_id = $f;
-	    $ins_id =~ s/^$subdir\///;
-	    $ins_id =~ s/\..*//;
+	if ($f =~ /ota/) { $size_ota += $stat[7]; }
+	if ($f =~ /LAP.ThreePi.20120706/) { $size_pv1 += $stat[7]; }
+	if ($f =~ /LAP.ThreePi.20130717/) { $size_pv2 += $stat[7]; }
+	if ($f =~ /MD/) { $size_md += $stat[7]; }
 
-	    my $key = $f;
-	    $key =~  s/.*\/${ins_id}\.//;
-	    $key =~  s%:%/%g;
+
+# 	if ($stat[7] > $limit) {
+# 	    if (0) {
+# 		my $ins_id = $f;
+# 		$ins_id =~ s/^$subdir\///;
+# 		$ins_id =~ s/\..*//;
 		
-	    my $uris = $neb->find_instances($key);
-	    my $found = 0;
-	    foreach my $uri (@{ $uris }) {
-		if ($uri eq "file://${f}") {
-		    $found = 1;
-		}
-	    }
-	    if ($#{ $uris } == -1) { # true orphan
-		if ($key =~ /ecliptic/) {
-		    $key =~ s%/00hr%:00hr%;
-		    $neb->replicate($key);
-		    print "#replicate $key\n";
-		}
-		$found = -1;
-	    }
-	    print "$f $stat[7] $key $found\n";
-	    if ($found == 0) {
-#		print "rm $f\n";
-		unlink($f);
-		foreach my $rsync (@rsync_vols) {
-		    my $test_f = $f;
-		    $test_f =~ s%^/data/%%;
-		    $test_f = "/data/${rsync}/stsci_shuffle/${test_f}";
-		    if (-e $test_f) {
-			unlink($f);
-#			print "rm $test_f\n";
-		    }
-		}
-	    }
-	}
+# 		my $key = $f;
+# 		$key =~  s/.*\/${ins_id}\.//;
+# 		$key =~  s%:%/%g;
+		
+# 		my $uris = $neb->find_instances($key);
+# 		my $found = 0;
+# 		foreach my $uri (@{ $uris }) {
+# 		    if ($uri eq "file://${f}") {
+# 			$found = 1;
+# 		    }
+# 		}
+# 		if ($#{ $uris } == -1) { # true orphan
+# 		    if ($key =~ /ecliptic/) {
+# 			$key =~ s%/00hr%:00hr%;
+# 			$neb->replicate($key);
+# 			print "#replicate $key\n";
+# 		    }
+# 		    $found = -1;
+# 		}
+# 		print "$f $stat[7] $key $found\n";
+# 		if ($found == 0) {
+# #		print "rm $f\n";
+# 		    unlink($f);
+# 		    foreach my $rsync (@rsync_vols) {
+# 			my $test_f = $f;
+# 			$test_f =~ s%^/data/%%;
+# 			$test_f = "/data/${rsync}/stsci_shuffle/${test_f}";
+# 			if (-e $test_f) {
+# 			    unlink($f);
+# #			print "rm $test_f\n";
+# 			}
+# 		    }
+# 		}
+# 	    }
+# 	}
     }
-#    print STDERR "$subdir\n";
 }
+my $Msize = $size / 1024 / 1024;
+print "$root $size $Msize\n";
+print "OTA $size_ota\n";
+print "PV1 $size_pv1\n";
+print "PV2 $size_pv2\n";
+print "MD $size_md\n";
+
