VM Report

chad_small

ADSM.ORG Moderator
Joined
Dec 17, 2002
Messages
2,262
Reaction score
52
Points
0
Location
Gilbert, AZ
Website
www.tsmadmin.com
PREDATAR Control23

So in trying to report straight from the TSM DB the status of all our VM's backups I came to the realization that you cannot easily create a backup report of the VM's that Missed their backup. Since the Primary Node runs the schedule any query event just shows the primary and not the VM's it was assigned to backup. A customer of ours wants a consolidated server report that looks like the events report. Problem is you can't easily link the VM's with a specific schedule if they didn't run (if they did run it's in the new SUMMARY_EXTENDED table). So while reading the IBM document on VM reporting they said you could show the VM's that didn't run but looking at their file space name. So I tweeked it to be a more consolidated report. You can change 'Completed' and 'Failed' to whatever you like... GOOD/OLD, CURRENT/STALE or OLD, whatever... You can also change the substring to show the name as it's size by doing (FILESPACE_NAME,9) and by eliminating the second character count TSM/DB2 will return the string no matter how long.

def script VM-STATUS-REPORT desc="Shows the backup status of all the VM servers"
upd script VM-STATUS-REPORT 'select -'
upd script VM-STATUS-REPORT 'substr(FILESPACE_NAME,9,30) as "Virtual Machine", -'
upd script VM-STATUS-REPORT 'date(backup_end) || ' ' || time(backup_end) AS LAST_BACKUP, -'
upd script VM-STATUS-REPORT 'case -'
upd script VM-STATUS-REPORT " when backup_end>=(current_timestamp - 24 hours) then 'Completed' -"
upd script VM-STATUS-REPORT " else 'Failed' -"
upd script VM-STATUS-REPORT 'end -'
upd script VM-STATUS-REPORT ' as BACKUP_STATUS -'
upd script VM-STATUS-REPORT 'from FILESPACES -'
upd script VM-STATUS-REPORT 'where -'
upd script VM-STATUS-REPORT "filespace_name like '%VMFULL%' -"
upd script VM-STATUS-REPORT 'order by backup_end asc'


Let me know what you think? If you have something more like the standard Q EVE I'd be interested but remember it would have to show is the VM's missed their backup not just COMPLETED/FAILED.
 
PREDATAR Control23

I use these for VM reporting...
VM Failures (Change Data Mover Node Name)
select SUB_ENTITY as "Failed Virtual Machines" from summary_extended where entity like 'DATAMOVER_NODE' and START_TIME>=CURRENT_TIMESTAMP - 24 hours and FAILED<>'0'

VM Summary (Change Data Move Node Name) *Note ñ some of the output can be a little wacky, but most of its reliable.
select cast(SUB_ENTITY as char(40)) as "VM Name", cast(SCHEDULE_NAME as char(40)) as "Schedule", cast(sum(BYTES)/1024/1024 as decimal(10,0)) as "Total_MB" from summary_extended where entity like 'DATAMOVER_NODE' and start_time>current_timestamp - 24 hours group by sub_entity,schedule_name
 
Top