07-25-2012 06:51 PM
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
07-26-2012 01:06 AM
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.
07-26-2012 02:52 AM
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
07-26-2012 02:56 AM
I *love* little functional scripts like that.