You will need something like:
select hl_name,count(ll_name) from backups where node_name='JUPITER' and
filespace_id=3 group by hl_name
The "group by" clause triggers the desired counting by directory.
You might be able to use something like "filespace_name='\\jupiter\e$'" as an
alternative to the "filespace_id" test; I am not sure whether you would have
problems with Unicode characters or not.
Depending on your exact goal, you might need to add "state='ACTIVE_VERSION'" to
the selection criteria. If you omit this condition, the counts will include
copies of recently deleted files and copies of older versions of recently
updated files.
Thomas Denier,
Thomas Jefferson University
-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Lee, Gary
Sent: Thursday, November 16, 2017 10:18
To: ADSM-L AT VM.MARIST DOT EDU
Subject: [ADSM-L] counting files in directories for a node
Tsm server 7.1.7.100
I have a request to count the number of files in each directory on the e: drive
for a node.
For output, path name, and file count.
Any pointers on where to start?
I can do it given a specific path,
Select count(*) from backups where node_name=bla and hl_name=bla and type='FILE'
How to extend this to all dirs. In a filespace?
Thanks for the help.
The information contained in this transmission contains privileged and
confidential information. It is intended only for the use of the person named
above. If you are not the intended recipient, you are hereby notified that any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact the
sender by reply email and destroy all copies of the original message.
CAUTION: Intended recipients should NOT use email communication for emergent or
urgent health care matters.
|