Veritas-bu

[Veritas-bu] Drive Utilization

2002-03-29 13:48:54
Subject: [Veritas-bu] Drive Utilization
From: Mark.Donaldson AT experianems DOT com (Donaldson, Mark)
Date: Fri, 29 Mar 2002 11:48:54 -0700
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_001_01C1D752.60078440
Content-Type: text/plain

Paul's right.  This script reports total job throughput - not drive
throughput.  Caveat Emptor - this doesn't report what I intended. I'm going
to have to dive into the bptm logs.

-----Original Message-----
From: Donaldson, Mark [mailto:Mark.Donaldson AT experianems DOT com]
Sent: Thursday, March 28, 2002 5:14 PM
To: Veritasbu (E-mail)
Subject: Re: [Veritas-bu] Drive Utilization



Repost trimmed for size: 

Here's a simple job report.  Feed it the jobid on the cmd line and it'll
kick out tapes, rates, etc.  It'd be better to do a "Past 24 hrs" type
report.  I'll work on it tomorrow.

-M 

$ ./job_report 183160 
 jobid: 183160 
status: 0 
 class: Oracle_mm 
 sched: mm 
kbytes: 42577367 
 files: 161 
Write Time: 003:57:51 
Avg Write Rate: 2983.49 kb/sec 
Avg File Size: 264456 kb 
Tapes Used: 000101,000367,000166 

Here's the script: 

#!/bin/ksh 
PATH=$PATH:/usr/openv/netbackup/bin/admincmd 
export PATH 

jobid=$1 
if [ -z "$jobid" ] 
then 
  echo "Usage: `basename $0` jobid" 
else 
  bpdbjobs -report -all_columns | grep "^$jobid," | tr ',' "\012" | \ 
  awk ' BEGIN { tapes="" } 
        {if ( NR== 1 ) {print " jobid: "$1} 
         if ( NR== 4 ) {print "status: "$1} 
         if ( NR== 5 ) {print " class: "$1} 
         if ( NR== 6 ) {print " sched: "$1} 
         if ( NR==15 ) {print "kbytes: "$1 ; kb=$1} 
         if ( NR==16 ) {print " files: "$1 ; files=$1} 
         if ( $0~/mounting/ ) { 
            if ( tapes=="" ) {tapes=$5} 
            else {tapes=tapes","$5} } 
         if ( $0~/end writing/ ) {time=$8} 
        } 
        END {if ( time != "" ) { 
             print "Write Time: "time 
             count=split( time, sub,":") 
             sec=sub[1]*3600 + sub[2]*60 + sub[3] 
             print "Avg Write Rate: " kb/sec " kb/sec" 
             print "Avg File Size: " kb/files " kb" 
             print "Tapes Used: " tapes 
            } else { 
            print "Write time not found" } 
        } ' 
fi 
exit 


-----Original Message----- 

Whoa - what a challenge! 

It's a cool idea - should be available from the bpdbjobs (all_columns)
report since it contains all the positioning and mounting information on a
per-job basis.  Parse it for tape mount info & times, do some math.  Easy,
right?  :)

It's a cool idea - I'll let you know if I ever try it out - one trouble is
line-length limitations in awk - this output is HUGE!.

-Mark 

-----Original Message----- 
From: Dan Dobbs 

Is there a way to compute 'real' backup times, however? 

<snip> 


------_=_NextPart_001_01C1D752.60078440
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<TITLE>Re: [Veritas-bu] Drive Utilization</TITLE>

<META content="MSHTML 6.00.2713.1100" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=379104718-29032002><FONT face=Arial color=#0000ff 
size=2>Paul's 
right.&nbsp; This script reports total job throughput - not drive 
throughput.&nbsp; Caveat Emptor - this doesn't report what I intended. I'm 
going 
to have to dive into the bptm logs.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Donaldson, Mark 
  [mailto:Mark.Donaldson AT experianems DOT com]<BR><B>Sent:</B> Thursday, 
March 28, 
  2002 5:14 PM<BR><B>To:</B> Veritasbu (E-mail)<BR><B>Subject:</B> Re: 
  [Veritas-bu] Drive Utilization<BR><BR></FONT></DIV>
  <P><FONT size=2>Repost trimmed for size:</FONT> </P>
  <P><FONT size=2>Here's a simple job report.&nbsp; Feed it the jobid on the 
cmd 
  line and it'll kick out tapes, rates, etc.&nbsp; It'd be better to do a "Past 
  24 hrs" type report.&nbsp; I'll work on it tomorrow.</FONT></P>
  <P><FONT size=2>-M</FONT> </P>
  <P><FONT size=2>$ ./job_report 183160</FONT> <BR><FONT size=2>&nbsp;jobid: 
  183160</FONT> <BR><FONT size=2>status: 0</FONT> <BR><FONT size=2>&nbsp;class: 
  Oracle_mm</FONT> <BR><FONT size=2>&nbsp;sched: mm</FONT> <BR><FONT 
  size=2>kbytes: 42577367</FONT> <BR><FONT size=2>&nbsp;files: 161</FONT> 
  <BR><FONT size=2>Write Time: 003:57:51</FONT> <BR><FONT size=2>Avg Write 
Rate: 
  2983.49 kb/sec</FONT> <BR><FONT size=2>Avg File Size: 264456 kb</FONT> 
  <BR><FONT size=2>Tapes Used: 000101,000367,000166</FONT> </P>
  <P><FONT size=2>Here's the script:</FONT> </P>
  <P><FONT size=2>#!/bin/ksh</FONT> <BR><FONT 
  size=2>PATH=$PATH:/usr/openv/netbackup/bin/admincmd</FONT> <BR><FONT 
  size=2>export PATH</FONT> </P>
  <P><FONT size=2>jobid=$1</FONT> <BR><FONT size=2>if [ -z "$jobid" ]</FONT> 
  <BR><FONT size=2>then</FONT> <BR><FONT size=2>&nbsp; echo "Usage: `basename 
  $0` jobid"</FONT> <BR><FONT size=2>else</FONT> <BR><FONT size=2>&nbsp; 
  bpdbjobs -report -all_columns | grep "^$jobid," | tr ',' "\012" | \</FONT> 
  <BR><FONT size=2>&nbsp; awk ' BEGIN { tapes="" }</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {if ( NR== 1 ) {print " 
  jobid: "$1}</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( NR== 4 ) {print 
  "status: "$1}</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( NR== 5 ) {print 
" 
  class: "$1}</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( NR== 6 ) {print 
" 
  sched: "$1}</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( NR==15 ) {print 
  "kbytes: "$1 ; kb=$1}</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( NR==16 ) {print 
" 
  files: "$1 ; files=$1}</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( $0~/mounting/ ) 
  {</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
( 
  tapes=="" ) {tapes=$5}</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
else 
  {tapes=tapes","$5} }</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( $0~/end writing/ 
  ) {time=$8}</FONT> <BR><FONT 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  }</FONT> <BR><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END {if 
( 
  time != "" ) {</FONT> <BR><FONT 
  
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  print "Write Time: "time</FONT> <BR><FONT 
  
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  count=split( time, sub,":")</FONT> <BR><FONT 
  
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  sec=sub[1]*3600 + sub[2]*60 + sub[3]</FONT> <BR><FONT 
  
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  print "Avg Write Rate: " kb/sec " kb/sec"</FONT> <BR><FONT 
  
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  print "Avg File Size: " kb/files " kb"</FONT> <BR><FONT 
  
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  print "Tapes Used: " tapes</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } 
  else {</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  print "Write time not found" }</FONT> <BR><FONT 
  size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } '</FONT> <BR><FONT 
  size=2>fi</FONT> <BR><FONT size=2>exit</FONT> </P><BR>
  <P><FONT size=2>-----Original Message-----</FONT> </P>
  <P><FONT size=2>Whoa - what a challenge!</FONT> </P>
  <P><FONT size=2>It's a cool idea - should be available from the bpdbjobs 
  (all_columns) report since it contains all the positioning and mounting 
  information on a per-job basis.&nbsp; Parse it for tape mount info &amp; 
  times, do some math.&nbsp; Easy, right?&nbsp; :)</FONT></P>
  <P><FONT size=2>It's a cool idea - I'll let you know if I ever try it out - 
  one trouble is line-length limitations in awk - this output is 
  HUGE!.</FONT></P>
  <P><FONT size=2>-Mark</FONT> </P>
  <P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From: Dan 
  Dobbs</FONT> </P>
  <P><FONT size=2>Is there a way to compute 'real' backup times, 
however?</FONT> 
  </P>
  <P><FONT size=2>&lt;snip&gt;</FONT> </P></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C1D752.60078440--

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