Veritas-bu

[Veritas-bu] SUMMARY - Bpdbjobs database file ??

2004-10-13 09:30:21
Subject: [Veritas-bu] SUMMARY - Bpdbjobs database file ??
From: Andrew.Hardy AT marks-and-spencer DOT com (Hardy, Andrew)
Date: Wed, 13 Oct 2004 14:30:21 +0100
This is a multi-part message in MIME format.

------_=_NextPart_001_01C4B128.C9E7C008
Content-Type: text/plain;
        charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

All,
=20
Many thanks to all who helped me solve this problem, with special thanks
to:
=20
Dave Chapa & Mark Donaldson
=20

*       What I wanted to do, was to create a script which would count up
the number of backup jobs, which were started during the past 24 hours &
then report as a percentage, any failures that occurred.

In order to do this, I needed to better understand the output of
bpdbjobs -report -all_columns, which was explained by Dave
Chapa....below:
=20
The (comma delimited) 9th field is the time the job entered the queue,
the 10th field is total elapse time (including queue time), the 11th
will be end time.  If you want to get just the actual time it took for
the job (without including waiting in the queue) then the parsing of
this output becomes a bit more complicated.  This is a dynamic output
and requires a great deal of understanding.

(1)jobid,(2)jobtype,(3)state,(4)status,(5)class,(6)sched,(7)client,(8)se
rver,(9)queuedtime,(10)elapsedfromqueuedtime,(11)endtime,(12)stunit,(13)
backuptry,(14)operationtype
(15)kbytes,(16)files,(17)pathlastwritten,(18)percent,(19)jobpid,(20)owne
r,(21)subtype,(22)classtype,(23)schedule_type,(24)jobpriority,(25)group,
(26)masterserver,
(27)retentionunits,(28)retentionperiod,(29)compression,(30)kbyteslastwri
tten,(31)fileslastwritten,(32)filelistcount
(33*)[files]...,(34*)trycount,[trypid,trystunit,tryserver,trystarted,try
elapsed,tryended,trystatus,trystatusdescription,trystatuscount,[trystatu
slines]...,trybyteswritten,tryfileswritten]...
 Everything up to Field 32 is fixed beyond that the output is dynamic
and you will find out how many name files in the files list based on the
number in field 32. =20
If you add that number to 33 (next field) it will take you to the number
of tries the backup job attempted. =20
For the first try move over 4 to get the start time of the first try, 5
for the elapse time of the first try, 6 for the end time of the first
try, etc.

*       I then used the following code to report on percentage success
rates:

1.      The $INPUTFILE is basically an output of bpdbjobs -most_columns.

2.      $REQ_TIME_AGO is how many hours backwards you want to look (in
seconds).

=20
nawk -F, -v reqtimeago=3D$REQ_TIME_AGO '{if($9>reqtimeago &&
$2=3D=3D0){countjob++}
=20
                else{ignorejob++}}
=20
                        END {print "Overall Total number of backup
jobs:\t\t\t\t "countjob""}' < $INPUTFILE

        nawk -F, -v reqtimeago=3D$REQ_TIME_AGO ' {if($9>reqtimeago &&
$2=3D=3D0 && $4>2){countbad++}
=20
                else{if($9>reqtimeago && $2=3D=3D0 && =
$4<2){countgood++}}}
=20
                        END {print "Overall Total number of successful
backup jobs:\t\t\t "countgood"\n\nOverall Total number of failed
jobs:\t\t\t\t "countbad"
\n\nOverall Total percentage of successful jobs:\t\t\t\t =3D>
"int(countgood/(countgood+countbad)*100)"% "}' < $INPUTFILE
=20
=20
If anyone wants any more details about this, then please let me know.
=20
Cheers
=20
Andy Hardy


-----------------------------------------------------------------------


Registered Office:
Marks and Spencer plc
Waterside House
35 North Wharf Road
London
W2 1NW

Registered No. 214436 in England and Wales.

Telephone (020) 7935 4422
=46acsimile (020) 7487 2670

www.marksandspencer.com

Please note that electronic mail may be monitored.

This e-mail is confidential. If you received it by mistake, please =
let us know and then delete it from your system; you should not =
copy, disclose, or distribute its contents to anyone nor act in =
reliance on this e-mail, as this is prohibited and may be unlawful.

The registered office of Marks and Spencer Financial Services PLC, =
Marks and Spencer Unit Trust Management Limited, Marks and Spencer =
Life Assurance Limited and Marks and Spencer Savings and Investments =
Limited is Kings Meadow, Chester, CH99 9FB. These firms are =
authorised and regulated by the Financial Services Authority.=20


------_=_NextPart_001_01C4B128.C9E7C008
Content-Type: text/html;
        charset="us-ascii"
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=3Dus-ascii">
<TITLE>Message</TITLE>

<META content=3D"MSHTML 6.00.2800.1458" name=3DGENERATOR></HEAD>
<BODY><FONT face=3DArial color=3D#0000ff size=3D2>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D141004110-13102004>All,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D141004110-13102004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D141004110-13102004>Many=20
thanks to all who helped me solve this problem, with special thanks=20
to:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D141004110-13102004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D141004110-13102004>Dave=20
Chapa &amp; Mark Donaldson</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D141004110-13102004></SPAN></FONT>&nbsp;</DIV>
<UL>
  <LI><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D141004110-13102004>What=20
  I wanted to do, was to create a script which would count up the number =
of=20
  backup jobs, which were started during the past 24 hours &amp; then =
report as=20
  a percentage, any failures that occurred.</SPAN></FONT></LI></UL>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D141004110-13102004>In=20
order to do this, I needed to better understand the output of bpdbjobs =
-report=20
-all_columns, which was explained by Dave =
Chapa....below:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D141004110-13102004><SPAN=20
class=3D141004110-13102004><FONT face=3DArial color=3Dnavy =
size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"></SPAN></FONT></SPAN></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D141004110-13102004><SPAN=20
class=3D141004110-13102004><FONT face=3DArial color=3Dnavy =
size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">The (comma =
delimited)=20
9<SUP>th</SUP> field is the time the job entered the queue, the =
10<SUP>th</SUP>=20
field is total elapse time (including queue time), the 11<SUP>th</SUP> =
will be=20
end time.<SPAN style=3D"mso-spacerun: yes">&nbsp; </SPAN>If you want to =
get just=20
the actual time it took for the job (without including waiting in the =
queue)=20
then the parsing of this output becomes a bit more complicated.<SPAN=20
style=3D"mso-spacerun: yes">&nbsp; </SPAN>This is a dynamic output and =
requires a=20
great deal of understanding.<?xml:namespace prefix =3D o ns =3D=20
"urn:schemas-microsoft-com:office:office" =
/><o:p></o:p></SPAN></FONT></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p></o:p></SPAN></FONT></P><PRE><FONT face=3DArial =
size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><FONT color=3D#ff0000>(1)<SPAN =
class=3DSpellE>jobid</SPAN>,(2)<SPAN =
class=3DSpellE>jobtype</SPAN>,(3)state,(4)status,(5)class,(6)<SPAN =
class=3DSpellE>sched</SPAN>,(7)client,(8)server,(9)<SPAN =
class=3DSpellE>queuedtime</SPAN>,(10)<SPAN =
class=3DSpellE>elapsedfromqueuedtime</SPAN>,(11)<SPAN =
class=3DSpellE>endtime</SPAN>,(12)<SPAN =
class=3DSpellE>stunit</SPAN>,(13)<SPAN =
class=3DSpellE>backuptry</SPAN>,(14)<SPAN =
class=3DSpellE>operationtype</SPAN></FONT></SPAN></FONT></PRE><PRE><FONT =
face=3DArial size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: navy; =
FONT-FAMILY: Arial"><FONT color=3D#ff0000>(15)<SPAN =
class=3DSpellE>kbytes</SPAN>,(16)files,(17)<SPAN =
class=3DSpellE>pathlastwritten</SPAN>,(18)percent,(19)<SPAN =
class=3DSpellE>jobpid</SPAN>,(20)owner,(21)subtype,(22)<SPAN =
class=3DSpellE>classtype</SPAN>,(23)<SPAN =
class=3DSpellE>schedule_type</SPAN>,(24)<SPAN =
class=3DSpellE>jobpriority</SPAN>,(25)group,(26)<SPAN =
class=3DSpellE>masterserver</SPAN>,<o:p></o:p></FONT></SPAN></FONT></PRE>=
<PRE><FONT face=3DArial size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: =
navy; FONT-FAMILY: Arial"><FONT color=3D#ff0000>(27)<SPAN =
class=3DSpellE>retentionunits</SPAN>,(28)<SPAN =
class=3DSpellE>retentionperiod</SPAN>,(29)compression,(30)<SPAN =
class=3DSpellE>kbyteslastwritten</SPAN>,(31)<SPAN =
class=3DSpellE>fileslastwritten</SPAN>,(32)<SPAN =
class=3DSpellE>filelistcount</SPAN></FONT></SPAN></FONT></PRE><PRE><FONT =
face=3DArial size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: navy; =
FONT-FAMILY: Arial"><SPAN class=3DSpellE></SPAN><FONT =
color=3D#ff0000>(33*)[files]...,(34*)<SPAN =
class=3DSpellE>trycount</SPAN>,[trypid,trystunit,tryserver,trystarted,try=
elapsed,tryended,trystatus,trystatusdescription,trystatuscount,[<SPAN =
class=3DSpellE>trystatuslines</SPAN>]...,<SPAN =
class=3DSpellE>trybyteswritten,tryfileswritten</SPAN>]...<o:p></o:p></FON=
T></SPAN></FONT></PRE><PRE><FONT face=3DArial color=3Dnavy =
size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT><FONT face=3DArial color=3Dnavy =
size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">Everything up to Field 32 is fixed beyond that the output is =
dynamic and you will find out how many name files in the files list =
based on the number in field 32.<SPAN style=3D"mso-spacerun: yes">&nbsp; =
</SPAN></SPAN></FONT></PRE><PRE><FONT face=3DArial color=3Dnavy =
size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><SPAN style=3D"mso-spacerun: yes"></SPAN>If you add that number =
to 33 (next field) it will take you to the number of tries the backup =
job attempted.<SPAN style=3D"mso-spacerun: yes">&nbsp; =
</SPAN></SPAN></FONT></PRE><PRE><FONT face=3DArial color=3Dnavy =
size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><SPAN style=3D"mso-spacerun: yes"></SPAN>For the first try move =
over 4 to get the start time of the first try, 5 for the elapse time of =
the first try, 6 for the end time of the first try, =
etc.</SPAN></FONT></SPAN></SPAN></FONT></PRE></DIV>
<UL>
  <LI><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D141004110-13102004>I=20
  then used the following code to report on percentage success=20
  rates:</SPAN></FONT></LI></UL>
<OL>
  <LI><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D141004110-13102004>The=20
  $INPUTFILE is basically an output of bpdbjobs =
-most_columns.</SPAN></FONT>=20
  </LI>
  <LI><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
  class=3D141004110-13102004>$REQ_TIME_AGO is how many hours backwards =
you want to=20
  look (in seconds).</SPAN></FONT></LI></OL>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D141004110-13102004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#800000 size=3D2><SPAN =
class=3D141004110-13102004>nawk=20
-F, -v reqtimeago=3D$REQ_TIME_AGO '{if($9&gt;reqtimeago &amp;&amp;=20
$2=3D=3D0){countjob++}</SPAN></FONT></DIV>
<DIV><FONT color=3D#800000></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#800000 size=3D2><SPAN=20
class=3D141004110-13102004>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
else{ignorejob++}}</SPAN></FONT></DIV>
<DIV><FONT color=3D#800000></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#800000 size=3D2><SPAN=20
class=3D141004110-13102004>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;=20
END {print "Overall Total number of backup jobs:\t\t\t\t "countjob""}' =
&lt;=20
$INPUTFILE</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D141004110-13102004><FONT=20
color=3D#0000ff></FONT><BR><FONT=20
color=3D#800000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nawk -F, -v=20
reqtimeago=3D$REQ_TIME_AGO ' {if($9&gt;reqtimeago &amp;&amp; $2=3D=3D0 =
&amp;&amp;=20
$4&gt;2){countbad++}</FONT></DIV>
<DIV><FONT color=3D#800000></FONT>&nbsp;</DIV>
<DIV><FONT=20
color=3D#800000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
else{if($9&gt;reqtimeago &amp;&amp; $2=3D=3D0 &amp;&amp;=20
$4&lt;2){countgood++}}}</FONT></DIV>
<DIV><FONT color=3D#800000></FONT>&nbsp;</DIV>
<DIV><FONT=20
color=3D#800000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
END {print "Overall Total number of successful backup jobs:\t\t\t=20
"countgood"\n\nOverall Total number of failed jobs:\t\t\t\t=20
"countbad"<BR>\n\nOverall Total percentage of successful jobs:\t\t\t\t =
=3D&gt;=20
"int(countgood/(countgood+countbad)*100)"% "}' &lt;=20
$INPUTFILE</FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D141004110-13102004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D141004110-13102004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D141004110-13102004>If=20
anyone wants any more details about this, then please let me=20
know.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D141004110-13102004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D141004110-13102004>Cheers</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D141004110-13102004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D141004110-13102004>Andy=20
Hardy</SPAN></FONT></FONT></DIV><HR><P><BR>Registered Office:<BR>Marks and 
Spencer plc<BR>Waterside =
House<BR>35 North Wharf Road<BR>London<BR>W2 1NW<BR><BR>Registered =
No. 214436 in England and Wales.<BR><BR>Telephone (020) 7935 =
4422<BR>Facsimile (020) 7487 =
2670<BR><BR>www.marksandspencer.com<BR><BR>Please note that =
electronic mail may be monitored.<BR><BR>This e-mail is =
confidential. If you received it by mistake, please let us know and =
then delete it from your system; you should not copy, disclose, or =
distribute its contents to anyone nor act in reliance on this =
e-mail, as this is prohibited and may be unlawful.<BR><BR>The =
registered office of Marks and Spencer Financial Services PLC, Marks =
and Spencer Unit Trust Management Limited, Marks and Spencer Life =
Assurance Limited and Marks and Spencer Savings and Investments =
Limited is Kings Meadow, Chester, CH99 9FB. These firms are =
authorised and regulated by the Financial Services Authority. =
<BR><BR></P>
</BODY></HTML>

------_=_NextPart_001_01C4B128.C9E7C008--


<Prev in Thread] Current Thread [Next in Thread>
  • [Veritas-bu] SUMMARY - Bpdbjobs database file ??, Hardy, Andrew <=