Tammy:
I looked in the archives and found a script by Mark Donaldson which should
provide what you need (thanks Mark):
********************************************
This will list all the empty slots from the command line (Note: it does a
version lookup for v3.4 or 4.5 & adjusts for both). Run it on your master
server (or, more accurately, your volume database host). Your other query
is farther down the page...
> cat ident_empty_slots
#!/bin/ksh
NBPATH=/usr/openv
export PATH=$PATH:$NBPATH/volmgr/bin
PROGNAME=`basename $0`
TPCONFIG=/tmp/$PROGNAME.$$.tpconfig
tpconfig -l >$TPCONFIG
echo "Robot\tSlot\n-----\t-------" >&2
#Get list of robots
roblist=`awk '$1=="robot" {print $2}' $TPCONFIG| sort -u`
for robnum in $roblist
do
#Get robot type & host
robtype=`awk '$1=="robot" && $2=='$robnum' {print $4}' $TPCONFIG | \
tr '[A-Z]' '[a-z]'`
robhost=`hostname`
#query for max number of library slots (version specific)
if [ `grep -c "^VERSION.*4\.5" $NBPATH/netbackup/version` -ge 1 ]
then
#v4.5
maxslot=`vmchange -res -robot_info -rn $robnum -rt $robtype -rh
$robhost|\
awk '{print $5}'`
else
#v3.X
robaddr=`awk '$1=="robot" && $2=='$robnum' {print $NF}' $TPCONFIG `
maxslot=`echo "mode" | tldtest -r $robaddr | tr ',' "\012" | tr -d ' ' |
\
awk -F= '$1=="Numberstorageelements" {print $2}'`
fi
count=1
for fullslot in `vmquery -w -rn $robnum | \
awk '$9~/[0-9]/ {print $9}' | sort -n`
do
while [ $count -lt $fullslot ]
do
echo "$robnum\t$count"
count=`expr $count + 1`
done
count=`expr $count + 1`
done
while [ $count -le $maxslot ]
do
echo "$robnum\t$count"
count=`expr $count + 1`
done
done
[ -f $TPCONFIG ] && rm -f $TPCONFIG
exit
********************************************
Message: 2
Date: Fri, 23 Apr 2004 14:53:24 -0400 (EDT)
From: David Cecchino <cecchind AT qwestip DOT net>
To: "Yosifovski, Tammy" <Tammy.Yosifovski AT usfc DOT com>
cc: veritas-bu AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] Slots available in a library
Robtest , or vmquery -a -bx
On Fri, 23 Apr 2004, Yosifovski, Tammy wrote:
>
> I am looking for a Netbackup 4.5.3 (Unix and Windows) command that would
> produce a list of which tapes slots are available/do not contain tapes.
>
> Thank you for your help!!
>
>
> Tammy Yosifovski
>
>
>
>
>
>
----------------------------------------------------------------------------
---------
> This e-mail is the exclusive, private and confidential property of the
sender. The
> information contained in it is intended solely for the use of the sender
and the
> intended recipient. If you are not the intended recipient you are hereby
advised that
> any unauthorized disclosure, copying, distribution or the taking of any
action in
> reliance on the contents of this message is strictly prohibited. If you
have received
> this e-mail in error, please notify us immediately by telephone (call the
USF
> Corporation Technical Support Center at 1-800-753-4563) and then destroy
this
> document and any copies in any form immediately. Finally, the recipient
should
> check this email and any attachments for the presence of viruses. USF
Corporation
> accepts no liability for any damage caused by any virus transmitted by
this email.
>
----------------------------------------------------------------------------
---------
--__--__--
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
End of Veritas-bu Digest
|