cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

looking for script long running backup

Hi Folks,

 

I am looking for script for long running backup....I m running 6.5.5 veritas netbackup on master and media server..i have tried to short by using /usr/openv//netbackup/bin/admincmd/bpdbjobs but i could not get elapsed time...its showing unformat view......Any one having idea?

 

Thanks,

Susi.S

3 Replies
Highlighted

Can you give an example of what you mean?

have tried ... using /usr/openv//netbackup/bin/admincmd/bpdbjobs but i could not get elapsed time...its showing unformat view.....

What do you mean by "unformat view"?

 

Running this for one of my latest jobs & cutting out field 10 (elapsed time):

bpdbjobs -most_columns -jobid 1249241 | awk -F, '{print $10}'

gives:

0000003224

which is 3224 seconds or 53 minutes and 44 seconds.

Highlighted

  ALARM_TRESHOLD=84000 RUNTIM

 

ALARM_TRESHOLD=84000
RUNTIME=0
bpdbjobs -most_columns | awk -F "," ' $3 ~ /^1$/ { print } ' |  awk -F "," ' $2 ~ /^0$/ { print } '  | awk -F "," '{ print $1, $3, $6, $7, $10 }' | while read  PID STATE SCHEDULE CLIENT RUNTIME
do
 if [ RUNTIME -gt ALARM_TRESHOLD ]
  then
     echo "Job ${PID} ${CLIENT} ${SCHEDULE} runtime is ${RUNTIME}. It's exceeded runtime treshold of ${ALARM_TRESHOLD} "
   fi
done


 

I came through this script in the below thread, it works

https://www-secure.symantec.com/connect/forums/long-running-or-hung-jobs-script

 

Highlighted

Nice find.

I *love* little functional scripts like that.