issmag
11 years agoLevel 5
Job Queue Log
hello,
please, where can i find the job queue logs ??
is there a specific directory for that ? i need to monitor the job queue during the week end.
thanks in advance for your help.
Master server : Windows 2008 R2.
Netbackup : Entreprise Edition 7.5.0.6
Hi issmag,
You could save this script as something like:
C:\NBU-SCRIPTS\mon-job-counts\mon-job-counts.bat
...and schedule a task to run it every 5 or 10 or so minutes.
Then after the weekend, collect the "mon-job-counts.csv" file, and open in Excel and you should be able to easily graph the numbers.
HTH
@echo off setlocal enabledelayedexpansion set z_path=%~dp0 set z_name=%~n0 set z_file_csv=!z_path!!z_name!.csv set z_file_log=!z_path!!z_name!.log set z_file_sum=!z_path!!z_name!.sum set z_file_tmp=!z_path!!z_name!.tmp if exist "!z_file_sum!" del "!z_file_sum!" if exist "!z_file_tmp!" del "!z_file_tmp!" call :log "" call :log "" call :log "***************************************" call :log "Script started..." set z_nbu_path=C:\Program Files\Veritas\NetBackup set z_cli_bpdbjobs=!z_nbu_path!\bin\admincmd\bpdbjobs.exe if not exist "!z_cli_bpdbjobs!" ( call :log "Unable to locate `!z_cli_bpdbjobs!`, aborting..." goto :eof ) call :log "" call :log "Getting current date time..." set z_date=!date! set z_time=!time:~0,8! if "!z_date:~3,1!"==" " ( set z_date_dd=!z_date:~4,2! set z_date_mm=!z_date:~7,2! set z_date_yyyy=!z_date:~10,4! ) else ( set z_date_dd=!z_date:~0,2! set z_date_mm=!z_date:~3,2! set z_date_yyyy=!z_date:~6,4! ) set z_date_yyyy_mm_dd=!z_date_yyyy!/!z_date_mm!/!z_date_dd! call :log "...date in yyyy/mm/dd is `!z_date_yyyy_mm_dd!`..." call :log "Done..." call :log "" call :log "Collecting job summary..." "!z_cli_bpdbjobs!" -summary >"!z_file_sum!" set z_sts=!errorlevel! if not "!z_sts!"=="0" ( call :log "...attempt to collect job summary failed, status `!z_sts!`, aborting..." goto :end ) call :log "Done..." call :log "" call :log "Processing job summary..." for /f "tokens=1,2,3,4,5,6,7,8,9,10,11,12" %%a in ('type "!z_file_sum!"') do ( if /i "%%a %%b"=="master server" ( if not exist "!z_file_csv!" ( set z_header=Server,Date Time,Queued,Requeued,Active,Success,PartSucc,Failed,Incomp,Susp,Waiting,Total (echo !z_header!)>>"!z_file_csv!" ) ) else ( set z_csv=%%a,!z_date_yyyy_mm_dd! !z_time!,%%b,%%c,%%d,%%e,%%f,%%g,%%h,%%i,%%j,%%k (echo !z_csv!)>>"!z_file_csv!" ) ) call :log "Done..." :end call :log "" call :log "Script completed..." REM echo+ REM pause exit /b :log (echo !date! !time:~0,8! %~1) (echo !date! !time:~0,8! %~1)>>"!z_file_log!" goto :eof