Re: Calculating MaxScratch vs Allocate Volume
2005-04-22 12:25:04
This works for me:
select stgpools.stgpool_name,stgpools.maxscra-
tch, count(*) as "Num Volumes" from stgpools,
volumes where stgpools.stgpool_name=volumes.s-
tgpool_name and devclass='TAPE' group by
stgpools.stgpool_name,stgpools.maxscratch
order by stgpools.stgpool_name
At 10:57 AM 4/22/2005 -0500, you 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!!!!!!
Fred Johanson
ITSM Administrator
University of Chicago
773-702-8464
|
|
|