lbtest sometimes doesn't return barcodes

2011-05-09 Thread Paul Fielding
I have a wierd issue I'm hoping someone has seen before.   I have a 3584
tape library attached to an AIX box.  I have a bunch of perl scripts that
deal with tape automation.  Part of this process uses lbtest to grab the
current contents of the IO door.   However, I've had it happen a few times
where things stopped working, and when I investigate I find that lbtest has
suddenly stopped returning barcodes.   All of the elements show FULL or
EMPTY, but no barcodes are listed, and barcode_len = 0.

If I go to the library web gui, I see the barcodes.  And if I just leave
things alone, in 24h or so it seems to go back to normal.  Nothing I do to
the library (including rebooting it) seems to fix the problem immediately.

Very very wierd.  Anyone seen this before?

regards,

Paul


Re: lbtest sometimes doesn't return barcodes

2011-05-09 Thread Marcel Anthonijsz
Paul,

No, I have not seen this before: I use IBM Atape and tapeutil -f /dev/smc0
inventory without any problem.

Make sure that TSM or another program is not using the library device at the
same time or program around that.
Maybe a previous perl script that hangs/waits until next timeout?

Marcel

2011/5/9 Paul Fielding p...@fielding.ca

 I have a wierd issue I'm hoping someone has seen before.   I have a 3584
 tape library attached to an AIX box.  I have a bunch of perl scripts that
 deal with tape automation.  Part of this process uses lbtest to grab the
 current contents of the IO door.   However, I've had it happen a few times
 where things stopped working, and when I investigate I find that lbtest has
 suddenly stopped returning barcodes.   All of the elements show FULL or
 EMPTY, but no barcodes are listed, and barcode_len = 0.

 If I go to the library web gui, I see the barcodes.  And if I just leave
 things alone, in 24h or so it seems to go back to normal.  Nothing I do to
 the library (including rebooting it) seems to fix the problem immediately.

 Very very wierd.  Anyone seen this before?

 regards,

 Paul




--
Kind Regards, Groetje,

Marcel Anthonijsz
T: +31(0)299-776768
M:+31(0)6-2423 6522


Re: lbtest sometimes doesn't return barcodes

2011-05-09 Thread Paul Fielding
Well, that's the strange part. I'm confident it's not a conflict - when
there is a conflict lbtest returns an error and I can check for that.  The
library is returning an inventory, providing all info about what is in each
slot *except* for the barcode :(

Paul

On Mon, May 9, 2011 at 4:26 PM, Marcel Anthonijsz mar...@anthonijsz.netwrote:

 Paul,

 No, I have not seen this before: I use IBM Atape and tapeutil -f /dev/smc0
 inventory without any problem.

 Make sure that TSM or another program is not using the library device at
 the
 same time or program around that.
 Maybe a previous perl script that hangs/waits until next timeout?

 Marcel

 2011/5/9 Paul Fielding p...@fielding.ca

  I have a wierd issue I'm hoping someone has seen before.   I have a 3584
  tape library attached to an AIX box.  I have a bunch of perl scripts that
  deal with tape automation.  Part of this process uses lbtest to grab the
  current contents of the IO door.   However, I've had it happen a few
 times
  where things stopped working, and when I investigate I find that lbtest
 has
  suddenly stopped returning barcodes.   All of the elements show FULL or
  EMPTY, but no barcodes are listed, and barcode_len = 0.
 
  If I go to the library web gui, I see the barcodes.  And if I just leave
  things alone, in 24h or so it seems to go back to normal.  Nothing I do
 to
  the library (including rebooting it) seems to fix the problem
 immediately.
 
  Very very wierd.  Anyone seen this before?
 
  regards,
 
  Paul
 



 --
 Kind Regards, Groetje,

 Marcel Anthonijsz
 T: +31(0)299-776768
 M:+31(0)6-2423 6522



Re: lbtest sometimes doesn't return barcodes

2011-05-09 Thread Paul Fielding
Side note - I thought I'd give tapeutil a go, but it does not appear to be
install on my box.  Running Atape 12.2.4.0.   Anyone know if tapeutil should
still be installed with this version of Atape, or if there's somewhere else
I could look for it?

regards,

Paul


On Mon, May 9, 2011 at 4:26 PM, Marcel Anthonijsz mar...@anthonijsz.netwrote:

 Paul,

 No, I have not seen this before: I use IBM Atape and tapeutil -f /dev/smc0
 inventory without any problem.

 Make sure that TSM or another program is not using the library device at
 the
 same time or program around that.
 Maybe a previous perl script that hangs/waits until next timeout?

 Marcel

 2011/5/9 Paul Fielding p...@fielding.ca

  I have a wierd issue I'm hoping someone has seen before.   I have a 3584
  tape library attached to an AIX box.  I have a bunch of perl scripts that
  deal with tape automation.  Part of this process uses lbtest to grab the
  current contents of the IO door.   However, I've had it happen a few
 times
  where things stopped working, and when I investigate I find that lbtest
 has
  suddenly stopped returning barcodes.   All of the elements show FULL or
  EMPTY, but no barcodes are listed, and barcode_len = 0.
 
  If I go to the library web gui, I see the barcodes.  And if I just leave
  things alone, in 24h or so it seems to go back to normal.  Nothing I do
 to
  the library (including rebooting it) seems to fix the problem
 immediately.
 
  Very very wierd.  Anyone seen this before?
 
  regards,
 
  Paul
 



 --
 Kind Regards, Groetje,

 Marcel Anthonijsz
 T: +31(0)299-776768
 M:+31(0)6-2423 6522



Re: lbtest sometimes doesn't return barcodes

2011-05-09 Thread Marcel Anthonijsz
Running my old (12.1.8.0) version of tapeutil tells me:

ATTENTION:  Tapeutil provides only a subset of device and command support
that
the IBM Tape Diagnostic Tool (ITDT) provides. The functions and
capabilities of tapeutil are now performed by ITDT.
Please use ITDT in place of tapeutil, as tapeutil is deprecated.

lslpp -w or -f do not tell me which fileset the /usr/bin/tapeutil belongs
to, my guess is that is was part of IBMtape (or Atape) but not shipped
anymore with the latest version. Sigh... so far for progress..

ITDT link :http://www-01.ibm.com/support/docview.wss?uid=ssg1S4000662


Marcel.

2011/5/10 Paul Fielding p...@fielding.ca

 Side note - I thought I'd give tapeutil a go, but it does not appear to be
 install on my box.  Running Atape 12.2.4.0.   Anyone know if tapeutil
 should
 still be installed with this version of Atape, or if there's somewhere else
 I could look for it?

 regards,

 Paul


 On Mon, May 9, 2011 at 4:26 PM, Marcel Anthonijsz mar...@anthonijsz.net
 wrote:

  Paul,
 
  No, I have not seen this before: I use IBM Atape and tapeutil -f
 /dev/smc0
  inventory without any problem.
 
  Make sure that TSM or another program is not using the library device at
  the
  same time or program around that.
  Maybe a previous perl script that hangs/waits until next timeout?
 
  Marcel
 
  2011/5/9 Paul Fielding p...@fielding.ca
 
   I have a wierd issue I'm hoping someone has seen before.   I have a
 3584
   tape library attached to an AIX box.  I have a bunch of perl scripts
 that
   deal with tape automation.  Part of this process uses lbtest to grab
 the
   current contents of the IO door.   However, I've had it happen a few
  times
   where things stopped working, and when I investigate I find that lbtest
  has
   suddenly stopped returning barcodes.   All of the elements show FULL or
   EMPTY, but no barcodes are listed, and barcode_len = 0.
  
   If I go to the library web gui, I see the barcodes.  And if I just
 leave
   things alone, in 24h or so it seems to go back to normal.  Nothing I do
  to
   the library (including rebooting it) seems to fix the problem
  immediately.
  
   Very very wierd.  Anyone seen this before?
  
   regards,
  
   Paul
  
 
 
 
  --
  Kind Regards, Groetje,
 
  Marcel Anthonijsz
  T: +31(0)299-776768
  M:+31(0)6-2423 6522
 




--
Kind Regards, Groetje,

Marcel Anthonijsz
T: +31(0)299-776768
M:+31(0)6-2423 6522


I/O Status (using lbtest)

2004-12-17 Thread Mark Bertrand
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


Re: I/O Status (using lbtest)

2004-12-17 Thread Sung Y Lee





Cool. I almost over looked this post because previously posted subject was
query bulk i/o.
Looks like however still need some manipulation to get the i/o list.  I
guess sometimes that's the only way to go.

Thanks for sharing.

Sung Y. Lee



   
 Mark Bertrand 
 [EMAIL PROTECTED] 
 UNWIRED.COM   To
 Sent by: ADSM:   [EMAIL PROTECTED]
 Dist Stor  cc
 Manager  
 [EMAIL PROTECTED] Subject
 .EDU I/O Status (using lbtest)   
   
   
 12/17/2004 12:12  
 PM
   
   
 Please respond to 
 ADSM: Dist Stor  
 Manager  
 [EMAIL PROTECTED] 
   .EDU   
   
   




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

inline: graycol.gifinline: pic04888.gifinline: ecblank.gif

lbtest batch input file syntax

2004-09-30 Thread Paul Zarnowski
Has anyone figured out the syntax for the lbtest batch input file?
Thanks.
..Paul
--
Paul Zarnowski Ph: 607-255-4757
719 Rhodes Hall, Cornell UniversityFx: 607-255-8521
Ithaca, NY 14853-3801  Em: [EMAIL PROTECTED]


Re: lbtest batch input file syntax

2004-09-30 Thread Richard Cowen
This is sort of old- use at your own risk.



From: ADSM: Dist Stor Manager on behalf of Paul Zarnowski
Sent: Thu 9/30/2004 3:47 PM
To: [EMAIL PROTECTED]
Subject: lbtest batch input file syntax



Has anyone figured out the syntax for the lbtest batch input file?
Thanks.
..Paul


--
Paul Zarnowski Ph: 607-255-4757
719 Rhodes Hall, Cornell UniversityFx: 607-255-8521
Ithaca, NY 14853-3801  Em: [EMAIL PROTECTED]


Re: lbtest batch input file syntax

2004-09-30 Thread Hunny Kershaw





Hello Paul,

Here's a batch file example for TSM 5.2.x.

The syntax for using the batch file - lbtest -d libname -f batchfile
-o outputfile

# comment
set return_error_when_fail = 1
set exit_on_unexpected_result = 1
symbols
type open the library
command open $D result rc =  0
command inquiry result rc != -1
command audit barcode = 0 result rc != -1
command audit barcode = 1 result rc != -1
command return_elem_count result rc != -1
command return_lib_inventory dno = 0 sno = 0 eeno = 0 tno = 0 result rc !=
-1
command return_lib_inventory_all  result rc != -1
command move_slot_slot move_count = 10 invert = 0 result rc != -1
command move_empty_slot  result cc == DD_SOURCE_EMPTY
command move_slot_full result cc == DD_DESTINATION_FULL
command move_slot_drive invert = 0result rc != -1
delay 30
command move_drive_slot invert = 0result rc != -1
if eeno == 0 skip 3
command extend result rc != -1
command retract result rc != -1
command move_slot_ee invert = 0result rc != -1
command return_lib_inventory_range typecode = 4 startaddr = 1 totalelem = 1
result rc != -1
command xdrive_inventory dno = 1 del = 0 result rc != -1
command return_enhance_lib_inventory_all result cc == DD_ILLEGAL_REQUEST
command close result rc != -1

Regards,

Hunny Kershaw



   
 Paul Zarnowski
 [EMAIL PROTECTED] 
   To
 Sent by: ADSM:   [EMAIL PROTECTED]
 Dist Stor  cc
 Manager  
 [EMAIL PROTECTED] Subject
 .EDU lbtest batch input file syntax  
   
   
 09/30/2004 12:47  
 PM
   
   
 Please respond to 
 ADSM: Dist Stor  
 Manager  
   
   




Has anyone figured out the syntax for the lbtest batch input file?
Thanks.
..Paul


--
Paul Zarnowski Ph: 607-255-4757
719 Rhodes Hall, Cornell UniversityFx: 607-255-8521
Ithaca, NY 14853-3801  Em: [EMAIL PROTECTED]

inline: graycol.gifinline: pic30097.gifinline: ecblank.gif

Re: lbtest

2002-02-18 Thread Henk ten Have

On 17-Feb-02 Jack Magill wrote:
 Where can I find documentation on the lbtest utility?

  I never found any documentation (on AIX).
  But at least lbtest works.

  Cheers,
  Henk ten Have.



Re: lbtest

2002-02-18 Thread Richard Cowen

I got this from Joel Fuhrman of washington.edu.  I have scripts that work,
so I know the document speaks accurately.




--

 lbtest

Caveat
==

This document describes how to use the lbtest tool shipped with
the ADSM server. This tool is shipped as a service aid for
diagnosing hardware problems for SCSI libraries used by ADSM.
This document describes an old version of the tool and is
slightly out of date. At this point in time lbtest and the
other service aids are not supported for customer use. (i.e. If
you find bugs in this document or lbtest, we are not obligated
to fix them).

--

Invoking lbtest

The tool can be invoked as a command from the command line or
from within a shell script or REXX EXEC using this syntax:

  lbtest -f input-file -o output-file -d special-file -t
-p special-file
  options:

-f input-file   This specifies the input file for batch mode.
 If a file is specified, lbtest will execute in
 batch mode and read input from this file.
 The default for this file is lbtest.in.

-o output-file  Specifies the output file.
  The default for this file is lbtest.out.

-d special-file Specifies the special file value to substitute
  on the open statement in the input file.

-p special-file Specifies the special file value to substitute
  on the passthru statement in the input file.

-t  Specifies trace will be invoked


e.g. lbtest -d /dev/lb0 -o test.output -f lbtest.mt

note.If no parameters are specified, lbtest will operate in interactive
mode.

Interactive Mode

When lbtest is invoked with no -f, it defaults to running in
interactive, or manual, mode. This allows a developer to
interactively determine the kind of testing to be done. When in
interactive mode, lbtest provides a menu of functions that can
be performed that looks like this:


Main Menu:
==

  1: Manual test
  2: Batch  test
  9: Exit lbtest

Enter selection: 1

After selecting option 1 from the main menu, a manual test menu
appears that allows individual device driver functions to be
tested:


variables settings
=
special file: /dev/lb0
return_error_when_fail 1  exit_on_unexpected_result 0

manual test menu:
=
  1: set device special file
  2: display symbols
  3: set return error when fail
  4: set exit on unexpected result
  5: set buffer address
  6: open7: close
  8: ioctl return element count
  9: ioctl return all library inventory
 10: ioctl return library inventory
 11: ioctl move medium
 12: ioctl audit 13: ioctl extend
 14: ioctl retract   15: ioctl inquiry
 16: ioctl get IOCINFO   17: ioctl return error
 18: ioctl move slot to slot 19: ioctl move slot to drive
 20: ioctl move drive to slot21: ioctl move from empty
 22: ioctl move to full  23: ioctl move slot to ee
 24: ioctl move ee to slot   25: ioctl move from bad addr
 26: ioctl move to bad addr  27: ioctl invalid ioctl
 28: ioctl position to element   29: ioctl position to slot
 30: ioctl library info
 40: execute command
 88: trace menu
 99: return to main menu

Batch Mode

If a batch input file was specified with the -f option on
invocation, lbtest will run in batch mode, rather than
interactive. Batch input files can contain these kinds of
statements:

commands
comments
exit
if
passthru
pause
set
skip
symbols
system
type

Each type of statement is described next.

Comment

Any line beginning with #, or any blank line, is a comment and will
be ignored.

command Statements

Device driver function is exercised by command entries in the
input file. Command statements must be on a single line of the
input file. The data is case sensitive, but leading or embedded
blanks are ignored.

command  command-text result-text


This statement is used to execute a library command and to test
the command completion status for an expected result.


The command-text is used to specify which tape operation to
perform. The possible values for this field are described next.

open

SYNTAX:

  open device-file
   $D

  e.g. open /dev/lb0
   open $D

If the special file $D is specified, the -d value given on the
command line will be substituted for $D.



FUNCTION Tested:

open will call the device driver ddopen entry point and
attempt to open a medium changer device special file.

close

SYNTAX:

  close

  e.g. close

FUNCTION Tested:

close will call the device driver ddclose entry point and
close the medium changer device special file previously opened.


return_elem_count

SYNTAX

Re: lbtest

2002-02-18 Thread Jack Magill

Richard,

I would like to say thank you for the doc that you sent me.  I have not
found any other and it did help.

Thanks again,

Jack
- Original Message -
From: Richard Cowen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 18, 2002 6:13 AM
Subject: Re: lbtest


 I got this from Joel Fuhrman of washington.edu.  I have scripts that work,
 so I know the document speaks accurately.






lbtest

2002-02-16 Thread Jack Magill

Where can I find documentation on the lbtest utility?



lbtest utility - reference?

2001-08-06 Thread Walker, Lesley R

Is there a reference somewhere for the lbtest utility?  I've looked in the
obvious places (Tivoli doco, Richard's quick facts) and can't find any
detailed info.

The ACSLS query commands seem fairly self-explanatory, but what I'm
wondering is whether the other commands are relevant, and if so how to use
them.

TSM 3.7.4 with STK Powderhorn library.

--
Lesley Walker
Unix Engineering, EDS New Zealand
[EMAIL PROTECTED]
I feel that there is a world market for as many as five computers
Thomas Watson, IBM corp. - 1943