cancel
Showing results for 
Search instead for 
Did you mean: 

Find Your NBU Client Patch Levels

AlanTLR
Level 5

        One of the challenges I face as an administrator is coordinating upgrades (especially minor upgrades) to hosts that I don't own.  Somehow, I have to communicate that the NetBackup level isn't up to date.  I can easily find out what level the client is by running a 'bpgetconfig', but I'm all about automation and ownership.  I think that an admin should own his machine and I don't want to micromanage.  So I can create a simple script that I can use as the basis for an automated notification about a hosts' NetBackup level.

        The script below is a quick and dirty one I wrote a long time ago that gathers all the client versions, along with the Operating Systems (as entered into the database).  Using this information, I can apply them against either a database or a flat file that maps the hostname and/or OS type with the owner's email and send a notification.

 
#!/bin/ksh

if [ $# -lt 1 ]; then
  for i in `bppllist -l -allpolicies | grep CLIENT | awk '{print $2}' | sort -u`
  do
    printf "$i: "
    bpgetconfig -s $i -A -L | egrep "Patch|Release" |awk '{printf "%s ",$4,$5}'
    printf "\n"
  done
else
    printf "$1: "
    bpgetconfig -s $1 -A -L | egrep "Patch|Release" |awk '{printf "%s ",$4,$5}'
    printf "\n"
fi

        As I said before, it's quick and dirty, but it will give output of the servers and their NBU versions that you can use in either a report or just for notifications.  It does take some time, but give it a try.  You may want to look at the output of bpgetconfig and possibly select other columns you may want to display, besides $4 and $5.

        Sample output below:

 
/usr/local/bin $ sudo ./nbu-os-patch.ksh
host1: Windows2000 6.5
host2: SunOS 6.5.5
host3: Linux 7.1
host4: Linux 7.1
host5: SunOS 6.5.5
host6: cannot connect on socket

 

Try and enjoy!