Charles,
Here is a script that I run. It gives you about the same info and a
little more.
set sqldisplaymode wide
select cast (volumes.stgpool_name as varchar(10)) as TAPE_STORAGE_POOL, -
cast ((select library_name from devclasses where stgpools.devclass =
devclasses.devclass_name ) as varchar(9)) as LIBRARY, -
cast (count(volume_name) as integer) as #_VOLUMES, -
cast (maxscratch as integer) as MAX_VOLUMES, -
cast (sum(volumes.est_capacity_mb)/1024 as integer) as CAPACITY_GB, -
cast (avg(volumes.pct_utilized) as integer) as "%_UTILIZATION" -
from volumes, stgpools -
where volumes.stgpool_name = stgpools.stgpool_name and devclass_name <> 'DISK' and
devclass_name <> 'FILE' -
group by volumes.stgpool_name, maxscratch
This will give you 6 columns of output. The first 2 are obvious, the
third is the number of volumes in use by that storage pool, the fourth
is the max scratch for that pool, the fifth is the estimated capacity
for the volumes that are in use (note this is different than what you
see if you do a q stg), the last field is the average percent
utilization for the tapes in use for that pool.
--
Regards,
Mark D. Rodriguez
President MDR Consulting, Inc.
===============================================================================
MDR Consulting
The very best in Technical Training and Consulting.
IBM Advanced Business Partner
SAIR Linux and GNU Authorized Center for Education
IBM Certified Advanced Technical Expert, CATE
AIX Support and Performance Tuning, RS6000 SP, TSM/ADSM and Linux
Red Hat Certified Engineer, RHCE
===============================================================================
Hart, Charles wrote:
When I run the following slect
SELECT STGPOOLS.STGPOOL_NAME, STGPOOLS.MAXSCRATCH,
Count(STGPOOLS.MAXSCRATCH) as "Allocated_SCRATCH" FROM STGPOOLS
STGPOOLS, VOLUMES VOLUMES WHERE VOLUMES.STGPOOL_NAME =
STGPOOLS.STGPOOL_NAME AND ((STGPOOLS.DEVCLASS='3592TAPE')) GROUP BY
STGPOOLS.STGPOOL_NAME, STGPOOLS.MAXSCRATCH
I get the following out put
Server STGPOOL_NAME MAXSCRATCH
Allocated_SCRATCH
MSPSTG3 TAPE_APP_BACKUP 20 58
MSPSTG3 TAPE_ARCHIVE 40 30
MSPSTG3 TAPE_ARCHIVE_COPY 80 39
MSPSTG3 TAPE_BACKUP_COPY 250 193
MSPSTG3 TAPE_DB_BACKUP 18 18
My question is how do I subtract "Allocated_SCRATCH Col from the
MaxScratch Col so I can see what the Acutal Scratch Remaining is. The
plan is to have this be out put to a txt file that can be picked up by
our monitoring system so we can auto genertae a help desk ticket. I
have searched around (here and the web) and can't seem to find a good
example.
Any insight would be great!!!!!!
|