Re: [Veritas-bu] Identify Full tapes on Windows environment
2008-05-30 10:22:28
You could also run a media report.
X:\Program Files\VERITAS\NetBackup\bin\goodies\available_media.cmd
-Jonathan
-----Original Message-----
From: veritas-bu-bounces AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of Dave
Markham
Sent: Friday, May 30, 2008 8:55 AM
To: Michael Graff Andersen
Cc: veritas-bu AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] Identify Full tapes on Windows environment
Thanks dude. I'll give it a go and see what happens.
We have blat installed so im sure i can email an output file and run the
bat file as an at job or something.
Cheers
Michael Graff Andersen wrote:
> Hi Dave
>
> I have used this bat script in the past
>
> @echo off
> Set VMPATH=D:\Veritas\volmgr\bin
> set NBADM=D:\Veritas\Netbackup\bin\admincmd
>
> %VMPATH%\vmquery -rn 1 -b > C:\temp\vmquery-rn-1-b.out
>
> if EXIST C:\temp\bpmedialist.out (del C:\temp\bpmedialist.out) for /F
> "tokens=1 skip=3" %%i in (C:\temp\vmquery-rn-1-b.out) do (
> %NBADM%\bpmedialist -m %%i >> C:\temp\bpmedialist.out
>
>
> )
>
> Think it still needs some work to do the automatic alerting and might
> also to run on 6.5 as it was made for 5.1
>
> Regards
> Michael
>
> 2008/5/30, Dave Markham <dave.markham AT fjserv DOT net>:
>
>> Guys, has anyone done this on windows at all? I have done it on unix
>> by shell script but need to help a guy do it on windows.
>>
>> Windows 2003
>> Netbackup 6.5
>>
>> We have a 20 tape DLT jukebox and need to AUTOMATICALLY alert via
>> email if possible when tapes are full.
>>
>> I'm sure you can pull a report from the gui manually but i need an
>> automatic process ideally to alert ops in the datacenter so they can
>> remove tapes which are full.
>>
>> On unix i do the following (which a few extra bits) :-
>>
>> #robot parameters
>> if [ -s /tmp/robot ];then
>> ROBOT=`cat /tmp/robot`
>> else
>> ROBOT=`/opt/openv/volmgr/bin/sgscan | awk -F: '/P1000/ {print
$1}'`
>> echo $ROBOT > /tmp/robot
>> fi
>>
>> ROBCMD="$VMDIR/tldtest -r $ROBOT"
>>
>> #Get Jukebox Inventory
>> get_jb_inv()
>> {
>> cp $JBINV $JBINV.old
>> echo "s s" | $ROBCMD | egrep "slot|Barcode" > $JBINV }
>>
>>
>> #Command finds full tapes
>> $NBUDIRA/bpmedialist -mlist -l | awk ' { if ( int($15/8)%2 ) {print
$1}
>> }' > /tmp/tapechk
>>
>> get_jb_inv
>>
>> echo ""
>> echo "Tapes contained in L1000 which are Full" |tee -a $MAILFILE
>> echo "" | tee -a $MAILFILE
>> for x in `cat /tmp/tapechk`
>> do
>> grep $x $JBINV > /dev/null
>> if [ $? = 0 ];then
>> $VMDIR/vmquery -m $x | egrep "media ID|pool" |tee -a
>> $MAILFILE
>> fi
>> done
>>
>>
>>
>> cheers.
>> _______________________________________________
>> Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
>> http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
>>
>>
>
>
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
|
|
|