ADSM-L

Re: [ADSM-L] Select statement to output backup & archive summary per domain

2008-12-30 08:29:25
Subject: Re: [ADSM-L] Select statement to output backup & archive summary per domain
From: Joni Moyer <joni.moyer AT HIGHMARK DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 30 Dec 2008 08:28:01 -0500
Hi Richard,

That worked great!  Thank you so much for sharing that with me!

********************************
Joni Moyer
Highmark
Storage Systems, Storage Mngt Analyst III
Phone Number: (717)302-9966
Fax: (717) 302-9826
joni.moyer AT highmark DOT com
********************************



"Richard Rhodes" <rrhodes AT FIRSTENERGYCORP DOT COM>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
12/30/2008 07:20 AM
Please respond to
"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>


To
ADSM-L AT VM.MARIST DOT EDU
cc

Subject
Re: Select statement to output backup & archive summary per domain






Here is what I use for this info . . . from our morning_report.ksh
scripts.


function r184 {
  Title="r184 backup objects and bytes per domain "
  PrintTitle

  # objects and MB for each domain over the last 24 hr

  # NOTE:  This is some overlap given the "< 25" hour period, but
  #         that's necessary since you don't know exactly when this
  #         function will run.

  dsmadmc -se=$tsm -id=$adminid -password=$adminpwd
-outfile=/tmp/tsmtmp/${tsm}/morning_report1$$ -tab -quiet -noc  <<EOD
    select domain_name as "DOMAIN", -
           cast(sum(affected) as decimal(9,0)) as "OBJECTS", -
           cast(sum(bytes)/1024/1024 as decimal(9,0)) as "MB" -
      from summary, nodes -
      where -
             node_name = entity -
         and (activity = 'BACKUP' or activity = 'ARCHIVE') -
         and cast((current_timestamp - end_time)hours  as decimal(5,0)) <
25 -
      group by domain_name -
      order by domain_name
EOD

  print "sum of sessions per domain that ENDED over the past 24 hours"
  print " "
  print "DOMAIN   OBJECTS   MB"
  print " "

  cat /tmp/tsmtmp/${tsm}/morning_report1$$   | awk "{print \$0, \"
${stamp}\"}"

}






             Joni Moyer
             <joni.moyer@HIGHM
             ARK.COM>                                                   To
             Sent by: "ADSM:           ADSM-L AT VM.MARIST DOT EDU
             Dist Stor                                                  cc
             Manager"
             <[email protected]                                     Subject
             .EDU>                     Select statement to output backup &
                                       archive summary per domain

             12/29/2008 03:51
             PM


             Please respond to
             "ADSM: Dist Stor
                 Manager"
             <[email protected]
                   .EDU>






Hi Everyone,

I am trying to figure out how to configure a script that will output the
total GB backed up and total GB archived per domain within a 24 hour time
period.  I already have something similar, but it totals all of the data
together and I would like to break it down more by the domain the server
belongs to.

Here are my current select statements.

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

select sum(cast(bytes/1024/1024/1024 as decimal(8,2))) "Total GB Archived"
from summary where start_time>=current_timestamp - 1 day and
activity='ARCHIVE'

Does anyone have any suggestions?  I would really appreciate the help.
Thanks in advance!

********************************
Joni Moyer
Highmark
Storage Systems, Storage Mngt Analyst III
Phone Number: (717)302-9966
Fax: (717) 302-9826
joni.moyer AT highmark DOT com
********************************


-----------------------------------------
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.

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