ADSM-L

Re: Script check requested.

2006-10-27 10:25:07
Subject: Re: Script check requested.
From: Ben Bullock <bbullock AT MICRON DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 27 Oct 2006 08:23:32 -0600
        I see where the issue is....

        The summary table has the MIGRATION statistics also, so if all
my data is going to disk and then moving to tape, I will count the data
twice. Once I exclude the MIGRATIONS it looks much more realistic as to
what is coming from the clients.
        
        select cast((cast(sum(summary.bytes) as float) / 1024 / 1024
/1024) as decimal(10,2)) as Gigabytes from               summary where
start_time >current_timestamp - 1 day and activity not like 'MIGRATION'

Ben

        
-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Andrew Raibeck
Sent: Thursday, October 26, 2006 4:31 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: Script check requested.

Off the top of my head, I don't see anything inherently wrong with the
script (syntax-wise).

However, if you are going after just backup or archive info, then you
are gboing to pick up a lot more than that. Try adding a WHERE clause
like
this:

   ... where activity in ('ARCHIVE', 'BACKUP')

Or if you want to split them out, add the ACTIVITY column to the SELECT
output, and add this after the WHERE clause:

   ... group by activity

Thus:

select activity, \
       cast((cast(sum(bytes) as double) / 1024 / 1024 /1024) as
decimal(10,2)) as "Gigabytes" \
   from summary \
   where activity in ('ARCHIVE', 'BACKUP') and \
         start_time>current_timestamp - 1 day \
   group by activity

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development Internal Notes e-mail: Andrew
Raibeck/Tucson/IBM@IBMUS Internet e-mail: storman AT us.ibm DOT com

IBM Tivoli Storage Manager support web page:
http://www.ibm.com/software/sysmgmt/products/support/IBMTivoliStorageMan
ager.html

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.

"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 10/26/2006
03:08:02 PM:

>    Folks,
>    I have a script I have run forever to see how much data has been 
> backed-up/archived to my TSM servers over the last 24 hours.
>
>    Lately, this command is returning a number that seems to be too 
> high, compared to what I see the clients doing.
>
>
> select cast((cast(sum(summary.bytes) as float) / 1024 / 1024 /1024)
>                                  as decimal(10,2)) as Gigabytes from 
> summary where start_time
>                                  >current_timestamp - 1 day
>
>
>    I recently upgraded my TSM servers from 5.2 to 5.3 and was 
> wondering if that had anything to do with it.
>
>    This SQL statement looks OK to me. Can anyone point out any 
> problems with that select statement?
>
> Thanks,
> Ben

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