Forum Discussion

shashi0621's avatar
shashi0621
Level 5
9 years ago

netbackup daily health check script

windows server : 2008

NBU : 7.6

Hi ALL,

I am using below script to have my daily health check.

SCRIPT:

@ECHO OFF

bperror  -problems | findstr /c:"ERR - failure reading file: System State:"

bperror  -problems | findstr /c:"WRN - can't open object: System State:"

bperror  -problems | findstr /c:"WRN - can't open object: Shadow Copy Components:"

bperror  -problems | findstr /c:"bphdb exit status = 1:"

OUTPUT of script:

1465952858 1 4 16 master1 3100709 3100541 0 client1  bpb

rm from client client1 :ERR - failure reading file: System Sta

te:\System Files\System Files (WIN32 -536805665: Unknown error)

1465953303 1 4 16 master1 3100733 3100540 0 client2  bpb

rm from client  client2: ERR - failure reading file: System Sta

te:\_SharedHardlinkData_\8c01b916.10000.3d75 (WIN32 -536805834: Unknown error)

1465953763 1 4 16 master1 3100714 3100536 0 client3 bpbrm from clien

t client3 : ERR - failure reading file: System State:\_SharedHardlinkData_\9

0a20029.10000.69dd (WIN32 -536805834: Unknown error)

1465954978 1 4 16 master1 3101144 3101142 0 client4 bpb

rm from client client4 : ERR - failure reading file: System Sta

te:\System Files\System Files (WIN32 -536805665: Unknown error)

1465955385 1 4 16 master1 3101125 3101124 0 client5  bpb

rm from client client5  : ERR - failure reading file: System Sta

te:\System Files\System Files (WIN32 -536805665: Unknown error)

1465933002 1 4 8 master1 3099962 3099885 0 client6  bpbrm from clien

t client5: WRN - can't open object: Shadow Copy Components:\System Service

\Windows Management Instrumentation\WMI (BEDS 0xE000FED1: A failure occurred que

rying the Writer status.)

 

 

 

I need to have only the client name in the script.What changes I have to made in the script.?

  • In powershell...

     

    bperror  -problems | findstr /c:"WRN - can't open"  | % { $_.Split(" ") | select -first 13 | select -last 1}  | Sort | Get-Unique

     

     

    not the prettiest or most accurate.. but gives you a starting point.

4 Replies

  • We run this and that works pretty well:

    bperror -problems -U  -s ERROR+

  • Used to do stuff like that. Nowadays we use OpsCenter.  NOC and Management likes the drill-down feature.

  • thanks guys..Actually I need to have only the client name in the script.What changes I have to made in the script.?

  • In powershell...

     

    bperror  -problems | findstr /c:"WRN - can't open"  | % { $_.Split(" ") | select -first 13 | select -last 1}  | Sort | Get-Unique

     

     

    not the prettiest or most accurate.. but gives you a starting point.