ADSM-L

Re: [ADSM-L] yasq (yet another SQL question)

2008-06-03 13:37:53
Subject: Re: [ADSM-L] yasq (yet another SQL question)
From: Richard Rhodes <rrhodes AT FIRSTENERGYCORP DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 3 Jun 2008 13:36:22 -0400
I got my numbers via a sql cmd and a ksh script.
It was kind of fun.

I've been looking at sqllite.  Do you know of any place to get precompiled
binaries for AIX?

Thanks

Rick


(my hack to get a guestimate on compression rations for full volumes)
(assumes tapes are 60gb, which is what our 3494 lib has)

#!/usr/bin/ksh93
#set -xv

# This script attempts to calculate the compression ratio for tapes.
#
# It's NOT really meant to be run asis, but to have it modified
# to your desires.
# For example, it assumes all 3494/3590 tapes are assumed to be 50gb
# and all 3584/3592 tapes are assumed to be 600gb.

typeset -A ratiotbl

for i in tsm1 tsm2 tsm3 tsm4
do
  # get volume list for 3494 lib (3590 drives)
  # CHANGE the cast to reflect your computation for the comp ratio
  # most of the colums returned aren't used - they helped with debugging
  dsmadmc -se=${i} -id=xxxx -password=yyyy -noc -tab -dataonly=yes <<EOD
    select 'xxxxxxxx', -
           volume_name, -
           '${i}', -
           stgpool_name, -
           devclass_name, -
           status, -
           est_capacity_mb, -
           cast((est_capacity_mb / 600 / 100) as decimal(3,1)) as
comp_ratio -
      from volumes -
      where status = 'FULL' -
        and ( devclass_name like '%3494%' or devclass_name like '%3590%' )
EOD
done \
  | grep "^xxxxxxxx" \
  | awk '{print $2, " ", $3, " ", $4, " ", $5, " ", $6, " ", $7 , " ", $8}'
\
  | while read Ivol Itsm Istgpool Idevclass Istatus Iestcap Icompratio
     do
         (( ratiotbl[$Icompratio] = ${ratiotbl[$Icompratio]} + 1 ))
     done

for i in ${!ratiotbl[@]}
 do
     print $i  ${ratiotbl[$i]}
 done \
  | sort -k1,1n









             "Allen S. Rout"
             <asr AT UFL DOT EDU>
             Sent by: "ADSM:                                            To
             Dist Stor                 ADSM-L AT VM.MARIST DOT EDU
             Manager"                                                   cc
             <[email protected]
             .EDU>                                                 Subject
                                       Re: yasq (yet another SQL question)

             06/03/2008 10:39
             AM


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






>> On Mon, 2 Jun 2008 14:58:06 -0400, Richard Rhodes
<rrhodes AT FIRSTENERGYCORP DOT COM> said:

>> I am thinking that you'll need to just get the raw columnar data for
each
>> volume record, then feed it into another program

> That's what I was beginning to think, and where I'll head.


Permit me to recommend 'sqlite'.  Free, easy, straightforward,
lightweight.

It's my favorite storage place for the columns IBM left out of TSM
tables.

- Allen S. Rout



-----------------------------------------
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.