TSM number of file versions

Udo

ADSM.ORG Member
Joined
Feb 12, 2008
Messages
26
Reaction score
0
Points
0
Hello,

I want to know how many numbers of version from one or a lot of files are stored on the server. (How is the utilization for the DB/server)
Does someone knows the select syntax to get the number of versions?

Reason:
My server filespace is growing and near of end. So I want to know this filetypes with a lot of versions to limit them over a managementclass.

Thanks Udo
 
If you type - q domain coloc_domain format=detailed (replace out coloc_domain with the name of your policy set domain name you will see all the retention values.
 
If you type - q domain coloc_domain format=detailed (replace out coloc_domain with the name of your policy set domain name you will see all the retention values.

Hello,

the retention settings can I get always over the q copy syntax. But this isn`t what I am searching for. I want to know the actual number of existing versions from file x, from file y,...!
I think, this is only possible over an complex select syntax!


Thanks!
 
Udo,
Here is a sql select that may be what your looking for:

select LL_name from backups WHERE state = 'INACTIVE_VERSION' and type = 'FILE' and node_name='CLIENTNODE'

This is a pretty crude select statement and may be a real load on the server but it will return the file name as many times as the file is inactive. I would HIGHLY reccomend you try this on a small test server before trying it on a large file server with 1000000 + files
you could get fancy and search by file space too. look at

select colname as "Table backups columns",remarks from
syscat.columns where tabname=upper('backups') and
tabschema='ADSM'

to get a list of the items available for this table

Bob
 
Question about select

Hello,

I am not a TSM specialist, and selects are a foreign language for me (like english you can see:()
I think I must replace the names between ' '. OK, node name is simple and file too. But what do I have to replace for 'file_version'???

And in the second select for 'ADSM' ???

Thanks!
 
The ADSM bit you don't change.

The only bit you change in the first query is the CLIENTNODE to your nodename, in capitals.
 
Version counting

Hello and thank you very much, the select is working fine. :up:
Now I have the problem to evalute the output. Is there a possibility to count each version, I don`t want to do that manually :eek:

Thanks!
 
This would take a long time to complete but it would give you a count by directory which is probably most useful.

select hl_name,count(LL_name) from backups WHERE state = 'INACTIVE_VERSION' and type = 'FILE' and node_name='CLIENTNODE' group by hl_name order by 2 desc
 
Version counting

Hello,

thank you for supporting!

I think, the select isn`t the solution for my problem. The select counts all versions in an inactive folder. But I want to know the inactive count of each file. For example: file x has 12 versions, file y 5,....
Reason: In the managementclass I have defined unlimited versions. And know I want to know if there is a file which have a very high number of versions. If there is one or more, I want to exclude them from the managementclass and put them into another with lower versioning!

Thanks!
 
No it selects all inactive versions in any folder. It lets you hunt down the culprit by subdirectory rather than each individual file. If you really want the latter try

select ll_name,count(LL_name) from backups WHERE state = 'INACTIVE_VERSION' and type = 'FILE' and node_name='CLIENTNODE' group by ll_name order by 2 desc

However this will match any files with the same name even if they're in different directories. I can't be bothered figuring out how to do both.
 
version counting

Hello,

thank you, this is what I want to know! Thanks!

One additional thing to get perfect. Is it possible, to show the data size of each listed files in an column? So I can see, if it is worth to limit the versioning of a data or not.

Thanks!
 
No you can't. You could manually hunt them down in *separate* sql queries against the 'contents' table but I'll leave that as an exercise for you to figure out.
 
I forgot the exact syntax but I believe you could also find out by executing:

show version(s)

It has been a while so you will have to search around for the syntax.
 
Hello and thanks, but this syntax is only for getting the TSM Server version!
 
Back
Top