ADSM-L

Re: [ADSM-L] Sql query help

2010-04-06 15:53:57
Subject: Re: [ADSM-L] Sql query help
From: "Lee, Gary D." <GLEE AT BSU DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 6 Apr 2010 15:52:06 -0400
Thanks Shawn.  That did it.  Don't know how I missed that field.
 


Gary Lee
Senior System Programmer
Ball State University
phone: 765-285-1310

 
-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Shawn Drew
Sent: Tuesday, April 06, 2010 3:18 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] Sql query help

There is a field in the stgpools table that shows how many tapes are used,
so I don't think you need a join.

select MAXSCRATCH, NUMSCRATCHUSED from stgpools


The way I monitor maxscratch is with this:

select STGPOOL_NAME, MAXSCRATCH, NUMSCRATCHUSED from stgpools where
MAXSCRATCH is not null and (MAXSCRATCH - NUMSCRATCHUSED)<10

If that command returns succesfully, then the Storage Pool will accept
less than 10 new scratch tapes.  (the "not null" is to exclude Random
pools)


Regards,
Shawn
________________________________________________
Shawn Drew





Internet
GLEE AT BSU DOT EDU

Sent by: ADSM-L AT VM.MARIST DOT EDU
04/06/2010 03:10 PM
Please respond to
ADSM-L AT VM.MARIST DOT EDU


To
ADSM-L
cc

Subject
[ADSM-L] Sql query help






Tsm server 5.5.4 running on suse 9 linux under zvm 5.3.

Trying to create a query which will give me the count of volumes in a
storage pool, and its maxscratch setting on a single line.
Nice to watch for filling pools which need a larger maxscratch value.
Query follows:

---------------

 select a.stgpool_name as "Storage Pool Name", -
        a.devclass as "Device Class Name", -
        count( b.volume_name) as "  # VOLUMES", -
                 a.maxscratch as "volumes available" -
        from stgpools a, volumes b -
                 where a.devclass <>'DISK'  -
and a.devclass = b.devclass_name -
        group by a.stgpool_name, a.devclass

--------- query ends. ------------

Thanks for any help.



Gary Lee
Senior System Programmer
Ball State University
phone: 765-285-1310




This message and any attachments (the "message") is intended solely for
the addressees and is confidential. If you receive this message in error,
please delete it and immediately notify the sender. Any use not in accord
with its purpose, any dissemination or disclosure, either whole or partial,
is prohibited except formal approval. The internet can not guarantee the
integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will)
not therefore be liable for the message if modified. Please note that certain
functions and services for BNP Paribas may be performed by BNP Paribas RCC, Inc.

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