Hmm, I've been trying to keep the admin tools restricted to only using
the python API which should make them a lot more future proof than
relying on the DB schema (which is changing slightly in 1.7.0). I don't
think the relevant methods exist to get the information that we want
from these SQL queries. I'll see if I can knock something up as a
temporary measure though. I'll also speak to the developers about it.
Cheers,
Greig
Stephen Childs wrote, On 28/01/09 15:53:
> Greig A. Cowan wrote:
>> In fact, this query is better:
>
>> > select cns_db.Cns_file_replica.setname as "Space Token",
>> dpm_db.dpm_space_reserv.u_token as "Token Desc.",
>> cns_db.Cns_file_replica.poolname as "Pool", count(*) as "# Files",
>> sum(cns_db.Cns_file_metadata.filesize/1024/1024/1024) as "Total Size
>> (GB)" from cns_db.Cns_file_replica left join dpm_db.dpm_space_reserv
>> on cns_db.Cns_file_replica.setname = dpm_db.dpm_space_reserv.s_token
>> JOIN cns_db.Cns_file_metadata ON cns_db.Cns_file_replica.fileid =
>> cns_db.Cns_file_metadata.fileid group by
>> cns_db.Cns_file_replica.setname, cns_db.Cns_file_replica.poolname
>> order by dpm_db.dpm_space_reserv.u_token;
>
> There's a candidate for dpm-spacetoken-usage if ever I saw one.
>
> How can I list the files associated with a particular space token (or
> dpm-spacetoken-list-files)?
>
> In case you can't tell, I'm looking forward to the next release of the
> admin tools so I don't have to copy and paste sql commands!
>
> Stephen
>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
|