Veritas-bu

[Veritas-bu] Available Tapes

2005-09-13 10:56:08
Subject: [Veritas-bu] Available Tapes
From: Mark.Donaldson AT cexp DOT com (Mark.Donaldson AT cexp DOT com)
Date: Tue, 13 Sep 2005 08:56:08 -0600
By the way, this is dreadfully inefficient, especially for large libraries.
It runs vmquery n+1 times where "n" is the number of pools represented in
your robot.  

If you want to use this long-term, you might want to redirect "vmquery -rn
0" to a file, then read the file repeatedly in the loop.  For even more
efficiency this could be read once if totals are accumulated into an array.

Wadya want for 5 minutes work?

-M

-----Original Message-----
From: Pillapalem, Smitha [mailto:SPillapalem AT Entertainment DOT com]
Sent: Tuesday, September 13, 2005 8:13 AM
To: Mark.Donaldson AT cexp DOT com; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] Available Tapes


Mark,
Thank You!!!This was what exactly I wanted....Yes,you are right we have only
one robot. Can I use scratch pool option with only one robot???
Thanks Again,
Smitha

-----Original Message-----
From: Mark.Donaldson AT cexp DOT com [mailto:Mark.Donaldson AT cexp DOT com]
Sent: Monday, September 12, 2005 5:51 PM
To: Pillapalem, Smitha; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] Available Tapes


I'd recommend using the scratch pool option.  This way unassigned media is
automatically returned to a common pool where it can then be assigned to a
needy data pool on demand.

Otherwise (assuming you have one robot):

#!/bin/ksh
PATH=$PATH:/usr/openv/volmgr/bin
echo "         Pool       \tOcc \tEmpty"
echo "====================\t====\t====="
for p in `vmquery -w -rn 0 | awk 'NR>3 {print $12}' | sort -u`
do
  vmquery -w -rn 0 | awk 'BEGIN {a=0;e=0}
                     {if ($12=="'$p'"){
                       if($20~/00\/00\/00/){e++}else{a++}}}
                     END {printf("%20s\t%4d\t%4d\n","'$p'",a,e)}'
done


Should do it, it prints three columns: poolname, # tapes assigned, # tapes
unassigned.

HTH - Mark


-----Original Message-----
From: veritas-bu-admin AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu]On Behalf Of Pillapalem,
Smitha
Sent: Monday, September 12, 2005 11:43 AM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Available Tapes


Hello,
We have Netbackup 5.1 running on Sunos , Linux and HP -UX
Is there a command or script to monitor the available unassigned media in
each volume pool so that I get notified during weekends, As we have a very
small library which can fit only 140 tapes.
Any help is greatly appreciated.
Thanks,
Smitha

_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu

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