Count files on volume

Rigido

ADSM.ORG Senior Member
Joined
Apr 21, 2006
Messages
151
Reaction score
7
Points
0
Location
Rome, Italy
Hi,
I wrote a little select to find no-readwrite volumes:
Code:
select -
rpad (VOLUME_NAME,15) as VOLUME_NAME, -
rpad (STGPOOL_NAME,25) as STGPOOL_NAME, -
rpad (ACCESS,15) as ACCESS, -
PCT_UTILIZED, -
PCT_RECLAIM -
from VOLUMES -
where ACCESS<>'READWRITE' and ACCESS<>'OFFSITE'
So we can update volume to readonly and try a move data.
The problem is with big volumes (like LTO6): volume was utilized 0.0 but move data moved more than 1 million files for 900MB...and still going.
I would like to add a column with the number of files for each volume, but can't find a select to count files!
Can someone help me?

Thanks.
 
Not sure how you would incorporate it to your query, but you can get the number of files from the contents table:
Code:
select volume_ncount(object_id) from contents group by volume_name
Code:
select count(object_id) from contents where volume_name='123456L6'
 
A good TSM administror should always have a "Tables and Columns quick-reference" on his/her side :rolleyes:
It looks like it is an heavy select, better write a script to count files on a single (given) volume...

Thank you marclant.
 
These 2 might come in handy to get table and column names:

Code:
select tabname from tables

select * from columns where tabname='TABLE'
 
Back
Top