Number of tape per node

chris_magic

ADSM.ORG Member
Joined
May 17, 2007
Messages
178
Reaction score
0
Points
0
Location
Quebec, Qc, Canada
Hi,

I wish to have a script that allows me to know the number of tape used by a specific node from a storage pool specific.

Thanks in advance for your help.
 
select distinct(volume_name) from volumeusage where node_name='NODENAME' and stgpool_name='STGPOOLNAME'
 
It should work ...This is the output from one of the tsm servers which we are handling.Please try once again

tsm: *****>select distinct(volume_name) from volumeusage where node_name='VAL89709' and stgpool_name='WIN_PRI'

VOLUME_NAME
------------------
TN40756
TN41120
 
tsm : *********>select distinct(volume_name) from volumeusage where node_name='DMZ00DMZQC00055' and stgpool_name='lto3_pool'
ANR2034E SELECT: No match found using this criteria.
ANS8001I Code de retour 11.

OR

tsm : TCN00QUBC00076>Select distinct node_name,volume_name,stgpool_name from volumeusage where node_name='DMZ00DMZQC00055' and stgpool_name='LTO3_POOL'

HTML:
NODE_NAME              VOLUME_NAME            STGPOOL_NAME
------------------     ------------------     ------------------
DMZ00DMZQC00055        300011                 LTO3_POOL
DMZ00DMZQC00055        300016                 LTO3_POOL
DMZ00DMZQC00055        300021                 LTO3_POOL
DMZ00DMZQC00055        300028                 LTO3_POOL
DMZ00DMZQC00055        300038                 LTO3_POOL

I would like a script that makes me the total number of tapes.
 
The solution:

select count(distinct volume_name) as "Number of tapes" FROM volumeusage where stgpool_name='STGPOOL_NAME' and node_name='NODE_NAME'

or

select stgpool_name, count(distinct volume_name) as "Number of tapes" FROM volumeusage where node_name='NODE_NAME' GROUP BY stgpool_name
 
Last edited:
Back
Top