ADSM-L

Re: Select on tapes used/node

2005-07-12 10:56:38
Subject: Re: Select on tapes used/node
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 12 Jul 2005 07:56:14 -0700
Hi Arnaud,

Try adding the DISTINCT keyword to the count(volume_name) part, i.e.:

   select node_name, count(distinct volume_name) as "COUNT" \
      from volumeusage \
      group by node_name

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.

"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 2005-07-12
07:41:59:

> Joni,
>
> I just realized that the query I provided (and yours too) will provide
> wrong results, as the same volume will be counted several times : one
> entry for each filespace belonging the same node on the same volume !
> Sorry ...
>
> Arnaud
>
> ************************************************************************
> ******
> Panalpina Management Ltd., Basle, Switzerland, CIT Department
> Viadukstrasse 42, P.O. Box 4002 Basel/CH
> Phone:  +41 (61) 226 11 11, FAX: +41 (61) 226 17 01
> Direct: +41 (61) 226 19 78
> e-mail: arnaud.brion AT panalpina DOT com
> ************************************************************************
> ******
>
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf 
> Of
> Joni Moyer
> Sent: Tuesday, 12 July, 2005 14:54
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Select on tapes used/node
>
> Hello everyone!
>
> I have run this select to find the total number of tapes
> used/node/storage pool, but I was wondering if there is a way to just
> count the total number of tapes used/node without breaking it down by
> storage pool?  Thank you in advance!
>
> select node_name,stgpool_name,count(*) as "Count" from volumeusage group
> by stgpool_name,node_name
>
> NODE_NAME              STGPOOL_NAME                 Count
> ------------------     ------------------     -----------
> CHRS041                COPY_AIX                       608
> CHRS047                COPY_AIX                       240
> CHRS049                COPY_AIX                        98
> CHRS051                COPY_AIX                       429
> CHRS054                COPY_AIX                       500
> CHRS057                COPY_AIX                       348
> CHRS058                COPY_AIX                        92
> CHRS144                COPY_AIX                       378
> CHSU602                COPY_AIX                         3
> CHSU603                COPY_AIX                         2
> NV6000                 COPY_AIX                        64
> PGSP023                COPY_AIX                       607
> PGSP024                COPY_AIX                       442
> PGSP025                COPY_AIX                       435
> PGSP026                COPY_AIX                       417
> CHLN070                COPY_LINUX                     371
> CHLN071                COPY_LINUX                     308
> CHLN072                COPY_LINUX                     286
> CHLN075                COPY_LINUX                     128
> CHLN076                COPY_LINUX                       8
>
> ********************************
> Joni Moyer
> Highmark
> Storage Systems
> Work:(717)302-6603
> Fax:(717)302-5974
> joni.moyer AT highmark DOT com
> ********************************

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