[Veritas-bu] Script to collect hourly data...
2006-07-28 13:23:25
Subject: |
[Veritas-bu] Script to collect hourly data... |
From: |
jdespres at csc.com (Joseph Despres) |
Date: |
Fri, 28 Jul 2006 13:23:25 -0400 |
Well I wrote a script to check the amount of backups that look back
one hr and list the amount on a per media server basis:
Please check it out:
#****************** Cut Here ******************#
#!/bin/ksh
# Script to collect Data
## Variables
HRS=$1
ADMINCMD="/usr/openv/netbackup/bin/admincmd"
MYHOME="/home/jdespres/bin"
BPCONF="/usr/openv/netbackup/bp.conf"
MedisS="/home/jdespres/HourlyData/MediaS.txt"
TMP1="/home/jdespres/HourlyData/orignalbpconf.txt"
DATELOG=`date +%m%d%Y%H%M%S`
LOGFILE="/home/jdespres/HourlyData/VolumeAmount.rpt"
Who_Cares="jdespres at csc.com"
#### Get a list of all the media servers and sort it as well!
grep "^SERVER " $BPCONF|sed '1,1'd|awk '{print $3}' > $TMP1
cat $TMP1 | sort > $MedisS
#### Function to collect data
collect_data() {
date
for i in `cat $MedisS`
do
echo "$i \c"
$ADMINCMD/bpimagelist -l -hoursago $HRS|egrep "^FRAG"|grep -v "\-1"| grep
$i|awk '{ tot+=$4 } END {printf "%9.5f\n", (tot/1024)/1024}'
done
}
collect_data > $LOGFILE.$DATELOG
/usr/bin/mailx -s "`hostname` Hourly Volume info `date '+%m/%d/%y %H:%M'`"
$Who_Cares < $LOGFILE.$DATELOG
#****************** Cut Here ******************#
Does this make sense..... it seems to give up the correct info:
Joe Despres...........
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://mailman.eng.auburn.edu/pipermail/veritas-bu/attachments/20060728/96d83d06/attachment.html
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Veritas-bu] Script to collect hourly data...,
Joseph Despres <=
|
|
|