This is a multipart message in MIME format.
--=_alternative 00338FC286256E50_=
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
here's a snippet from what I use. you'll have to set the variable for=20
bpimagelist, hours and master or enter them in to what youd like...
# ******************************************************************
# Add total backup kbytes to report
# ******************************************************************
$bpimagelist -U -hoursago $hours -M $master | tail +3 |
awk '{
kbytes=3D kbytes + $5
}
END {
mbytes=3D kbytes / 1024
gbytes=3D mbytes / 1024
tbytes=3D gbytes / 1024
if (gbytes < 1024) {
print "A total of",gbytes,"GB of data has been backed up during=20
the last",hours,"hours."
} else {
print "A total of",tbytes,"TB of data has been backed up during=20
the last",hours,"hours."
}
}' hours=3D$hours
- Scott
"kurbis gemuse" <kurbisgemuse AT hotmail DOT com>
Sent by: veritas-bu-admin AT mailman.eng.auburn DOT edu
03/05/2004 06:01 PM
=20
To: veritas-bu AT mailman.eng.auburn DOT edu
cc:=20
Subject: [Veritas-bu] the amount of backup data in the last =
24h
Hi all! I'd like do know if is there another way to generate a result of=20
the=20
last 24 hours of backed up data in a Netbackup 4.5 Datacenter server.
Here's the code we have:
date > /tmp/backup.txt
echo "Backups executed in the last 24 hours" >> /backups.txt
/usr/openv/netbackup/bin/admincmd/bperror -all -hoursago 24 | grep=20
"successfully wrote backup id" | awk '{bytes=3Dbytes + $20} END {print=20
"backed=20
up",bytes," Kbytes of data"}' >> /backups.txt
/usr/openv/netbackup/bin/admincmd/bperror -all -hoursago 24 | grep=20
"successfully wrote backup id" | wc -l | awk '{print "Backups with sucess: =
",$1}' >> /backups.txt
I would like to know if this is the rightest way to do it or if is there a =
better way.
Tks
Kurbis
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
MSN Messenger: instale gr=E1tis e converse com seus amigos.=20
http://messenger.msn.com.br
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
--=_alternative 00338FC286256E50_=
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<br><font size=3D2 face=3D"Arial">here's a snippet from what I use. y=
ou'll have to set the variable for bpimagelist, hours and master or enter t=
hem in to what youd like...</font>
<br>
<br>
<br><font size=3D2 face=3D"Arial"># ***************************************=
***************************</font>
<br><font size=3D2 face=3D"Arial"># Add total ba=
ckup kbytes to report</font>
<br><font size=3D2 face=3D"Arial"># ***************************************=
***************************</font>
<br>
<br><font size=3D2 face=3D"Arial">$bpimagelist -U -hoursago $hours -M $mast=
er | tail +3 |</font>
<br>
<br><font size=3D2 face=3D"Arial">awk '{</font>
<br><font size=3D2 face=3D"Arial"> kbytes=3D kbytes + $5</font>
<br><font size=3D2 face=3D"Arial">}</font>
<br><font size=3D2 face=3D"Arial">END {</font>
<br><font size=3D2 face=3D"Arial"> mbytes=3D kbytes / 1024</fo=
nt>
<br><font size=3D2 face=3D"Arial"> gbytes=3D mbytes / 1024</fo=
nt>
<br><font size=3D2 face=3D"Arial"> tbytes=3D gbytes / 1024</fo=
nt>
<br><font size=3D2 face=3D"Arial"> if (gbytes < 1024) {</fo=
nt>
<br><font size=3D2 face=3D"Arial"> print "A=
total of",gbytes,"GB of data has been backed up during the last&=
quot;,hours,"hours."</font>
<br><font size=3D2 face=3D"Arial"> } else {</font>
<br><font size=3D2 face=3D"Arial"> print "A=
total of",tbytes,"TB of data has been backed up during the last&=
quot;,hours,"hours."</font>
<br><font size=3D2 face=3D"Arial"> }</font>
<br><font size=3D2 face=3D"Arial">}' hours=3D$hours</font>
<br>
<br>
<br>
<br><font size=3D2 face=3D"Arial">- Scott</font>
<br>
<br>
<br>
<br>
<table width=3D100%>
<tr valign=3Dtop>
<td>
<td><font size=3D1 face=3D"sans-serif"><b>"kurbis gemuse" <kur=
bisgemuse AT hotmail DOT com></b></font>
<br><font size=3D1 face=3D"sans-serif">Sent by: veritas-bu-admin AT mailman DOT
en=
g.auburn.edu</font>
<p><font size=3D1 face=3D"sans-serif">03/05/2004 06:01 PM</font>
<br>
<td><font size=3D1 face=3D"Arial"> </font>
<br><font size=3D1 face=3D"sans-serif"> To: &nbs=
p; veritas-bu AT mailman.eng.auburn DOT edu</font>
<br><font size=3D1 face=3D"sans-serif"> cc: &nbs=
p; </font>
<br><font size=3D1 face=3D"sans-serif"> Subject:=
[Veritas-bu] the amount of backup data in the l=
ast 24h</font></table>
<br>
<br>
<br><font size=3D2 face=3D"Courier New">Hi all! I'd like do know if is ther=
e another way to generate a result of the <br>
last 24 hours of backed up data in a Netbackup 4.5 Datacenter server.<br>
<br>
Here's the code we have:<br>
<br>
<br>
date > /tmp/backup.txt<br>
<br>
echo "Backups executed in the last 24 hours" >> /backups.tx=
t<br>
<br>
/usr/openv/netbackup/bin/admincmd/bperror -all -hoursago 24 | grep <br>
"successfully wrote backup id" | awk '{bytes=3Dbytes + $20} END {=
print "backed <br>
up",bytes," Kbytes of data"}' >> /backups.txt<br>
<br>
/usr/openv/netbackup/bin/admincmd/bperror -all -hoursago 24 | grep <br>
"successfully wrote backup id" | wc -l | awk '{print "Backup=
s with sucess: <br>
",$1}' >> /backups.txt<br>
<br>
<br>
I would like to know if this is the rightest way to do it or if is there a =
<br>
better way.<br>
<br>
<br>
Tks<br>
<br>
Kurbis<br>
<br>
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>
MSN Messenger: instale gr=E1tis e converse com seus amigos. <br>
http://messenger.msn.com.br<br>
<br>
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu<br>
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu<br>
</font>
<br>
<br>
--=_alternative 00338FC286256E50_=--
|