Apparently some over zealous AV server may have pulled the attachment.
Here's the code inline - beware of line wraps.
regards
$ cat NBUjobcheck.pl
#!/usr/bin/perl5
use Time::localtime;
# don't buffer output in case someone is tail -f'ing the output file
$|=1;
my $bpdbjobs='/usr/openv/netbackup/bin/admincmd/bpdbjobs';
# number of seconds between samples. NBU only updates this periodically
(don't know how frequently)
# so a reasonable interval is required, eg 60 secs to get decent data
my $resolution=60;
my %last_kb=();
while (true) {
my ($timestamp)=ctime();
open(JOBS,"$bpdbjobs -most_columns |") || die "Unable to run
$bpdbjobs -most_columns: $!\n";
while (<JOBS>) {
# from NBU commands reference for bpdbjobs
my
($jobid,$jobtype,$state,$status,$class,$schedule,$client,$server,$starte
d,$elapsed,$ended,$stunit,$try,$operation,$kbytes,$bored) = split(/,/);
# only interested in active Backup jobs
next unless ($state==1);
next unless ($jobtype==0);
if (defined $last_kb{$jobid}) {
printf("JOBID: %d\tDATE: %s\tCURRENT MB: %10d\tTHROUGHPUT
KB/s:
%10d\n",$jobid,$timestamp,$kbytes/1024,($kbytes-$last_kb{$jobid})/$resol
ution);
$last_kb{$jobid}=$kbytes;
}
$last_kb{$jobid}=$kbytes;
}
close(JOBS);
sleep($resolution);
}
> -----Original Message-----
> From: McCammont, Anderson (IT)
> Sent: 08 July 2005 11:48
> To: 'Jerry'; Paul Keating; Veritas List
> Subject: RE: [Veritas-bu] looking for a command.
>
> Unfortunately iostat doesn't report on st devices on all
> platforms (certainly RH Linux, I believe also *BSD and HPUX)
>
> You can get throughput by sampling bpdbjobs from the master.
> An example script attached, often worth running for a while
> with the output redirected when tracking down performance problems.
>
> If someone fancies modifying it to take account of
> multiplexing to give total drive throughput that would be
> great. It's not immediately obvious to me how to determine
> from bpdbjobs the physical drive being used in an SSO environment.
>
> Sample output:
> ...
> JOBID: 3049524 DATE: Mon May 2 23:41:46 2005 CURRENT MB:
> 16556 THROUGHPUT KB/s: 1920
> JOBID: 3049516 DATE: Mon May 2 23:41:46 2005 CURRENT MB:
> 87719 THROUGHPUT KB/s: 40034
> JOBID: 3049491 DATE: Mon May 2 23:41:46 2005 CURRENT MB:
> 59193 THROUGHPUT KB/s: 6698
> JOBID: 3049402 DATE: Mon May 2 23:41:46 2005 CURRENT MB:
> 203668 THROUGHPUT KB/s: 11899
> JOBID: 3049379 DATE: Mon May 2 23:41:46 2005 CURRENT MB:
> 178570 THROUGHPUT KB/s: 10048
> ...
>
>
> > -----Original Message-----
> > From: veritas-bu-admin AT mailman.eng.auburn DOT edu
> > [mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu] On Behalf Of Jerry
> > Sent: 06 July 2005 21:16
> > To: Paul Keating; Veritas List
> > Subject: Re: [Veritas-bu] looking for a command.
> >
> > Not exactly what you want, but you could use iostat
> > and monitor the tape drive throughput. If a drive is
> > below a value, you could run voprcmd to see if there
> > is a job/tape running on that drive. If no active job
> > on that drive ,ignore.
> >
> > I also seem to remember that the activity monitor
> > shows kb/sec if you double click on the details... I
> > wonder if this info can be obtained from the command
> > line.
> >
> > --- Paul Keating <pkeating AT bank-banque-canada DOT ca>
> > wrote:
> >
> > > I'm looking for something that will give me a
> > > listing of all active
> > > backup jobs, and their "point in time" throughput.
> > >
> > > I've had a few machines whose backup jobs have hung,
> > > due to an error
> > > with Windows Open File backup, or are writing
> > > extremely slow due to a
> > > NIC duplex mismatch (switch port hard set to 100FD,
> > > and client's Gig
> > > card set to Auto/Auto) where the client's connection
> > > was stuck at 100HD
> > > on a 100FD port, and the client hogged a tape drive
> > > for 52 hours over
> > > the weekend trying to write 60 Gig at 88KB/s.....the
> > > job didn't "fail"
> > > so there were no alerts sent.
> > >
> > > Basically, I'm looking for a way that I can
> > > determine a client's
> > > throughput using a script, and send out an alert if
> > > I have a client
> > > writing at less than 200KB/s or something.
> > >
> > > Any ideas?
> > >
> > > Paul
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> > _______________________________________________
> > Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
> > http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
> >
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does
not waive confidentiality or privilege, and use is prohibited.
|