sudo bpsyncinfo -L >> /tmp/catalog.txt head -10 /tmp/catalog.txt >> /tmp/catalog2.txt echo "Tapes used for catalog" > /tmp/catalog_tape.txt tail -3 /tmp/catalog2.txt | awk '{print $8}' >> /tmp/catalog_tape.txt echo "">>/tmp/catalog_tape.txt echo "All backups Failing with Status 1 are as follows:">> /tmp/catalog_tape.txt echo "">>/tmp/catalog_tape.txt sudo bperror -U -backstat -hoursago 24 |awk '($1 == 1) {print $0}'>>/tmp/catalog_tape.txt echo "">>/tmp/catalog_tape.txt PPATH=/export/home/ashakya # Path to this file VPATH=/usr/openv/volmgr/bin # Path to the executables #MLIST=$PPATH/poollister.maillist # Mailing list DFILE=$PPATH/pools.txt # Data file DATE=`date` if test -f $DFILE then rm $DFILE fi echo "Netbackup Pool Data ">$DFILE echo "$DATE">>$DFILE echo "">>$DFILE echo "Pool-------------------------Qty">>$DFILE echo "-----------------------------">>$DFILE for POOL in `sudo $VPATH/vmpool -listall -b|sed '1,2d'|awk '{ print $1 }'` do COUNT=`sudo $VPATH/vmquery -pn $POOL -b|sed '1,3d'|wc -l` echo "$POOL------------------------$COUNT">>$DFILE done cat $DFILE>>/tmp/catalog_tape.txt echo "" echo "##############################">>/tmp/catalog_tape.txt echo "# NetBackup Daily Summary for `hostname`">>/tmp/catalog_tape.txt echo "##############################">>/tmp/catalog_tape.txt echo "">>/tmp/catalog_tape.txt echo "###################################">>/tmp/catalog_tape.txt echo "# Status of Yesterday's Backups">>/tmp/catalog_tape.txt echo "###################################">>/tmp/catalog_tape.txt echo "">>/tmp/catalog_tape.txt sudo /usr/openv/netbackup/bin/admincmd/bperror -U -backstat -s INFO -hoursago 24 >> /tmp/catalog_tape.txt echo"">>/tmp/catalog_tape.txt echo "###################################">>/tmp/catalog_tape.txt echo "Backup Problems in last 24 Hours are as follows:">>/tmp/catalog_tape.txt echo "###################################">>/tmp/catalog_tape.txt echo "">>/tmp/catalog_tape.txt sudo /usr/openv/netbackup/bin/admincmd/bperror -U -backstat -by_statcode
-hoursago 24 >> /tmp/catalog_tape.txt echo "">>/tmp/catalog_tape.txt echo "########################################">>/tmp/catalog_t ape.txt echo "# Media written during last backup cycle">>/tmp/catalog_tape.txt echo "########################################">>/tmp/catalog_t ape.txt echo "">>/tmp/catalog_tape.txt sudo /usr/openv/netbackup/bin/admincmd/bpimagelist -A -media -hoursago 24 >> /tmp/catalog_tape.txt echo "">>/tmp/catalog_tape.txt echo "" BPimagelist='sudo /usr/openv/netbackup/bin/admincmd/bpimagelist' # Collect daily Kbytes stats and convert to Gbytes for display DailyTotalKbytes=0 for Kbytes in $($BPimagelist -l -hoursago 24 | grep 'FRAG' | awk '{print $4}') do (( DailyTotalKbytes = DailyTotalKbytes + Kbytes )) done (( DailyTotalGbytes = DailyTotalKbytes / 1024 / 1024 )) echo "Daily total backed up data in Gbytes: $DailyTotalGbytes">>/tmp/catalog_tape.txt /usr/bin/mailx -s "Health Check Netbackup Server `hostname`" username@domainname
Related Documents
More Documents from "Ralf Eisend"