[Veritas-bu] Drive Utilization
2002-03-28 19:13:35
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_01C1D6B6.91A3D630
Content-Type: text/plain
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_01C1D6B6.91A3D630
Content-Type: text/html
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=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>Re: [Veritas-bu] Drive Utilization</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Repost trimmed for size:</FONT>
</P>
<P><FONT SIZE=3D2>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.</FONT></P>
<P><FONT SIZE=3D2>-M</FONT>
</P>
<P><FONT SIZE=3D2>$ ./job_report 183160</FONT>
<BR><FONT SIZE=3D2> jobid: 183160</FONT>
<BR><FONT SIZE=3D2>status: 0</FONT>
<BR><FONT SIZE=3D2> class: Oracle_mm</FONT>
<BR><FONT SIZE=3D2> sched: mm</FONT>
<BR><FONT SIZE=3D2>kbytes: 42577367</FONT>
<BR><FONT SIZE=3D2> files: 161</FONT>
<BR><FONT SIZE=3D2>Write Time: 003:57:51</FONT>
<BR><FONT SIZE=3D2>Avg Write Rate: 2983.49 kb/sec</FONT>
<BR><FONT SIZE=3D2>Avg File Size: 264456 kb</FONT>
<BR><FONT SIZE=3D2>Tapes Used: 000101,000367,000166</FONT>
</P>
<P><FONT SIZE=3D2>Here's the script:</FONT>
</P>
<P><FONT SIZE=3D2>#!/bin/ksh</FONT>
<BR><FONT =
SIZE=3D2>PATH=3D$PATH:/usr/openv/netbackup/bin/admincmd</FONT>
<BR><FONT SIZE=3D2>export PATH</FONT>
</P>
<P><FONT SIZE=3D2>jobid=3D$1</FONT>
<BR><FONT SIZE=3D2>if [ -z "$jobid" ]</FONT>
<BR><FONT SIZE=3D2>then</FONT>
<BR><FONT SIZE=3D2> echo "Usage: `basename $0` =
jobid"</FONT>
<BR><FONT SIZE=3D2>else</FONT>
<BR><FONT SIZE=3D2> bpdbjobs -report -all_columns | grep =
"^$jobid," | tr ',' "\012" | \</FONT>
<BR><FONT SIZE=3D2> awk ' BEGIN { tapes=3D"" }</FONT>
<BR><FONT SIZE=3D2> {if ( =
NR=3D=3D 1 ) {print " jobid: "$1}</FONT>
<BR><FONT SIZE=3D2> if =
( NR=3D=3D 4 ) {print "status: "$1}</FONT>
<BR><FONT SIZE=3D2> if =
( NR=3D=3D 5 ) {print " class: "$1}</FONT>
<BR><FONT SIZE=3D2> if =
( NR=3D=3D 6 ) {print " sched: "$1}</FONT>
<BR><FONT SIZE=3D2> if =
( NR=3D=3D15 ) {print "kbytes: "$1 ; kb=3D$1}</FONT>
<BR><FONT SIZE=3D2> if =
( NR=3D=3D16 ) {print " files: "$1 ; files=3D$1}</FONT>
<BR><FONT SIZE=3D2> if =
( $0~/mounting/ ) {</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; if ( tapes=3D=3D"" ) {tapes=3D$5}</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; else {tapes=3Dtapes","$5} }</FONT>
<BR><FONT SIZE=3D2> if =
( $0~/end writing/ ) {time=3D$8}</FONT>
<BR><FONT SIZE=3D2> }</FONT>
<BR><FONT SIZE=3D2> END {if ( =
time !=3D "" ) {</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; print "Write Time: "time</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; count=3Dsplit( time, sub,":")</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; sec=3Dsub[1]*3600 + sub[2]*60 + sub[3]</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; print "Avg Write Rate: " kb/sec " =
kb/sec"</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; print "Avg File Size: " kb/files " =
kb"</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; print "Tapes Used: " tapes</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; } else {</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; print "Write time not found" }</FONT>
<BR><FONT SIZE=3D2> } =
'</FONT>
<BR><FONT SIZE=3D2>fi</FONT>
<BR><FONT SIZE=3D2>exit</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
</P>
<P><FONT SIZE=3D2>Whoa - what a challenge!</FONT>
</P>
<P><FONT SIZE=3D2>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? :)</FONT></P>
<P><FONT SIZE=3D2>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=3D2>-Mark</FONT>
</P>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Dan Dobbs</FONT>
</P>
<P><FONT SIZE=3D2>Is there a way to compute 'real' backup times, =
however?</FONT>
</P>
<P><FONT SIZE=3D2><snip></FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C1D6B6.91A3D630--
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Veritas-bu] Drive Utilization, Gary Sperano
- [Veritas-bu] Drive Utilization, Donaldson, Mark
- [Veritas-bu] Drive Utilization, Dan Dobbs
- [Veritas-bu] Drive Utilization, Donaldson, Mark
- [Veritas-bu] Drive Utilization, Peter L. Buschman
- [Veritas-bu] Drive Utilization,
Donaldson, Mark <=
- [Veritas-bu] Drive Utilization, William Enestvedt
- [Veritas-bu] Drive Utilization, Winkeler, Paul
- [Veritas-bu] Drive Utilization, Donaldson, Mark
|
|
|