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

Long running or Hung jobs script

Hi All,

We have 5 netbackup master server and more than 6000 clients configured in it. I am looking for a UNIX sccript that can identify the long running , hung jobs or jobs with very less throughput. Its very difficult to manually find the long running/hung jobs in all the master server. We are planning to automate through script. If any one is using any such scripts in their Backup environment please share. Thanks in ADVANCE.....
1 Solution

Accepted Solutions
Highlighted
Accepted Solution!

We look for jobs running for

We look for jobs running for more then 24 hours:
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
It is just a question of finding the collumn in bpdbjobs which contain the write speed and compare it with your treshold. I hope you can use that.

BR, Jacob

View solution in original post

3 Replies
Highlighted
Accepted Solution!

We look for jobs running for

We look for jobs running for more then 24 hours:
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
It is just a question of finding the collumn in bpdbjobs which contain the write speed and compare it with your treshold. I hope you can use that.

BR, Jacob

View solution in original post

Highlighted

Hi Jacob, Thanks for the

Hi Jacob,

Thanks for the quick response,
Your script really worked.... Smiley Happy

I have added few more things based on the requirement and it really worked..!!!!!

In order to find the writing speed I have added column no. 35 and able to get the KB/Sec which I was looking for.


Thanks a lot once again.....
Highlighted
Moved:

Re: We look for jobs running for