ADSM-L

I/O Status (using lbtest)

2004-12-17 12:21:53
Subject: I/O Status (using lbtest)
From: Mark Bertrand <Mark.Bertrand AT USUNWIRED DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 17 Dec 2004 11:12:36 -0600
While we wait for 5.3.....

OK here is what I found in my adventures to automate the status of my 10
slot I/O of my 3584.

I am no expert, just wanted to share. Also, my environment is W2K, TSM
5.1.6.3.
I have read all the postings on this subject and here is what I found. First
Richard Cowen had posted the best document associated with this tool, here:
http://msgs.adsm.org/cgi-bin/get/adsm0202/767.html period. Richard credits
Joel Fuhrman of washington.edu.for the document.

In my experience I could not get return_lib_inventory to work. I tried
everything with no luck.
SYNTAX: return_lib_inventory dno=  sno=  eeno=  tno=
e.g. return_lib_inventory dno=2 sno=3 eeno=1 tno=1 Where dno = number of
drives sno = number of storage slots eeno = number of entry/exit ports tno =
number of transport elements

So I just used return_lib_inventory_all and used grep to pull out only the
I/O slot info, no big deal.

OK, so here is the meat of the script, I am sure any of you reading this can
write some cool stuff around this to meet your needs.

First to launch lbtest in batch mode use -dev for device name input, which I
found using the TSM MMC plugin on my Windows server under TSM Device Drive.
Reports, Device Information.
Also use the -f for the batch part of the script, this is what tells lbtest
what to do once it is launched. Don't worry about specifying an output file,
this will automatically use lbtest.out in the launched from directory. Also
great for troubleshooting syntax problems.

cd c:\Program Files\tivoli\tsm\Server
lbtest -dev lb0.1.0.1 -f lbtest.in

Here is the .in file lbtest.in:
command open $D
command return_elem_count
command return_lib_inventory_all
command close

Even though you specify the device, you still need to open it using the
command open. I used $D which is an acceptable variable. Don't forget to
close when complete. If the script fails then you will need to enter lbtest
in manual mode and close the device. Also, if you make any changes to your
.in file, you must completely exit the lbtest app before it will read the
changes.

That's it, put that in a batch file, use a couple of redirects > to an out
file a few greps, awks and if statements with a command line mail utility
and you can do some pretty cool stuff.

I will now have it check the I/O for tapes before checkout, also run a
little batch file on schedule to send me an email when full. This is great
for those of us admins who are our whole TSM shop.

Let me know directly if you need more detail, but I think this is just about
it. I know lbtest can do much more, but this met my needs, the link to the
document from Richard and Joel was a big help.


Thanks all for getting me pointed in the right direction.
Mark Bertrand

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