ADSM-L

Re: Occupancy comparison script

2002-07-23 17:22:59
Subject: Re: Occupancy comparison script
From: "Seay, Paul" <seay_pd AT NAPTHEON DOT COM>
Date: Tue, 23 Jul 2002 17:20:03 -0400
These may also be useful

/* SQL Script:                                                       */
/*                                                                   */
/* backup_volume_last_24hours.sql                                    */
/* Date           Description                                        */
/* 2002-06-10 PDS Created                                            */

/* Create Report of total MBs per each session */

select entity as "Node Name      ", cast(bytes/1024/1024 as decimal(10,3))
as "Total MB  ", substr(cast(start_time as char(26)),1,19) as "Date/Time
" from summary where start_time>=current_timestamp - 1 day and
activity='BACKUP'

/* Create Report of total MBs and length of backup for each node */

select entity as "Node Name      ", cast(sum(bytes/1024/1024) as
decimal(10,3)) as "Total MB", substr(cast(min(start_time) as char(26)),1,19)
as "Date/Time           ", cast(substr(cast(max(end_time)-min(start_time) as
char(20)),3,8) as char(8)) as "Length   " from summary where
start_time>=current_timestamp - 22 hours and activity='BACKUP' group by
entity

/* Create Report of total backed up*/

select sum(cast(bytes/1024/1024/1024 as decimal(6,3))) "Total GB Backup"
from summary where start_time>=current_timestamp - 1 day and
activity='BACKUP'

/* Create Report of Storage Pool Copies */

select entity as "Storage Pool                                           ",
cast(bytes/1024/1024 as decimal(10,3)) as "   Total MB ", ' ' as " ",
substr(cast(start_time as char(26)),1,19) as "Date/Time             ",
cast(substr(cast(end_time-start_time as char(20)),3,8) as char(8)) as
"Length   " from summary where start_time>=current_timestamp - 22 hours and
activity='STGPOOL BACKUP' order by 3, entity

/* Create Summary Report for each Storage Pool */

select entity as "Storage Pool                                           ",
cast(sum(bytes/1024/1024) as decimal(10,3)) as "   Total MB ", ' ' as " ",
substr(cast(min(start_time) as char(26)),1,19) as "Start Date/Time       ",
substr(cast(max(end_time) as char(26)),1,19) as "End Date/Time         "
from summary where start_time>=current_timestamp - 22 hours and
activity='STGPOOL BACKUP' group by entity

/* Create Report of Total Storage Pool GB copied */

select sum(cast(bytes/1024/1024/1024 as decimal(6,3))) "Total STG Pool GB
Backup" from summary where start_time>=current_timestamp - 1 day and
activity='STGPOOL BACKUP'

Paul D. Seay, Jr.
Technical Specialist
Naptheon, INC
757-688-8180


<Prev in Thread] Current Thread [Next in Thread>