How to Count the Number of Files on A Tape

Previous topic - Next topic

rstockton

TSM - 6.3, LT04 tapes

Is there any way to count the number of files on a TSM LT04 tape?  We are trying to develop some metrics by estimating how many files we store on a LT04 tape and I cannot find any way to get a count from a tape.

Thanks,
Russell

Justin Derrick

Ah, the murky world of database queries in TSM.  :)

Even in old versions of TSM, where the database engine was some proprietary thing, you could still issue select statements.  Now that DB2 runs under the hood in TSM, you have all the power and flexibility that DB2 provides for getting the information you want from DB2.

Log in as your TSM admin, connect to DB2, connect to the TSMDB1 database, and start looking around.  I haven't taken the time to dig through the innards of newer versions of TSM, but you'll likely find tables that contain what you're looking for.  (You can get information on the fields in tables with 'describe table <owner>.<tablename>.)

Report back and let us know what you find!

-JD.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

rstockton

I have found that auditing a tape will give the number of files it contains.  It is a slow process to get the number of files.

AUDIT VOLUME XXXXXXXXXX

q proc

Process     Process Description      Process Status
  Number
--------     --------------------     -------------------------------------------------
      99     Audit Volume             Volume XXXXXXX (storage pool TIER3POOL), Files
              (Inspect Only)           Processed: 53976, Damaged Files Found: 0,
                                       Partial Files Skipped: 0. Current Physical File
                                       (bytes): 3,072 Current input volume: XXXXXXX.

Justin Derrick

There should be a better way to get this info from the database -- a simple SQL select statement.  Although, an audit is never a bad idea.  :)

I'll get back to you when I've had a chance to do some more digging.

-JD.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Alessandro Perucchi

q content <volume>

if you run it in batch mode, then you can use the unix power to do what you want with it :-)
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML