Veritas-bu

[Veritas-bu] Source of the data for "Full" view in Job Monitor

2002-03-04 13:14:46
Subject: [Veritas-bu] Source of the data for "Full" view in Job Monitor
From: plb AT iotk DOT com (Peter L. Buschman)
Date: Mon, 04 Mar 2002 19:14:46 +0100
Will:

If you're comfortable with Perl, NBUX can give this information to you 
quite easily.  Otherwise,
you need to parse the output of "bpdbjobs -report -all_columns" yourself.

The status information you are referring to is stored once for each time 
the given job was tried.

NBUX will store these status lines in numbered hash keys.

Thus, "try_1_statuslines" is the hash key for the first try, 
"try_2_statuslines" is the hash key for
the second try, etc., There will only be as many of these keys as there are 
tries though, so an
easy way to get all of them for a given job would be like this (change the 
jobid to whatever you need.)

#!/usr/bin/perl

use NBUX;

$jobid = 2154;

%jobs = bpdbjobs( '$record->{jobid} == ' . $jobid );

$job = $jobs{$jobid};

$trycount = $job->{trycount};

print "Job ID $jobid was tried $trycount times.\n";

foreach $try ( 1..$trycount ) {
   print "[Try $try Status Lines]\n\n";
   print $job->{"try_${try}_statuslines"};
   print "\n\n";
}

On my little system at home, this produces the following output:

Job ID 2154 was tried 4 times.
[Try 1 Status Lines]

03/04/2002 18:21:30 - connecting
03/04/2002 18:21:40 - connected; connect time: 000:00:05
03/04/2002 18:21:40 - using /iotk/spool/plb_1015266091_C1_F1
03/04/2002 18:21:40 - begin writing
03/04/2002 18:31:00 - end writing; write time: 000:09:21

[Try 2 Status Lines]

03/04/2002 18:35:20 - connecting
03/04/2002 18:35:20 - connected; connect time: 000:00:00
03/04/2002 18:35:20 - using /iotk/spool/plb_1015266918_C1_F1
03/04/2002 18:35:20 - begin writing
03/04/2002 18:47:10 - end writing; write time: 000:11:53

[Try 3 Status Lines]

03/04/2002 18:47:10 - connecting

[Try 4 Status Lines]

03/04/2002 18:48:20 - connecting


I hope this helps!  Please let me know if you need any of this explained in 
more detail.

Best regards,

--PLB





At 11:52 AM 03/04/2002 -0500, William Enestvedt wrote:
>Good morning, all;
>    I apologize if this information is available somewhere online or in my
>pile o' manuals, but what's the source for the data displayed in the "Full"
>view of the NBU 3.4.x Job Monitor?
>    Specifically, I would like to use a script to pull out a few lines of the
>data shown in the "Status" scrolling window in the bottom half of a given
>job's record -- the 'begin writing,' 'end writing,' and tape id information
>-- but I don't know where to go to get this data.
>    Any suggestions about where to get this info?
>    Also, I'm off to NBU class next week (the 3-day and the "Advanced" 2-day
>class all in one week); anything anyone wants me to ask the instructor? :7)
>-wde
>--
>Will Enestvedt
>UNIX System Administrator
>Johnson & Wales University -- Providence, RI
>_______________________________________________
>Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
>http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


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