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.
------=_NextPartTM-000-f585ab25-54b6-11d7-bd54-00508bc82f2a
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C2E8C9.2AB5E98D"
------_=_NextPart_001_01C2E8C9.2AB5E98D
Content-Type: text/plain;
charset="iso-8859-1"
Great thanks,
Also is there a way to automate tape ejects? Currently I use a script w/
vmchange -vh server -res -m clientname -mt HCART -rt none -rc1 0 -e
but it has me press enter after each tape. I would like to feed a list of
frozen or > 2 month retensions to a script and have them waiting in the CAP.
thanks...
-----Original Message-----
From: Donaldson, Mark [mailto:Mark.Donaldson AT experianems DOT com]
Sent: Wednesday, March 12, 2003 11:56 AM
To: Shuster, James; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] CLI for tape retensions.
Tapes with an expiration of greater than two months will come from
"bpmedialist -mlist -l". Field 7 is the expiration date in Unix seconds.
Get the current time in unix seconds, (using PERL or a C program), subtract
the two & find a difference greater than two months.
For frozen tapes in the library:
Well, here's how to find frozen tapes:
bpmedialist -mlist -l | awk ' { if ( $15%2 ) {print $1} }'
...note, this is for one media-server environment, you have to loop through
all media servers if you have more than one (note "-h" option to
bpmedialist).
Here's the tapes in the library:
vmquery -w -a | awk 'NR>3 && $9!="-" {print $1}'
...now the trick is to cross-reference the lists...
#!/bin/sh
vmquery -w -a | awk 'NR>3 && $9!="-" {print $1}' >/tmp/TMPFILE.$$
for tape in `bpmedialist -mlist -l | awk ' { if ( $15%2 ) {print $1} }'`
do
if [ `grep -c "^${tape}$" /tmp/TMPFILE.$$` -gt 0 ]
then
echo $tape
fi
done
rm /tmp/TMPFILE.$$
exit
That's it. Hope this helps.
-Mark
-----Original Message-----
From: Shuster, James [ mailto:jshuster AT etrade DOT com
<mailto:jshuster AT etrade DOT com> ]
Sent: Tuesday, March 11, 2003 1:54 PM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] CLI for tape retensions.
Looking for a CLI to report
Tapes that have a retension of higher than 2 months.
Tapes that are still in the library and frozen.
_______________________________________________
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_01C2E8C9.2AB5E98D
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>RE: [Veritas-bu] CLI for tape retensions.</TITLE>
<META content="MSHTML 6.00.2716.2200" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=470105318-12032003><FONT face=Arial color=#0000ff size=2>Great
thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=470105318-12032003><FONT face=Arial color=#0000ff size=2>Also
is there a way to automate tape ejects? Currently I use a script w/ vmchange
-vh
server -res -m clientname -mt HCART -rt none -rc1 0 -e</FONT></SPAN></DIV>
<DIV><SPAN class=470105318-12032003><FONT face=Arial color=#0000ff size=2>but
it
has me press enter after each tape. I would like to feed a list of frozen
or > 2 month retensions to a script and have them waiting in the
CAP.</FONT></SPAN></DIV>
<DIV><SPAN class=470105318-12032003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=470105318-12032003><FONT face=Arial color=#0000ff
size=2>thanks...</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> Wednesday,
March 12,
2003 11:56 AM<BR><B>To:</B> Shuster, James;
veritas-bu AT mailman.eng.auburn DOT edu<BR><B>Subject:</B> RE: [Veritas-bu]
CLI for
tape retensions.<BR><BR></FONT></DIV>
<P><FONT size=2>Tapes with an expiration of greater than two months will come
from "bpmedialist -mlist -l". Field 7 is the expiration date in Unix
seconds. Get the current time in unix seconds, (using PERL or a C
program), subtract the two & find a difference greater than two
months.</FONT></P>
<P><FONT size=2>For frozen tapes in the library:</FONT> </P>
<P><FONT size=2>Well, here's how to find frozen tapes:</FONT> </P>
<P><FONT size=2> bpmedialist -mlist -l | awk ' { if ( $15%2 ) {print
$1}
}'</FONT> </P>
<P><FONT size=2>...note, this is for one media-server environment, you have
to
loop through all media servers if you have more than one (note "-h" option to
bpmedialist).</FONT></P><BR>
<P><FONT size=2>Here's the tapes in the library:</FONT> </P>
<P><FONT size=2> vmquery -w -a | awk 'NR>3 && $9!="-" {print
$1}' </FONT></P>
<P><FONT size=2>...now the trick is to cross-reference the lists...</FONT>
</P>
<P><FONT size=2>#!/bin/sh</FONT> <BR><FONT size=2>vmquery -w -a | awk
'NR>3
&& $9!="-" {print $1}' >/tmp/TMPFILE.$$</FONT> <BR><FONT
size=2>for
tape in `bpmedialist -mlist -l | awk ' { if ( $15%2 ) {print $1} }'`</FONT>
<BR><FONT size=2>do</FONT> <BR><FONT size=2> if [ `grep -c "^${tape}$"
/tmp/TMPFILE.$$` -gt 0 ]</FONT> <BR><FONT size=2> then</FONT> <BR><FONT
size=2> echo $tape</FONT> <BR><FONT size=2> fi</FONT>
<BR><FONT size=2>done</FONT> <BR><FONT size=2>rm /tmp/TMPFILE.$$</FONT>
<BR><FONT size=2>exit</FONT> </P><BR>
<P><FONT size=2>That's it. Hope this helps.</FONT> <BR><FONT
size=2>-Mark</FONT> </P><BR><BR>
<P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From:
Shuster, James [<A
href="mailto:jshuster AT etrade DOT com">mailto:jshuster AT etrade DOT
com</A>]</FONT>
<BR><FONT size=2>Sent: Tuesday, March 11, 2003 1:54 PM</FONT> <BR><FONT
size=2>To: veritas-bu AT mailman.eng.auburn DOT edu</FONT> <BR><FONT
size=2>Subject:
[Veritas-bu] CLI for tape retensions.</FONT> </P><BR>
<P><FONT size=2>Looking for a CLI to report</FONT> <BR><FONT size=2>Tapes
that
have a retension of higher than 2 months.</FONT> <BR><FONT size=2>Tapes that
are still in the library and frozen.</FONT> <BR><FONT
size=2>_______________________________________________</FONT> <BR><FONT
size=2>Veritas-bu maillist -
Veritas-bu AT mailman.eng.auburn DOT edu</FONT> <BR><FONT size=2><A
href="http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu"
target=_blank>http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu</A></FONT>
</P></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C2E8C9.2AB5E98D--
------=_NextPartTM-000-f585ab25-54b6-11d7-bd54-00508bc82f2a--
|