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.
------_=_NextPart_001_01C2E424.DE0E4D30
Content-Type: text/plain;
charset="iso-8859-1"
So, sorry I don't have a reference for that. If you jump back and forth,
using a single imageid, between the -U, -l, etc. output, you can start
piecing it together.
ie: bpimagelist -backupid <id> -U
bpimagelist -backupid <id> -l
What, specifically, are you looking for? I may have it.
-M
-----Original Message-----
From: Pearson, Gregory M (Getronics) [mailto:Greg.Pearson AT bp DOT com]
Sent: Thursday, March 06, 2003 1:27 PM
To: 'veritas-bu AT mailman.eng.auburn DOT edu'
Subject: RE: [Veritas-bu] Reporting amount backed up per-machine?
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_01C2E424.DE0E4D30
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] Reporting amount backed up per-machine?</TITLE>
<META content="MSHTML 5.50.4923.2500" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=482180921-06032003><FONT face=Arial color=#0000ff size=2>So,
sorry I don't have a reference for that. If you jump back and forth,
using
a single imageid, between the -U, -l, etc. output, you can start piecing it
together.</FONT></SPAN></DIV>
<DIV><SPAN class=482180921-06032003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=482180921-06032003><FONT face=Arial color=#0000ff size=2>ie:
bpimagelist -backupid <id> -U</FONT></SPAN></DIV>
<DIV><SPAN class=482180921-06032003><FONT face=Arial color=#0000ff
size=2>
bpimagelist -backupid <id> -l</FONT></SPAN></DIV>
<DIV><SPAN class=482180921-06032003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=482180921-06032003><FONT face=Arial color=#0000ff size=2>What,
specifically, are you looking for? I may have it.</FONT></SPAN></DIV>
<DIV><SPAN class=482180921-06032003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=482180921-06032003><FONT face=Arial color=#0000ff
size=2>-M</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> Pearson, Gregory M
(Getronics) [mailto:Greg.Pearson AT bp DOT com]<BR><B>Sent:</B> Thursday,
March 06,
2003 1:27 PM<BR><B>To:</B>
'veritas-bu AT mailman.eng.auburn DOT edu'<BR><B>Subject:</B> RE:
[Veritas-bu]
Reporting amount backed up per-machine?<BR><BR></FONT></DIV>
<DIV>
<P><FONT size=2>Mark:</FONT></P>
<P><FONT size=2>First off, thanks for the script. I am using your logic to
create a script<SPAN class=244152420-06032003> </SPAN>for W2K servers, and
change it up a little bit. Do you (or anyone else)<SPAN
class=244152420-06032003> </SPAN>know what each of the different fields
represent in the output of<SPAN class=244152420-06032003> </SPAN>bpimagelist
or bperror? I want to use awk (for W32) to gather a little bit<SPAN
class=244152420-06032003> </SPAN>more information, but I haven't found a
decent reference on the various<SPAN class=244152420-06032003> </SPAN>fields
in the output. </FONT></P>
<P><FONT size=2>Thanks,</FONT></P>
<P><FONT size=2>Greg Pearson</FONT></P></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 05,
2003 3:22 PM<BR><B>To:</B> Veritasbu (E-mail)<BR><B>Subject:</B> RE:
[Veritas-bu] Reporting amount backed up per-machine?<BR><BR></FONT></DIV>
<P><FONT size=2>Tim,</FONT> <BR><FONT size=2>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.</FONT></P>
<P><FONT size=2>-M</FONT> </P>
<P><FONT size=2>#!/bin/ksh</FONT> </P>
<P><FONT size=2>PATH=$PATH:/usr/openv/netbackup/bin/admincmd</FONT>
<BR><FONT size=2>TMPFILE=/var/tmp/`basename $0`.tmp.$$</FONT> </P>
<P><FONT size=2>hours=24</FONT> </P>
<P><FONT size=2>echo "## Backup totals by client"</FONT> <BR><FONT
size=2>for client in `bpclclients -allunique -noheader | awk '{print $3}' |
sort`</FONT> <BR><FONT size=2>do</FONT> <BR><FONT size=2> bpimagelist
-hoursago $hours -client $client 2>/dev/null >$TMPFILE</FONT>
<BR><FONT size=2> if [ `wc -l $TMPFILE2 | awk '{print $1}` -eq 0
]</FONT> <BR><FONT size=2> then</FONT> <BR><FONT
size=2> echo "\n Null
\t$client"</FONT> <BR><FONT size=2> else</FONT> <BR><FONT
size=2> awk 'BEGIN {sum=0;OFMT="%8.1f"}</FONT> <BR><FONT
size=2> {if ($1=="IMAGE")
{sum=sum+$19}}</FONT> <BR><FONT size=2> END {
if (sum<1024) {</FONT> <BR><FONT
size=2>
printf ("\n%9.1f KB\t%s\n",sum,"'$client'")</FONT> <BR><FONT
size=2>
} else {</FONT> <BR><FONT
size=2>
if
(sum<1048576) {</FONT> <BR><FONT
size=2>
printf ("\n%9.1f MB\t%s\n",sum/1024,"'$client'")</FONT> <BR><FONT
size=2>
} else {</FONT> <BR><FONT
size=2>
printf ("\n%9.1f GB\t%s\n",sum/1024/1024,"'$client'")</FONT> <BR><FONT
size=2>
}}}' $TMPFILE</FONT> <BR><FONT size=2> for policy in `awk
'$1=="IMAGE"
{print $7}' $TMPFILE | sort -u`</FONT> <BR><FONT size=2> do</FONT>
<BR><FONT size=2> awk 'BEGIN {sum=0;OFMT="%8.1f"}</FONT>
<BR><FONT size=2> {if ($1=="IMAGE" &&
$7=="'$policy'" ) {sum=sum+$19}}</FONT> <BR><FONT
size=2> END { if (sum<1024) {</FONT>
<BR><FONT
size=2>
printf ("\t\t%9.1f KB\tP=%s\n",sum,"'$policy'")</FONT> <BR><FONT
size=2>
} else {</FONT> <BR><FONT
size=2>
if
(sum<1048576) {</FONT> <BR><FONT
size=2>
printf ("\t\t%9.1f MB\tP=%s\n",sum/1024,"'$policy'")</FONT> <BR><FONT
size=2>
} else {</FONT> <BR><FONT
size=2>
printf ("\t\t%9.1f GB\tP=%s\n",sum/1024/1024,"'$policy'")</FONT> <BR><FONT
size=2>
}}}' $TMPFILE</FONT> <BR><FONT size=2> done</FONT> <BR><FONT
size=2> fi</FONT> <BR><FONT size=2>done</FONT> </P>
<P><FONT size=2>[ -f $TMPFILE ] && rm -f $TMPFILE</FONT> <BR><FONT
size=2>exit</FONT> </P>
<P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From:
Tim
McMurphy [<A
href="mailto:Tim.McMurphy AT telus DOT com">mailto:Tim.McMurphy AT telus
DOT com</A>]</FONT>
<BR><FONT size=2>Sent: Wednesday, March 05, 2003 1:49 PM</FONT> <BR><FONT
size=2>To: 'Donaldson, Mark'</FONT> <BR><FONT size=2>Subject: RE:
[Veritas-bu] Reporting amount backed up per-machine?</FONT> </P><BR>
<P><FONT size=2>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.</FONT></P>
<P><FONT size=2>Thanks for posting it.</FONT> </P>
<P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From:
Donaldson, Mark [<A
href="mailto:Mark.Donaldson AT experianems DOT com">mailto:Mark.Donaldson
AT experianems DOT com</A>]</FONT>
<BR><FONT size=2>Sent: Monday, March 03, 2003 10:38 AM</FONT> <BR><FONT
size=2>To: 'H. Wade Minter'; veritas-bu AT mailman.eng.auburn DOT
edu</FONT>
<BR><FONT size=2>Subject: RE: [Veritas-bu] Reporting amount backed up
per-machine?</FONT> </P><BR>
<P><FONT size=2>This'll report totals for the past 24 hours:
</FONT><BR><FONT size=2>echo "KB\tClient\n--\t------" </FONT><BR><FONT
size=2>for client in `bpclclients -allunique -noheader | awk '{print $3}'`
</FONT><BR><FONT size=2>do </FONT><BR><FONT size=2> </FONT><BR><FONT
size=2> bpimagelist -hoursago 24 -client $client 2>/dev/null| \
</FONT><BR><FONT size=2> awk 'BEGIN {sum=0}
</FONT><BR><FONT size=2>
{OFMT="%.1f";if ($1=="IMAGE") {sum=sum+$19}} </FONT><BR><FONT
size=2> END {print sum
"\t'$client'"}' </FONT><BR><FONT size=2>done </FONT><BR><FONT size=2>output
looks like this </FONT><BR><FONT
size=2>KB Client </FONT><BR><FONT
size=2>-- ------ </FONT><BR><FONT
size=2>0 app00.devel </FONT><BR><FONT
size=2>1507 app00.prod </FONT><BR><FONT
size=2>38924 app00.test </FONT><BR><FONT
size=2>50659 app01.prod </FONT><BR><FONT
size=2>28288 app02.prod </FONT><BR><FONT size=2><snip>
</FONT><BR><FONT size=2>Note, clients with no backup data show as "0", not
as a null indicator. </FONT><BR><FONT size=2>-M </FONT></P><BR>
<P><FONT size=2>-----Original Message----- </FONT><BR><FONT size=2>From: H.
Wade Minter [<A
href="mailto:minter AT hcssystems DOT com">mailto:minter AT hcssystems DOT
com</A>]
</FONT><BR><FONT size=2>Sent: Monday, March 03, 2003 8:09 AM
</FONT><BR><FONT size=2>To: veritas-bu AT mailman.eng.auburn DOT edu
</FONT><BR><FONT size=2>Subject: [Veritas-bu] Reporting amount backed up
per-machine? </FONT></P><BR>
<P><FONT size=2>-----BEGIN PGP SIGNED MESSAGE----- </FONT><BR><FONT
size=2>Hash: SHA1 </FONT><BR><FONT size=2>Is there a way to query NetBackup
to determine how much data was backed up </FONT><BR><FONT
size=2>per-machine
per-night? </FONT><BR><FONT size=2>For example, I have a backup class with
about six machines. Using </FONT><BR><FONT size=2>bpmedialist,
I
can see how much data a _tape_ has on it, but don't know how
</FONT><BR><FONT size=2>to break it down per-machine. What I'd like
to
do is be able to query "How </FONT><BR><FONT size=2>much data did machine1
back up last night", or last Tuesday, or whatever. </FONT><BR><FONT
size=2>Is this operation possible in NetBackup 3.4? </FONT><BR><FONT
size=2>Thanks, </FONT><BR><FONT size=2>Wade </FONT><BR><FONT size=2>- --
</FONT><BR><FONT size=2>H. Wade Minter </FONT><BR><FONT size=2>Senior Unix
Systems Engineer </FONT><BR><FONT size=2>IBM Business Consulting Services,
NC Wise Project </FONT><BR><FONT size=2>-----BEGIN PGP SIGNATURE-----
</FONT><BR><FONT size=2>Version: GnuPG v1.2.1 (GNU/Linux) </FONT><BR><FONT
size=2>iD8DBQE+Y3AajWXVnTuVP7kRAi3/AKDG/Q6czvCpqOiJru0QJBTMVe+x/QCgrjuS
</FONT><BR><FONT size=2>VL+EymeZO+JNC22iPoR1nmo= </FONT><BR><FONT
size=2>=0Eu+ </FONT><BR><FONT size=2>-----END PGP SIGNATURE-----
</FONT></P><BR>
<P><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
target=_blank
href="http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu">http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu</A>
</FONT></P></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C2E424.DE0E4D30--
|