cancel
Showing results for 
Search instead for 
Did you mean: 

Bperror help

keendean
Level 2
Hi

My first post :)  I am using bperror as follows-

call bperror.exe -U -backstat -hoursago 23:59

This works very well, in a nice readable format for BB's, but for larger sites, showing all the sucessful jobs is a little too much information.  I've tried other switches, but -U gives the cleanest ouput.
I could then process the output, but don't want to miss errors with mis use of grep etc.  I'm also using NOM, but the output from Nom is not very freindly on the company BB's.

Ideally, I'd not show all the sucessfull jobs, just all job exit ID's greater than 1.

Any ideas?

Thanks

Dean


4 REPLIES 4

dltsc
Level 4
Partner
Does this give you what you need:

bperror -backstat -d `date +%D` 00:00:00 |grep -v "EXIT STATUS 0" |grep -v "EXIT STATUS 1"

You can substitude the -d `date +%D` 00:00:00 with -hoursago
The format this produces will not be the same as with the -U but using some scripting you can modify the output to your liking

Andy_Welburn
Level 6
(***EDIT*** at least I think it was me!)

As I say, it's simple & has none of the 'niceties' of a correctly formatted script, but it does work.

Basically, it's using bperror & looking for any job status' greater than one & then printing out the jobs for those clients. It does also print the successful jobs for those clients, but that then allows you to see if that particular job_id was successfully re-run.

bperror -backstat -U| awk '($1 > 1) {print $0}'|cut -c8-20|grep -v CLIENT|sort -u > /app/site/scripts/failed_clients
if [ ! -s /app/site/scripts/failed_clients ]
then
  echo "No clients have had any failed jobs in the last 24 hours"
  rm /app/site/scripts/failed_clients
  exit
fi
echo "The following clients have had one or more failed jobs in the last 24 hours"
echo "***************************************************************************"
echo
cat /app/site/scripts/failed_clients|
while read CLIENT
do
  echo
  echo "JOBS RUN FOR CLIENT $CLIENT"
  echo "*********************************"
  bperror -backstat -client $CLIENT| cut -d " " -f6 | sort -u > /app/site/scripts/failed_jobid
  cat /app/site/scripts/failed_jobid|
        while read JOB_ID
        do
                echo
                echo "JOB_ID $JOB_ID"
                bperror -backstat -U -jobid $JOB_ID
        done
done
rm /app/site/scripts/failed_clients
rm /app/site/scripts/failed_jobid

keendean
Level 2
Thanks for the replies! grep-v works a treat, as I'm using Windows, installed grep and I'm away, needs a little work, but a step in the right direction :)

bperror -backstat -hoursago 24 | grep -v "EXIT STATUS 0" |grep -v "EXIT STATUS 1" |grep "CLIENT" |grep "EXIT STATUS" >c:\reports\report.txt

J_H_Is_gone
Level 6

/usr/openv/netbackup/bin/admincmd/bperror -U -backstat -hoursago $h -by_statcode

> /opt/openv/scripts/temp/bksum.txt


where $h is a parameter 24 for daily and 64 for weekends.