cancel
Showing results for 
Search instead for 
Did you mean: 

Reporting via command line

moez
Level 2

Hi,

 

The "powers that be" have requested that every friday they require an excel report which looks like the following: 

 

For the Last 72 hours

<master server1> | <total jobs> | <failed jobs> | <total kb backed up>

<master server2> | <total jobs> | <failed jobs> | <total kb backed up>

.... you get the idea..

 

I am currently getting my data from NOM, but this requires quite a bit of manual work getting it into excel.

 

I am looking at hopefuly scrapping my requirement to use NOM for the data and automating this with a vbscript. I can't for the life of me find the command or combination of commands to get all of the above info.

With BPERROR i can extract enough data to be able to fill in the first 3 fields but not the <kb backed up>.

BPDBJOBS gives KB Written but this is not useful to me as it doesn't allow me to specify the last 72 hours of job history, only what ever is listed in the activity monitor at the time the command is run.

 

Does anyone know a command or combination of commands that will give me the KB backed for each job or total KB backed up in the last 72hours or any other time i specify? It's not important how the output of the command looks, as long as the data is in there i'll get the script to extract it.

 

Help or advice will be much appreciated.

 

 

4 REPLIES 4

Darren_Dunham
Level 6

You get the start time in bpdbjobs.  Have your VB script throw away any jobs older than 72 hours, then sum the rest.

 

-- 

Darren

moez
Level 2

Thanks for your response Darren,

 

I have already looked in to the possibility of using bpdbjobs to get all the required data. Due to having several admins in the environment whos work relates to backup systems I can not completely rely on the output of bpdbjobs as all it takes is for one of those admins to delete a few jobs here and there in the activity monitor for my numbers to be out.

 

Since my first post I have made some progress while looking at using a combination of:

1. bperror -U -all -backstat -hoursago 72

This command will list "all" the jobs run in the last 72 hours and allow my script to count the failed/successful jobs.

2. bpimagelist -A -hoursago 72

This will allow my script to gather the kilobytes written for each image in the last 72 hours.

 

The script is tallying up the jobs correctly and all is looking promising except for one issue I have encountered. The BPERROR command is not returning a list of all the jobs as expected. I went into the NB Console and ran REPORTS -> STATUS OF BACKUPS, this report gave me a number almost twice as large as what BPERROR was giving me. In the STATUS OF BACKUPS report I noticed nearly half the jobs in there had a description of "*NULL*" rather than descriptions like "Operation was successful" or "Resource request failed" etc.

 

It appears these jobs with a *NULL* description are not being reported by BPERROR even though they are jobs that have actually ran and succeeded.

Does anyone know why this is? or how to get around it?

I'm so close to having this fully automated except for this one hiccup.

Help or advice is very much appreciated.

 

 

J_H_Is_gone
Level 6

http://support.veritas.com/docs/247902

 

try this doc.  it is how to run the reports in the GUI at cli.

now it is only for up to 5.1  ( can't find one for the new reports in 6.5)

 

but some of this might help

like the backup status or client backups.

 

Karthikeyan_Sun
Level 6
Thanks Hinchliffe Its very good doc with all kind of reports ! :)