TSM command list

madunix

ADSM.ORG Member
Joined
Aug 5, 2008
Messages
91
Reaction score
1
Points
0
I would find it really useful if i can get a list of common TSM commands/queries used frequently ....


Thanks
 
This can be a potential flame war :)

q stg
q proc
q sess

And a variant of those that measuers the speed. Command like

run qsesskb (scripts)
run qprocmb (scripst)

This will give speen in kb/sec and mb/sec respectivly.

Others are

select * from associations where node_name like upper('%$1%')
q stg stgpoolname f=d

Since we have about 1200 nodes and I do not know all my schedules :)

recla stg stgpoolname
migr stg stgpoolnomae dur=120

upd node XXXXX cloptset=linux|windows|sun.......


These are commands that I use frequently, and covers my needs.

Please add commands, as my list is way too short....
 
i found this in IBM forum ...

variables used in examples below:
server_name=server1
lib_name=3583
drive_name=rmtx where x=1-4

View a node's backed up files
select * from backups where node_name='nodename'

Find volumes marked as unavailable
q vol * acc=unav

Update volumes to read/write status
upd vol vol_name acc=readw

Label new volumes and checkin with scratch status
labe libv lib_name vol_name checki=scr
or for bulk labeling
labe libv 3583 search=bulk labels=barcode checkin=scr

Checkin previously labeled volumes in bulk as scratch (TSM will not allow volumes to be checked in as scratch if they contain valid data)
checki libv lib_name search=bulk checkl=barcode stat=scr

Query DRMedia volumes
q drmedia

Query volumes physically in library
q libv
* Note: using the two commands above you can locate volumes that have been "lost" by comparing output

Audit all volumes in library quickly
audit libr lib_name checkl=barcode

Query storage pools
q stgpool

Query occupancy, lists how much space each node is using
q occ

Take drive paths offline
upd path server_name drive_name srct=srv dest=dr libr=lib_name devi=/dev/drive_name onl=n

Take drive paths online
upd path server_name drive_name srct=srv dest=dr libr=lib_name devi=/dev/drive_name onl=y

Take library path offline
upd path server_name lib_name srct=serv dest=libr devi=/dev/smc0 onl=n

Take library path online
upd path server_name lib_name srct=serv dest=libr devi=/dev/smc0 onl=y

Query scripts stored on tsm server
q script

Run scripts stored on tsm server
run script_name

Display Gb used in storage pool
select sum(physical_mb)/1024 from occupancy where stgpool_name='storage_pool'

Display Gb used by a single node
select sum(physical_mb)/1024 from occupancy where node_name='nodename'

Some of these commands may vary depending on the type of library that you are dealing with, in my case it is a IBM 3583 with a barcode reader...
 
some others...

q event * * begind=-1
status of previous nights client schedules

ba db devc=<deviceclass> type=<full/incr/dbs>
backup the tsm database

def clienta <nodename> act=i
run an incremental backup on the target node
 
Last edited:
Back
Top