cancel
Showing results for 
Search instead for 
Did you mean: 

bpdbjobs - Full error code description

Schwarzkopf
Level 5
Is there any way in command line to show full error code to every job in the activity monitor ?
3 REPLIES 3

Omar_Villa
Level 6
Employee
bperror -S <error code> -r

Stumpr2
Level 6

I am NOT the author.

I found this on the internet but it has some good ideas and I modified it to suit my needs.

 

 

#!/bin/kshPATH=$PATH:/usr/openv/netbackup/bin/admincmd:/usr/openv/localOUTFILE=/var/tmp/`basename $0`.$$.outMAILADDR="Netbackup.Reports"cols=92hours=24if [ -n "$1" ] then if [ $1 -gt 0 ] then hours=$1 else echo "Usage: `basename $0` [hours]" exit 1 fifiecho "## Problem Summary..." >$OUTFILEbperror -columns $cols -U -backstat -by_statcode -hoursago $hours | \ awk 'BEGIN {switch=0} {if ( $1>0 && $1~/^[0-9][0-9]*$/ ) {switch=1} if ( switch==1 ) { if ( $1~/^[0-9][0-9]*$/ ) {print} else { count=0 while ( ++count <= NF ) { print "\t\t" $count } } } }' >>$OUTFILEsvrlist=`bperror -columns $cols -U -backstat -by_statcode -hoursago $hours | \ awk 'BEGIN {switch=0} {if ( $1>0 && $1~/^[0-9][0-9]*$/ ) {switch=1} if ( switch==1 && $1!~/^[0-9][0-9]*$/) { count=0 while ( ++count <= NF ) {print $count}}}' | sort -u`echo "\n## Problem Detail by server..." >>$OUTFILEfor each in $svrlistdo echo "\n## Client: $each" >>$OUTFILE bperror -client $each -columns $cols -U -problems -hoursago $hours >>$OUTFILEdonecp $OUTFILE /usr/openv/netbackup/logs/scripts/problems.rpt.lastrunif [ `egrep -vc "^ *$|^#" $OUTFILE` -gt 0 ] ; then for recip in $MAILADDR ; do mailx -s "NB Rpt: ${hours}hr Rpt:Problems Report" $MAILADDR <$OUTFILE donefi[ -f $OUTFILE ] && rm -f $OUTFILEexit

 

Schwarzkopf
Level 5
Thanks a lot - I'll test this script tomorrow.