Veritas-bu

[Veritas-bu] Empty Slots.............

2003-04-07 11:51:47
Subject: [Veritas-bu] Empty Slots.............
From: Mark.Donaldson AT experianems DOT com (Donaldson, Mark)
Date: Mon, 7 Apr 2003 09:51:47 -0600
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_01C2FD1D.98484FF0
Content-Type: text/plain

Apologies - this is for TLD robots, not ACS.  I didn't realize the
differences were so profound.  Maybe something is salvageable.
-M

-----Original Message-----
From: Donaldson, Mark [mailto:Mark.Donaldson AT experianems DOT com]
Sent: Friday, April 04, 2003 12:43 PM
To: 'Joseph Despres'; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] Empty Slots.............



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 <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
<http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu>  


------_=_NextPart_001_01C2FD1D.98484FF0
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<TITLE>RE: [Veritas-bu] Empty Slots.............</TITLE>

<META content="MSHTML 5.50.4923.2500" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=905305015-07042003><FONT face=Arial color=#0000ff 
size=2>Apologies - this is for TLD robots, not ACS.&nbsp; I didn't realize the 
differences were so profound.&nbsp; Maybe something is 
salvageable.</FONT></SPAN></DIV>
<DIV><SPAN class=905305015-07042003><FONT face=Arial color=#0000ff 
size=2>-M</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Donaldson, Mark 
  [mailto:Mark.Donaldson AT experianems DOT com]<BR><B>Sent:</B> Friday, April 
04, 2003 
  12:43 PM<BR><B>To:</B> 'Joseph Despres'; 
  veritas-bu AT mailman.eng.auburn DOT edu<BR><B>Subject:</B> RE: [Veritas-bu] 
Empty 
  Slots.............<BR><BR></FONT></DIV>
  <P><FONT size=2>This will list all the empty slots from the command line 
  (Note: it does a version lookup for v3.4 or 4.5 &amp; adjusts for 
both).&nbsp; 
  Run it on your master server (or, more accurately, your volume database 
  host).&nbsp; Your other query is farther down the page...</FONT></P>
  <P><FONT size=2>&gt; cat ident_empty_slots</FONT> <BR><FONT 
  size=2>#!/bin/ksh</FONT> </P>
  <P><FONT size=2>NBPATH=/usr/openv</FONT> <BR><FONT size=2>export 
  PATH=$PATH:$NBPATH/volmgr/bin</FONT> </P>
  <P><FONT size=2>PROGNAME=`basename $0`</FONT> <BR><FONT 
  size=2>TPCONFIG=/tmp/$PROGNAME.$$.tpconfig</FONT> </P><BR>
  <P><FONT size=2>tpconfig -l &gt;$TPCONFIG</FONT> </P>
  <P><FONT size=2>echo "Robot\tSlot\n-----\t-------" &gt;&amp;2</FONT> </P>
  <P><FONT size=2>#Get list of robots</FONT> <BR><FONT size=2>roblist=`awk 
  '$1=="robot" {print $2}' $TPCONFIG| sort -u`</FONT> <BR><FONT size=2>for 
  robnum in $roblist</FONT> <BR><FONT size=2>do</FONT> <BR><FONT size=2>&nbsp; 
  #Get robot type &amp; host</FONT> <BR><FONT size=2>&nbsp; robtype=`awk 
  '$1=="robot" &amp;&amp; $2=='$robnum' {print $4}' $TPCONFIG | \</FONT> 
  <BR><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  tr '[A-Z]' '[a-z]'`</FONT> <BR><FONT size=2>&nbsp; robhost=`hostname`</FONT> 
  </P>
  <P><FONT size=2>&nbsp; #query for max number of library slots (version 
  specific)</FONT> <BR><FONT size=2>&nbsp; if [ `grep -c "^VERSION.*4\.5" 
  $NBPATH/netbackup/version` -ge 1 ]</FONT> <BR><FONT size=2>&nbsp; then</FONT> 
  <BR><FONT size=2>&nbsp;&nbsp;&nbsp; #v4.5</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp; maxslot=`vmchange -res -robot_info -rn $robnum -rt 
  $robtype -rh $robhost|\</FONT> <BR><FONT 
  
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  awk '{print $5}'`</FONT> <BR><FONT size=2>&nbsp; else</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp; #v3.X</FONT> <BR><FONT size=2>&nbsp;&nbsp;&nbsp; 
  robaddr=`awk '$1=="robot" &amp;&amp; $2=='$robnum' {print $NF}' $TPCONFIG 
  `</FONT> <BR><FONT size=2>&nbsp;&nbsp;&nbsp; maxslot=`echo "mode" | tldtest 
-r 
  $robaddr | tr ',' "\012" | tr -d ' ' | \</FONT> <BR><FONT 
  
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  awk -F= '$1=="Numberstorageelements" {print $2}'`</FONT> <BR><FONT 
  size=2>&nbsp; fi</FONT> </P>
  <P><FONT size=2>&nbsp; count=1</FONT> <BR><FONT size=2>&nbsp; for fullslot in 
  `vmquery -w -rn $robnum | \</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; awk '$9~/[0-9]/ 
  {print $9}' | sort -n`</FONT> <BR><FONT size=2>&nbsp; do</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp; while [ $count -lt $fullslot ]</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp; do</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo "$robnum\t$count"</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count=`expr $count + 1`</FONT> 
<BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp; done</FONT> <BR><FONT size=2>&nbsp;&nbsp;&nbsp; 
  count=`expr $count + 1`</FONT> <BR><FONT size=2>&nbsp; done</FONT> <BR><FONT 
  size=2>&nbsp; while [ $count -le $maxslot ]</FONT> <BR><FONT size=2>&nbsp; 
  do</FONT> <BR><FONT size=2>&nbsp;&nbsp;&nbsp; echo "$robnum\t$count"</FONT> 
  <BR><FONT size=2>&nbsp;&nbsp;&nbsp; count=`expr $count + 1`</FONT> <BR><FONT 
  size=2>&nbsp; done</FONT> <BR><FONT size=2>done</FONT> <BR><FONT size=2>[ -f 
  $TPCONFIG ] &amp;&amp; rm -f $TPCONFIG</FONT> <BR><FONT size=2>exit</FONT> 
</P>
  <P><FONT size=2>---------</FONT> </P>
  <P><FONT size=2>The second question is much easier.&nbsp; Tapes in the 
  libraries is:</FONT> </P>
  <P><FONT size=2>&gt; cat ident_library_tapes</FONT> <BR><FONT 
  size=2>#!/bin/sh</FONT> </P>
  <P><FONT size=2>echo "Robot\tSlot\tTape\n-----\t----\t------" 
  &gt;&amp;2</FONT> </P>
  <P><FONT size=2>/usr/openv/volmgr/bin/vmquery -w -a | \</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp; awk 'NR&gt;3 &amp;&amp; $9!="-" {print $8 
"\t" 
  $9 "\t" $1}'</FONT> <BR><FONT size=2>exit</FONT> </P><BR>
  <P><FONT size=2>HTH - Mark</FONT> </P><BR><BR>
  <P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From: 
  Joseph Despres [<A 
  href="mailto:jdespres AT csc DOT com">mailto:jdespres AT csc DOT 
com</A>]</FONT> <BR><FONT 
  size=2>Sent: Friday, April 04, 2003 11:36 AM</FONT> <BR><FONT size=2>To: 
  veritas-bu AT mailman.eng.auburn DOT edu</FONT> <BR><FONT size=2>Subject: 
  [Veritas-bu] Empty Slots.............</FONT> </P><BR><BR>
  <P><FONT size=2>Background...........&nbsp; 3 PowderHorn Silos, acsls 6.01, 
  netbackup 3.4_1</FONT> </P>
  <P><FONT size=2>Question..................&nbsp; At the command line:&nbsp; 
  How would I find out</FONT> <BR><FONT size=2>howmany empty slots there are 
  available ?</FONT> </P>
  <P><FONT 
  
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
  At the command line:&nbsp; How would I</FONT> <BR><FONT size=2>list what 
tapes 
  are in the silo's.....?</FONT> </P>
  <P><FONT size=2>Thanks</FONT> </P>
  <P><FONT size=2>Joe Despres</FONT> </P><BR>
  <P><FONT size=2>_______________________________________________</FONT> 
  <BR><FONT size=2>Veritas-bu maillist&nbsp; -&nbsp; 
  Veritas-bu AT mailman.eng.auburn DOT edu</FONT> <BR><FONT size=2><A 
target=_blank 
  
href="http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu";>http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu</A></FONT>
 
  </P></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C2FD1D.98484FF0--

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