/[pdpsoft]/trunk/nl.nikhef.ndpf.tools/ndpf-dpm-tools/bin/dpm-disk-consistency
ViewVC logotype

Diff of /trunk/nl.nikhef.ndpf.tools/ndpf-dpm-tools/bin/dpm-disk-consistency

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1810 by ronalds, Tue Jun 22 11:47:12 2010 UTC revision 2478 by ronalds, Tue Jan 10 10:37:00 2012 UTC
# Line 136  sub get_db_replicas { Line 136  sub get_db_replicas {
136          # ($verbose > 0) and print LOG "Executing $cmd\n";          # ($verbose > 0) and print LOG "Executing $cmd\n";
137    
138          my $sql = "SELECT sfn FROM Cns_file_replica WHERE "          my $sql = "SELECT sfn FROM Cns_file_replica WHERE "
139                    . "status <> 'D' AND "
140                  . "host=" . &sql_quote($server) . " AND fs=" . &sql_quote($filesystem);                  . "host=" . &sql_quote($server) . " AND fs=" . &sql_quote($filesystem);
141          my @results = &sql_query($sql);          my @results = &sql_query($sql);
142          foreach my $row (@results) {          foreach my $row (@results) {
# Line 147  sub get_db_replicas { Line 148  sub get_db_replicas {
148          }          }
149      }      }
150    
     ## # parse the file holding the replicas registered in the DB  
     ## open DB, $dbfile or die "Failed to open $dbfile: $!\n";  
     ## while ( my $line = <DB> ) {  
         ## if ( $line =~ /^Replica: ([\w_\.-]+):(.*) \d+$/ ) {  
             ## my $replica = $2;  
             ## $replica =~ s!^$filesystem[/]*!!;  
             ## ($verbose > 2) and print LOG "$replica\n";  
             ## $$ref{$replica} |= $REPLICA_IN_DB;  
             ## $count{db}++;  
         ## }  
         ## elsif ( $line =~ /Found (\d+) replica/ ) {  
             ## ($verbose > 1) and print LOG "There are $1 replicas in the DB\n";  
         ## }  
     ## }  
     ## close DB;  
   
151      ($verbose > 0) and print LOG "Found $count{db} replicas in the database under $filesystem\n";      ($verbose > 0) and print LOG "Found $count{db} replicas in the database under $filesystem\n";
152  }  }
153    

Legend:
Removed from v.1810  
changed lines
  Added in v.2478

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28