Veritas-bu

[Veritas-bu] bpdbjobs output

2001-07-16 11:16:09
Subject: [Veritas-bu] bpdbjobs output
From: paul.weaver AT stratech DOT com (Weaver, Paul)
Date: Mon, 16 Jul 2001 11:16:09 -0400
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_000_01C10E0A.3DC9C620
Content-Type: multipart/alternative;
        boundary="----_=_NextPart_001_01C10E0A.3DC9C620"


------_=_NextPart_001_01C10E0A.3DC9C620
Content-Type: text/plain;
        charset="iso-8859-1"

Jason,
        I have written a perl script that may be useful; it parses (or takes
as a file) the output of bpdbjobs -report -all_columns or a subset thereof;
see sample output below.  You may have to modify it, if you can use it, for
what you want.  I don't think all the kinks are out of it yet, but it does
the job when I need it to.

Paul Weaver


+BEGIN SAMPLE OUTPUT+
================
Job ID:   6650
================

     Job     Job
     Type    State   Status  Class                         Schedule
Client
     ======= ======  ======  ===========================   ===============
==============
     Backup    Done      96  WindowsNT                     C_Incr
Stiscnt

     Owner:  root      Retention Level: 3                    Start Time: Mon
Jul 16 00:04:43 2001
     Group:  (None)      Master Server: sc250              Elapsed Time:
2(h) 14(m) 48(s)
                          Media Server: sc250                  End Time: Mon
Jul 16 02:19:31 2001
                              Priority: 0

     Filelist:
        ( C:\\ )

     Try: 1
       Pid: 14874                                       Start Time: Mon Jul
16 00:04:44 2001
       Storage Unit: L1000                            Elapsed Time: 0(h)
18(m) 14(s)
       Media Server: sc250
       Status: (84) media write error
       Job Details:
            07/16/2001 00:04:40 - connecting
            07/16/2001 00:04:40 - connected; connect time: 000:00:00
            07/16/2001 00:04:50 - mounting DNS797
            07/16/2001 00:06:20 - mounted; mount time: 000:01:30
            07/16/2001 00:06:20 - positioning to file 75
            07/16/2001 00:08:50 - positioned; position time: 000:02:35
            07/16/2001 00:08:50 - begin writing
            07/16/2001 00:16:30 - positioning to file 76
            07/16/2001 00:16:30 - positioned; position time: 000:00:00
            07/16/2001 00:22:50 - end writing; write time: 000:14:03

       KBytes: 246656
        Files: 175


     Try: 2
       Pid: 8370                                        Start Time: Mon Jul
16 00:23:00 2001
       Storage Unit: L1000                            Elapsed Time: 1(h)
56(m) 31(s)
       Media Server: sc250
       Status: (96) unable to allocate new media for backup\  storage unit
has none available
       Job Details:
            07/16/2001 00:23:00 - connecting
            07/16/2001 00:23:00 - mounting DNS797
            07/16/2001 00:23:00 - connected; connect time: 000:00:02
            07/16/2001 00:26:50 - mounted; mount time: 000:03:49
            07/16/2001 00:26:50 - positioning to file 76
            07/16/2001 00:29:30 - positioned; position time: 000:02:35
            07/16/2001 00:29:30 - begin writing
            07/16/2001 00:36:40 - positioning to file 77
            07/16/2001 00:36:40 - positioned; position time: 000:00:00
            07/16/2001 00:45:10 - positioning to file 78
            07/16/2001 00:45:10 - positioned; position time: 000:00:00
            07/16/2001 00:53:00 - positioning to file 79
            07/16/2001 00:53:00 - positioned; position time: 000:00:00
            07/16/2001 01:00:50 - positioning to file 80
            07/16/2001 01:00:50 - positioned; position time: 000:00:00
            07/16/2001 01:08:00 - positioning to file 81
            07/16/2001 01:08:00 - positioned; position time: 000:00:00
            07/16/2001 01:08:40 - positioning to file 82
            07/16/2001 01:08:40 - positioned; position time: 000:00:00
            07/16/2001 01:43:50 - positioning to file 83
            07/16/2001 01:43:50 - positioned; position time: 000:00:00
            07/16/2001 02:19:20 - positioning to file 84
            07/16/2001 02:19:20 - positioned; position time: 000:00:00
            07/16/2001 02:19:30 - end writing; write time: 001:50:01

       KBytes: 1977856
        Files: 28000

+END SAMPLE OUTPUT+

-----Original Message-----
From: Jason Ahrens [mailto:AhrensJ AT psi DOT ca]
Sent: Monday, July 16, 2001 10:49 AM
To: Veritas BU
Subject: [Veritas-bu] bpdbjobs output


I am trying to make our monitoring system (netSaint) more inteligent by
allowing it to monitor the status of NetBackup backups. I have a working
model that is using bperror to find the status of current and most recent
backups for each system and schedule. However, I imagine the output from
bpdbjobs is more indicative of the 'current' status as I can use this to
determine if a job has been requeued or not (ie: a manual backup won't be
requeued while a scheduled one will be if it fails).

So I am wondering if anyone has written any routines they would consider
releasing for parsing the output of bpdbjobs (or maybe someone else already
has a fully functional plugin?)? (I am looking at the format bpdbjobs
-report -all_columns)

Thanks

Jason

--
Jason Ahrens
Systems Administrator/Backup Specialist
PSINet Limited
http://www.psi.ca
The Internet SuperCarrier

_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


------_=_NextPart_001_01C10E0A.3DC9C620
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Veritas-bu] bpdbjobs output</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Jason,</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>I have =
written a perl script that may be useful; it parses (or takes as a =
file) the output of bpdbjobs -report -all_columns or a subset thereof; =
see sample output below.&nbsp; You may have to modify it, if you can =
use it, for what you want.&nbsp; I don't think all the kinks are out of =
it yet, but it does the job when I need it to.</FONT></P>

<P><FONT SIZE=3D2>Paul Weaver</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>+BEGIN SAMPLE OUTPUT+</FONT>
<BR><FONT =
SIZE=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT>
<BR><FONT SIZE=3D2>Job ID:&nbsp;&nbsp; 6650</FONT>
<BR><FONT =
SIZE=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; Job&nbsp;&nbsp;&nbsp;&nbsp; =
Job</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; Type&nbsp;&nbsp;&nbsp; =
State&nbsp;&nbsp; Status&nbsp; =
Class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; Schedule&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Client</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; =3D=3D=3D=3D=3D=3D=3D =
=3D=3D=3D=3D=3D=3D&nbsp; =3D=3D=3D=3D=3D=3D&nbsp; =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D&nbsp;&nbsp; =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D&nbsp; =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; Backup&nbsp;&nbsp;&nbsp; =
Done&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 96&nbsp; =
WindowsNT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
C_Incr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Stiscnt</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; Owner:&nbsp; =
root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Retention Level: =
3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start Time: Mon Jul 16 =
00:04:43 2001</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; Group:&nbsp; =
(None)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Master Server: =
sc250&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; Elapsed Time:&nbsp;&nbsp; 2(h) 14(m) 48(s)</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp; Media Server: =
sc250&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Time: Mon Jul 16 02:19:31 =
2001</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Priority: 0</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; Filelist:</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( C:\\ =
)</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; Try: 1</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pid: =
14874&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; Start Time: Mon Jul 16 00:04:44 2001</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Storage Unit: =
L1000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; Elapsed Time: 0(h) 18(m) 14(s)</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Media Server: =
sc250</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Status: (84) =
media write error</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Job =
Details:</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:04:40 - connecting</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:04:40 - connected; connect time: 000:00:00</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:04:50 - mounting DNS797</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:06:20 - mounted; mount time: 000:01:30</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:06:20 - positioning to file 75</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:08:50 - positioned; position time: 000:02:35</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:08:50 - begin writing</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:16:30 - positioning to file 76</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:16:30 - positioned; position time: 000:00:00</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:22:50 - end writing; write time: 000:14:03</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KBytes: =
246656</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Files: =
175</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; Try: 2</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Pid: =
8370&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp; Start Time: Mon Jul 16 00:23:00 2001</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Storage Unit: =
L1000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; Elapsed Time: 1(h) 56(m) 31(s)</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Media Server: =
sc250</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Status: (96) =
unable to allocate new media for backup\&nbsp; storage unit has none =
available</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Job =
Details:</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:23:00 - connecting</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:23:00 - mounting DNS797</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:23:00 - connected; connect time: 000:00:02</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:26:50 - mounted; mount time: 000:03:49</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:26:50 - positioning to file 76</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:29:30 - positioned; position time: 000:02:35</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:29:30 - begin writing</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:36:40 - positioning to file 77</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:36:40 - positioned; position time: 000:00:00</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:45:10 - positioning to file 78</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:45:10 - positioned; position time: 000:00:00</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:53:00 - positioning to file 79</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 00:53:00 - positioned; position time: 000:00:00</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 01:00:50 - positioning to file 80</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 01:00:50 - positioned; position time: 000:00:00</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 01:08:00 - positioning to file 81</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 01:08:00 - positioned; position time: 000:00:00</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 01:08:40 - positioning to file 82</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 01:08:40 - positioned; position time: 000:00:00</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 01:43:50 - positioning to file 83</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 01:43:50 - positioned; position time: 000:00:00</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 02:19:20 - positioning to file 84</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 02:19:20 - positioned; position time: 000:00:00</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; 07/16/2001 02:19:30 - end writing; write time: 001:50:01</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KBytes: =
1977856</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Files: =
28000</FONT>
</P>

<P><FONT SIZE=3D2>+END SAMPLE OUTPUT+</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Jason Ahrens [<A =
HREF=3D"mailto:AhrensJ AT psi DOT ca">mailto:AhrensJ AT psi DOT ca</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Monday, July 16, 2001 10:49 AM</FONT>
<BR><FONT SIZE=3D2>To: Veritas BU</FONT>
<BR><FONT SIZE=3D2>Subject: [Veritas-bu] bpdbjobs output</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>I am trying to make our monitoring system (netSaint) =
more inteligent by</FONT>
<BR><FONT SIZE=3D2>allowing it to monitor the status of NetBackup =
backups. I have a working</FONT>
<BR><FONT SIZE=3D2>model that is using bperror to find the status of =
current and most recent</FONT>
<BR><FONT SIZE=3D2>backups for each system and schedule. However, I =
imagine the output from</FONT>
<BR><FONT SIZE=3D2>bpdbjobs is more indicative of the 'current' status =
as I can use this to</FONT>
<BR><FONT SIZE=3D2>determine if a job has been requeued or not (ie: a =
manual backup won't be</FONT>
<BR><FONT SIZE=3D2>requeued while a scheduled one will be if it =
fails).</FONT>
</P>

<P><FONT SIZE=3D2>So I am wondering if anyone has written any routines =
they would consider</FONT>
<BR><FONT SIZE=3D2>releasing for parsing the output of bpdbjobs (or =
maybe someone else already</FONT>
<BR><FONT SIZE=3D2>has a fully functional plugin?)? (I am looking at =
the format bpdbjobs</FONT>
<BR><FONT SIZE=3D2>-report -all_columns)</FONT>
</P>

<P><FONT SIZE=3D2>Thanks</FONT>
</P>

<P><FONT SIZE=3D2>Jason</FONT>
</P>

<P><FONT SIZE=3D2>--</FONT>
<BR><FONT SIZE=3D2>Jason Ahrens</FONT>
<BR><FONT SIZE=3D2>Systems Administrator/Backup Specialist</FONT>
<BR><FONT SIZE=3D2>PSINet Limited</FONT>
<BR><FONT SIZE=3D2><A HREF=3D"http://www.psi.ca"; =
TARGET=3D"_blank">http://www.psi.ca</A></FONT>
<BR><FONT SIZE=3D2>The Internet SuperCarrier</FONT>
</P>

<P><FONT SIZE=3D2>_______________________________________________</FONT>=

<BR><FONT SIZE=3D2>Veritas-bu maillist&nbsp; -&nbsp; =
Veritas-bu AT mailman.eng.auburn DOT edu</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu"; =
TARGET=3D"_blank">http://mailman.eng.auburn.edu/mailman/listinfo/veritas=
-bu</A></FONT>
</P>

<P><FONT FACE=3D"Arial" SIZE=3D2 COLOR=3D"#000000"></FONT>&nbsp;

</BODY>
</HTML>
------_=_NextPart_001_01C10E0A.3DC9C620--

------_=_NextPart_000_01C10E0A.3DC9C620
Content-Type: application/octet-stream;
        name="job_listing.pl"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
        filename="job_listing.pl"

#!/usr/local/bin/perl=0A=
=0A=
# Description:=0A=
# This perl script will take the contents of =
/usr/openv/netbackup/bin/admincmd/bpdbjobs -report -all_columns=0A=
# either from a file or piped in when the script is run=0A=
# and either prints out a listing of the specified job or all jobs =
received as input=0A=
=0A=
format OUT =3D=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
Job ID: @#####=0A=
        $jid=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
=0A=
     Job     Job                                                 =0A=
     Type    State   Status  Class                         Schedule     =
    Client     =0A=
     =3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D  =3D=3D=3D=3D=3D=3D  =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D   =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D  =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
     @<<<<<< @>>>>>  @>>>>>  @<<<<<<<<<<<<<<<<<<<<<<<<<<   =
@<<<<<<<<<<<<<<  @<<<<<<<<<<<<<=0A=
     $jtype,$jstate,$status,$class,$sched,$client=0A=
=0A=
     Owner:  @<<<<<<<< Retention Level: @<<<<<<<<            Start =
Time: @>>>>>>>>>>>>>>>>>>>>>>>=0A=
             $owner,                    $retlvl,                        =
 $start=0A=
     Group:  @<<<<<<<<   Master Server: @<<<<<<<<<<<<<<<<  Elapsed =
Time: @##(h) @#(m) @#(s)=0A=
             $gname,                    $mserver,                       =
 $total_hours,$total_minutes,$total_seconds=0A=
                          Media Server: @<<<<<<<<<<<<<<<<      End =
Time: @>>>>>>>>>>>>>>>>>>>>>>>=0A=
                                        $medias,                        =
 $ended=0A=
                              Priority: @<<=0A=
                                        $pri=0A=
=0A=
     Filelist:=0A=
.=0A=
=0A=
        $filename =3D $summary =3D "\0";=0A=
=0A=
        for $i (0 .. $#ARGV) {=0A=
                if ( @ARGV[$i] =3D~ /\-h/ ) { $prg =3D `basename $0`; chop 
$prg; =
print "\n\nUsage: $prg [-h] | Job_ID [file]\n\tIf [file] is undefined, =
the output of bpdbjobs -report -all_columns is used\n\tTo see all jobs, =
use -1 as the status.\n\n"; exit(); }=0A=
                if ( $i =3D=3D 0 ) { $JOBID =3D @ARGV[$i]; }=0A=
                if ( $i =3D=3D 1 ) { $filename =3D @ARGV[$i]; $summary =3D =
$filename."_summary"; }=0A=
        }=0A=
        if ( $filename eq "\0" ) { =0A=
                $filename =3D "/usr/openv/netbackup/bin/admincmd/bpdbjobs 
-report =
-all_columns |"; =0A=
                $summary =3D "./bpdbjobs_summary";=0A=
        }=0A=
=0A=
        open(FILE1,"<$filename") || die "Can't open $filename\n";=0A=
        open(OUT,">$summary") || die "Can't open $summary\n";=0A=
=0A=
        while ( <FILE1> ) {=0A=
                =
($jid,$jtype,$jstate,$status,$class,$sched,$client,$medias,$start,$elaps=
ed,$ended,$stu,$try,$op,$kbytes,$files,$path,$percomp,$jpid,$owner,$d1,$=
ctype,$d2,$pri,$gname,$mserver,$retlvl,$d3,$d4,$d5,$d6,$lifl,@rest) =3D =
split(/,/,$_);=0A=
                if ( ($JOBID =3D=3D -1) || ( $jid =3D=3D $JOBID ) ) {=0A=
=0A=
                        $start =3D localtime($start);=0A=
                        $ended =3D localtime($ended);=0A=
                        $total_seconds =3D ( $elapsed % 60 );=0A=
                        $total_minutes =3D ( int( ( $elapsed / 60 ) ) % 60 
);=0A=
                        $total_hours   =3D int( ( $elapsed / 3600 ) );     =0A=
                        if ( $gname eq "" ) { $gname =3D "(None)"; }=0A=
                        if ( $jtype =3D=3D 0 ) { $jtype =3D "Backup"; }=0A=
                        if ( $jtype =3D=3D 1 ) { $jtype =3D "Restore"; }=0A=
                        if ( $jstate =3D=3D 1 ) { $jstate =3D "Active"; }=0A=
                        if ( $jstate =3D=3D 3 ) { $jstate =3D "Done"; }=0A=
                        write OUT;=0A=
=0A=
                        # Print the File List=0A=
                        $x =3D 0;=0A=
                        print OUT "\t";=0A=
                        while ( $x < $lifl ) {=0A=
                                print OUT "( ",@rest[$x]," )";=0A=
                                $x++;=0A=
                        }=0A=
                        print OUT "\n";=0A=
=0A=
                        # Print out a summary for each of the number of 
tries=0A=
                        $y =3D 1;=0A=
                        while ( $y <=3D $try ) {=0A=
                                $start =3D localtime(@rest[($x + 4)]);=0A=
                                $total_seconds =3D ( @rest[($x + 5)] % 60 );=0A=
                                $total_minutes =3D ( int( ( @rest[($x + 5)] / 
60 ) ) % 60 );=0A=
                                $total_hours   =3D int( ( @rest[($x + 5)] / 
3600 ) );     =0A=
                                printf(OUT "\n     Try: %d\n",$y);=0A=
                                printf(OUT "       Pid: %-6d                    
                  =
Start Time: %s\n",@rest[($x + 1)],$start);=0A=
                                printf(OUT "       Storage Unit: %-17s          
      Elapsed Time: =
%d(h) %d(m) %d(s)\n",@rest[($x + =
2)],$total_hours,$total_minutes,$total_seconds);=0A=
                                printf(OUT "       Media Server: 
%s\n",@rest[($x + 3)]);=0A=
                                printf(OUT "       Status: (%d) %s",@rest[($x + 
7)],@rest[($x + =
8)]);=0A=
                                if ( @rest[($x + 8)] =3D~ /\\/ ) { @rest[($x + 
8)] =3D~ s/\\/,/; =
printf(OUT " %s\n",@rest[($x + 9)]); $x++; } =0A=
                                else { printf (OUT "\n"); }=0A=
                                printf(OUT "       Job Details:\n");=0A=
                                $t =3D @rest[($x + 9)]; $u =3D 1;=0A=
                                while ( $t ) {=0A=
                                        printf(OUT "            %s\n",@rest[($x 
+ 9 + $u)]);=0A=
                                        $u++; $t--;=0A=
                                }=0A=
                                $x +=3D ( 9 + @rest[($x + 9)] );=0A=
                                printf(OUT "\n       KBytes: %d\n",@rest[($x + 
1)]);=0A=
                                printf(OUT "        Files: %d\n\n",@rest[($x + 
2)]);=0A=
                                $x +=3D 2;=0A=
                                $y++;=0A=
                        }=0A=
                }=0A=
        }=0A=
close(FILE1); =0A=
close(OUT);=0A=

------_=_NextPart_000_01C10E0A.3DC9C620--

<Prev in Thread] Current Thread [Next in Thread>