ADSM-L

Re: SQL select statement to find volumes for each client

2002-08-08 03:41:06
Subject: Re: SQL select statement to find volumes for each client
From: "Ilja G. Coolen" <ilja.coolen AT ABP DOT NL>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Thu, 8 Aug 2002 09:40:59 +0200
Joni,

As a happy 3590 user i am wondering why you would want to convert from 3590
to a different type.
If you want reliability, don't convert to LTO. StorageTek's 9840 should also
be fine though.
Take a look at the specs for the drives, but mostly for the tapes, and
compare them. Then decide which is your prefered media. The LTO's lifecycles
are much shorter then 3950 and 9840.


If you would like to know how much tapes you need, it would be easier to
gather the total amount of data from the auditocc table. With this
information you should be able to do an fairly accurate capacity sizing for
your tapes.
Run the audit lic process to update the auditocc values to their current
values, than run this script:

<<< copy from here >>>>
def script totocd desc='run totocd'
upd script totocd '/* -------------------------------------------*/'
upd script totocd '/* Script Name: totocd                        */'
upd script totocd '/* Parameter:   none                          */'
upd script totocd '/* Author:      ilja.coolen AT abp DOT nl            */'
upd script totocd '/* Example:     run totocd                    */'
upd script totocd '/* RUN AUDIT LIC FIRST TO GET AN ACC. RESULT  */'
upd script totocd '/* -------------------------------------------*/'
upd script totocd 'select sum(num_files) as "File Count" from occupancy'
upd script totocd 'select -'
upd script totocd 'cast(sum(backup_mb/1024) as decimal(5,1)) as "Backup
(GB)", -'
upd script totocd 'cast(sum(backup_copy_mb/1024) as decimal(5,1)) as
"BackupCp (GB)", -'
upd script totocd 'cast(sum(archive_mb/1024) as decimal(5,1)) as "Archive
(GB)", -'
upd script totocd 'cast(sum(archive_copy_mb/1024) as decimal(5,1)) as
"ArchCp (GB)", -'
upd script totocd 'cast(sum(total_mb/1024) as decimal(5,1)) as "Total (GB)"
-'
upd script totocd 'from auditocc'
<<< copy to here >>>>
<<< Paste into your command line admin console >>>
Run the query like this -> TSMServer:tsm>run totocd




For the SQL statement, you should have collocation set to yes for the
storage pools. Otherwise the chance that a node is the only resident of a
tape volume will be very very very small. Then it will be hard to determine
the real tape usage per node.
If you have collocation set to yes, try this script:

<<< copy from here >>>>
def script vols-node desc='run vols-node nodename'
upd script vols-node '/*  -------------------------------------------*/'
upd script vols-node '/*  Script Name: vols-node                     */'
upd script vols-node '/*  Description: List volumes per node         */'
upd script vols-node '/*  Parameter:   nodename                      */'
upd script vols-node '/*  Author:      ilja.coolen AT abp DOT nl            */'
upd script vols-node '/*  Example:  run vols-node myUnixBox          */'
upd script vols-node '/*  !!! WARNING !!! RESOURCE INTENSIVE !!!     */'
upd script vols-node '/*  -------------------------------------------*/'
upd script vols-node 'select volumes.volume_name as "Volume",-'
upd script vols-node 'volumes.stgpool_name as "StgPool",-'
upd script vols-node 'volumes.est_capacity_mb as "Cap.(MB)",-'
upd script vols-node 'volumes.pct_utilized as "Utlzd(%)",-'
upd script vols-node 'volumes.status as "Status",-'
upd script vols-node 'volumeusage.filespace_name as "Filespace" -'
upd script vols-node 'from volumes,volumeusage -'
upd script vols-node 'where volumes.volume_name=volumeusage.volume_name and
-'
upd script vols-node "volumeusage.node_name=upper('$1')"
<<< copy to here >>>>
<<< Paste into your command line admin console >>>


run it from your administrator console with a desired nodename as first and
only input.
Like this -> TSMServer:tsm>run vols-node myLinuxBox

BEWARE: This one is very resource intensive. On a AIX-H80 (50 GB TSM
database, 2x600Mhz CPU and 4GB memory) this takes like 5 minutes to compute.
For me, this not very workable.
Let me know is this works out for you.

This is a sample result from the second script.
tsm: ABPTSM1>run vols-node sunsv006



Volume                 StgPool                            Cap.(MB)
Utlzd(%)     Status                 Filespace
------------------     ------------------     --------------------
--------     ------------------     ------------------
600534                 TPN                                 46080.0
7.1     FILLING                /
600534                 TPN                                 46080.0
7.1     FILLING                /
600534                 TPN                                 46080.0
7.1     FILLING                /home
600534                 TPN                                 46080.0
7.1     FILLING                /opt
600534                 TPN                                 46080.0
7.1     FILLING                /tmp
600534                 TPN                                 46080.0
7.1     FILLING                /usr
600534                 TPN                                 46080.0
7.1     FILLING                /var
ANR1462I RUN: Command script VOLS-NODE completed successfully.






i think i'll stop here.

Ilja G. Coolen


ABP / USZO
CIS / BS / TB / Storage Management

Telefoon : +31(0)45  579 7938
Fax      : +31(0)45  579 3990
Email    : ilja.coolen AT abp DOT nl
Mailbox  : Centrale Mailbox - BS Storage (eumbx05)
Intranet : Storage Web
<http://intranet/cis_bstb/html_content/sm/index_sm.htm>



- Everybody has a photographic memory, some just don't have film. -

-----Oorspronkelijk bericht-----
Van: Joni Moyer [mailto:joni.moyer AT HIGHMARK DOT COM]
Verzonden: woensdag 7 augustus 2002 13:30
Aan: ADSM-L AT VM.MARIST DOT EDU
Onderwerp: SQL select statement to find volumes for each client


Hi!

I don't know much about SQL select statements and I was wondering if anyone
would happen to know a command that would find out the volumes that belong
to that client, how many total and the percent utilized of the tape?  I'm
trying to get an idea of how many tapes I will need when I convert from
3590 magstars to 9840's or LTO.  Thanks in advance!!!!

Joni Moyer
Associate Systems Programmer
joni.moyer AT highmark DOT com
(717)975-8338

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