SUMMARY: Jukebox control for Solaris

From: dave.campbell@vf.vodafone.co.uk
Date: Mon Jul 17 2000 - 09:17:11 CDT


Thanks to the following for their replies.

Francois Marcos
David Beauoin
Kell Canty
Keith Hermansader
Brett Anthony
Torsten Kirschner

I have listed several URLs of useful sites to obtain jukebox related
software. However many of the products mentioned did not directly address my
problem which was to be able to get status information on what slots in the
inport/export area were full/empty. David Beaudoin inadvertently led me to
the answer I wanted. In the /etc/LGTOuscsi directory there's a binary call
sjirdtag which obtains element status for all parts of the jukebox. I have
been using this for a Legato implementation on Compaq Tru64 so I know this
works. I've attached a piece of code that makes sense of what sjirdtag
returns in order to allow it to be used in a script. The sjirdtag binary
requires the address of the control port, e.g. scsidev@10.1.0.

Regards,
Dave

Useful URLs

http://ptolemy.eecs.berkeley.edu/~cxh/sapub/mtx.html
http://ptolemy.eecs.berkeley.edu/~cxh/sapub/juke.html
http://www.hiarc.com
http://www.storagetek.com/StorageTek/software/acsls/
http://www.cs.pdx.edu/~eric/stctl/
http://www.pcisys.net/home/c/craigw/sst/

This piece of code requires the control port name to be specified (In this
piece of code it is specified in $JBCONTROLPORT). The output from the
sjirdtag command is then formatted into a user friendly output depending on
which parameter is specified.

          SJIRDTAGFILE=/tmp/$PROGNAME.sjirdtag.$$
        SJIRDTAG=/etc/LGTOuscsi/sjirdtag
        case "$1" in
        "-d")
                TYPE="DATA TRANSPORT"
                ;;
        "-s")
                TYPE="STORAGE"
                ;;
        "-h")
                TYPE="MEDIA TRANSPORT"
                ;;
        "-c")
                TYPE="IMPORT/EXPORT"
                ;;
        "-?"|"")
                echo "Usage: `basename $0` -d(rives)|s(lots)|h(and)|c(ap)"
                exit
                ;;
        esac

        typeset -i ELEM
        $SJIRDTAG $JBCONTROLPORT > $SJIRDTAGFILE
        exec 0<$SJIRDTAGFILE
        while read P1 P2 P3 P4 P5 P6 P7 P8
        do
                if [ "$P1 $P2" = "Tag Data" ]
                then
                        CORRECTSECTION=false
                fi

                if [ "$P7" = "${TYPE}:" ] || [ "$P7 $P8" = "${TYPE}:" ]
                then
                        CORRECTSECTION=true
                fi

                if [ "$CORRECTSECTION" = true ]
                then
                        if [ "$EXPECTCODE" = true ]
                        then
                                if [ -n "`echo $P1 | grep ^VolumeTag`" ]
                                then
                                        BARCODE=`echo $P1 | cut -c12-30`
                                        echo $ELEM $BARCODE
                                else
                                        echo $ELEM NO-BARCODE
                                fi
                                EXPECTCODE=false
                        fi

                        if [ -n "`echo $P1 | grep ^Elem`" ]
                        then
                                ELEM=`echo $P1 | cut -c6-8`
                                if [ "$P4" = 'med_pres=0' ] || [ "$P7" =
'full=0' ]
                                then
                                        echo $ELEM EMPTY
                                        EXPECTCODE=false
                                else
                                        EXPECTCODE=true
                                fi
                        fi
                fi
        done
        rm -f $SJIRDTAGFILE

S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:12 CDT