Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you detemine the "Actual" backup speed?

Command Line

How do you detemine the "Actual" backup speed?

by  PGPhantom  Posted    (Edited  )
How can you determine the "Actual" speed of a tape device attached to your media server?
[color red]bperror -server <MediaServer> -hoursago <number of hours>[/color] or ...
[color red]bperror -server <MediaServer> -s <StartDate> <StartTime> -e <EndDate> <EndTime>[/color]

Using either of those commands - Output the results to a text file as in > c:\results.txt.
Use grep to organize and sort the results ...
[color red]grep Kbytes/sec c:\results.txt |grep -v duplicate |grep -v restore |awk -F\, '{print $NF}'|awk -f AWKFILE| awk '{print ($3)}'> c:\kbytes.txt
grep Kbytes/sec c:\results.txt |grep -v duplicate |grep -v restore |awk -F\, '{print $NF}'|awk -f $AWKFILE| awk '{print ($5)}'> c:\mytes.txt [/color]

I am piping the results of the awk to two additional text files - c:\kbytes.txt and c:\mbytes.txt - This simply lists a number in either kilobytes or megabytes.

The AWKFILE is a standard file containing the following:
[color red]
BEGIN {bytes=0;thruput=0;items=0}

$2=="Kbytes" && $3=="at" {bytes+=$1; thruput+=$4;items++}
$1=="total" && $2=="Kbytes" {bytes+=$3; thruput+=$5;items++}
$2=="total" && $5=="Kbytes" {bytes+=$4; thruput+=$7;items++}

END {
# print "Total Volume: " bytes/1024 " Mbytes";
if (items>0) {print "Average Throughput: " thruput/items " KBytes/sec "int(((thruput/items)*60)/1024) " MBytes/min"}
}[/color]

That is how it tabulates the results. With these command you can easily compile one file to perform everything in one step, including getting the results for ALL your media servers in one go. I use this in a small VB application that I wrote up and it gives the user an option to select a media server, specify a time frame or a time period and then view the results which is in kbytes/sec or mbytes/min.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top