ADSM-L

Re: SQL select for file size

2005-11-28 12:30:42
Subject: Re: SQL select for file size
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 28 Nov 2005 10:31:55 -0700
But why do the volume names need to be known at all?

Why not just do:

select node_name,filespace_name,file_name,file_size from contents

But yes, if the file is part of an aggregate, you'll get the aggregate
size, which would be misleading.

I don't think there is a very good way to do this. Another avenue to
consider would be just get file counts from the BACKUPS table, then
multiply some average size value, say, like 3 - 5 MB for a typical song.
It's only a rough idea, but then if the objective is to determine who the
biggest users of these files are, the file counts should give an
indication.

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

IBM Tivoli Storage Manager support web page:
http://www-306.ibm.com/software/sysmgmt/products/support/IBMTivoliStorageManager.html

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-11-28
09:53:44:

> <<If I know what volumes the node/filespace resides on, I can get the
file
> size with>>
>
> How about this select to get the volume(s).. warning.. looks like a long
> query..
>
> select volume_name from contents where node_name='xxx' AND
> file_name='xxxx.xxx'
>
> Sung Y. Lee
>
> "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 11/25/2005
> 12:05:22 PM:
>
> > I know that this question has been addressed before, but I just want
to
> > check that the situation remains the same with the current releases,
> > or if anybody has come up with a cheeky workaround/better solution.
> >
> > I am looking for a relatively efficient way of finding out how much
data
> > in size is stored by TSM for certain files or file types (ie. .mp3
.wav
> > .avi )
> >
> > I can get a list of the files with
> >
> > select ll_name,hl_name from backups where node_name='XXX' and
> > filespace_id=x and ll_name like'%.MP3%'
> >
> > If I know what volumes the node/filespace resides on, I can get the
file
> > size with
> >
> > select node_name,filespace_name,file_name,file_size from contents
where
> > volume_name='XXX'
> >
> > Is the file size accurate or is it the size of the aggregate that the
> > file is contained within ? (They all seem a little too rounded for my
> > liking)
> >
> > Also, this is not particularly easy in a non-colocated environment.
> >
> > So,............ is listing the volumes that the node/filespace is
stored
> > on and then selecting from the contents of this list of volumes the
only
> > way.
> > And, even if this is scripted, is it accurate or is it just the size
of
> > the aggregates.
> >
> > Knowing that the GUI will list the filesize but it doesn't seem
readily
> > available from SQL queries is truly a Friday afternoon annoyance.
> >
> > Leigh

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