Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Full are these tapes?

Status
Not open for further replies.

cglaser

MIS
Feb 13, 2004
15
0
0
US
Does anyone know a good way to see how much full a specific tape is? Ideally, I would like a percentage or the number of GB/MB that images are taking up on a particular tape.
The reason that I am doing this is that I want to see how full some tapes are that we are sending off-site.
Sorry if this is an easy one...kinda new to netbackup.
Thanks - CG
 
I did the following:
#!/bin/ksh
#
#########################################################################
# #
# Script to report average throughput for the previous nights backups. # # #
# Creation Date: September 2nd, 2003 #
# Modification Date: September 2nd, 2003 #
* Created by: Steve Staves #
# #
#########################################################################

#########################################################################
#
# Set up variables

MASTER=master_server
BPDIR=d:/veritas/netbackup/bin/admincmd
OUTPUT=d:/Veritas/ScriptFiles/test-scripts/TapeUsage.txt
ADMCMD=d:/veritas/netbackup/bin/admincmd
TAPENUMBER=d:/Veritas/ScriptFiles/Test-Scripts/tape_number.txt
KILOBYTES=d:/Veritas/ScriptFiles/Test-Scripts/kilobytes.txt
DENSITY=d:/Veritas/ScriptFiles/Test-Scripts/density.txt
IMAGES=d:/Veritas/ScriptFiles/Test-Scripts/images.txt
EXPIRATION=d:/Veritas/ScriptFiles/Test-Scripts/expiration.txt
ALLOCATED=d:/Veritas/ScriptFiles/Test-Scripts/allocated.txt
MEDIASERVER=d:/Veritas/ScriptFiles/Test-Scripts/mediaserver.txt
GIGABYTES=d:/Veritas/ScriptFiles/Test-Scripts/gigabytes.txt
GIGABYTES1=d:/Veritas/ScriptFiles/Test-Scripts/gigabytes1.txt
STATUS=d:/Veritas/ScriptFiles/Test-Scripts/status.txt

#########################################################################
#
# Initialize Log Files
#

if [ -s $OUTPUT ]
then
rm $OUTPUT
fi

#########################################################################
#
# Perform actions


cat $TAPENUMBER | while read LINE
do
case $LINE in
*)

$BPDIR/bpmedialist -m $LINE > $OUTPUT
grep Server $OUTPUT |awk '{print $4}' > $MEDIASERVER
grep $LINE $OUTPUT | awk '{print $9}' > $KILOBYTES
grep $LINE $OUTPUT | awk '{print $8}' > $DENSITY
grep $LINE $OUTPUT | awk '{print $3}' > $IMAGES
grep $LINE $OUTPUT | awk '{print $4}' > $ALLOCATED
tail -2 $OUTPUT |awk '{print $5}' > $STATUS
tail -2 $OUTPUT |awk '{print $2}' > $EXPIRATION
cat $KILOBYTES | while read LINE1
do
case $LINE1 in
*)
d:/Veritas/ScriptFiles/Test-Scripts/eval.exe $LINE1 /1024 /1024 > $GIGABYTES
grep $LINE1 $GIGABYTES |awk '{print $5}' > $GIGABYTES1
esac
done


Let me know if it helps.
 
Thanks so much - it indeed worked and then some! get a lot clearer output of what is actually on these tapes - thanks so much,huge help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top