[Veritas-bu] Empty Slots.............
2003-04-04 14:42:44
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C2FAE2.5CF024B0
Content-Type: text/plain
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
---------
The second question is much easier. Tapes in the libraries is:
> cat ident_library_tapes
#!/bin/sh
echo "Robot\tSlot\tTape\n-----\t----\t------" >&2
/usr/openv/volmgr/bin/vmquery -w -a | \
awk 'NR>3 && $9!="-" {print $8 "\t" $9 "\t" $1}'
exit
HTH - Mark
-----Original Message-----
From: Joseph Despres [mailto:jdespres AT csc DOT com]
Sent: Friday, April 04, 2003 11:36 AM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Empty Slots.............
Background........... 3 PowderHorn Silos, acsls 6.01, netbackup 3.4_1
Question.................. At the command line: How would I find out
howmany empty slots there are available ?
At the command line: How would I
list what tapes are in the silo's.....?
Thanks
Joe Despres
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
------_=_NextPart_001_01C2FAE2.5CF024B0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Veritas-bu] Empty Slots.............</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>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...</FONT></P>
<P><FONT SIZE=3D2>> cat ident_empty_slots</FONT>
<BR><FONT SIZE=3D2>#!/bin/ksh</FONT>
</P>
<P><FONT SIZE=3D2>NBPATH=3D/usr/openv</FONT>
<BR><FONT SIZE=3D2>export PATH=3D$PATH:$NBPATH/volmgr/bin</FONT>
</P>
<P><FONT SIZE=3D2>PROGNAME=3D`basename $0`</FONT>
<BR><FONT SIZE=3D2>TPCONFIG=3D/tmp/$PROGNAME.$$.tpconfig</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>tpconfig -l >$TPCONFIG</FONT>
</P>
<P><FONT SIZE=3D2>echo "Robot\tSlot\n-----\t-------" =
>&2</FONT>
</P>
<P><FONT SIZE=3D2>#Get list of robots</FONT>
<BR><FONT SIZE=3D2>roblist=3D`awk '$1=3D=3D"robot" {print =
$2}' $TPCONFIG| sort -u`</FONT>
<BR><FONT SIZE=3D2>for robnum in $roblist</FONT>
<BR><FONT SIZE=3D2>do</FONT>
<BR><FONT SIZE=3D2> #Get robot type & host</FONT>
<BR><FONT SIZE=3D2> robtype=3D`awk '$1=3D=3D"robot" =
&& $2=3D=3D'$robnum' {print $4}' $TPCONFIG | \</FONT>
<BR><FONT =
SIZE=3D2> =
tr '[A-Z]' '[a-z]'`</FONT>
<BR><FONT SIZE=3D2> robhost=3D`hostname`</FONT>
</P>
<P><FONT SIZE=3D2> #query for max number of library slots =
(version specific)</FONT>
<BR><FONT SIZE=3D2> if [ `grep -c "^VERSION.*4\.5" =
$NBPATH/netbackup/version` -ge 1 ]</FONT>
<BR><FONT SIZE=3D2> then</FONT>
<BR><FONT SIZE=3D2> #v4.5</FONT>
<BR><FONT SIZE=3D2> maxslot=3D`vmchange -res =
-robot_info -rn $robnum -rt $robtype -rh $robhost|\</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; awk '{print $5}'`</FONT>
<BR><FONT SIZE=3D2> else</FONT>
<BR><FONT SIZE=3D2> #v3.X</FONT>
<BR><FONT SIZE=3D2> robaddr=3D`awk =
'$1=3D=3D"robot" && $2=3D=3D'$robnum' {print $NF}' =
$TPCONFIG `</FONT>
<BR><FONT SIZE=3D2> maxslot=3D`echo "mode" =
| tldtest -r $robaddr | tr ',' "\012" | tr -d ' ' | \</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; awk -F=3D '$1=3D=3D"Numberstorageelements" {print =
$2}'`</FONT>
<BR><FONT SIZE=3D2> fi</FONT>
</P>
<P><FONT SIZE=3D2> count=3D1</FONT>
<BR><FONT SIZE=3D2> for fullslot in `vmquery -w -rn $robnum | =
\</FONT>
<BR><FONT =
SIZE=3D2> awk =
'$9~/[0-9]/ {print $9}' | sort -n`</FONT>
<BR><FONT SIZE=3D2> do</FONT>
<BR><FONT SIZE=3D2> while [ $count -lt $fullslot =
]</FONT>
<BR><FONT SIZE=3D2> do</FONT>
<BR><FONT SIZE=3D2> echo =
"$robnum\t$count"</FONT>
<BR><FONT SIZE=3D2> count=3D`expr $count =
+ 1`</FONT>
<BR><FONT SIZE=3D2> done</FONT>
<BR><FONT SIZE=3D2> count=3D`expr $count + 1`</FONT>
<BR><FONT SIZE=3D2> done</FONT>
<BR><FONT SIZE=3D2> while [ $count -le $maxslot ]</FONT>
<BR><FONT SIZE=3D2> do</FONT>
<BR><FONT SIZE=3D2> echo =
"$robnum\t$count"</FONT>
<BR><FONT SIZE=3D2> count=3D`expr $count + 1`</FONT>
<BR><FONT SIZE=3D2> done</FONT>
<BR><FONT SIZE=3D2>done</FONT>
<BR><FONT SIZE=3D2>[ -f $TPCONFIG ] && rm -f $TPCONFIG</FONT>
<BR><FONT SIZE=3D2>exit</FONT>
</P>
<P><FONT SIZE=3D2>---------</FONT>
</P>
<P><FONT SIZE=3D2>The second question is much easier. Tapes in =
the libraries is:</FONT>
</P>
<P><FONT SIZE=3D2>> cat ident_library_tapes</FONT>
<BR><FONT SIZE=3D2>#!/bin/sh</FONT>
</P>
<P><FONT SIZE=3D2>echo =
"Robot\tSlot\tTape\n-----\t----\t------" >&2</FONT>
</P>
<P><FONT SIZE=3D2>/usr/openv/volmgr/bin/vmquery -w -a | \</FONT>
<BR><FONT SIZE=3D2> awk 'NR>3 && =
$9!=3D"-" {print $8 "\t" $9 "\t" =
$1}'</FONT>
<BR><FONT SIZE=3D2>exit</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>HTH - Mark</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Joseph Despres [<A =
HREF=3D"mailto:jdespres AT csc DOT com">mailto:jdespres AT csc DOT
com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Friday, April 04, 2003 11:36 AM</FONT>
<BR><FONT SIZE=3D2>To: veritas-bu AT mailman.eng.auburn DOT edu</FONT>
<BR><FONT SIZE=3D2>Subject: [Veritas-bu] Empty =
Slots.............</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=3D2>Background........... 3 PowderHorn Silos, acsls =
6.01, netbackup 3.4_1</FONT>
</P>
<P><FONT SIZE=3D2>Question.................. At the command =
line: How would I find out</FONT>
<BR><FONT SIZE=3D2>howmany empty slots there are available ?</FONT>
</P>
<P><FONT =
SIZE=3D2> &nb=
sp; &nb=
sp; &nb=
sp; At the command line: How would I</FONT>
<BR><FONT SIZE=3D2>list what tapes are in the silo's.....?</FONT>
</P>
<P><FONT SIZE=3D2>Thanks</FONT>
</P>
<P><FONT SIZE=3D2>Joe Despres</FONT>
</P>
<BR>
<P><FONT =
SIZE=3D2>_______________________________________________</FONT>
<BR><FONT SIZE=3D2>Veritas-bu maillist - =
Veritas-bu AT mailman.eng.auburn DOT edu</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu" =
TARGET=3D"_blank">http://mailman.eng.auburn.edu/mailman/listinfo/veritas=
-bu</A></FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C2FAE2.5CF024B0--
|
|
|