Forum Discussion

noazara's avatar
noazara
Level 6
12 years ago
Solved

we have 1500 clients in our backup rotation

Hi Folks,

Please provide me the scripts that I can use in my environment for backup jobs/clients  which are running more than 24 hours.

 

Please provide the detailed steps.I meean how to create the script file and how to run that.

 

NBU 7.1

LINUX(tikanga)

 

  • The shebang expiression added, this script is written for Korn shell not Bash. Path to bpdbjobs is now full

    But do take a look at my previos post that contain a link to a perl script that do the same.The script below is one I wrote and then replaved with a perl version. 

    #!/usr/bin/ksh
    ALARM_TRESHOLD=84000
    RUNTIME=0
    /usr/openv/netbackup/bin/admincmd/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

24 Replies