Veritas-bu

[Veritas-bu] Monitoring perfomance at the buffer level

2004-08-11 02:09:03
Subject: [Veritas-bu] Monitoring perfomance at the buffer level
From: Mark.Donaldson AT cexp DOT com (Mark.Donaldson AT cexp DOT com)
Date: Wed, 11 Aug 2004 00:09:03 -0600
Nope - sorry.  

Perhaps this could be converted to PERL on for Windows...

-M

-----Original Message-----
From: Moses, Darby [mailto:DMoses AT leviton DOT com]
Sent: Tuesday, August 10, 2004 5:17 PM
To: Donaldson, Mark - Broomfield, CO; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] Monitoring perfomance at the buffer level


Got a script for windows?

        -----Original Message----- 
        From: Mark.Donaldson AT cexp DOT com [mailto:Mark.Donaldson AT cexp DOT 
com] 
        Sent: Tue 8/10/2004 5:59 PM 
        To: veritas-bu AT mailman.eng.auburn DOT edu 
        Cc: 
        Subject: [Veritas-bu] Monitoring perfomance at the buffer level
        
        

        Here's a quick and dirty script that sweeps the bptm logs on a media
server
        for a supplied policy name and reports the "fill_buffer, waiting on
empty
        buffer" and "write_backup, waiting on full buffer" statistics.
        
        Output looks like this:
        
        >policy_perf Hot_PRD
        ## Gathering data..........Done.
        ## Write to buffer waiting on available buffer:
        Min: 0  Avg: 356  Max: 5877 with 285 samples
        
        ## Write to tape waiting on full buffer:
        Min: 0  Avg: 43373  Max: 290583 with 7 samples
        
        The "Hot_PRD" is the name of my policy (no safety checking on this
one -
        type it right or get back nothing).  It then sweeps *today's* bptm
logfile
        and counts up the times that the process writing to the tape buffers
was
        waiting on an empty buffer to become available and it also counts up
the
        times that the process writing to the tape was waiting for a buffer
to
        become full before it could write the data to a tape.
        
        If the Write to Buffer is waiting for an available empty buffer a
whole
        bunch, then perhaps you should increase your buffer count.  If
you're tape
        writing process waiting on a full buffer a lot, then you're starving
your
        tape drives and you should find a way to increase the delivery of
client
        data to your media server or increase your multiplexing factor.
        
        More info available here:
        http://seer.support.veritas.com/docs/244652.htm (NT but applicable
to unix)
        
        ...and here...
        http://seer.support.veritas.com/docs/183702.htm
        
        Here's the script.  Watch for line-wrap issues if you cat and paste,
it
        wraps pretty badly and e-mailing through Exchange often adds more
wrapped
        lines...
        
        Have fun with it.
        
        -M
        
        > cat policy_perf
        #!/bin/ksh
        
        policy=$1
        
        today=`date +%m%d%y`
        TMPFILEf=/tmp/`basename $0`.tmp.f
        TMPFILEw=/tmp/`basename $0`.tmp.w
        
        [ -f $TMPFILEf ] && rm -f $TMPFILEf
        [ -f $TMPFILEw ] && rm -f $TMPFILEw
        
        echo "## Gathering data.\c"
        for pid in `grep  "START BACKUP.*-cl $policy"
        /usr/openv/netbackup/logs/bptm/log.$today |\
          awk '{print $2}' | sort -u | tr -dc "[0-9]\012" `
        do
          echo ".\c"
          awk '$0~/\['$pid'\]/ && $0~/fill_buffer.*waited.*empty/ {print
$13+$16}'
        /usr/openv/netbackup/logs/bptm/log.$today >> $TMPFILEf
          awk '$0~/\['$pid'\]/ && $0~/write_backup.*waited.*full/ {print
$9+$12}'
        /usr/openv/netbackup/logs/bptm/log.$today  >> $TMPFILEw
        done
        echo "Done."
        
        echo "## Write to buffer waiting on available buffer:"
        awk '{if (NR==1){min=$1;max=$1;sum=$1;count=1} else
                        {if($1<min){min=$1}
                         if($1>max){max=$1}
                         sum=sum+$1 ; count++}}
              END {if (count>0){print "Min:", min,"
Avg:",int(sum/count+.5),"
        Max:",max, "with",count,"samples" }
                   else {print "No Data Found."}}' $TMPFILEf
        [ -f $TMPFILEf ] && rm -f $TMPFILEf
        
        echo "\n## Write to tape waiting on full buffer:"
        awk '{if (NR==1){min=$1;max=$1;sum=$1;count=1} else
                        {if($1<min){min=$1}
                         if($1>max){max=$1}
                         sum=sum+$1 ; count++}}
              END {if (count>0){print "Min:", min,"
Avg:",int(sum/count+.5),"
        Max:",max, "with",count,"samples"}
                   else {print "No Data Found."}}' $TMPFILEw
        [ -f $TMPFILEw ] && rm -f $TMPFILEw
        
        exit
        
        -M
        
        
        
        
        =================================================
          (2B|^2B) == ?
        =================================================
          Mark Donaldson - SA - Corporate Express
        =================================================
        _______________________________________________
        Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
        http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu