dmwm / DMWMMON

1 stars 8 forks source link

chimera-dump.py does not work with dCache 2.15 #26

Closed martbhell closed 4 years ago

martbhell commented 8 years ago

The database schemas in dCache changed some work is needed to make it work again.

$ python chimera-dump.py -d -c cmsdump
No pgdb module found, might help to install postgresql-python
 Will try psycopg
select t_dirs.ipnfsid,iname,iparent,isize,date_part('epoch', date_trunc('seconds', t_inodes.iatime)),isum from t_inodes,t_dirs,t_inodes_checksum where t_inodes.itype = '32768' and t_dirs.ipnfsid <> '000000000000000000000000000000000000' and t_dirs.ipnfsid = t_inodes.ipnfsid and t_dirs.ipnfsid = t_inodes_checksum.ipnfsid
   started at:             (2016, 5, 18, 15, 24, 36)
Traceback (most recent call last):
  File "chimera-dump.py", line 171, in 
    flist=getresult(con,cmd)
  File "chimera-dump.py", line 94, in getresult
    cur.execute(cmd)
psycopg2.ProgrammingError: column t_dirs.ipnfsid does not exist
LINE 1: select t_dirs.ipnfsid,iname,iparent,isize,date_part('epoch',...

https://github.com/dmwm/DMWMMON/tree/master/SiteInfoProviders/DCache/tools/chimeraDump

Here is a proposed update using SQL join to a similar script used by some another VO:

https://gitlab.cern.ch/atlas-adc-ddm-support/dark_data/merge_requests/6/diffs