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-88df6e09-500b-11d7-b78d-0002a58abbf5
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C2E41E.5B45BCCC"
------_=_NextPart_001_01C2E41E.5B45BCCC
Content-Type: text/plain;
charset="iso-8859-1"
Mark:
First off, thanks for the script. I am using your logic to create a script
for W2K servers, and change it up a little bit. Do you (or anyone else) know
what each of the different fields represent in the output of bpimagelist or
bperror? I want to use awk (for W32) to gather a little bit more
information, but I haven't found a decent reference on the various fields in
the output.
Thanks,
Greg Pearson
-----Original Message-----
From: Donaldson, Mark [mailto:Mark.Donaldson AT experianems DOT com]
Sent: Wednesday, March 05, 2003 3:22 PM
To: Veritasbu (E-mail)
Subject: RE: [Veritas-bu] Reporting amount backed up per-machine?
Tim,
Try this version, then. I improved the script after the original posting
for my own internal use - the non-backups show as "null" and there's
subtotals for the each class/policy per client.
-M
#!/bin/ksh
PATH=$PATH:/usr/openv/netbackup/bin/admincmd
TMPFILE=/var/tmp/`basename $0`.tmp.$$
hours=24
echo "## Backup totals by client"
for client in `bpclclients -allunique -noheader | awk '{print $3}' | sort`
do
bpimagelist -hoursago $hours -client $client 2>/dev/null >$TMPFILE
if [ `wc -l $TMPFILE2 | awk '{print $1}` -eq 0 ]
then
echo "\n Null \t$client"
else
awk 'BEGIN {sum=0;OFMT="%8.1f"}
{if ($1=="IMAGE") {sum=sum+$19}}
END { if (sum<1024) {
printf ("\n%9.1f KB\t%s\n",sum,"'$client'")
} else {
if (sum<1048576) {
printf ("\n%9.1f MB\t%s\n",sum/1024,"'$client'")
} else {
printf ("\n%9.1f GB\t%s\n",sum/1024/1024,"'$client'")
}}}' $TMPFILE
for policy in `awk '$1=="IMAGE" {print $7}' $TMPFILE | sort -u`
do
awk 'BEGIN {sum=0;OFMT="%8.1f"}
{if ($1=="IMAGE" && $7=="'$policy'" ) {sum=sum+$19}}
END { if (sum<1024) {
printf ("\t\t%9.1f KB\tP=%s\n",sum,"'$policy'")
} else {
if (sum<1048576) {
printf ("\t\t%9.1f MB\tP=%s\n",sum/1024,"'$policy'")
} else {
printf ("\t\t%9.1f GB\tP=%s\n",sum/1024/1024,"'$policy'")
}}}' $TMPFILE
done
fi
done
[ -f $TMPFILE ] && rm -f $TMPFILE
exit
-----Original Message-----
From: Tim McMurphy [ mailto:Tim.McMurphy AT telus DOT com
<mailto:Tim.McMurphy AT telus DOT com> ]
Sent: Wednesday, March 05, 2003 1:49 PM
To: 'Donaldson, Mark'
Subject: RE: [Veritas-bu] Reporting amount backed up per-machine?
Cool script. I use it a bit differently. I already had one that showed what
was backed up and how much but I was looking for one that would show if a
client didn't back up but didn't give any errors (has happened before). The
zero is and easy one to parse for.
Thanks for posting it.
-----Original Message-----
From: Donaldson, Mark [ mailto:Mark.Donaldson AT experianems DOT com
<mailto:Mark.Donaldson AT experianems DOT com> ]
Sent: Monday, March 03, 2003 10:38 AM
To: 'H. Wade Minter'; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] Reporting amount backed up per-machine?
This'll report totals for the past 24 hours:
echo "KB\tClient\n--\t------"
for client in `bpclclients -allunique -noheader | awk '{print $3}'`
do
bpimagelist -hoursago 24 -client $client 2>/dev/null| \
awk 'BEGIN {sum=0}
{OFMT="%.1f";if ($1=="IMAGE") {sum=sum+$19}}
END {print sum "\t'$client'"}'
done
output looks like this
KB Client
-- ------
0 app00.devel
1507 app00.prod
38924 app00.test
50659 app01.prod
28288 app02.prod
<snip>
Note, clients with no backup data show as "0", not as a null indicator.
-M
-----Original Message-----
From: H. Wade Minter [ mailto:minter AT hcssystems DOT com
<mailto:minter AT hcssystems DOT com> ]
Sent: Monday, March 03, 2003 8:09 AM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Reporting amount backed up per-machine?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Is there a way to query NetBackup to determine how much data was backed up
per-machine per-night?
For example, I have a backup class with about six machines. Using
bpmedialist, I can see how much data a _tape_ has on it, but don't know how
to break it down per-machine. What I'd like to do is be able to query "How
much data did machine1 back up last night", or last Tuesday, or whatever.
Is this operation possible in NetBackup 3.4?
Thanks,
Wade
- --
H. Wade Minter
Senior Unix Systems Engineer
IBM Business Consulting Services, NC Wise Project
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+Y3AajWXVnTuVP7kRAi3/AKDG/Q6czvCpqOiJru0QJBTMVe+x/QCgrjuS
VL+EymeZO+JNC22iPoR1nmo=
=0Eu+
-----END PGP SIGNATURE-----
_______________________________________________
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_01C2E41E.5B45BCCC
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE>RE: [Veritas-bu] Reporting amount backed up per-machine?</TITLE>
<META content=3D"MSHTML 5.50.4913.1100" name=3DGENERATOR></HEAD>
<BODY>
<DIV>
<P><FONT size=3D2>Mark:</FONT></P>
<P><FONT size=3D2>First off, thanks for the script. I am using your =
logic to=20
create a script<SPAN class=3D244152420-06032003> </SPAN>for W2K =
servers, and=20
change it up a little bit. Do you (or anyone else)<SPAN=20
class=3D244152420-06032003> </SPAN>know what each of the different =
fields=20
represent in the output of<SPAN class=3D244152420-06032003> =
</SPAN>bpimagelist or=20
bperror? I want to use awk (for W32) to gather a little bit<SPAN=20
class=3D244152420-06032003> </SPAN>more information, but I haven't =
found a decent=20
reference on the various<SPAN class=3D244152420-06032003> </SPAN>fields =
in the=20
output. </FONT></P>
<P><FONT size=3D2>Thanks,</FONT></P>
<P><FONT size=3D2>Greg Pearson</FONT></P></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> Donaldson, Mark=20
[mailto:Mark.Donaldson AT experianems DOT com]<BR><B>Sent:</B> Wednesday, =
March 05,=20
2003 3:22 PM<BR><B>To:</B> Veritasbu (E-mail)<BR><B>Subject:</B> RE:=20
[Veritas-bu] Reporting amount backed up =
per-machine?<BR><BR></FONT></DIV>
<P><FONT size=3D2>Tim,</FONT> <BR><FONT size=3D2>Try this version, =
then. I=20
improved the script after the original posting for my own internal =
use - the=20
non-backups show as "null" and there's subtotals for the each =
class/policy per=20
client.</FONT></P>
<P><FONT size=3D2>-M</FONT> </P>
<P><FONT size=3D2>#!/bin/ksh</FONT> </P>
<P><FONT =
size=3D2>PATH=3D$PATH:/usr/openv/netbackup/bin/admincmd</FONT> =
<BR><FONT=20
size=3D2>TMPFILE=3D/var/tmp/`basename $0`.tmp.$$</FONT> </P>
<P><FONT size=3D2>hours=3D24</FONT> </P>
<P><FONT size=3D2>echo "## Backup totals by client"</FONT> <BR><FONT =
size=3D2>for=20
client in `bpclclients -allunique -noheader | awk '{print $3}' | =
sort`</FONT>=20
<BR><FONT size=3D2>do</FONT> <BR><FONT size=3D2> bpimagelist =
-hoursago=20
$hours -client $client 2>/dev/null >$TMPFILE</FONT> <BR><FONT=20
size=3D2> if [ `wc -l $TMPFILE2 | awk '{print $1}` -eq 0 =
]</FONT>=20
<BR><FONT size=3D2> then</FONT> <BR><FONT =
size=3D2> echo=20
"\n Null \t$client"</FONT> =
<BR><FONT=20
size=3D2> else</FONT> <BR><FONT size=3D2> awk =
'BEGIN=20
{sum=3D0;OFMT=3D"%8.1f"}</FONT> <BR><FONT =
size=3D2> =20
{if ($1=3D=3D"IMAGE") {sum=3Dsum+$19}}</FONT> <BR><FONT=20
size=3D2> END { if (sum<1024) =
{</FONT>=20
<BR><FONT=20
=
size=3D2> &nb=
sp; =20
printf ("\n%9.1f KB\t%s\n",sum,"'$client'")</FONT> <BR><FONT=20
=
size=3D2> &nb=
sp; &nb=
sp; =20
} else {</FONT> <BR><FONT=20
=
size=3D2> &nb=
sp; if=20
(sum<1048576) {</FONT> <BR><FONT=20
=
size=3D2> &nb=
sp; =20
printf ("\n%9.1f MB\t%s\n",sum/1024,"'$client'")</FONT> <BR><FONT=20
=
size=3D2> &nb=
sp; &nb=
sp; =20
} else {</FONT> <BR><FONT=20
=
size=3D2> &nb=
sp; =20
printf ("\n%9.1f GB\t%s\n",sum/1024/1024,"'$client'")</FONT> =
<BR><FONT=20
size=3D2> &=
nbsp; =20
}}}' $TMPFILE</FONT> <BR><FONT size=3D2> for policy in `awk =
'$1=3D=3D"IMAGE"=20
{print $7}' $TMPFILE | sort -u`</FONT> <BR><FONT size=3D2> =
do</FONT>=20
<BR><FONT size=3D2> awk 'BEGIN =
{sum=3D0;OFMT=3D"%8.1f"}</FONT>=20
<BR><FONT size=3D2> {if =
($1=3D=3D"IMAGE" &&=20
$7=3D=3D"'$policy'" ) {sum=3Dsum+$19}}</FONT> <BR><FONT=20
size=3D2> END { if (sum<1024) =
{</FONT>=20
<BR><FONT=20
=
size=3D2> &nb=
sp; =20
printf ("\t\t%9.1f KB\tP=3D%s\n",sum,"'$policy'")</FONT> <BR><FONT=20
=
size=3D2> &nb=
sp; &nb=
sp; =20
} else {</FONT> <BR><FONT=20
=
size=3D2> &nb=
sp; if=20
(sum<1048576) {</FONT> <BR><FONT=20
=
size=3D2> &nb=
sp; =20
printf ("\t\t%9.1f MB\tP=3D%s\n",sum/1024,"'$policy'")</FONT> =
<BR><FONT=20
=
size=3D2> &nb=
sp; &nb=
sp; =20
} else {</FONT> <BR><FONT=20
=
size=3D2> &nb=
sp; =20
printf ("\t\t%9.1f GB\tP=3D%s\n",sum/1024/1024,"'$policy'")</FONT> =
<BR><FONT=20
=
size=3D2> &nb=
sp; =20
}}}' $TMPFILE</FONT> <BR><FONT size=3D2> done</FONT> <BR><FONT=20
size=3D2> fi</FONT> <BR><FONT size=3D2>done</FONT> </P>
<P><FONT size=3D2>[ -f $TMPFILE ] && rm -f $TMPFILE</FONT> =
<BR><FONT=20
size=3D2>exit</FONT> </P>
<P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT =
size=3D2>From: Tim=20
McMurphy [<A=20
=
href=3D"mailto:Tim.McMurphy AT telus DOT com">mailto:Tim.McMurphy AT telus DOT
com</A>=
]</FONT>=20
<BR><FONT size=3D2>Sent: Wednesday, March 05, 2003 1:49 PM</FONT> =
<BR><FONT=20
size=3D2>To: 'Donaldson, Mark'</FONT> <BR><FONT size=3D2>Subject: RE: =
[Veritas-bu]=20
Reporting amount backed up per-machine?</FONT> </P><BR>
<P><FONT size=3D2>Cool script. I use it a bit differently. I already =
had one=20
that showed what was backed up and how much but I was looking for one =
that=20
would show if a client didn't back up but didn't give any errors (has =
happened=20
before). The zero is and easy one to parse for.</FONT></P>
<P><FONT size=3D2>Thanks for posting it.</FONT> </P>
<P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT =
size=3D2>From:=20
Donaldson, Mark [<A=20
=
href=3D"mailto:Mark.Donaldson AT experianems DOT com">mailto:Mark.Donaldson@exp=
erianems.com</A>]</FONT>=20
<BR><FONT size=3D2>Sent: Monday, March 03, 2003 10:38 AM</FONT> =
<BR><FONT=20
size=3D2>To: 'H. Wade Minter'; =
veritas-bu AT mailman.eng.auburn DOT edu</FONT>=20
<BR><FONT size=3D2>Subject: RE: [Veritas-bu] Reporting amount backed =
up=20
per-machine?</FONT> </P><BR>
<P><FONT size=3D2>This'll report totals for the past 24 hours: =
</FONT><BR><FONT=20
size=3D2>echo "KB\tClient\n--\t------" </FONT><BR><FONT size=3D2>for =
client in=20
`bpclclients -allunique -noheader | awk '{print $3}'` =
</FONT><BR><FONT=20
size=3D2>do </FONT><BR><FONT size=3D2> </FONT><BR><FONT =
size=3D2> =20
bpimagelist -hoursago 24 -client $client 2>/dev/null| \ =
</FONT><BR><FONT=20
size=3D2> awk 'BEGIN {sum=3D0} </FONT><BR><FONT=20
size=3D2> {OFMT=3D"%.1f";if =
($1=3D=3D"IMAGE") {sum=3Dsum+$19}} </FONT><BR><FONT=20
size=3D2> END {print sum=20
"\t'$client'"}' </FONT><BR><FONT size=3D2>done </FONT><BR><FONT =
size=3D2>output=20
looks like this </FONT><BR><FONT=20
size=3D2>KB Client =
</FONT><BR><FONT=20
size=3D2>-- ------ </FONT><BR><FONT=20
size=3D2>0 app00.devel =
</FONT><BR><FONT=20
size=3D2>1507 app00.prod </FONT><BR><FONT=20
size=3D2>38924 app00.test </FONT><BR><FONT =
size=3D2>50659 =20
app01.prod </FONT><BR><FONT size=3D2>28288 app02.prod=20
</FONT><BR><FONT size=3D2><snip> </FONT><BR><FONT =
size=3D2>Note, clients=20
with no backup data show as "0", not as a null indicator. =
</FONT><BR><FONT=20
size=3D2>-M </FONT></P><BR>
<P><FONT size=3D2>-----Original Message----- </FONT><BR><FONT =
size=3D2>From: H.=20
Wade Minter [<A=20
=
href=3D"mailto:minter AT hcssystems DOT com">mailto:minter AT hcssystems DOT
com</A>] =
</FONT><BR><FONT size=3D2>Sent: Monday, March 03, 2003 8:09 AM =
</FONT><BR><FONT=20
size=3D2>To: veritas-bu AT mailman.eng.auburn DOT edu </FONT><BR><FONT =
size=3D2>Subject:=20
[Veritas-bu] Reporting amount backed up per-machine? </FONT></P><BR>
<P><FONT size=3D2>-----BEGIN PGP SIGNED MESSAGE----- </FONT><BR><FONT =
size=3D2>Hash: SHA1 </FONT><BR><FONT size=3D2>Is there a way to query =
NetBackup to=20
determine how much data was backed up </FONT><BR><FONT =
size=3D2>per-machine=20
per-night? </FONT><BR><FONT size=3D2>For example, I have a backup =
class with=20
about six machines. Using </FONT><BR><FONT =
size=3D2>bpmedialist, I=20
can see how much data a _tape_ has on it, but don't know how =
</FONT><BR><FONT=20
size=3D2>to break it down per-machine. What I'd like to do is =
be able to=20
query "How </FONT><BR><FONT size=3D2>much data did machine1 back up =
last night",=20
or last Tuesday, or whatever. </FONT><BR><FONT size=3D2>Is this =
operation=20
possible in NetBackup 3.4? </FONT><BR><FONT size=3D2>Thanks, =
</FONT><BR><FONT=20
size=3D2>Wade </FONT><BR><FONT size=3D2>- -- </FONT><BR><FONT =
size=3D2>H. Wade=20
Minter </FONT><BR><FONT size=3D2>Senior Unix Systems Engineer =
</FONT><BR><FONT=20
size=3D2>IBM Business Consulting Services, NC Wise Project =
</FONT><BR><FONT=20
size=3D2>-----BEGIN PGP SIGNATURE----- </FONT><BR><FONT =
size=3D2>Version: GnuPG=20
v1.2.1 (GNU/Linux) </FONT><BR><FONT=20
=
size=3D2>iD8DBQE+Y3AajWXVnTuVP7kRAi3/AKDG/Q6czvCpqOiJru0QJBTMVe+x/QCgrju=
S=20
</FONT><BR><FONT size=3D2>VL+EymeZO+JNC22iPoR1nmo=3D </FONT><BR><FONT =
size=3D2>=3D0Eu+=20
</FONT><BR><FONT size=3D2>-----END PGP SIGNATURE----- </FONT></P><BR>
<P><FONT size=3D2>_______________________________________________=20
</FONT><BR><FONT size=3D2>Veritas-bu maillist - =20
Veritas-bu AT mailman.eng.auburn DOT edu </FONT><BR><FONT size=3D2><A =
target=3D_blank=20
=
href=3D"http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu">http:=
//mailman.eng.auburn.edu/mailman/listinfo/veritas-bu</A>=20
</FONT></P></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C2E41E.5B45BCCC--
------=_NextPartTM-000-88df6e09-500b-11d7-b78d-0002a58abbf5--
|