Veritas-bu

[Veritas-bu] Anybody has a script to report available capacit y and utilized capacity

2005-06-09 12:56:48
Subject: [Veritas-bu] Anybody has a script to report available capacit y and utilized capacity
From: Mark.Donaldson AT cexp DOT com (Mark.Donaldson AT cexp DOT com)
Date: Thu, 9 Jun 2005 10:56:48 -0600
poolnames:
vmpool -listall -b | awk 'NR>2 {print $1}'


Tapes in pool:
vmquery -pn <poolname> -w | awk 'NR>3 {print $1}'


Assigned (occupied) tapes in pool
vmquery -pn <poolname> -w | awk 'NR>3 && $20!~/00\/00\/00/ {print $1}'


So, quick and dirty, here's your script:

#!/bin/ksh
export PATH=$PATH:/usr/openv/volmgr/bin
echo "       Poolname            Use"
echo "====================  ============"
for p in `vmpool -listall -b | awk 'NR>2 {print $1}'`
do
  pc=`vmquery -pn $p -w|awk 'NR>3 {print $1}'|wc -l`
  po=`vmquery -pn $p -w|awk 'NR>3 && $20!~/00\/00\/00/ {print $1}'|wc -l`
  printf "%20s  %4d of %4d\n" $p $po $pc
done
exit


...
This does imply that you're not using a scratch pool of tapes.  You should
consider that, they're wonderful.

BTW, it'd be neater to count within the awk statement and output a number
but that's beyond the scope of "quick & dirty".

-M

-----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 Algo Seeker
Sent: Wednesday, June 08, 2005 9:31 AM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Anybody has a script to report available capacity
and utilized capacity


I always try to stay away from reinventing the wheel, and has survived
so far in this world of netbackup. I am looking for a script which can
generate a report with the heading Pool, Availaable and Used capacity?


If there is none, then I will be posting one soon. 


Thanks

_______________________________________________
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>