ADSM-L

(another select statement example..against drmedia table and the libvolumes table.) Re: Command for finding...tape counts across storage pools

2000-05-09 15:03:51
Subject: (another select statement example..against drmedia table and the libvolumes table.) Re: Command for finding...tape counts across storage pools
From: Tim Williams <Tim.Williams AT FRITOLAY DOT COM>
Date: Tue, 9 May 2000 14:03:51 -0500
Here's another one that will get good counts across various status'.....
good?

[snax17][/flapps/adsm/macros]>more taperpt.mac
/* this is a production, esp scheduled macro be careful */
/* tim williams 5/19/1999                               */
show time
select count(*) as "Number of tapes with Vault status" from drmedia where state=
'VAULT'
select count(*) as "Number of tapes with Vaultretrieve status" from drmedia wher
e state='VAULTRETRIEVE'
select count(*) as "Number of tapes with Courierretrieve status" from drmedia wh
ere state='COURIERRETRIEVE'
select count(*) as "Number of tapes in Scratch status" from libvolumes where sta
tus='Scratch'
select count(*) as "Number of tapes in LIB02 that contain data (private)" from l
ibvolumes where status='Private'


SAMPLE output:
ADSTAR Distributed Storage Manager
Command Line Administrative Interface - Version 3, Release 1, Level 0.7
(C) Copyright IBM Corporation, 1990, 1999, All Rights Reserved.

ANS8000I Server command: 'show time'

Current Date and Time on the Server
----------------------------------------
05/08/00   06:01:03
05/08/00   06:01:03
UTC (GMT) Date/Time is: 05/08/00 11:01:03
Last Noted Date/Time is: 05/08/00 06:00:22
ANS8000I Server command: 'select count(*) as "Number of tapes with Vault status"
from drmedia where state='VAULT''

Number of tapes with Vault status
---------------------------------
                              792
                              792
ANS8000I Server command: 'select count(*) as "Number of tapes with Vaultretrieve
status" from drmedia where state='VAULTRETRIEVE''

Number of tapes with Vaultretrieve status
-----------------------------------------
                                       18
                                       18
ANS8000I Server command: 'select count(*) as "Number of tapes with
Courierretrieve status" from drmedia where state='COURIERRETRIEVE''

Number of tapes with Courierretrieve status
-------------------------------------------
                                         27
                                         27
ANS8000I Server command: 'select count(*) as "Number of tapes in Scratch status"
from libvolumes where status='Scratch''

Number of tapes in Scratch status
---------------------------------
                              520
                              520
ANS8000I Server command: 'select count(*) as "Number of tapes in LIB02 that
contain data (private)" from libvolumes where status='Private''

Number of tapes in LIB02 that contain data (private)
----------------------------------------------------
                                                 725
                                                 725

ANS8002I Highest return code was 0.






Greg Dick <gregoryd AT isc.upenn DOT edu>
05/09/2000 09:18 AM

To:   Tim Williams/Frito-Lay/US@Frito-Lay
cc:
Subject:  Re: Command for finding...tape counts across storage pools

Thanks Tim this works great, I was wondering if there was a way to get it
to sort out the onsite and offsite.
I have not worked with adsm much and the are asking me to right a script
for it.  I am just looking for the onsite for one of the pool and all for
the rest.
ThanX,
Greg
At 01:27 PM 5/9/00 -0500, you wrote:
>Here's an example that you can use as a model...you may want to strip out
>the having stgpool_name like '%TAPE%' clause and the output redirection...
>you may have to tailor to exclude disk....volumes...to your shop...
>
>set sqldisplaymode wide
>select current date as tmpdt, count(*) volume_name, stgpool_name from
>volumes -
>group by stgpool_name having stgpool_name like '%TAPE%' >
>/tmp/tapeutil_by_stgpo
>ol
>
>example output:
>1999-10-29             155     BKUPTAPE
>1999-10-29             184     BKUPTAPE_CP
>1999-10-29              28     EXCHTAPE
>1999-10-29              33     EXCHTAPE_CP
>1999-10-29              44     INTLTAPE
>1999-10-29              45     INTLTAPE_CP
>1999-10-29             298     NOTETAPE
>1999-10-29             294     NOTETAPE_CP
>1999-10-29             260     ORCLTAPE
>1999-10-29             286     ORCLTAPE_CP
>
>
>
>
>
>
>Greg Dick <gregoryd AT ISC.UPENN DOT EDU>
>05/09/2000 08:28 AM
>
>To:   ADSM-L AT VM.MARIST DOT EDU@SMTP@Exchange
>cc:
>Subject:  Command for finding...
>
>Anybody know what command I can use to find out how many tapes are in a
>storage pool?
>ThanX,
>Greg
<Prev in Thread] Current Thread [Next in Thread>
  • (another select statement example..against drmedia table and the libvolumes table.) Re: Command for finding...tape counts across storage pools, Tim Williams <=