cancel
Showing results for 
Search instead for 
Did you mean: 

Extract Jobs from the Activity Jobs

AMohamed
Level 2

Hi all,

I'm trying to extract the jobs for a given day, so I can tell the number of jobs based on the status (0=Succeeded, >1=Failed, None=Runing)

To do so, I copy the jobs for a day, and past them into an Excel sheet. And with some basic filters, I got the results.

However, for some consoles with thousands of jobs, this method dosen't seem to be working. I can't copy such a big number of jobs.

My question is, is there any way (maybe a command line) I can tell the number of succeeded jobs, failed ones, and those runing for a given day?

Thank you so much.

Regards.

5 REPLIES 5

jnardello
Moderator
Moderator
   VIP    Certified

Seems like some variety of bperror would give you the best historical records - if you are going to query against jobs still in the Activity Monitor you could get away with bpdbjobs but that doesn't let you specify a date (you'd have to grep for what you want).

i.e. /usr/openv/netbackup/bin/admincmd/bperror -d 09/14/2019 -e 09/14/2019 -U -backstat |grep -v SLP_Internal

 

Nicolai
Moderator
Moderator
Partner    VIP   

bpdbjobs is the command you are looking for. 

https://www.veritas.com/content/support/en_US/doc/123533878-127136857-0/v123536850-127136857

the qualifyer -all_columns or -most_columns is a good place to start. You may have to filter/transform text from commandline before importing.

sdo
Moderator
Moderator
Partner    VIP    Certified

I agree with @Nicolai  that bpdbjobs command is the place to start.  However, sometimes the -all_columns file can be a bit tricky for newbies to process scriptomatically, as it contains two variable sized embedded self expanding lists.  So it might be best is to start with -most_columns file, which is highly structured and very useful.  It won't take too much code to filter by datetime, i.e. by session, e.g. 16-Sep-2019 16:00 to 17-Sep-2019 16:00 to get Monday's backup "run window / session", because in your script you just need to be able to convert dates to ctimes, and ctimes to dates.

Nicolai
Moderator
Moderator
Partner    VIP   

Completely agree with @sdo 

bpdbjobs is not the easiest command to master.

Alternative is to deploy OpsCenter (part of the NBU package), where you can define own reports or pick and choose from the predefined reports.

AMohamed
Level 2

Hello,

Thank you all for your responses. I'll give those a try, and i'll get back to you.