Forum Discussion

AMohamed's avatar
AMohamed
Level 2
6 years ago

Extract Jobs from the Activity Jobs

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.

  • 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's avatar
      Nicolai
      Moderator

      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.

  • 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

     

  • Hello,

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