Wednesday, August 6, 2014

How much data did a TSM node transfer in the last xx days ?

Some TSM clients like DB2, Oracle and SAP control their retention period from the client side, and TSM server copy groups have no impact on the data expiration. In this cases there is a good idea to see how much data a node has transferred in the past xx days to compare to what is understood to be the retention period. 

How much GB worth of backup did a node transfer in the past 30 days:
SELECT cast(ENTITY as char(20)) as "Server",sum(cast(float(BYTES/1024/1024/1024) as dec(8))) as "GB" FROM summary WHERE activity='BACKUP' AND entity ='NODE_NAME' and end_time>current_timestamp-30 days group by ENTITY

How much GB worth of archive did a node transfer in the past 30 days:
SELECT cast(ENTITY as char(20)) as "Server",sum(cast(float(BYTES/1024/1024/1024) as dec(8))) as "GB" FROM summary WHERE activity='ARCHIVE' AND entity ='NODE_NAME' and end_time>current_timestamp-30 days group by ENTITY

Replace NODE_NAME with your actual node. You can also use "entity like '%%NODE_SUBSTRING%%'  " if you require the report for multiple nodes that have similar extension. For example for all the nodes that have DB2 in the name, the select will look like:

SELECT cast(ENTITY as char(20)) as "Server",sum(cast(float(BYTES/1024/1024/1024) as dec(8))) as "GB" FROM summary WHERE activity='BACKUP' AND entity like '%%DB2%%' and end_time>current_timestamp-30 days group by ENTITY

This should answer questions like:
How much data did my DB2 nodes transfer in the past 30 days?
How much data did my Oracle nodes transfer in the past 30 days ? 
How much data did my node transfer in the past 30 days ?
How much backed up data my node transferred in the past xx days? 

No comments:

Post a Comment