Okay, I've had look at the scripts in the information system setup, and it looks as though we're not using srm-storage-element-info. Instead our lcg-dynamic-dcache script is this perl script:
#!/usr/bin/perl -w
use strict ;
use File::Basename ;
my $used = '/var/lib/edginfo/used-space.dat' ;
my $total = '/var/lib/edginfo/available-space.dat' ;
my %space ;
open(USED,$used) or die "Could not open $used: $!\n" ;
while(<USED>) {
if (/^(\d+)\s+(\S+)\s*/) {
my $kb = $1 ;
my $path = &basename($2) ;
$space{$path}{'used'} = $kb ;
}
}
close(USED) ;
open(TOTAL,$total) or die "Could not open $total: $!\n" ;
while(<TOTAL>) {
if (/^(\d+)\s+(\S+)\s*/) {
my $kb = $1 ;
my $path = &basename($2) ;
$space{$path}{'total'} = $kb ;
}
}
foreach( qw/cms dteam atlas lhcb/ ){
print "dn: GlueSARoot=$_:/pnfs/gridpp.rl.ac.uk/data/$_,GlueSEUniqueID=dcache.gridpp.rl.ac.uk,Mds-Vo-name=local,o=grid\n" ;
print "GlueSAStateAvailableSpace: ".$space{$_}{'total'}."\n" ;
print "GlueSAStateUsedSpace: ".$space{$_}{'used'}."\n\n" ;
}
We also have a cron job in /etc/cron.d/:
50 3 * * * edginfo /usr/bin/du -s /pnfs/gridpp.rl.ac.uk/data/* > /var/lib/edginfo/used-space.dat
And the /var/lib/edginfo/available-space.dat is a file consisting of
14252613123 /pnfs/gridpp.rl.ac.uk/data/atlas
14252613123 /pnfs/gridpp.rl.ac.uk/data/cms
14252613123 /pnfs/gridpp.rl.ac.uk/data/dteam
14252613123 /pnfs/gridpp.rl.ac.uk/data/lhcb
Derek
|